parent
85412b7475
commit
877799092a
Binary file not shown.
Binary file not shown.
@ -0,0 +1,89 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
MY_P=aws-cli-${PV}
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="
|
||||
https://github.com/aws/aws-cli/
|
||||
https://pypi.org/project/awscli/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/aws/aws-cli/archive/${PV}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
|
||||
# botocore is x.(y+2).z
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 2)).$(ver_cut 3-)"
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
|
||||
dev-python/colorama[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.10.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
!app-admin/awscli-bin
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pytest-forked[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# do not rely on bundled deps in botocore (sic!)
|
||||
find -name '*.py' -exec sed -i \
|
||||
-e 's:from botocore[.]vendored import:import:' \
|
||||
-e 's:from botocore[.]vendored[.]:from :' \
|
||||
{} + || die
|
||||
# strip overzealous upper bounds on requirements
|
||||
sed -i -e 's:,<[0-9.]*::' -e 's:==:>=:' setup.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local serial_tests=(
|
||||
tests/functional/ecs/test_execute_command.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_{fails,success}
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_with_new_version_plugin_success
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking_windows
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestNuGetLogin::test_login_nuget_sources_listed_with_backtracking
|
||||
tests/unit/customizations/ecs/test_executecommand_startsession.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/unit/customizations/test_sessionmanager.py
|
||||
tests/unit/test_compat.py::TestIgnoreUserSignals
|
||||
tests/unit/test_help.py
|
||||
tests/unit/test_utils.py::TestIgnoreCtrlC::test_ctrl_c_is_ignored
|
||||
)
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
EPYTEST_XDIST= epytest "${serial_tests[@]}"
|
||||
|
||||
local EPYTEST_DESELECT=( "${serial_tests[@]}" )
|
||||
# integration tests require AWS credentials and Internet access
|
||||
epytest tests/{functional,unit}
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp bin/aws_bash_completer aws
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins bin/aws_zsh_completer.sh _aws
|
||||
|
||||
distutils-r1_python_install_all
|
||||
|
||||
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
MY_P=aws-cli-${PV}
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="
|
||||
https://github.com/aws/aws-cli/
|
||||
https://pypi.org/project/awscli/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/aws/aws-cli/archive/${PV}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
|
||||
# botocore is x.(y+2).z
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 2)).$(ver_cut 3-)"
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
|
||||
dev-python/colorama[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.10.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
!app-admin/awscli-bin
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pytest-forked[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# do not rely on bundled deps in botocore (sic!)
|
||||
find -name '*.py' -exec sed -i \
|
||||
-e 's:from botocore[.]vendored import:import:' \
|
||||
-e 's:from botocore[.]vendored[.]:from :' \
|
||||
{} + || die
|
||||
# strip overzealous upper bounds on requirements
|
||||
sed -i -e 's:,<[0-9.]*::' -e 's:==:>=:' setup.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local serial_tests=(
|
||||
tests/functional/ecs/test_execute_command.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_{fails,success}
|
||||
tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_with_new_version_plugin_success
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking_windows
|
||||
tests/unit/customizations/codeartifact/test_adapter_login.py::TestNuGetLogin::test_login_nuget_sources_listed_with_backtracking
|
||||
tests/unit/customizations/ecs/test_executecommand_startsession.py::TestExecuteCommand::test_execute_command_success
|
||||
tests/unit/customizations/test_sessionmanager.py
|
||||
tests/unit/test_compat.py::TestIgnoreUserSignals
|
||||
tests/unit/test_help.py
|
||||
tests/unit/test_utils.py::TestIgnoreCtrlC::test_ctrl_c_is_ignored
|
||||
)
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
EPYTEST_XDIST= epytest "${serial_tests[@]}"
|
||||
|
||||
local EPYTEST_DESELECT=( "${serial_tests[@]}" )
|
||||
# integration tests require AWS credentials and Internet access
|
||||
epytest tests/{functional,unit}
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp bin/aws_bash_completer aws
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins bin/aws_zsh_completer.sh _aws
|
||||
|
||||
distutils-r1_python_install_all
|
||||
|
||||
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||
}
|
Binary file not shown.
@ -1,2 +1,4 @@
|
||||
DIST clzip-1.13.tar.gz 123369 BLAKE2B 3d6b205aa7c60e04baddcf826d3da709f58b5796c95ac348a77e9d997ab68dda750c65b78ba50656a6c986146bc87da8b3503c86a3e0d568c9e6b1550aad5997 SHA512 7b9943f3e971cb9cabadb3b0832c23984c9329cb48bbfa6fd0780146b6b3d612386b6ca8c6e688c05470e3e3474b688dfb3228ba6aff2093ea1d781eba5f2791
|
||||
DIST clzip-1.13.tar.gz.sig 72 BLAKE2B 5ad95fa29fa23679a304fb53d0a415640985d9fbc67bd47ab83991694be406a956da813329a37844c4581911fe253a027ecaf3621f5c31c28b0ac6423b89f969 SHA512 80d24b980ee78f6dc0d61412b4838f59c37f97aba65856b2622d2cbaf82650abc37c6dfc914326cfe3c534399a7023ff11a0f3865b3cdc8f7d9cfe278b5c2395
|
||||
DIST clzip-1.14.tar.gz 125412 BLAKE2B e28dc890ef233871f8b38e1d4c306032131b714a560e7ebfe756ce3bddb84c9fd0ac3a04e789884951b74760e248503ec2f3555eccf568244c3b3efeae80cb4a SHA512 54047979cc4477e8edba648074ff64b512627aba4da693052052e96faf2c41386db986d73a477aab8ebaef974d753e6b42fa53a0fd293b047efcf60b1fc7483d
|
||||
DIST clzip-1.14.tar.gz.sig 72 BLAKE2B f397d586ae3c052bdda80229993746c085196bd01e7e4eddd843ed053b8449109c774199c74c7cd97f1a19623d57965188cf3d3a046e581d9cfbae58f16723c8 SHA512 31e23c3deb63c2c09b71bc9b11d12337a629bed097905d37560f3b8cbcb4730355dc8effa050ec95c1e7e0e00eb4651fa891d9fabdf58df66563e38b3f8b6380
|
||||
|
@ -1,2 +1,4 @@
|
||||
DIST lunzip-1.13.tar.gz 66541 BLAKE2B 45b6a4ffaac6d9b8ddeeebe5e33609bf4e671ad7370570035bacf41ee8ad35f49e14f495dfba650de284fedca1a63ebafe7f67c18083b4add94caaf7709d8e2b SHA512 67f950883b7062d37601bc16d7d64c07f6c580afbf3c0f61394dd6fb5d41c27214484b1dea7aabd41db06d18162b95b5734674646c4fcc833268cabe8cba91bb
|
||||
DIST lunzip-1.13.tar.gz.sig 72 BLAKE2B a0d852dbb5394c5fb3e287cf4111290e0c603414de5a00a2d6173821df2410e4d826554ba4e04b5e9b7df0fa247cd95335a1a227b7cf38d4c5a7f3cc436be6ef SHA512 b71a73e7ad3a25140343db92c0ccf6311d0a30c71675e01a36da4735d0e0523d12d32b6472409359345ad6c9e550dccd399442d98fde44593af42f516119b3fb
|
||||
DIST lunzip-1.14.tar.gz 69284 BLAKE2B 8ef63a5cfd0cf839889785845ec84b23451cb69b1e09c84526e000b82b73aaaa01b99407e87bde416ca2ab638d9f9688fcb37f77fd53e2a8e0875646a54d304c SHA512 2aa530c4ef7ebcfa345c8ac8701712e7f973ee4a92d34c33a03dd02a31d76507c919da373b64bc6b49b7868af8e4444d4b12bd71b8760e9b333c2a013ad95da1
|
||||
DIST lunzip-1.14.tar.gz.sig 72 BLAKE2B ab2ba6c265f197c322884898ae8ff5c8679ab8a1d2f71a2dfedcce9011e16fb723fd592b0edc3f48d540ad8d2578b799f28f9d609a7e26379e39e0cb7f908cc3 SHA512 38806848f904fb3700c908166a1ad2d601409fa13f1b0dc69372766b41a6f37ae0c5792964b8aae494320d47e603dc79f36b3fa7361ccf84b89835c14a6b7b11
|
||||
|
@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/antoniodiazdiaz.asc
|
||||
inherit toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="Decompressor for the lzip format, written in C"
|
||||
HOMEPAGE="https://www.nongnu.org/lzip/lunzip.html"
|
||||
SRC_URI="https://download.savannah.gnu.org/releases/lzip/lunzip/${P}.tar.gz"
|
||||
SRC_URI+=" verify-sig? ( https://download.savannah.gnu.org/releases/lzip/${PN}/${P/_/-}.tar.gz.sig )"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-antoniodiazdiaz )"
|
||||
|
||||
src_configure() {
|
||||
# not autotools-based
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}"/usr
|
||||
CC="$(tc-getCC)"
|
||||
CPPFLAGS="${CPPFLAGS}"
|
||||
CFLAGS="${CFLAGS}"
|
||||
LDFLAGS="${LDFLAGS}"
|
||||
)
|
||||
|
||||
./configure "${myconf[@]}" || die
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST xarchiver-0.5.4.21.tar.gz 1132417 BLAKE2B 38a426d4a7ac53a471aba7dec8d1da64e6bb4bab3d7efb5e8e1326dcbdfd1e98e66dab43d50cc847fb37ee754d8996233c23503f2a57776ed8e4b96da425462e SHA512 7befe5427636aaa27b669c503832927731cc9da27c698f3e2ea06d8b4579d95096613a41b54919eb3f9314791d32e73b6aecdb5e6af7b10dd154861377f2f5c4
|
||||
DIST xarchiver-0.5.4.22.tar.gz 1125943 BLAKE2B 545061ef8dda7b7d0bdf6025536310705548e48d7f60ba4484900882fb97b0c56f3faac97bb64516f6a919d04b8de082175c020951676ee4b4f59ebd1ca93a74 SHA512 e5c773fbe3d29d998e6aa10eca6cfda5a78defe8d4759d95c894b06f00c22900c8c5cca2ab39066904d19ec1c73fd7326ac16c09ca50c4520621e326f3717887
|
||||
|
@ -1,61 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit xdg-utils
|
||||
|
||||
DESCRIPTION="A GTK+ archive manager that can be used with Thunar"
|
||||
HOMEPAGE="https://github.com/ib/xarchiver/"
|
||||
SRC_URI="
|
||||
https://github.com/ib/xarchiver/archive/${PV}.tar.gz -> ${P}.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc"
|
||||
|
||||
DEPEND="
|
||||
>=dev-libs/glib-2:=
|
||||
x11-libs/gtk+:3=
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
dev-util/intltool
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
app-text/docbook-xml-dtd
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
)
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
$(use_enable doc)
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
xdg_icon_cache_update
|
||||
|
||||
elog "You need external programs for some formats, including:"
|
||||
elog "7zip - app-arch/p7zip"
|
||||
elog "arj - app-arch/arj"
|
||||
elog "lha - app-arch/lha"
|
||||
elog "lzop - app-arch/lzop"
|
||||
elog "rar - app-arch/unrar app-arch/rar"
|
||||
elog "zip - app-arch/unzip app-arch/zip"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
xdg_icon_cache_update
|
||||
}
|
@ -1,2 +1,6 @@
|
||||
DIST xz-5.4.5.tar.gz 2884510 BLAKE2B 647c8227080a7f37e3321e778d7f52ccb9da3810f2be81b2d2b46001605b22cef6e724f9b3facfada26a12b24401c9a11449d6066443849b37b28e0eaa199315 SHA512 91f8f548c915de0ed79cee13ce0336b51c1cebf2eb142fa1efecfd07771c662c99cad3730540fcb712057ab274130e13b87960f6b4c62f0bd9477f27a303fb2b
|
||||
DIST xz-5.4.5.tar.gz.sig 566 BLAKE2B c6ec64f92ecb30395e6d580be5d0aad1ee007585245ed42e7b05f1ea3a8cd8bf4317e8dc964c65417daa0a04e8f523c6ba8ae61a7f5b2ff3dc17dd53c7593ce2 SHA512 4f2c779d3c14bacd0451cfd68846201a48931128994c4119fcbf4f0dd7331710c32098039d38561de29327d543d67174fddbb6a83cb2fcfda9b3153cab092d4d
|
||||
DIST xz-5.4.6.tar.gz 2889306 BLAKE2B f0bbd33ea7cd64d475c3501f6e76080c8c0080e377f23462f5f76459935f4e621538ddaa8452d2feaed278d62a596e38ed2aca18ed9e76512c4ec77fa2f4cc5f SHA512 b08a61d8d478d3b4675cb1ddacdbbd98dc6941a55bcdd81a28679e54e9367d3a595fa123ac97874a17da571c1b712e2a3e901c2737099a9d268616a1ba3de497
|
||||
DIST xz-5.4.6.tar.gz.sig 566 BLAKE2B 808f1b5e2a17729f36a05ba88a9c00210cda2afa02923e6f289d13dc2a48f7674cafec6e25660e142d67f01dd941c7390cee2757b054df3a3193dde0791363a1 SHA512 d5e32b944e7492a32c40f675d918796e077f63490a23c6fce5c4d6d1eebc443f129d27a2e888913c5a36c3ffdac75b9c96c1749402283445e0ba9ff72b965741
|
||||
DIST xz-5.5.1alpha.tar.gz 3020057 BLAKE2B 1a2106b9e43cb06ddde0f8a9fc86754fe2d335367035ec3349d34da5511496af0d1270cd42ce2c1c3324af74092c0eea3663746ec98195d0db449d5754253c0f SHA512 dbd164353012c9ff5ee3e776709704fcbc6e9f644fff52c75846653ca4a26b6dce1a2a5fe1663c3fc8674f99aa67a1a806eeac44cb978246223688c8c105fcf1
|
||||
DIST xz-5.5.1alpha.tar.gz.sig 566 BLAKE2B 760946fd09eccd0a221d117cc1f5b656aba5bbbfa911d987fd93c54d9905a1e51dd8c24b6927cc97dda344f2efa774b556e6919bdf0b298fa6370ac8d3a56f76 SHA512 714f07b510a4a8ff0d533e6278cd25f8ed407b3c84b6172ce9d4e9fc2dfe8b0be9849eb008ee3b7ac900f34f85946336277a2700dc5133c6dcae144b8aba6dd7
|
||||
|
@ -0,0 +1,146 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Remember: we cannot leverage autotools in this ebuild in order
|
||||
# to avoid circular deps with autotools
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit flag-o-matic libtool multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
# Per tukaani.org, git.tukaani.org is a mirror of github and
|
||||
# may be behind.
|
||||
EGIT_REPO_URI="
|
||||
https://github.com/tukaani-project/xz
|
||||
https://git.tukaani.org/xz.git
|
||||
"
|
||||
inherit git-r3 autotools
|
||||
|
||||
# bug #272880 and bug #286068
|
||||
BDEPEND="sys-devel/gettext >=dev-build/libtool-2"
|
||||
else
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jiatan.asc
|
||||
inherit verify-sig
|
||||
|
||||
MY_P="${PN/-utils}-${PV/_}"
|
||||
SRC_URI="
|
||||
https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz
|
||||
mirror://sourceforge/lzmautils/${MY_P}.tar.gz
|
||||
https://tukaani.org/xz/${MY_P}.tar.gz
|
||||
verify-sig? (
|
||||
https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz.sig
|
||||
https://tukaani.org/xz/${MY_P}.tar.gz.sig
|
||||
)
|
||||
"
|
||||
|
||||
if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Utils for managing LZMA compressed files"
|
||||
HOMEPAGE="https://tukaani.org/xz/"
|
||||
|
||||
# See top-level COPYING file as it outlines the various pieces and their licenses.
|
||||
LICENSE="public-domain LGPL-2.1+ GPL-2+"
|
||||
SLOT="0"
|
||||
IUSE="doc +extra-filters pgo nls static-libs"
|
||||
|
||||
if [[ ${PV} != 9999 ]] ; then
|
||||
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-jiatan )"
|
||||
fi
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
eautopoint
|
||||
eautoreconf
|
||||
else
|
||||
# Allow building shared libs on Solaris/x64
|
||||
elibtoolize
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myconf=(
|
||||
--enable-threads
|
||||
$(multilib_native_use_enable doc)
|
||||
$(use_enable nls)
|
||||
$(use_enable static-libs static)
|
||||
)
|
||||
|
||||
if ! multilib_is_native_abi ; then
|
||||
myconf+=(
|
||||
--disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts}
|
||||
)
|
||||
fi
|
||||
|
||||
if ! use extra-filters ; then
|
||||
myconf+=(
|
||||
# LZMA1 + LZMA2 for standard .lzma & .xz files
|
||||
--enable-encoders=lzma1,lzma2
|
||||
--enable-decoders=lzma1,lzma2
|
||||
|
||||
# those are used by default, depending on preset
|
||||
--enable-match-finders=hc3,hc4,bt4
|
||||
|
||||
# CRC64 is used by default, though some (old?) files use CRC32
|
||||
--enable-checks=crc32,crc64
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export gl_cv_posix_shell="${EPREFIX}"/bin/sh
|
||||
|
||||
# Undo Solaris-based defaults pointing to /usr/xpg5/bin
|
||||
myconf+=( --disable-path-for-script )
|
||||
fi
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# -fprofile-partial-training because upstream note the test suite isn't super comprehensive
|
||||
# See https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
|
||||
local pgo_generate_flags=$(usev pgo "-fprofile-update=atomic -fprofile-dir=${T}/${ABI}-pgo -fprofile-generate=${T}/${ABI}-pgo $(test-flags-CC -fprofile-partial-training)")
|
||||
local pgo_use_flags=$(usev pgo "-fprofile-use=${T}/${ABI}-pgo -fprofile-dir=${T}/${ABI}-pgo $(test-flags-CC -fprofile-partial-training)")
|
||||
|
||||
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}"
|
||||
|
||||
if use pgo ; then
|
||||
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" -k check
|
||||
|
||||
if tc-is-clang; then
|
||||
llvm-profdata merge "${T}"/${ABI}-pgo --output="${T}"/${ABI}-pgo/default.profdata || die
|
||||
fi
|
||||
|
||||
emake clean
|
||||
emake CFLAGS="${CFLAGS} ${pgo_use_flags}"
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
default
|
||||
|
||||
gen_usr_ldscript -a lzma
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
if use doc ; then
|
||||
rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Remember: we cannot leverage autotools in this ebuild in order
|
||||
# to avoid circular deps with autotools
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit flag-o-matic libtool multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
# Per tukaani.org, git.tukaani.org is a mirror of github and
|
||||
# may be behind.
|
||||
EGIT_REPO_URI="
|
||||
https://github.com/tukaani-project/xz
|
||||
https://git.tukaani.org/xz.git
|
||||
"
|
||||
inherit git-r3 autotools
|
||||
|
||||
# bug #272880 and bug #286068
|
||||
BDEPEND="sys-devel/gettext >=dev-build/libtool-2"
|
||||
else
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jiatan.asc
|
||||
inherit verify-sig
|
||||
|
||||
MY_P="${PN/-utils}-${PV/_}"
|
||||
SRC_URI="
|
||||
https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz
|
||||
mirror://sourceforge/lzmautils/${MY_P}.tar.gz
|
||||
https://tukaani.org/xz/${MY_P}.tar.gz
|
||||
verify-sig? (
|
||||
https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz.sig
|
||||
https://tukaani.org/xz/${MY_P}.tar.gz.sig
|
||||
)
|
||||
"
|
||||
|
||||
if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Utils for managing LZMA compressed files"
|
||||
HOMEPAGE="https://tukaani.org/xz/"
|
||||
|
||||
# See top-level COPYING file as it outlines the various pieces and their licenses.
|
||||
LICENSE="public-domain LGPL-2.1+ GPL-2+ doc? ( CC-BY-SA-4.0 )"
|
||||
SLOT="0"
|
||||
IUSE="doc +extra-filters pgo nls static-libs"
|
||||
|
||||
if [[ ${PV} != 9999 ]] ; then
|
||||
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-jiatan )"
|
||||
fi
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
eautopoint
|
||||
eautoreconf
|
||||
else
|
||||
# Allow building shared libs on Solaris/x64
|
||||
elibtoolize
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myconf=(
|
||||
--enable-threads
|
||||
$(multilib_native_use_enable doc)
|
||||
$(use_enable nls)
|
||||
$(use_enable static-libs static)
|
||||
)
|
||||
|
||||
if ! multilib_is_native_abi ; then
|
||||
myconf+=(
|
||||
--disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts}
|
||||
)
|
||||
fi
|
||||
|
||||
if ! use extra-filters ; then
|
||||
myconf+=(
|
||||
# LZMA1 + LZMA2 for standard .lzma & .xz files
|
||||
--enable-encoders=lzma1,lzma2
|
||||
--enable-decoders=lzma1,lzma2
|
||||
|
||||
# those are used by default, depending on preset
|
||||
--enable-match-finders=hc3,hc4,bt4
|
||||
|
||||
# CRC64 is used by default, though some (old?) files use CRC32
|
||||
--enable-checks=crc32,crc64
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export gl_cv_posix_shell="${EPREFIX}"/bin/sh
|
||||
|
||||
# Undo Solaris-based defaults pointing to /usr/xpg5/bin
|
||||
myconf+=( --disable-path-for-script )
|
||||
fi
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
# -fprofile-partial-training because upstream note the test suite isn't super comprehensive
|
||||
# See https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
|
||||
local pgo_generate_flags=$(usev pgo "-fprofile-update=atomic -fprofile-dir=${T}/${ABI}-pgo -fprofile-generate=${T}/${ABI}-pgo $(test-flags-CC -fprofile-partial-training)")
|
||||
local pgo_use_flags=$(usev pgo "-fprofile-use=${T}/${ABI}-pgo -fprofile-dir=${T}/${ABI}-pgo $(test-flags-CC -fprofile-partial-training)")
|
||||
|
||||
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}"
|
||||
|
||||
if use pgo ; then
|
||||
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" -k check
|
||||
|
||||
if tc-is-clang; then
|
||||
llvm-profdata merge "${T}"/${ABI}-pgo --output="${T}"/${ABI}-pgo/default.profdata || die
|
||||
fi
|
||||
|
||||
emake clean
|
||||
emake CFLAGS="${CFLAGS} ${pgo_use_flags}"
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
default
|
||||
|
||||
gen_usr_ldscript -a lzma
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
if use doc ; then
|
||||
rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
|
||||
}
|
Binary file not shown.
@ -1,303 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit fcaps toolchain-funcs flag-o-matic gnuconfig
|
||||
|
||||
MY_P="${P/_alpha/a}"
|
||||
|
||||
DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord"
|
||||
HOMEPAGE="https://sourceforge.net/projects/cdrtools/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/$([[ -z ${PV/*_alpha*} ]] && echo 'alpha')/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1 CDDL-Schily"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="acl caps nls unicode selinux"
|
||||
|
||||
BDEPEND="
|
||||
nls? ( >=sys-devel/gettext-0.18.1.1 )
|
||||
x11-misc/makedepend
|
||||
"
|
||||
RDEPEND="
|
||||
acl? ( virtual/acl )
|
||||
caps? ( sys-libs/libcap )
|
||||
nls? ( virtual/libintl )
|
||||
selinux? ( sec-policy/selinux-cdrecord )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
S=${WORKDIR}/${P/_alpha[0-9][0-9]}
|
||||
|
||||
FILECAPS=(
|
||||
cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep usr/bin/cdrecord --
|
||||
cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav --
|
||||
cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd
|
||||
)
|
||||
|
||||
cdrtools_os() {
|
||||
local os="linux"
|
||||
[[ ${CHOST} == *-darwin* ]] && os="mac-os10"
|
||||
echo "${os}"
|
||||
}
|
||||
|
||||
symlink_build_rules() {
|
||||
local cputype="$1"
|
||||
pushd "${S}"/RULES > /dev/null || die
|
||||
ln -sf i586-linux-cc.rul "${cputype}"-linux-cc.rul || die
|
||||
ln -sf i586-linux-clang.rul "${cputype}"-linux-clang.rul || die
|
||||
ln -sf i586-linux-clang32.rul "${cputype}"-linux-clang32.rul || die
|
||||
ln -sf i586-linux-clang64.rul "${cputype}"-linux-clang64.rul || die
|
||||
ln -sf i586-linux-gcc.rul "${cputype}"-linux-gcc.rul || die
|
||||
ln -sf i586-linux-gcc32.rul "${cputype}"-linux-gcc32.rul || die
|
||||
ln -sf i586-linux-gcc64.rul "${cputype}"-linux-gcc64.rul || die
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
gnuconfig_update
|
||||
|
||||
# Remove profiled make files.
|
||||
find -name '*_p.mk' -delete || die "delete *_p.mk"
|
||||
|
||||
# Adjusting hardcoded paths.
|
||||
sed -i -e "s|opt/schily|usr|" \
|
||||
$(find ./ -type f -name \*.[0-9ch] -exec grep -l 'opt/schily' '{}' '+') \
|
||||
|| die "sed opt/schily"
|
||||
|
||||
sed -i -e "s|\(^INSDIR=\t\tshare/doc/\)|\1${PF}/|" \
|
||||
$(find ./ -type f -exec grep -l '^INSDIR.\+doc' '{}' '+') \
|
||||
|| die "sed doc"
|
||||
|
||||
# Respect libdir.
|
||||
sed -i -e "s|\(^INSDIR=\t\t\)lib|\1$(get_libdir)|" \
|
||||
$(find ./ -type f -exec grep -l '^INSDIR.\+lib\(/siconv\)\?$' '{}' '+') \
|
||||
|| die "sed multilib"
|
||||
|
||||
# Do not install static libraries.
|
||||
sed -i -e "s|include\t\t.*rules.lib||" \
|
||||
$(find ./ -type f -exec grep -l '^include.\+rules\.lib' '{}' '+') \
|
||||
|| die "sed rules"
|
||||
|
||||
# Don't quote $(MAKE)
|
||||
sed -i -e 's|"$(MAKE)"|$(MAKE)|' \
|
||||
$(find ./RULES -type f -exec grep -l '"$(MAKE)"' '{}' '+') \
|
||||
|| die "sed RULES/"
|
||||
|
||||
# Enable verbose build.
|
||||
sed -i -e '/@echo.*==>.*;/s:@echo[^;]*;:&set -x;:' \
|
||||
RULES/*.rul RULES/rules.prg RULES/rules.inc \
|
||||
|| die "sed verbose rules"
|
||||
|
||||
# Respect CC/CXX variables.
|
||||
cd "${S}"/RULES || die
|
||||
local tcCC="$(tc-getCC)"
|
||||
local tcCXX="$(tc-getCXX)"
|
||||
|
||||
sed -i -e "/cc-config.sh/s|\$(C_ARCH:%64=%) \$(CCOM_DEF)|${tcCC} ${tcCC}|" \
|
||||
rules1.top || die "sed rules1.top"
|
||||
sed -i -e "/^CC_COM_DEF=/s|gcc|${tcCC}|" \
|
||||
-e "/^CC++_COM_DEF=/s|g++|${tcCXX}|" \
|
||||
-e "/COPTOPT=/s|-O||" \
|
||||
-e 's|$(GCCOPTOPT)||' \
|
||||
cc-gcc.rul || die "sed cc-gcc.rul"
|
||||
sed -i -e "s|^#\(CONFFLAGS +=\).*|\1\t-cc=${tcCC}|" \
|
||||
rules.cnf || die "sed rules.cnf"
|
||||
|
||||
# Add support for arm64
|
||||
symlink_build_rules aarch64_be
|
||||
|
||||
# fix RISC-V build err, bug 811375
|
||||
symlink_build_rules riscv
|
||||
symlink_build_rules riscv64
|
||||
|
||||
# Add support for loong
|
||||
symlink_build_rules loongarch64
|
||||
|
||||
# Schily make setup.
|
||||
cd "${S}"/DEFAULTS || die
|
||||
local os=$(cdrtools_os)
|
||||
|
||||
sed -i \
|
||||
-e "s|^\(DEFLINKMODE=\).*|\1\tdynamic|" \
|
||||
-e "s|^\(LINUX_INCL_PATH=\).*|\1|" \
|
||||
-e "s|^\(LDPATH=\).*|\1|" \
|
||||
-e "s|^\(RUNPATH=\).*|\1|" \
|
||||
-e "s|^\(INS_BASE=\).*|\1\t${ED}/usr|" \
|
||||
-e "s|^\(INS_RBASE=\).*|\1\t${ED}|" \
|
||||
-e "s|^\(DEFINSGRP=\).*|\1\t0|" \
|
||||
-e '/^DEFUMASK/s,002,022,g' \
|
||||
Defaults.${os} || die "sed Schily make setup"
|
||||
# re DEFUMASK above:
|
||||
# bug 486680: grsec TPE will block the exec if the directory is
|
||||
# group-writable. This is painful with cdrtools, because it makes a bunch of
|
||||
# group-writable directories during build. Change the umask on their
|
||||
# creation to prevent this.
|
||||
}
|
||||
|
||||
ac_cv_sizeof() {
|
||||
cat <<-EOF >"${T}"/test.c
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
int main () {
|
||||
static int test_array [1 - 2 * !((sizeof(TYPE)) == LEN)];
|
||||
test_array [0] = 0;
|
||||
return test_array [0];
|
||||
}
|
||||
EOF
|
||||
|
||||
local i=1
|
||||
while [[ ${i} -lt 20 ]] ; do
|
||||
if ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o /dev/null -DTYPE="$1" -DLEN=$i 2>/dev/null; then
|
||||
echo ${i}
|
||||
return 0
|
||||
fi
|
||||
: $(( i += 1 ))
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use acl || export ac_cv_header_sys_acl_h="no"
|
||||
use caps || export ac_cv_lib_cap_cap_get_proc="no"
|
||||
export ac_cv_header_pulse_pulseaudio_h="no"
|
||||
export ac_cv_header_alsa_asoundlib_h="no"
|
||||
export ac_cv_lib_asound_snd_pcm_open="no"
|
||||
|
||||
# skip obsolete configure script
|
||||
if tc-is-cross-compiler ; then
|
||||
# Cache known values for targets. #486680
|
||||
|
||||
tc-export CC
|
||||
local var val t types=(
|
||||
char "short int" int "long int" "long long"
|
||||
"unsigned char" "unsigned short int" "unsigned int"
|
||||
"unsigned long int" "unsigned long long"
|
||||
float double "long double" size_t ssize_t ptrdiff_t
|
||||
mode_t uid_t gid_t pid_t dev_t time_t wchar_t
|
||||
"char *" "unsigned char *"
|
||||
)
|
||||
for t in "${types[@]}" ; do
|
||||
var="ac_cv_sizeof_${t// /_}"
|
||||
var=${var//[*]/p}
|
||||
val=$(ac_cv_sizeof "${t}") || die "could not compute ${t}"
|
||||
export "${var}=${val}"
|
||||
einfo "Computing sizeof(${t}) as ${val}"
|
||||
done
|
||||
# We don't have these types.
|
||||
export ac_cv_sizeof___int64=0
|
||||
export ac_cv_sizeof_unsigned___int64=0
|
||||
export ac_cv_sizeof_major_t=${ac_cv_sizeof_dev_t}
|
||||
export ac_cv_sizeof_minor_t=${ac_cv_sizeof_dev_t}
|
||||
export ac_cv_sizeof_wchar=${ac_cv_sizeof_wchar_t}
|
||||
|
||||
export ac_cv_type_prototypes="yes"
|
||||
export ac_cv_func_mlock{,all}="yes"
|
||||
export ac_cv_func_{e,f,g}cvt=$(usex elibc_glibc)
|
||||
export ac_cv_func_dtoa_r="no"
|
||||
export ac_cv_func_sys_siglist{,_def}="no"
|
||||
export ac_cv_func_printf_{j,ll}="yes"
|
||||
export ac_cv_realloc_null="yes"
|
||||
export ac_cv_no_user_malloc="no"
|
||||
export ac_cv_var_timezone="yes"
|
||||
export ac_cv_var___progname{,_full}="yes"
|
||||
export ac_cv_fnmatch_igncase="yes"
|
||||
export ac_cv_file__dev_{fd_{0,1,2},null,std{err,in,out},tty,zero}="yes"
|
||||
export ac_cv_file__usr_src_linux_include="no"
|
||||
|
||||
case $(cdrtools_os) in
|
||||
linux)
|
||||
export ac_cv_func_bsd_{g,s}etpgrp="no"
|
||||
export ac_cv_hard_symlinks="yes"
|
||||
export ac_cv_link_nofollow="yes"
|
||||
export ac_cv_access_e_ok="no"
|
||||
|
||||
export ac_cv_dev_minor_noncontig="yes"
|
||||
case ${ac_cv_sizeof_long_int} in
|
||||
4) export ac_cv_dev_minor_bits="32";;
|
||||
8) export ac_cv_dev_minor_bits="44";;
|
||||
esac
|
||||
|
||||
cat <<-EOF >"${T}"/test.c
|
||||
struct {
|
||||
char start[6];
|
||||
unsigned char x1:4;
|
||||
unsigned char x2:4;
|
||||
char end[5];
|
||||
} a = {
|
||||
.start = {'S', 't', 'A', 'r', 'T', '_'},
|
||||
.x1 = 5,
|
||||
.x2 = 4,
|
||||
.end = {'_', 'e', 'N', 'd', 'X'},
|
||||
};
|
||||
EOF
|
||||
${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o
|
||||
if grep -q 'StArT_E_eNdX' "${T}"/test.o ; then
|
||||
export ac_cv_c_bitfields_htol="no"
|
||||
elif grep -q 'StArT_T_eNdX' "${T}"/test.o ; then
|
||||
export ac_cv_c_bitfields_htol="yes"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use unicode; then
|
||||
local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)"
|
||||
if [[ -n ${flags} ]]; then
|
||||
append-flags ${flags}
|
||||
else
|
||||
ewarn "Your compiler does not support the options required to build"
|
||||
ewarn "cdrtools with unicode in USE. unicode flag will be ignored."
|
||||
fi
|
||||
fi
|
||||
|
||||
# If not built with -j1, "sometimes" cdda2wav will not be built.
|
||||
emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \
|
||||
LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# If not built with -j1, "sometimes" manpages are not installed.
|
||||
emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \
|
||||
LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" install
|
||||
|
||||
# These symlinks are for compat with cdrkit.
|
||||
dosym schily /usr/include/scsilib
|
||||
dosym ../scg /usr/include/schily/scg
|
||||
|
||||
dodoc ABOUT Changelog* CONTRIBUTING PORTING README.linux-shm READMEs/README.linux
|
||||
|
||||
cd "${S}"/cdda2wav || die
|
||||
docinto cdda2wav
|
||||
dodoc Changelog FAQ Frontends HOWTOUSE NEEDED README THANKS TODO
|
||||
|
||||
cd "${S}"/mkisofs || die
|
||||
docinto mkisofs
|
||||
dodoc ChangeLog* TODO
|
||||
|
||||
# Remove man pages related to the build system
|
||||
rm -rvf "${ED}"/usr/share/man/man5 || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fcaps_pkg_postinst
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
einfo
|
||||
einfo "Darwin/OS X use the following device names:"
|
||||
einfo
|
||||
einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices"
|
||||
einfo
|
||||
einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices"
|
||||
einfo
|
||||
fi
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST xfburn-0.6.2.tar.bz2 869745 BLAKE2B ed8658d729dc0cf1ee40773fa82baf9a5301225bce4c971201ae8d21bffb74e81fb9d1b674f8b9e0bc55585a3fc9f380a0aa3718173ce7425d40f3dfcd4e1fb6 SHA512 c74d21244b5029aaa72c4911ea7549458aea161623a6a020a165b8148f320053a83189de87f71192f006579ca435558d0c07e1a8aa4165db8cfb30581f8882b4
|
||||
DIST xfburn-0.7.0.tar.bz2 923498 BLAKE2B 27c80f20306b1097f4d9176c2b9278b6ec5628eda6c36779270eca4fb2387ca425450201d6a4ae171aa8ce2fa50243614ae30d4561c72e3b70727cfcf54c7c34 SHA512 5ac679926809839d36c94d918ebc9bb409b9940127eba1cae6daf6614288f5d18181be5b7b4d249f0f0e973c2a4a22b8b3ce5709a2d23e5d4dd3b412cf5846d1
|
||||
|
@ -1,56 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit xdg-utils
|
||||
|
||||
DESCRIPTION="GTK+ based CD and DVD burning application"
|
||||
HOMEPAGE="https://docs.xfce.org/apps/xfburn/start"
|
||||
SRC_URI="https://archive.xfce.org/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm ~ppc x86"
|
||||
IUSE="gstreamer +udev"
|
||||
|
||||
RDEPEND=">=dev-libs/glib-2.32:=
|
||||
>=dev-libs/libburn-0.4.2:=
|
||||
>=dev-libs/libisofs-0.6.2:=
|
||||
>=x11-libs/gtk+-3.20:3=
|
||||
>=xfce-base/exo-0.11:=
|
||||
>=xfce-base/libxfce4ui-4.12:=
|
||||
gstreamer? (
|
||||
media-libs/gstreamer:1.0=
|
||||
media-libs/gst-plugins-base:1.0= )
|
||||
udev? ( dev-libs/libgudev:= )"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/intltool
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
# fix bashism
|
||||
# https://gitlab.xfce.org/apps/xfburn/-/merge_requests/36
|
||||
sed -i -e 's:== x:= x:' configure || die
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
$(use_enable udev gudev)
|
||||
$(use_enable gstreamer)
|
||||
)
|
||||
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
}
|
Binary file not shown.
@ -0,0 +1,206 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit bash-completion-r1 go-module linux-info optfeature systemd verify-sig
|
||||
|
||||
DESCRIPTION="Modern, secure and powerful system container and virtual machine manager"
|
||||
HOMEPAGE="https://linuxcontainers.org/incus/introduction/ https://github.com/lxc/incus"
|
||||
SRC_URI="https://linuxcontainers.org/downloads/incus/${P}.tar.xz
|
||||
verify-sig? ( https://linuxcontainers.org/downloads/incus/${P}.tar.xz.asc )"
|
||||
|
||||
LICENSE="Apache-2.0 BSD LGPL-3 MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="apparmor fuidshift nls"
|
||||
|
||||
DEPEND="acct-group/incus
|
||||
acct-group/incus-admin
|
||||
app-arch/xz-utils
|
||||
>=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
|
||||
dev-db/sqlite:3
|
||||
dev-libs/cowsql
|
||||
dev-libs/lzo
|
||||
>=dev-libs/raft-0.18.3:=[lz4]
|
||||
>=dev-util/xdelta-3.0[lzma(+)]
|
||||
net-dns/dnsmasq[dhcp]
|
||||
sys-libs/libcap
|
||||
virtual/udev"
|
||||
RDEPEND="${DEPEND}
|
||||
fuidshift? ( !app-containers/lxd )
|
||||
net-firewall/ebtables
|
||||
net-firewall/iptables
|
||||
sys-apps/iproute2
|
||||
sys-fs/fuse:*
|
||||
>=sys-fs/lxcfs-5.0.0
|
||||
sys-fs/squashfs-tools[lzma]
|
||||
virtual/acl"
|
||||
BDEPEND="dev-lang/go
|
||||
nls? ( sys-devel/gettext )
|
||||
verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
|
||||
|
||||
CONFIG_CHECK="
|
||||
~CGROUPS
|
||||
~IPC_NS
|
||||
~NET_NS
|
||||
~PID_NS
|
||||
|
||||
~SECCOMP
|
||||
~USER_NS
|
||||
~UTS_NS
|
||||
|
||||
~KVM
|
||||
~MACVTAP
|
||||
~VHOST_VSOCK
|
||||
"
|
||||
|
||||
ERROR_IPC_NS="CONFIG_IPC_NS is required."
|
||||
ERROR_NET_NS="CONFIG_NET_NS is required."
|
||||
ERROR_PID_NS="CONFIG_PID_NS is required."
|
||||
ERROR_SECCOMP="CONFIG_SECCOMP is required."
|
||||
ERROR_UTS_NS="CONFIG_UTS_NS is required."
|
||||
|
||||
WARNING_KVM="CONFIG_KVM and CONFIG_KVM_AMD/-INTEL is required for virtual machines."
|
||||
WARNING_MACVTAP="CONFIG_MACVTAP is required for virtual machines."
|
||||
WARNING_VHOST_VSOCK="CONFIG_VHOST_VSOCK is required for virtual machines."
|
||||
|
||||
# Go magic.
|
||||
QA_PREBUILT="/usr/bin/incus
|
||||
/usr/bin/lxc-to-incus
|
||||
/usr/bin/incus-agent
|
||||
/usr/bin/incus-benchmark
|
||||
/usr/bin/incus-migrate
|
||||
/usr/sbin/fuidshift
|
||||
/usr/sbin/lxd-to-incus
|
||||
/usr/sbin/incusd"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/linuxcontainers.asc
|
||||
|
||||
# The testsuite must be run as root.
|
||||
# make: *** [Makefile:156: check] Error 1
|
||||
RESTRICT="test"
|
||||
|
||||
GOPATH="${S}/_dist"
|
||||
|
||||
src_prepare() {
|
||||
export GOPATH="${S}/_dist"
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/incus:g" \
|
||||
-e "s:make:make ${MAKEOPTS}:g" \
|
||||
Makefile || die
|
||||
|
||||
# Fix hardcoded ovmf file path, see bug 763180
|
||||
sed -i \
|
||||
-e "s:/usr/share/OVMF:/usr/share/edk2-ovmf:g" \
|
||||
-e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \
|
||||
doc/environment.md \
|
||||
internal/server/apparmor/instance.go \
|
||||
internal/server/apparmor/instance_qemu.go \
|
||||
internal/server/instance/drivers/driver_qemu.go || die "Failed to fix hardcoded ovmf paths."
|
||||
|
||||
# Fix hardcoded virtfs-proxy-helper file path, see bug 798924
|
||||
sed -i \
|
||||
-e "s:/usr/lib/qemu/virtfs-proxy-helper:/usr/libexec/virtfs-proxy-helper:g" \
|
||||
internal/server/device/device_utils_disk.go || die "Failed to fix virtfs-proxy-helper path."
|
||||
|
||||
cp "${FILESDIR}"/incus-0.4.service "${T}"/incus.service || die
|
||||
if use apparmor; then
|
||||
sed -i \
|
||||
'/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
|
||||
"${T}"/incus.service || die
|
||||
fi
|
||||
|
||||
# Disable -Werror's from go modules.
|
||||
find "${S}" -name "cgo.go" -exec sed -i "s/ -Werror / /g" {} + || die
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
|
||||
src_compile() {
|
||||
export GOPATH="${S}/_dist"
|
||||
export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
|
||||
|
||||
for k in incus-benchmark incus-user incus lxc-to-incus ; do
|
||||
ego install -v -x "${S}/cmd/${k}"
|
||||
done
|
||||
|
||||
if use fuidshift ; then
|
||||
ego install -v -x "${S}/cmd/fuidshift"
|
||||
fi
|
||||
|
||||
ego install -v -x -tags libsqlite3 "${S}"/cmd/incusd
|
||||
|
||||
# Needs to be built statically
|
||||
CGO_ENABLED=0 go install -v -tags netgo "${S}"/cmd/incus-migrate
|
||||
CGO_ENABLED=0 go install -v -tags agent,netgo "${S}"/cmd/incus-agent
|
||||
|
||||
cd "${S}"/cmd/lxd-to-incus || die
|
||||
ego build -v -x ./
|
||||
cd "${S}" || die
|
||||
|
||||
use nls && emake build-mo
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
export GOPATH="${S}/_dist"
|
||||
local bindir="_dist/bin"
|
||||
|
||||
newsbin "${FILESDIR}"/incus-startup-0.4.sh incus-startup
|
||||
|
||||
# Admin tools
|
||||
for l in incusd incus-user ; do
|
||||
dosbin ${bindir}/${l}
|
||||
done
|
||||
dosbin cmd/lxd-to-incus/lxd-to-incus
|
||||
|
||||
# User tools
|
||||
for m in incus-agent incus-benchmark incus-migrate incus lxc-to-incus ; do
|
||||
dobin ${bindir}/${m}
|
||||
done
|
||||
|
||||
# fuidshift, should be moved under admin tools at some point
|
||||
if use fuidshift ; then
|
||||
dosbin ${bindir}/fuidshift
|
||||
fi
|
||||
|
||||
newconfd "${FILESDIR}"/incus-0.4.confd incus
|
||||
newinitd "${FILESDIR}"/incus-0.4.initd incus
|
||||
newinitd "${FILESDIR}"/incus-user-0.4.initd incus-user
|
||||
|
||||
systemd_dounit "${T}"/incus.service
|
||||
systemd_newunit "${FILESDIR}"/incus-0.4.socket incus.socket
|
||||
systemd_newunit "${FILESDIR}"/incus-startup-0.4.service incus-startup.service
|
||||
systemd_newunit "${FILESDIR}"/incus-user-0.4.service incus-user.service
|
||||
systemd_newunit "${FILESDIR}"/incus-user-0.4.socket incus-user.socket
|
||||
|
||||
dobashcomp scripts/bash/incus
|
||||
|
||||
dodoc AUTHORS
|
||||
dodoc -r doc/*
|
||||
use nls && domo po/*.mo
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "Please see"
|
||||
elog " https://wiki.gentoo.org/wiki/Incus"
|
||||
elog " https://wiki.gentoo.org/wiki/Incus#Migrating_from_LXD"
|
||||
elog
|
||||
optfeature "virtual machine support" app-emulation/qemu[spice,usbredir,virtfs]
|
||||
optfeature "btrfs storage backend" sys-fs/btrfs-progs
|
||||
optfeature "ipv6 support" net-dns/dnsmasq[ipv6]
|
||||
optfeature "full incus-migrate support" net-misc/rsync
|
||||
optfeature "lvm2 storage backend" sys-fs/lvm2
|
||||
optfeature "zfs storage backend" sys-fs/zfs
|
||||
elog
|
||||
elog "Be sure to add your local user to the incus group."
|
||||
elog
|
||||
}
|
Binary file not shown.
@ -1,6 +1,4 @@
|
||||
DIST gpgme-1.22.0.tar.bz2 1717836 BLAKE2B 6c03f4252391a114233fed284bf9eba03fa7b67328b506c01554fbd4239e0f3ede0bc79d82e9f21718084ca17945d628707d4451ac765a8f36d282e7e2d75f8e SHA512 17053053fa885f01416433e43072ac716b5d5db0c3edf45b2d6e90e6384d127626e6ae3ce421abba8f449f5ca7e8963f3d62f3565d295847170bc998d1ec1a70
|
||||
DIST gpgme-1.22.0.tar.bz2.sig 119 BLAKE2B fde8892743e7658004d73d89dcb3899fd003ad9222fa47ec0beb29c507917936cd34ade58609cb44c8ed2d2dc0c8e4aba6ac73ed4789d2a375f79055d23c2349 SHA512 20468946e8247dd12991b25a599ee815b2627931fd3886c41b310eea51f058a51cd1584de2292241a225144bf9a1f18b70bb495cb34304879fc294fc95b220ea
|
||||
DIST gpgme-1.23.1.tar.bz2 1716825 BLAKE2B 5810bafb2bbea0a44078fdd587fdeae5a2705dac381d6873dd1cdff017a0be7213125846201cdfef510a5802fdc6d86fd2216b17c380ef5f9e30add5edeaa70c SHA512 a82d5de29a38e5cee4042b3891d0a2c265001832e8578ba17b26c48c6d2a4d5919ac9655b4bfb5235dc8c7cea8d3254054da270d287133b9161e7c6ef93b2d58
|
||||
DIST gpgme-1.23.1.tar.bz2.sig 119 BLAKE2B bc31079a0632aee4f84347114f3705d8e5068282000057cd8f332b541ee9f0d82eda246ed9b0fb156bb5fbb887156df8ba28518b184ce71b4c66c80e02efc154 SHA512 c3546bc69f8f083d6ebf146336860af263810224a7e9a42c233bfa1210eb0f6f82c26bf134d261ca823eef170549c2642ea2d689610446df91805c5d3c02528f
|
||||
DIST gpgme-1.23.1.tar.bz2.sig 238 BLAKE2B 10ce8dfb03ac06b815218ac01ee20009e605632f4f23956b4b37d3bce02d3c8da7d18f59ae84dbd5ec244fbfb24437502e3295e1161ddb27d203d11ab034a71a SHA512 4aae7334a7fb2aeffc425ed514eaef10183672154159ee8bcd1396612ef2d961aed33d00a346d9edaee0b396c6dbb0057950dbb8defd164f73acfdb1ecd0f72b
|
||||
DIST gpgme-1.23.2.tar.bz2 1836904 BLAKE2B 563e470e861c7cc64ecb3e8dd0a0ed8436bc0867105093abcec09f4d1e1dd95cbf64c8161cf8500b9842583b57f6583efff63e5111234e36fda1e6fbedce2f78 SHA512 6cfcd07e81a93de240582de5a46545420cee93d1f27fe20ea2c983780fdd3036b69fdba073cf549d68a20791e189bf4b3cdde14a43f912d2ab9ef3414c83ac75
|
||||
DIST gpgme-1.23.2.tar.bz2.sig 238 BLAKE2B fafba6e2f1f34c53fa3f7e05953298132f7b046048660b9f2df5bc11ccb9694b581117ca78883a8f4ca9af060397a39f3132a3711be1cd28183b7c2f8f93a8b7 SHA512 65b7cdd4ce06bb0b15b13033d226423380338efdcb47ffc3f33780a92973453053f8f59b12a3f37e392e773bdd207a7420c25aa3a210c15eec45b7bfef6e891e
|
||||
|
@ -1,166 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# Maintainers should:
|
||||
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
|
||||
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
|
||||
# (find the one for the current release then subscribe to it +
|
||||
# any subsequent ones linked within so you're covered for a while.)
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_OPTIONAL=1
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
|
||||
|
||||
# in-source builds are not supported:
|
||||
# * https://dev.gnupg.org/T6313#166339
|
||||
# * https://dev.gnupg.org/T6673#174545
|
||||
inherit distutils-r1 libtool flag-o-matic out-of-source qmake-utils toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
|
||||
HOMEPAGE="https://www.gnupg.org/related_software/gpgme"
|
||||
SRC_URI="
|
||||
mirror://gnupg/gpgme/${P}.tar.bz2
|
||||
verify-sig? ( mirror://gnupg/gpgme/${P}.tar.bz2.sig )
|
||||
"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
# Please check ABI on each bump, even if SONAMEs didn't change: bug #833355
|
||||
# Use e.g. app-portage/iwdevtools integration with dev-libs/libabigail's abidiff.
|
||||
# Subslot: SONAME of each: <libgpgme.libgpgmepp.libqgpgme.FUDGE>
|
||||
# Bump FUDGE if a release is made which breaks ABI without changing SONAME.
|
||||
# (Reset to 0 if FUDGE != 0 if libgpgme/libgpgmepp/libqpggme change.)
|
||||
SLOT="1/11.6.15.2"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="common-lisp static-libs +cxx python qt5 test"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="qt5? ( cxx ) python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
# - On each bump, update dep bounds on each version from configure.ac!
|
||||
RDEPEND="
|
||||
>=app-crypt/gnupg-2
|
||||
>=dev-libs/libassuan-2.5.3:=
|
||||
>=dev-libs/libgpg-error-1.36:=
|
||||
>=dev-libs/libgpg-error-1.46-r1
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
qt5? ( dev-qt/qtcore:5 )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
test? (
|
||||
qt5? ( dev-qt/qttest:5 )
|
||||
)
|
||||
"
|
||||
#doc? ( app-text/doxygen[dot] )
|
||||
BDEPEND="
|
||||
python? ( dev-lang/swig )
|
||||
verify-sig? ( sec-keys/openpgp-keys-gnupg )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.18.0-tests-start-stop-agent-use-command-v.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
elibtoolize
|
||||
|
||||
# bug #697456
|
||||
addpredict /run/user/$(id -u)/gnupg
|
||||
|
||||
local MAX_WORKDIR=66
|
||||
if use test && [[ "${#WORKDIR}" -gt "${MAX_WORKDIR}" ]]; then
|
||||
eerror "Unable to run tests as WORKDIR='${WORKDIR}' is longer than ${MAX_WORKDIR} which causes failure!"
|
||||
die "Could not run tests as requested with too-long WORKDIR."
|
||||
fi
|
||||
|
||||
# Make best effort to allow longer PORTAGE_TMPDIR
|
||||
# as usock limitation fails build/tests
|
||||
ln -s "${P}" "${WORKDIR}/b" || die
|
||||
S="${WORKDIR}/b"
|
||||
}
|
||||
|
||||
my_src_configure() {
|
||||
local languages=()
|
||||
|
||||
# bug #847955
|
||||
append-lfs-flags
|
||||
|
||||
if use common-lisp ; then
|
||||
languages+=( "cl" )
|
||||
fi
|
||||
|
||||
if use cxx ; then
|
||||
languages+=( "cpp" )
|
||||
fi
|
||||
|
||||
# TODO: qt6? but qt5 and qt5 are mutually exclusive :(
|
||||
if use qt5; then
|
||||
languages+=( "qt5" )
|
||||
|
||||
#use doc ||
|
||||
export DOXYGEN=true
|
||||
export MOC="$(qt5_get_bindir)/moc"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
$(use test || echo "--disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test --disable-g13-test")
|
||||
--enable-languages="${languages[*]}"
|
||||
$(use_enable static-libs static)
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if use python ; then
|
||||
emake -C lang/python prepare
|
||||
|
||||
pushd lang/python > /dev/null || die
|
||||
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_configure
|
||||
popd > /dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
my_src_compile() {
|
||||
default
|
||||
|
||||
if use python ; then
|
||||
pushd lang/python > /dev/null || die
|
||||
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_compile
|
||||
popd > /dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
my_src_test() {
|
||||
default
|
||||
|
||||
if use python ; then
|
||||
distutils-r1_src_test
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
emake -C lang/python/tests check \
|
||||
PYTHON=${EPYTHON} \
|
||||
PYTHONS=${EPYTHON} \
|
||||
TESTFLAGS="--python-libdir=${BUILD_DIR}/lib"
|
||||
}
|
||||
|
||||
my_src_install() {
|
||||
default
|
||||
|
||||
if use python ; then
|
||||
pushd lang/python > /dev/null || die
|
||||
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_install
|
||||
popd > /dev/null || die
|
||||
fi
|
||||
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
# Backward compatibility for gentoo
|
||||
# (in the past, we had slots)
|
||||
dodir /usr/include/gpgme
|
||||
dosym ../gpgme.h /usr/include/gpgme/gpgme.h
|
||||
}
|
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST s6-man-pages-2.12.0.2.1.tar.gz 123785 BLAKE2B 7eea4242a3d4dfa6170044c57639f4251db6d4cc5555d73beaae9e16866614cfe04d78ddc50a998548b96b10ff8ee57c1dd8e7e111e2c0660dff8ca5dd27c2de SHA512 76c7fac7e7bc8bfc6a4b0536562c2281d9187bcc0a2a6bcd1a74fccc60965ee319bedc0d6647c1c3793b19bb58f839e48a630066fbfa7f82347ca49a1e173ea7
|
||||
DIST s6-man-pages-2.12.0.3.1.tar.gz 123779 BLAKE2B f9ae84b81f13e3edb6e44a7bd3f23817cb0082206d72e2141237493dc2a2ab0181a6374daeaea692f47d3bddbf6c73d438640e2c00f95bd7c132babbab1a585f SHA512 424edbd55e56ac2f4c9146c542c989c9a5e542fdfff9b2f026c620949a3a07a3f767123672f45744efaa28da0012472f97b0aeb09f2fe4dbe5567a6f66946d9d
|
||||
|
@ -1,16 +0,0 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="mdoc port of the HTML documentation for the s6 suite"
|
||||
HOMEPAGE="https://git.sr.ht/~flexibeast/s6-man-pages"
|
||||
SRC_URI="
|
||||
https://git.sr.ht/~flexibeast/${PN}/archive/v${PV}.tar.gz
|
||||
-> ${P}.tar.gz
|
||||
"
|
||||
S="${WORKDIR}/${PN}-v${PV}"
|
||||
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
@ -1,2 +1 @@
|
||||
DIST s6-networking-man-pages-2.7.0.0.1.tar.gz 24147 BLAKE2B b0425a2ac0302f7158639ffb5f7b76b3341b885a9aff2b02e4b65c6e03a6cbdff8a0f7e93dd7f56416b2ca058dbb033971cbc90bb84d3d9bd6434fd31b56f06b SHA512 f683117584645184ebd45232b5727fb76406d9854f2dad0b60f883e56ef2c39242e7585d2892951c2bf8adf369ce2d95a5de598555d343be2fc903201c7cef7c
|
||||
DIST s6-networking-man-pages-2.7.0.1.1.tar.gz 24101 BLAKE2B e977f814d121fccf6bc39fbc0c5153b70d4e0f4f70e12f48eeb0765ab17b871c43c4a984e998f35f2a099a41efd3ce7bcdeea31e3c6f7ba7ed9284673584aca9 SHA512 c106fd1586f26e2a37a8252b554b78b413fbb19ffeb3874e27f8ee24ca246bb27bf2d9b4ebf05bec68a12c4524203f064fa9e504053044aa46c1a03313311f35
|
||||
|
@ -1,16 +0,0 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="mdoc port of the HTML documentation for the s6 suite"
|
||||
HOMEPAGE="https://git.sr.ht/~flexibeast/s6-man-pages"
|
||||
SRC_URI="
|
||||
https://git.sr.ht/~flexibeast/${PN}/archive/v${PV}.tar.gz
|
||||
-> ${P}.tar.gz
|
||||
"
|
||||
S="${WORKDIR}/${PN}-v${PV}"
|
||||
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST shed-1.15.tar.gz 87777 BLAKE2B 7c23f01e649de6ad15b870ef3786bd1747b6ab765f19a748d08bad878325f11e38483b957ed6a791ae4a7de752e96cca2057fd69838625c3fe660d2ba3fbc984 SHA512 fe401303e686fb11975b71de0f84d0cdb84dc5a48e1094356d012f95d8c956ed05bd6b39bf65af924212e83c1db45bbfe556342489150bb0e10fb4c832fb6c78
|
||||
DIST shed-1.16.tar.gz 104323 BLAKE2B 30c4d6ec7d497a64cc4e313496d26e3a4b8a8050bcfd05c50d9eef865d987df76cd1d7fa13509bdfed184159676dfc2c8bb8d3eb98f64573845e543d174cae7b SHA512 0c807205540b17ee977c157c8edd916b34ba6c4ace280f59c10a92abbe820ef7fe24c4a64c2fc8b5fcd3d86f71e26672cef469340ddce393d370b53aa8785e7c
|
||||
|
@ -0,0 +1,13 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -42,9 +42,8 @@
|
||||
fi
|
||||
|
||||
ERR="Required package missing!"
|
||||
-AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([$ERR]))
|
||||
+PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],AC_MSG_ERROR([$ERR]))
|
||||
AC_CHECK_HEADER(getopt.h,:,AC_MSG_ERROR([$ERR]))
|
||||
-AC_CHECK_LIB(ncurses,initscr)
|
||||
AC_CHECK_LIB(m,pow)
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Simple Hex EDitor"
|
||||
HOMEPAGE="https://shed.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
|
||||
RDEPEND="sys-libs/ncurses:0="
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-tinfo.patch )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# Bump with app-editors/xvile
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc
|
||||
inherit verify-sig
|
||||
|
||||
DESCRIPTION="VI Like Emacs -- yet another full-featured vi clone"
|
||||
HOMEPAGE="https://invisible-island.net/vile/"
|
||||
SRC_URI="https://invisible-island.net/archives/vile/current/${P}.tgz"
|
||||
SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/vile/current/${P}.tgz.asc )"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="perl iconv"
|
||||
|
||||
RDEPEND=">=sys-libs/ncurses-5.2:=
|
||||
virtual/libcrypt:=
|
||||
iconv? ( virtual/libiconv )
|
||||
perl? ( dev-lang/perl:= )"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
app-alternatives/lex
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-thomasdickey-20240114 )
|
||||
"
|
||||
IDEPEND="app-eselect/eselect-vi"
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--disable-stripping \
|
||||
--with-ncurses \
|
||||
--with-pkg-config \
|
||||
$(use_with iconv) \
|
||||
$(use_with perl)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
dodoc CHANGES* README doc/*.doc
|
||||
docinto html
|
||||
dodoc doc/*.html
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "Updating ${EPREFIX}/usr/bin/vi symlink"
|
||||
eselect vi update --if-unset
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
einfo "Updating ${EPREFIX}/usr/bin/vi symlink"
|
||||
eselect vi update --if-unset
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop pax-utils xdg optfeature
|
||||
|
||||
# Usage: arch_src_uri <gentoo arch> <upstream arch>
|
||||
arch_src_uri() {
|
||||
echo "${1}? (
|
||||
https://github.com/VSCodium/${PN}/releases/download/${PV}/VSCodium-linux-${2}-${PV}.tar.gz
|
||||
-> ${P}-${1}.tar.gz
|
||||
)"
|
||||
}
|
||||
|
||||
DESCRIPTION="A community-driven, freely-licensed binary distribution of Microsoft's VSCode"
|
||||
HOMEPAGE="https://vscodium.com/"
|
||||
SRC_URI="
|
||||
$(arch_src_uri amd64 x64)
|
||||
$(arch_src_uri arm armhf)
|
||||
$(arch_src_uri arm64 arm64)
|
||||
"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="
|
||||
Apache-2.0
|
||||
BSD
|
||||
BSD-1
|
||||
BSD-2
|
||||
BSD-4
|
||||
CC-BY-4.0
|
||||
ISC
|
||||
LGPL-2.1+
|
||||
MIT
|
||||
MPL-2.0
|
||||
openssl
|
||||
PYTHON
|
||||
TextMate-bundle
|
||||
Unlicense
|
||||
UoI-NCSA
|
||||
W3C
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~arm ~arm64"
|
||||
IUSE="egl kerberos wayland"
|
||||
RESTRICT="strip bindist"
|
||||
|
||||
RDEPEND="
|
||||
>=app-accessibility/at-spi2-core-2.46.0:2
|
||||
app-crypt/libsecret[crypt]
|
||||
app-misc/ca-certificates
|
||||
dev-libs/expat
|
||||
dev-libs/glib:2
|
||||
dev-libs/nspr
|
||||
dev-libs/nss
|
||||
media-libs/alsa-lib
|
||||
media-libs/libcanberra[gtk3]
|
||||
media-libs/libglvnd
|
||||
media-libs/mesa
|
||||
net-misc/curl
|
||||
net-print/cups
|
||||
sys-apps/dbus
|
||||
sys-libs/zlib
|
||||
sys-process/lsof
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libdrm
|
||||
x11-libs/libnotify
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb
|
||||
x11-libs/libXcomposite
|
||||
x11-libs/libXdamage
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libxkbcommon
|
||||
x11-libs/libxkbfile
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXScrnSaver
|
||||
x11-libs/pango
|
||||
x11-misc/xdg-utils
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
"
|
||||
|
||||
QA_PREBUILT="*"
|
||||
|
||||
src_install() {
|
||||
# Cleanup
|
||||
rm "${S}/resources/app/LICENSE.txt" || die
|
||||
|
||||
if ! use kerberos; then
|
||||
rm -r "${S}/resources/app/node_modules.asar.unpacked/kerberos" || die
|
||||
fi
|
||||
|
||||
# Install
|
||||
pax-mark m codium
|
||||
mkdir -p "${ED}/opt/${PN}" || die
|
||||
cp -r . "${ED}/opt/${PN}" || die
|
||||
fperms 4711 /opt/${PN}/chrome-sandbox
|
||||
|
||||
dosym -r "/opt/${PN}/bin/codium" "usr/bin/vscodium"
|
||||
dosym -r "/opt/${PN}/bin/codium" "usr/bin/codium"
|
||||
|
||||
local EXEC_EXTRA_FLAGS=()
|
||||
if use wayland; then
|
||||
EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" )
|
||||
fi
|
||||
if use egl; then
|
||||
EXEC_EXTRA_FLAGS+=( "--use-gl=egl" )
|
||||
fi
|
||||
|
||||
sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
|
||||
"${FILESDIR}/vscodium-url-handler.desktop" \
|
||||
> "${T}/vscodium-url-handler.desktop" || die
|
||||
|
||||
sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
|
||||
"${FILESDIR}/vscodium.desktop" \
|
||||
> "${T}/vscodium.desktop" || die
|
||||
|
||||
domenu "${T}/vscodium.desktop"
|
||||
domenu "${T}/vscodium-url-handler.desktop"
|
||||
newicon "resources/app/resources/linux/code.png" "vscodium.png"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
elog "When compared to the regular VSCode, VSCodium has a few quirks"
|
||||
elog "More information at: https://github.com/VSCodium/vscodium/blob/master/DOCS.md"
|
||||
optfeature "keyring support inside vscode" "virtual/secret-service"
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# Bump with app-editors/vile
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc
|
||||
inherit verify-sig
|
||||
|
||||
MY_P="${PN/x/}-${PV}"
|
||||
DESCRIPTION="VI Like Emacs -- yet another full-featured vi clone"
|
||||
HOMEPAGE="https://invisible-island.net/vile/"
|
||||
SRC_URI="https://invisible-island.net/archives/vile/current/${MY_P}.tgz"
|
||||
SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/vile/current/${MY_P}.tgz.asc )"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~riscv ~sparc ~x86"
|
||||
IUSE="perl"
|
||||
|
||||
RDEPEND="
|
||||
~app-editors/vile-${PV}
|
||||
virtual/libcrypt:=
|
||||
>=x11-libs/libX11-1.0.0
|
||||
>=x11-libs/libXt-1.0.0
|
||||
>=x11-libs/libICE-1.0.0
|
||||
>=x11-libs/libSM-1.0.0
|
||||
>=x11-libs/libXaw-1.0.1
|
||||
>=x11-libs/libXpm-3.5.4.2
|
||||
perl? ( dev-lang/perl:= )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
x11-base/xorg-proto
|
||||
"
|
||||
BDEPEND="
|
||||
app-alternatives/lex
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-thomasdickey-20240114 )
|
||||
"
|
||||
|
||||
S="${WORKDIR}"/${MY_P}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--disable-stripping \
|
||||
--with-ncurses \
|
||||
--with-pkg-config \
|
||||
--with-x \
|
||||
$(use_with perl)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin xvile
|
||||
dodoc CHANGES* README doc/*.doc
|
||||
docinto html
|
||||
dodoc doc/*.html
|
||||
}
|
Binary file not shown.
@ -1,141 +0,0 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
aho-corasick-0.7.18
|
||||
ansi_term-0.12.1
|
||||
arc-swap-1.5.0
|
||||
atty-0.2.14
|
||||
autocfg-1.1.0
|
||||
bitflags-1.3.2
|
||||
capng-0.2.2
|
||||
cc-1.0.78
|
||||
cfg-if-1.0.0
|
||||
clap-2.34.0
|
||||
env_logger-0.10.0
|
||||
errno-0.2.8
|
||||
errno-dragonfly-0.1.2
|
||||
error-chain-0.12.4
|
||||
futures-0.3.21
|
||||
futures-channel-0.3.21
|
||||
futures-core-0.3.21
|
||||
futures-executor-0.3.21
|
||||
futures-io-0.3.21
|
||||
futures-macro-0.3.21
|
||||
futures-sink-0.3.21
|
||||
futures-task-0.3.21
|
||||
futures-util-0.3.21
|
||||
heck-0.3.3
|
||||
hermit-abi-0.1.19
|
||||
hermit-abi-0.2.6
|
||||
hostname-0.3.1
|
||||
humantime-2.1.0
|
||||
io-lifetimes-1.0.4
|
||||
is-terminal-0.4.2
|
||||
itoa-1.0.2
|
||||
lazy_static-1.4.0
|
||||
libc-0.2.139
|
||||
libseccomp-sys-0.2.1
|
||||
linux-raw-sys-0.1.4
|
||||
log-0.4.17
|
||||
match_cfg-0.1.0
|
||||
memchr-2.5.0
|
||||
num_cpus-1.13.1
|
||||
num_threads-0.1.6
|
||||
pin-project-lite-0.2.9
|
||||
pin-utils-0.1.0
|
||||
proc-macro-error-1.0.4
|
||||
proc-macro-error-attr-1.0.4
|
||||
proc-macro2-1.0.40
|
||||
quote-1.0.20
|
||||
regex-1.6.0
|
||||
regex-syntax-0.6.27
|
||||
rustix-0.36.7
|
||||
slab-0.4.7
|
||||
strsim-0.8.0
|
||||
structopt-0.3.26
|
||||
structopt-derive-0.4.18
|
||||
syn-1.0.98
|
||||
syslog-6.0.1
|
||||
termcolor-1.1.3
|
||||
textwrap-0.11.0
|
||||
time-0.3.11
|
||||
unicode-ident-1.0.2
|
||||
unicode-segmentation-1.9.0
|
||||
unicode-width-0.1.9
|
||||
vec_map-0.8.2
|
||||
version_check-0.9.4
|
||||
vhost-0.6.0
|
||||
vhost-user-backend-0.8.0
|
||||
virtio-bindings-0.1.0
|
||||
virtio-queue-0.7.0
|
||||
vm-memory-0.10.0
|
||||
vmm-sys-util-0.11.1
|
||||
winapi-0.3.9
|
||||
winapi-i686-pc-windows-gnu-0.4.0
|
||||
winapi-util-0.1.5
|
||||
winapi-x86_64-pc-windows-gnu-0.4.0
|
||||
windows-sys-0.42.0
|
||||
windows_aarch64_gnullvm-0.42.1
|
||||
windows_aarch64_msvc-0.42.1
|
||||
windows_i686_gnu-0.42.1
|
||||
windows_i686_msvc-0.42.1
|
||||
windows_x86_64_gnu-0.42.1
|
||||
windows_x86_64_gnullvm-0.42.1
|
||||
windows_x86_64_msvc-0.42.1
|
||||
"
|
||||
|
||||
inherit cargo
|
||||
|
||||
DESCRIPTION="Shared file system for virtual machines"
|
||||
HOMEPAGE="https://virtio-fs.gitlab.io/"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://gitlab.com/virtio-fs/virtiofsd.git"
|
||||
EGIT_BRANCH="main"
|
||||
else
|
||||
SRC_URI="https://gitlab.com/virtio-fs/virtiofsd/-/archive/v${PV}/virtiofsd-v${PV}.tar.gz
|
||||
$(cargo_crate_uris ${CRATES})"
|
||||
KEYWORDS="~amd64"
|
||||
S="${WORKDIR}/${PN}-v${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-DFS-2016 Unlicense"
|
||||
SLOT="0"
|
||||
|
||||
DEPEND="
|
||||
sys-libs/libcap-ng
|
||||
sys-libs/libseccomp
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# rust does not use *FLAGS from make.conf, silence portage warning
|
||||
# update with proper path to binaries this crate installs, omit leading /
|
||||
QA_FLAGS_IGNORED="usr/libexec/${PN}"
|
||||
|
||||
src_unpack() {
|
||||
if [[ "${PV}" == *9999* ]]; then
|
||||
git-r3_src_unpack
|
||||
cargo_live_src_unpack
|
||||
else
|
||||
cargo_src_unpack
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cargo_src_install
|
||||
|
||||
mkdir "${ED}/usr/libexec" || die
|
||||
mv "${ED}/usr/"{bin,libexec}/${PN} || die
|
||||
|
||||
# Install 50-qemu-virtiofsd.json but to avoid conflicts with
|
||||
# <app-emulation/qemu-8.0.0 install it under different name. In this case,
|
||||
# smaller number means higher priority, but that's probably what users want
|
||||
# anyway if they install this package on top of app-emulation/qemu.
|
||||
# TODO: remove once old QEMUs are removed from the portage.
|
||||
insinto "/usr/share/qemu/vhost-user"
|
||||
newins "50-qemu-virtiofsd.json" "40-qemu-virtiofsd.json"
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
DIST VBoxGuestAdditions_6.1.46.iso 64032768 BLAKE2B cc0181861802822e3887cd821edc687db081993e01e24ac0139ffd29b76aaabf3be20c9394e0ee02748359a7127ed5522418c2c5523ba77c3a8c483aad596c00 SHA512 e31e9cad72132d0f683b8135b5e91bcd42e6cb532fc9e0e9a463347c29053799f51b9d0730a9de4096557010c6ca341715e72515811b87d0df41343510cad55e
|
||||
DIST VBoxGuestAdditions_6.1.48.iso 63969280 BLAKE2B 7bba272d427a6a91cd4d63c5d494e50d9984badac47c75f5323b1b2ad25a4fbf7cf28a1eba30988288d6e308b8d62ab5043c445a651b8b767667a267d5dee1e9 SHA512 19b98be42d7c0148ada0342fbbe6e1803fa127aca14662b560624d2c582656af68b01152a9c8b14d238c493d171694e088091b924598cebbf1f8d2c7a949d0c3
|
||||
DIST VBoxGuestAdditions_6.1.50.iso 64051200 BLAKE2B 9eff4a3643579ee0426dbe2b62247b8c89321be495e61469628574445fedc06ff2fb9afa108705cbaf24a13db99b4e6e850c61e5c97343095549f444831fcf62 SHA512 d74ce912dbbcef7f644a9f3ba9917782336cbee8e0756727a8753ffc17486a75e833adaa869e205531bc3b81b9cb26aa9b50f44210e78dceece966687122f6c6
|
||||
DIST VBoxGuestAdditions_7.0.10.iso 53497856 BLAKE2B 8577cd44c4564f205e65d955f3cca33084215c4e2b777d944cb14240a47b6a6196cd9e40acbfbec9e915bda55f676627c1819ca2c881f8d0945c334df4e1d242 SHA512 5148823cc3bfd5145bff4ecfb6e0f3f068e0e3a9f1021161122b89dd01197e64345a73efdda6259134a35cbb0b6cd8361f235c2c996ef6a4dbf03d452b3ae9db
|
||||
DIST VBoxGuestAdditions_7.0.12.iso 53448704 BLAKE2B 1b738c648c902c1a98d83dc9525c7e091cd2234aa67f464a4beb3d6bd9bbb6893fe02eee4a37a05eae8e880efc6c834931a7ec7f08ae7b1615b1a622117767a2 SHA512 7f5db8f73bc2c89ad798fd2ec3543c460aa3fd3e44f02c04c334539172699af08c16312d96b6fdd5c561bc3d8133fc7a3662e51a86f82980d692f050286e0e7e
|
||||
DIST VBoxGuestAdditions_7.0.14.iso 53526528 BLAKE2B 2ec95d9261d3a7f762f333c1e3eb36f7b75cfd7cf722d1bdcd5c0b38a3a311db82b728fe800aed79b41b979ec345cd2586e3fd8c2d2c54f8b83516061d81d304 SHA512 5aa80b04c567d383793c560eb535babd1ebc4f472aaa51753867dbee00e1f5a3efeb5dd4c9eb1a48149ff0fa2e7598aa68792d3da9959709b619d234c2b57544
|
||||
|
@ -1,25 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PN=VBoxGuestAdditions
|
||||
MY_P=${MY_PN}_${PV}
|
||||
|
||||
DESCRIPTION="CD image containing guest additions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.iso"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
|
||||
src_unpack() {
|
||||
return 0
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/${PN/-additions}
|
||||
newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PN=VBoxGuestAdditions
|
||||
MY_P=${MY_PN}_${PV}
|
||||
|
||||
DESCRIPTION="CD image containing guest additions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.iso"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="GPL-3 || ( GPL-3 CDDL )"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
|
||||
src_unpack() {
|
||||
return 0
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/${PN/-additions}
|
||||
newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.46.tar.gz 11175297 BLAKE2B 00c99036cb34579da811f0a2e3e46ac49b5588af3d8effa44132c496375c87c0778dc6650591a7e1bb11d3b3a459f775de94a8a06ae2bd42ce08385250db00d9 SHA512 9efdb746e5ef63872cde3adafb9e5c45c65183f59b7b2c2d3424588909c85ce3574e65c5bf1a2e0471028051e29ec010b4ed1968fcf4637d81d8f8d6547a24c7
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.48.tar.gz 11166368 BLAKE2B 5c1ced1742f44110490aee07e0323d418152b87c5c8c9dfbeffb05cc59fcc94bb88b8e932b59f5bd79e3d85b347525b939df2a60f52d46533bd2d877c1720439 SHA512 71ca826ac886fdb9389a09f6fc1b5b7e99e8bfda1fa64cecefebc60e3cd7c11f678bfe1fb853a7bd0de8ed2ffe00f5f9758a2b00e122bc678b71fa74ad366573
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.50.tar.gz 11175855 BLAKE2B 898ef92a91dbfb39079f8dfa5f4c1e6d91df66e92deb00849ba1da8a2278e3adcfd5754bf70acc6d8b6d7d6273923999860b71c01de3eaabf4d487d718aa14ef SHA512 818f0564a8ee1266f2d03d6e0d5df44278746067ae86279f6e884f519ad3e923382c7b987b3a58fe95e2aa4f0a53b98d553106b0250923e88989e5fdaa9dc3ae
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-7.0.10.tar.gz 18259331 BLAKE2B 0afcd918243cd52e90278df63a8bb7aa1415a3662ad8bc2d49c19dd9a1cfe3ab9f810d8d66b4be2c1742361e000c547f9cdd88ad215b764a80991e0b7ea44c50 SHA512 fd5dc7577467d54d170c325be27dbb67eee16860e0b876bca1afa023c33a45c356cb77303b0c26fa7ca2057908b9acd7ebc41dbc68a0a9bc3253a797cc9ccb55
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-7.0.12.tar.gz 18245684 BLAKE2B 6a55307034da5510d47bbf57bf557308be5c0459bbb21d0c79cc769a0f1ebae1e26c3202e23da17cd900b0ca88dbc653d2be0297817b79b61f426c6c5880c43a SHA512 0d311ed94a52d02634050f309886d6c5b627151b7e85a50e81a602c02c9400f01c1dfc21a7f52f33e50c2e27df96213f5b97cb3edc82f784ef171796c3ae6d56
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-7.0.14.tar.gz 18331089 BLAKE2B 278341be074c7bb276b90034355da3a55e2ef5efd89ad9a26a8f53b6743890772e1486ed5552ec131a8c80a710405dac284789d71a6c3bbec2dd79cf0e7e0459 SHA512 9301300dd1c2a178c730045128574b99a4a6cd1c2dd3f6a5782a78fa08588a4c5fd9c9ff6b2dbeba04747de915e3342ebbd08a4b9ed4641ff60f90f6a5c7fc3d
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PV="$(ver_cut 1-3)"
|
||||
MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
MY_P="${MY_PN}-${MY_PV}"
|
||||
|
||||
DESCRIPTION="PUEL extensions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="PUEL-11"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
RESTRICT="bindist mirror strip"
|
||||
|
||||
RDEPEND=">=app-emulation/virtualbox-${MY_PV}"
|
||||
|
||||
QA_PREBUILT="usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/*"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
|
||||
doins -r linux.${ARCH}
|
||||
doins ExtPack* PXE-Intel.rom
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PV="$(ver_cut 1-3)"
|
||||
MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
MY_P="${MY_PN}-${MY_PV}"
|
||||
|
||||
DESCRIPTION="PUEL extensions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="PUEL-11"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
RESTRICT="bindist mirror strip"
|
||||
|
||||
RDEPEND="=app-emulation/virtualbox-${MY_PV}*"
|
||||
|
||||
QA_PREBUILT="usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/*"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
|
||||
doins -r linux.${ARCH}
|
||||
doins ExtPack* PXE-Intel.rom
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
https://www.virtualbox.org/pipermail/vbox-dev/2023-September/010224.html
|
||||
|
||||
From: vbox-dev <vbox-dev-bounces at virtualbox.org> on behalf of Larry Finger via vbox-dev <vbox-dev at virtualbox.org>
|
||||
Sent: Friday, August 11, 2023 12:23 AM
|
||||
To: vbox-dev at virtualbox.org
|
||||
Subject: [vbox-dev] Fix for kernel 6.5 build of VB 7.0.10
|
||||
|
||||
Hi,
|
||||
|
||||
The 7.0.10 release fixed most problems with kernel 6.5. The first exception was
|
||||
the problem with extensible arrays in the kernel's vboxsf module that I
|
||||
described earlier. There were some hiccups, but that fix should be in kernel
|
||||
6.5-rc6.
|
||||
|
||||
One other problem showed up in the compilation of vbox_fb.c. The patch for that,
|
||||
released under the MIT license, is shown below:
|
||||
|
||||
Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
===================================================================
|
||||
--- a/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
+++ b/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
@@ -196,9 +196,13 @@
|
||||
.owner = THIS_MODULE,
|
||||
.fb_check_var = drm_fb_helper_check_var,
|
||||
.fb_set_par = drm_fb_helper_set_par,
|
||||
+#if RTLNX_VER_MIN(6, 5, 0)
|
||||
+ FB_DEFAULT_SYS_OPS,
|
||||
+#else
|
||||
.fb_fillrect = drm_fb_helper_sys_fillrect,
|
||||
.fb_copyarea = drm_fb_helper_sys_copyarea,
|
||||
.fb_imageblit = drm_fb_helper_sys_imageblit,
|
||||
+#endif
|
||||
.fb_pan_display = drm_fb_helper_pan_display,
|
||||
.fb_blank = drm_fb_helper_blank,
|
||||
.fb_setcmap = drm_fb_helper_setcmap,
|
@ -1,288 +0,0 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit edo linux-mod-r1 systemd toolchain-funcs udev
|
||||
|
||||
MY_PN="VirtualBox"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="X +dbus"
|
||||
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
RDEPEND="
|
||||
acct-group/vboxguest
|
||||
acct-group/vboxsf
|
||||
acct-user/vboxguest
|
||||
sys-libs/pam
|
||||
sys-libs/zlib
|
||||
dbus? ( sys-apps/dbus )
|
||||
X? (
|
||||
x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
X? (
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-build/kbuild-0.1.9998.3127
|
||||
<=dev-build/kbuild-0.1.9998.3500
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-power/iasl
|
||||
"
|
||||
PDEPEND="
|
||||
X? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
|
||||
)
|
||||
|
||||
DOCS=() # Don't install the default README file during einstalldocs
|
||||
|
||||
VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
|
||||
CONFIG_CHECK="DRM_TTM"
|
||||
|
||||
src_prepare() {
|
||||
eapply "${PATCHES[@]}"
|
||||
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Provide kernel sources
|
||||
pushd src/VBox/Additions &>/dev/null || die
|
||||
ebegin "Extracting guest kernel module sources"
|
||||
kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
|
||||
eend $? || die
|
||||
popd &>/dev/null || die
|
||||
|
||||
# PaX fixes (see bug #298988)
|
||||
eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
|
||||
|
||||
# Disable things unused or splitted into separate ebuilds
|
||||
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
|
||||
use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
|
||||
|
||||
# Remove pointless GCC version check
|
||||
sed -e '/^check_gcc$/d' -i configure || die
|
||||
|
||||
# Respect LDFLAGS (bug #759100)
|
||||
sed -i -e '/TEMPLATE_VBOXR3EXE_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk
|
||||
|
||||
eapply "${WORKDIR}/virtualbox-patches-6.1.36/patches"
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export AR CC CXX LD RANLIB
|
||||
|
||||
# Build the user-space tools, warnings are harmless
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
$(usev !dbus --disable-dbus)
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
|
||||
# bug #843437
|
||||
# Respect LDFLAGS (bug #759100)
|
||||
# Cannot use LDFLAGS here because they also get passed to $(LD)
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
CFLAGS=${CFLAGS}
|
||||
CXXFLAGS=${CXXFLAGS}
|
||||
CCLDFLAGS=${LDFLAGS}
|
||||
EOF
|
||||
|
||||
edo ./configure "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
source ./env.sh || die
|
||||
|
||||
# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
|
||||
MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
|
||||
|
||||
local myemakeargs=(
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo
|
||||
VBOX_ONLY_ADDITIONS=1
|
||||
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
AS="$(tc-getCC)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
LD="$(tc-getCC)"
|
||||
|
||||
TOOL_GCC3_CC="$(tc-getCC)"
|
||||
TOOL_GCC3_CXX="$(tc-getCXX)"
|
||||
TOOL_GCC3_LD="$(tc-getCC)"
|
||||
TOOL_GCC3_AS="$(tc-getCC)"
|
||||
TOOL_GCC3_AR="$(tc-getAR)"
|
||||
TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
#TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
|
||||
|
||||
TOOL_GXX3_CC="$(tc-getCC)"
|
||||
TOOL_GXX3_CXX="$(tc-getCXX)"
|
||||
TOOL_GXX3_LD="$(tc-getCXX)"
|
||||
TOOL_GXX3_AS="$(tc-getCXX)"
|
||||
TOOL_GXX3_AR="$(tc-getAR)"
|
||||
TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
#TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
|
||||
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}"
|
||||
TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
|
||||
VBOX_GCC_OPT="${CXXFLAGS}"
|
||||
VBOX_NM="$(tc-getNM)"
|
||||
TOOL_YASM_AS=yasm
|
||||
)
|
||||
|
||||
MAKE="kmk" emake "${myemakeargs[@]}"
|
||||
|
||||
# Now creating the kernel modules. We must do this _after_
|
||||
# we compiled the user-space tools as we need two of the
|
||||
# automatically generated header files. (>=3.2.0)
|
||||
# Move this here for bug 836037
|
||||
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
||||
local modlist=( vboxguest vboxsf )
|
||||
use X && modlist+=( vboxvideo )
|
||||
modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
|
||||
linux-mod-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
|
||||
insinto /etc/modprobe.d # 485996
|
||||
newins - vboxsf.conf <<-EOF
|
||||
# modprobe.d configuration file for VBOXSF
|
||||
|
||||
# Internal Aliases - Do not edit
|
||||
# ------------------------------
|
||||
alias fs-vboxsf vboxsf
|
||||
EOF
|
||||
|
||||
cd out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
if use dbus; then
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
|
||||
else
|
||||
newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
|
||||
fi
|
||||
|
||||
insinto /usr/sbin/
|
||||
newins VBoxService vboxguest-service
|
||||
fperms 0755 /usr/sbin/vboxguest-service
|
||||
|
||||
insinto /usr/bin
|
||||
doins VBoxControl
|
||||
fperms 0755 /usr/bin/VBoxControl
|
||||
|
||||
# VBoxClient user service and xrandr wrapper
|
||||
if use X ; then
|
||||
doins VBoxClient
|
||||
fperms 0755 /usr/bin/VBoxClient
|
||||
doins VBoxDRMClient
|
||||
fperms 4755 /usr/bin/VBoxDRMClient
|
||||
|
||||
pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
|
||||
newins 98vboxadd-xclient VBoxClient-all
|
||||
fperms 0755 /usr/bin/VBoxClient-all
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# udev rule for vboxdrv
|
||||
local udev_rules_dir="/lib/udev/rules.d"
|
||||
dodir ${udev_rules_dir}
|
||||
echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
|
||||
# VBoxClient autostart file
|
||||
insinto /etc/xdg/autostart
|
||||
doins "${FILESDIR}"/vboxclient.desktop
|
||||
|
||||
# sample xorg.conf
|
||||
dodoc "${FILESDIR}"/xorg.conf.vbox
|
||||
docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
|
||||
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod-r1_pkg_postinst
|
||||
udev_reload
|
||||
if ! use X ; then
|
||||
elog "use flag X is off, enable it to install the"
|
||||
elog "X Window System video driver."
|
||||
fi
|
||||
elog ""
|
||||
elog "Please add users to the \"vboxguest\" group so they can"
|
||||
elog "benefit from seamless mode, auto-resize and clipboard."
|
||||
elog ""
|
||||
elog "The vboxsf group has been added to make automount services work."
|
||||
elog "These services are part of the shared folders support."
|
||||
elog ""
|
||||
elog "Please add:"
|
||||
elog "/etc/init.d/${PN}"
|
||||
elog "to the default runlevel in order to start"
|
||||
elog "needed services."
|
||||
elog "To use the VirtualBox X driver, use the following"
|
||||
elog "file as your /etc/X11/xorg.conf:"
|
||||
elog " /usr/share/doc/${PF}/xorg.conf.vbox"
|
||||
elog ""
|
||||
elog "An autostart .desktop file has been installed to start"
|
||||
elog "VBoxClient in desktop sessions."
|
||||
elog ""
|
||||
elog "You can mount shared folders with:"
|
||||
elog " mount -t vboxsf <shared_folder_name> <mount_point>"
|
||||
elog ""
|
||||
elog "Warning:"
|
||||
elog "this ebuild is only needed if you are running gentoo"
|
||||
elog "inside a VirtualBox Virtual Machine, you don't need"
|
||||
elog "it to run VirtualBox itself."
|
||||
elog ""
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
udev_reload
|
||||
}
|
@ -1,295 +0,0 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit edo linux-mod-r1 systemd toolchain-funcs udev
|
||||
|
||||
MY_PN="VirtualBox"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.8.tar.bz2"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
|
||||
LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+dbus gui"
|
||||
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
# TODO: find out what this is, remove comment if obsolete
|
||||
|
||||
RDEPEND="
|
||||
acct-group/vboxguest
|
||||
acct-group/vboxsf
|
||||
acct-user/vboxguest
|
||||
sys-libs/pam
|
||||
sys-libs/zlib
|
||||
dbus? ( sys-apps/dbus )
|
||||
gui? (
|
||||
x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
"
|
||||
# some libs here are indirect dependencies, and also needed at compile time.
|
||||
# keeping them in DEPEND to avoid warnings from qa-vdb.
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
gui? (
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-base/xorg-proto
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-lang/yasm-0.6.2
|
||||
>=dev-build/kbuild-0.1.9998.3127
|
||||
sys-devel/bin86
|
||||
sys-power/iasl
|
||||
"
|
||||
PDEPEND="
|
||||
gui? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
|
||||
"${FILESDIR}"/virtualbox-guest-additions-7.0.10-fix-kernel-6.5.patch # bug #915665
|
||||
)
|
||||
|
||||
DOCS=() # Don't install the default README file during einstalldocs
|
||||
|
||||
VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
|
||||
CONFIG_CHECK="DRM_TTM"
|
||||
|
||||
src_prepare() {
|
||||
eapply "${PATCHES[@]}"
|
||||
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Provide kernel sources
|
||||
pushd src/VBox/Additions &>/dev/null || die
|
||||
ebegin "Extracting guest kernel module sources"
|
||||
kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
|
||||
eend $? || die
|
||||
popd &>/dev/null || die
|
||||
|
||||
# PaX fixes (see bug #298988)
|
||||
eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
|
||||
|
||||
# Disable things unused or splitted into separate ebuilds
|
||||
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
|
||||
if ! use gui; then
|
||||
echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
# Remove pointless GCC version check
|
||||
sed -e '/ check_gcc$/d' -i configure || die
|
||||
|
||||
# Respect LDFLAGS (bug #759100)
|
||||
sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
|
||||
|
||||
eapply "${WORKDIR}/virtualbox-patches-7.0.8/patches"
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export AR CC CXX LD RANLIB
|
||||
|
||||
# Build the user-space tools, warnings are harmless
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
$(usev !dbus --disable-dbus)
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
|
||||
# bug #843437
|
||||
# Respect LDFLAGS (bug #759100)
|
||||
# Cannot use LDFLAGS here because they also get passed to $(LD)
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
CFLAGS=${CFLAGS}
|
||||
CXXFLAGS=${CXXFLAGS}
|
||||
CCLDFLAGS=${LDFLAGS}
|
||||
EOF
|
||||
|
||||
edo ./configure "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
source ./env.sh || die
|
||||
|
||||
# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
|
||||
MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
|
||||
|
||||
local myemakeargs=(
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo
|
||||
VBOX_ONLY_ADDITIONS=1
|
||||
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
AS="$(tc-getCC)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
LD="$(tc-getCC)"
|
||||
|
||||
TOOL_GCC3_CC="$(tc-getCC)"
|
||||
TOOL_GCC3_CXX="$(tc-getCXX)"
|
||||
TOOL_GCC3_LD="$(tc-getCC)"
|
||||
TOOL_GCC3_AS="$(tc-getCC)"
|
||||
TOOL_GCC3_AR="$(tc-getAR)"
|
||||
TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
#TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
|
||||
|
||||
TOOL_GXX3_CC="$(tc-getCC)"
|
||||
TOOL_GXX3_CXX="$(tc-getCXX)"
|
||||
TOOL_GXX3_LD="$(tc-getCXX)"
|
||||
TOOL_GXX3_AS="$(tc-getCXX)"
|
||||
TOOL_GXX3_AR="$(tc-getAR)"
|
||||
TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
#TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
|
||||
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}"
|
||||
TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
|
||||
VBOX_GCC_OPT="${CXXFLAGS}"
|
||||
VBOX_NM="$(tc-getNM)"
|
||||
TOOL_YASM_AS=yasm
|
||||
)
|
||||
|
||||
MAKE="kmk" emake "${myemakeargs[@]}"
|
||||
|
||||
# Now creating the kernel modules. We must do this _after_
|
||||
# we compiled the user-space tools as we need two of the
|
||||
# automatically generated header files. (>=3.2.0)
|
||||
# Move this here for bug 836037
|
||||
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
||||
local modlist=( vboxguest vboxsf )
|
||||
use gui && modlist+=( vboxvideo )
|
||||
modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
|
||||
linux-mod-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
|
||||
insinto /etc/modprobe.d # 485996
|
||||
newins - vboxsf.conf <<-EOF
|
||||
# modprobe.d configuration file for VBOXSF
|
||||
|
||||
# Internal Aliases - Do not edit
|
||||
# ------------------------------
|
||||
alias fs-vboxsf vboxsf
|
||||
EOF
|
||||
|
||||
cd out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
if use dbus; then
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
|
||||
else
|
||||
newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
|
||||
fi
|
||||
|
||||
insinto /usr/sbin/
|
||||
newins VBoxService vboxguest-service
|
||||
fperms 0755 /usr/sbin/vboxguest-service
|
||||
|
||||
insinto /usr/bin
|
||||
doins VBoxControl
|
||||
fperms 0755 /usr/bin/VBoxControl
|
||||
|
||||
# VBoxClient user service and xrandr wrapper
|
||||
if use gui ; then
|
||||
doins VBoxClient
|
||||
fperms 0755 /usr/bin/VBoxClient
|
||||
doins VBoxDRMClient
|
||||
fperms 4755 /usr/bin/VBoxDRMClient
|
||||
|
||||
pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
|
||||
newins 98vboxadd-xclient VBoxClient-all
|
||||
fperms 0755 /usr/bin/VBoxClient-all
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# udev rule for vboxdrv
|
||||
local udev_rules_dir="/lib/udev/rules.d"
|
||||
dodir ${udev_rules_dir}
|
||||
echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
|
||||
# VBoxClient autostart file
|
||||
insinto /etc/xdg/autostart
|
||||
doins "${FILESDIR}"/vboxclient.desktop
|
||||
|
||||
# sample xorg.conf
|
||||
dodoc "${FILESDIR}"/xorg.conf.vbox
|
||||
docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
|
||||
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod-r1_pkg_postinst
|
||||
udev_reload
|
||||
if ! use gui ; then
|
||||
elog "use flag gui is off, enable it to install the"
|
||||
elog "X Window System video driver."
|
||||
fi
|
||||
elog ""
|
||||
elog "Please add users to the \"vboxguest\" group so they can"
|
||||
elog "benefit from seamless mode, auto-resize and clipboard."
|
||||
elog ""
|
||||
elog "The vboxsf group has been added to make automount services work."
|
||||
elog "These services are part of the shared folders support."
|
||||
elog ""
|
||||
elog "Please add:"
|
||||
elog "/etc/init.d/${PN}"
|
||||
elog "to the default runlevel in order to start"
|
||||
elog "needed services."
|
||||
elog "To use the VirtualBox X driver, use the following"
|
||||
elog "file as your /etc/X11/xorg.conf:"
|
||||
elog " /usr/share/doc/${PF}/xorg.conf.vbox"
|
||||
elog ""
|
||||
elog "An autostart .desktop file has been installed to start"
|
||||
elog "VBoxClient in desktop sessions."
|
||||
elog ""
|
||||
elog "You can mount shared folders with:"
|
||||
elog " mount -t vboxsf <shared_folder_name> <mount_point>"
|
||||
elog ""
|
||||
elog "Warning:"
|
||||
elog "this ebuild is only needed if you are running gentoo"
|
||||
elog "inside a VirtualBox Virtual Machine, you don't need"
|
||||
elog "it to run VirtualBox itself."
|
||||
elog ""
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
udev_reload
|
||||
}
|
@ -1,294 +0,0 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit edo linux-mod-r1 systemd toolchain-funcs udev
|
||||
|
||||
MY_PN="VirtualBox"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.8.tar.bz2"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
|
||||
LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="+dbus gui"
|
||||
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
# TODO: find out what this is, remove comment if obsolete
|
||||
|
||||
RDEPEND="
|
||||
acct-group/vboxguest
|
||||
acct-group/vboxsf
|
||||
acct-user/vboxguest
|
||||
sys-libs/pam
|
||||
sys-libs/zlib
|
||||
dbus? ( sys-apps/dbus )
|
||||
gui? (
|
||||
x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
"
|
||||
# some libs here are indirect dependencies, and also needed at compile time.
|
||||
# keeping them in DEPEND to avoid warnings from qa-vdb.
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
gui? (
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-base/xorg-proto
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-lang/yasm-0.6.2
|
||||
>=dev-build/kbuild-0.1.9998.3127
|
||||
sys-devel/bin86
|
||||
sys-power/iasl
|
||||
"
|
||||
PDEPEND="
|
||||
gui? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
|
||||
)
|
||||
|
||||
DOCS=() # Don't install the default README file during einstalldocs
|
||||
|
||||
VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
|
||||
CONFIG_CHECK="DRM_TTM"
|
||||
|
||||
src_prepare() {
|
||||
eapply "${PATCHES[@]}"
|
||||
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Provide kernel sources
|
||||
pushd src/VBox/Additions &>/dev/null || die
|
||||
ebegin "Extracting guest kernel module sources"
|
||||
kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
|
||||
eend $? || die
|
||||
popd &>/dev/null || die
|
||||
|
||||
# PaX fixes (see bug #298988)
|
||||
eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
|
||||
|
||||
# Disable things unused or splitted into separate ebuilds
|
||||
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
|
||||
if ! use gui; then
|
||||
echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
# Remove pointless GCC version check
|
||||
sed -e '/ check_gcc$/d' -i configure || die
|
||||
|
||||
# Respect LDFLAGS (bug #759100)
|
||||
sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
|
||||
|
||||
eapply "${WORKDIR}/virtualbox-patches-7.0.8/patches"
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export AR CC CXX LD RANLIB
|
||||
|
||||
# Build the user-space tools, warnings are harmless
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
$(usev !dbus --disable-dbus)
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
|
||||
# bug #843437
|
||||
# Respect LDFLAGS (bug #759100)
|
||||
# Cannot use LDFLAGS here because they also get passed to $(LD)
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
CFLAGS=${CFLAGS}
|
||||
CXXFLAGS=${CXXFLAGS}
|
||||
CCLDFLAGS=${LDFLAGS}
|
||||
EOF
|
||||
|
||||
edo ./configure "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
source ./env.sh || die
|
||||
|
||||
# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
|
||||
MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
|
||||
|
||||
local myemakeargs=(
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo
|
||||
VBOX_ONLY_ADDITIONS=1
|
||||
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
AS="$(tc-getCC)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
LD="$(tc-getCC)"
|
||||
|
||||
TOOL_GCC3_CC="$(tc-getCC)"
|
||||
TOOL_GCC3_CXX="$(tc-getCXX)"
|
||||
TOOL_GCC3_LD="$(tc-getCC)"
|
||||
TOOL_GCC3_AS="$(tc-getCC)"
|
||||
TOOL_GCC3_AR="$(tc-getAR)"
|
||||
TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
#TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
|
||||
|
||||
TOOL_GXX3_CC="$(tc-getCC)"
|
||||
TOOL_GXX3_CXX="$(tc-getCXX)"
|
||||
TOOL_GXX3_LD="$(tc-getCXX)"
|
||||
TOOL_GXX3_AS="$(tc-getCXX)"
|
||||
TOOL_GXX3_AR="$(tc-getAR)"
|
||||
TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
#TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
|
||||
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}"
|
||||
TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
|
||||
VBOX_GCC_OPT="${CXXFLAGS}"
|
||||
VBOX_NM="$(tc-getNM)"
|
||||
TOOL_YASM_AS=yasm
|
||||
)
|
||||
|
||||
MAKE="kmk" emake "${myemakeargs[@]}"
|
||||
|
||||
# Now creating the kernel modules. We must do this _after_
|
||||
# we compiled the user-space tools as we need two of the
|
||||
# automatically generated header files. (>=3.2.0)
|
||||
# Move this here for bug 836037
|
||||
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
||||
local modlist=( vboxguest vboxsf )
|
||||
use gui && modlist+=( vboxvideo )
|
||||
modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
|
||||
linux-mod-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
|
||||
insinto /etc/modprobe.d # 485996
|
||||
newins - vboxsf.conf <<-EOF
|
||||
# modprobe.d configuration file for VBOXSF
|
||||
|
||||
# Internal Aliases - Do not edit
|
||||
# ------------------------------
|
||||
alias fs-vboxsf vboxsf
|
||||
EOF
|
||||
|
||||
cd out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
if use dbus; then
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
|
||||
else
|
||||
newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
|
||||
fi
|
||||
|
||||
insinto /usr/sbin/
|
||||
newins VBoxService vboxguest-service
|
||||
fperms 0755 /usr/sbin/vboxguest-service
|
||||
|
||||
insinto /usr/bin
|
||||
doins VBoxControl
|
||||
fperms 0755 /usr/bin/VBoxControl
|
||||
|
||||
# VBoxClient user service and xrandr wrapper
|
||||
if use gui ; then
|
||||
doins VBoxClient
|
||||
fperms 0755 /usr/bin/VBoxClient
|
||||
doins VBoxDRMClient
|
||||
fperms 4755 /usr/bin/VBoxDRMClient
|
||||
|
||||
pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
|
||||
newins 98vboxadd-xclient VBoxClient-all
|
||||
fperms 0755 /usr/bin/VBoxClient-all
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# udev rule for vboxdrv
|
||||
local udev_rules_dir="/lib/udev/rules.d"
|
||||
dodir ${udev_rules_dir}
|
||||
echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
|
||||
# VBoxClient autostart file
|
||||
insinto /etc/xdg/autostart
|
||||
doins "${FILESDIR}"/vboxclient.desktop
|
||||
|
||||
# sample xorg.conf
|
||||
dodoc "${FILESDIR}"/xorg.conf.vbox
|
||||
docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
|
||||
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod-r1_pkg_postinst
|
||||
udev_reload
|
||||
if ! use gui ; then
|
||||
elog "use flag gui is off, enable it to install the"
|
||||
elog "X Window System video driver."
|
||||
fi
|
||||
elog ""
|
||||
elog "Please add users to the \"vboxguest\" group so they can"
|
||||
elog "benefit from seamless mode, auto-resize and clipboard."
|
||||
elog ""
|
||||
elog "The vboxsf group has been added to make automount services work."
|
||||
elog "These services are part of the shared folders support."
|
||||
elog ""
|
||||
elog "Please add:"
|
||||
elog "/etc/init.d/${PN}"
|
||||
elog "to the default runlevel in order to start"
|
||||
elog "needed services."
|
||||
elog "To use the VirtualBox X driver, use the following"
|
||||
elog "file as your /etc/X11/xorg.conf:"
|
||||
elog " /usr/share/doc/${PF}/xorg.conf.vbox"
|
||||
elog ""
|
||||
elog "An autostart .desktop file has been installed to start"
|
||||
elog "VBoxClient in desktop sessions."
|
||||
elog ""
|
||||
elog "You can mount shared folders with:"
|
||||
elog " mount -t vboxsf <shared_folder_name> <mount_point>"
|
||||
elog ""
|
||||
elog "Warning:"
|
||||
elog "this ebuild is only needed if you are running gentoo"
|
||||
elog "inside a VirtualBox Virtual Machine, you don't need"
|
||||
elog "it to run VirtualBox itself."
|
||||
elog ""
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
udev_reload
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
DIST vbox-kernel-module-src-6.1.46.tar.xz 680036 BLAKE2B 46963957424fab934152ff945a3f1c0da9ca395f6ce7834e249805d155e2d41ec94b9feaed5c214d90fab547509ca48282fa7603b7f9434e7a5d596ea75177f9 SHA512 b60cf42e8213cb4c7f68090d118a477b4535cca7011f495b8ed3a254070dd8912853bb6c647cb4c86448e241005ad2467888d4731aee994c1ac80d2f38e153b3
|
||||
DIST vbox-kernel-module-src-6.1.48.tar.xz 680552 BLAKE2B 243cd013a7e027634b7f6338056708cbbfb4ccf46b569c21e60b0e2450dd1ad1395c6881eb235f2cab68a65c0911322604e732fdde06eb389f83171f38ded5ae SHA512 e26e8e4dce70d0dd07a336a6681d49e0fd5991ed92997139311cefa9cb55d03066c6400d4bdb9dbf54fba683192cfc5a63a98076525f3b3066269dc8fc498598
|
||||
DIST vbox-kernel-module-src-6.1.50.tar.xz 680700 BLAKE2B c3a10ce8f3eb7e6c0c05f81cd3c072296557b9f9f6f501bb0aec3f04aabfe1fbb67b553510104139cef290c09ff9e67161085781b8d28c968dfafd15958a1b1a SHA512 7822e421b595263cbdaae08103255742360ca7ab0c385818ec895f10570c5b9ed5c7614742d8fa8bc2414cd426907cd1c49d735cde8caf9d2b7692898058f592
|
||||
DIST vbox-kernel-module-src-7.0.10.tar.xz 717508 BLAKE2B 7e4517eb39a7927a9b4343ab3cf3700c28fd1b2271311a980b4e257029dd228fd541a940b9f0a3b8190161d1b020e76f1a6d89752016620116fc175e45fb038b SHA512 0c7c3bac13a42cca4c6b30c4bbea86511ebbb296c5f941a3fb6cb190cbc60303f80ec93e3e18f03f85a6de1f02c3db102f6bd80f793610a38645b03112fc5ce7
|
||||
DIST vbox-kernel-module-src-7.0.12.tar.xz 718284 BLAKE2B 8b427f9764ad7cb216d3b8dcfa05e8b564a8b67cf3beb7ec048b2529a31580eb59eb0e41a887bb85503542cae18d873d91108a522fc0ba106d119a73ce629f34 SHA512 0b64ad2ddc6eaf56759e636aa6c8e5dba998e232ec42a7bf0cf92dc00e7a6c0ebb11e9d7500a8a407e0c92a162ebb71cdb15cbfd4f570c1860641a7fdba21bd0
|
||||
DIST vbox-kernel-module-src-7.0.14.tar.xz 718532 BLAKE2B 64df92802ab5e9fa3fdf9ba3e3b13004dc687dd2d5f3d41d24354f116a79000fe6ea07bfa8877113ab263d4f75210b600e61d983616f66b6e96324b3ea6a4b2d SHA512 2a0b9a0bbcb0a21a580000309be3a71722ee3cb9a63a5e12cd0d8a391b3832a6cc92ff806f8ca4b5fcb80fed02a44aa4de6a2d49f4583d704cec0902572a68bb
|
||||
|
@ -1,13 +0,0 @@
|
||||
https://bugs.gentoo.org/912168
|
||||
|
||||
--- a/vboxnetflt/linux/VBoxNetFlt-linux.c
|
||||
+++ b/vboxnetflt/linux/VBoxNetFlt-linux.c
|
||||
@@ -47,7 +47,7 @@
|
||||
#if RTLNX_VER_MIN(2,6,24)
|
||||
# include <linux/nsproxy.h>
|
||||
#endif
|
||||
-#if RTLNX_VER_MIN(6,5,0)
|
||||
+#if RTLNX_VER_MIN(6,4,10)
|
||||
# include <net/gso.h>
|
||||
#endif
|
||||
#include <linux/netdevice.h>
|
@ -1,36 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# XXX: the tarball here is just the kernel modules split out of the binary
|
||||
# package that comes from VirtualBox-*.run
|
||||
# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit linux-mod-r1
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-7.0.10-kernel-6.4.10.patch )
|
||||
|
||||
src_compile() {
|
||||
local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
|
||||
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
||||
linux-mod-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# XXX: the tarball here is just the kernel modules split out of the binary
|
||||
# package that comes from VirtualBox-*.run
|
||||
# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit linux-mod-r1
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
|
||||
CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
|
||||
|
||||
src_compile() {
|
||||
local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
|
||||
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
||||
linux-mod-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# XXX: the tarball here is just the kernel modules split out of the binary
|
||||
# package that comes from VirtualBox-*.run
|
||||
# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit linux-mod-r1
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-7.0.10-kernel-6.4.10.patch )
|
||||
|
||||
src_compile() {
|
||||
local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
|
||||
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
||||
linux-mod-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# XXX: the tarball here is just the kernel modules split out of the binary
|
||||
# package that comes from VirtualBox-*.run
|
||||
# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit linux-mod-r1
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
|
||||
CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
|
||||
|
||||
src_compile() {
|
||||
local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
|
||||
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
||||
linux-mod-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
|
||||
}
|
@ -1,675 +0,0 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# To add a new Python here:
|
||||
# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
|
||||
# Do NOT skip this part. It'll end up silently not-building the Python extension
|
||||
# or otherwise misbehaving if you do.
|
||||
#
|
||||
# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
|
||||
#
|
||||
# May need to look at other distros (e.g. Arch Linux) to find patches for newer
|
||||
# Python versions as upstream tends to lag. Upstream may have patches on their
|
||||
# trunk branch but not release branch.
|
||||
#
|
||||
# See bug #785835, bug #856121.
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
|
||||
inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
|
||||
python-single-r1 tmpfiles toolchain-funcs udev xdg
|
||||
|
||||
MY_PN="VirtualBox"
|
||||
MY_P=${MY_PN}-${PV}
|
||||
|
||||
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
LICENSE="GPL-2 dtrace? ( CDDL )"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="alsa debug doc dtrace headless java lvm +opus pam pax-kernel pch pulseaudio +opengl python +qt5 +sdk +sdl +udev vboxwebsrv vnc"
|
||||
|
||||
unset WATCOM #856769
|
||||
|
||||
COMMON_DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
acct-group/vboxusers
|
||||
~app-emulation/virtualbox-modules-${PV}
|
||||
>=dev-libs/libxslt-1.1.19
|
||||
net-misc/curl
|
||||
dev-libs/libxml2
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvpx:0=
|
||||
sys-libs/zlib:=
|
||||
!headless? (
|
||||
sdl? ( media-libs/libsdl:0[X,video] )
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
opengl? (
|
||||
media-libs/libglvnd[X]
|
||||
virtual/glu
|
||||
)
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtx11extras:5
|
||||
opengl? ( dev-qt/qtopengl:5 )
|
||||
x11-libs/libXinerama
|
||||
)
|
||||
)
|
||||
dev-libs/openssl:0=
|
||||
virtual/libcrypt:=
|
||||
lvm? ( sys-fs/lvm2 )
|
||||
opus? ( media-libs/opus )
|
||||
udev? ( >=virtual/udev-171 )
|
||||
vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9 )
|
||||
"
|
||||
# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
|
||||
# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
|
||||
# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
|
||||
# based on *DEPEND doesn't work for BDEPEND at least right now.
|
||||
#
|
||||
# There's a comment in Config.kmk about it
|
||||
# ("With Java 11 wsimport was removed, usually part of a separate install now.")
|
||||
# but it needs more investigation.
|
||||
#
|
||||
# See bug #878299 to track this issue.
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
!headless? (
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
opengl? ( virtual/opengl )
|
||||
)
|
||||
java? ( virtual/jdk:1.8 )
|
||||
pam? ( sys-libs/pam )
|
||||
pax-kernel? ( sys-apps/elfix )
|
||||
pulseaudio? ( media-libs/libpulse )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=app-arch/tar-1.34-r2
|
||||
>=dev-build/kbuild-0.1.9998.3127
|
||||
<=dev-build/kbuild-0.1.9998.3500
|
||||
>=dev-lang/yasm-0.6.2
|
||||
dev-libs/libIDL
|
||||
sys-apps/which
|
||||
sys-devel/bin86
|
||||
sys-libs/libcap
|
||||
sys-power/iasl
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
app-text/docbook-sgml-dtd:4.4
|
||||
dev-texlive/texlive-basic
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexrecommended
|
||||
dev-texlive/texlive-latexextra
|
||||
dev-texlive/texlive-fontsrecommended
|
||||
dev-texlive/texlive-fontsextra
|
||||
)
|
||||
java? ( virtual/jdk:1.8 )
|
||||
qt5? ( dev-qt/linguist-tools:5 )
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
java? ( virtual/jre:1.8 )
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
|
||||
"
|
||||
|
||||
QA_TEXTRELS="
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
"
|
||||
|
||||
QA_EXECSTACK="
|
||||
usr/lib64/virtualbox/iPxeBaseBin
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
|
||||
"
|
||||
|
||||
QA_WX_LOAD="
|
||||
usr/lib64/virtualbox/iPxeBaseBin
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
java? ( sdk )
|
||||
python? ( sdk )
|
||||
vboxwebsrv? ( java )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365
|
||||
|
||||
# This patch is needed to avoid automagic detection based on a hardcoded
|
||||
# list of Pythons in configure. It's necessary but not sufficient
|
||||
# (see the rest of the ebuild's logic for the remainder) to handle
|
||||
# proper Python selection.
|
||||
"${FILESDIR}"/${PN}-6.1.34-r3-python.patch
|
||||
|
||||
# 865361
|
||||
"${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch
|
||||
|
||||
# 906309
|
||||
"${FILESDIR}"/${PN}-6.1.44-fix-libxml2.patch
|
||||
|
||||
# Downloaded patchset
|
||||
"${WORKDIR}"/virtualbox-patches-6.1.36/patches
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
if ! use headless && ! use qt5 ; then
|
||||
einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
|
||||
elif use headless && use qt5 ; then
|
||||
einfo "You selected USE=\"headless qt5\", defaulting to"
|
||||
einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
|
||||
fi
|
||||
|
||||
if ! use opengl ; then
|
||||
einfo "No USE=\"opengl\" selected, this build will lack"
|
||||
einfo "the OpenGL feature."
|
||||
fi
|
||||
if ! use python ; then
|
||||
einfo "You have disabled the \"python\" USE flag. This will only"
|
||||
einfo "disable the python bindings being installed."
|
||||
fi
|
||||
|
||||
# 749273
|
||||
local d=${ROOT}
|
||||
for i in usr "$(get_libdir)"; do
|
||||
d="${d}/$i"
|
||||
if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
|
||||
die "${d} should be owned by root, VirtualBox will not start otherwise"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Only add nopie patch when we're on hardened
|
||||
if gcc-specs-pie ; then
|
||||
eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
|
||||
fi
|
||||
|
||||
# Remove shipped binaries (kBuild, yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Replace pointless GCC version check with something more sensible.
|
||||
# This is needed for the qt5 version check.
|
||||
sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; cc_min="$(${CC} -dumpversion | cut -d. -f2)"@' \
|
||||
-i configure || die
|
||||
|
||||
# Disable things unused or split into separate ebuilds
|
||||
sed -e "s@MY_LIBDIR@$(get_libdir)@" \
|
||||
"${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
|
||||
|
||||
if ! use pch ; then
|
||||
# bug #753323
|
||||
printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
|
||||
>> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
|
||||
-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
|
||||
|
||||
# Do not use hard-coded ld (related to bug #488176)
|
||||
sed -e '/QUIET)ld /s@ld @$(LD) @' \
|
||||
-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
|
||||
|
||||
# Use PAM only when pam USE flag is enbaled (bug #376531)
|
||||
if ! use pam ; then
|
||||
einfo "Disabling PAM removes the possibility to use the VRDP features."
|
||||
sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
|
||||
sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
|
||||
src/VBox/HostServices/Makefile.kmk || die
|
||||
fi
|
||||
|
||||
# add correct java path
|
||||
if use java ; then
|
||||
sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
|
||||
-i "${S}"/Config.kmk || die
|
||||
java-pkg-opt-2_src_prepare
|
||||
fi
|
||||
|
||||
# 890561
|
||||
echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-ld-disable-gold # bug #488176
|
||||
|
||||
#856811 #864274
|
||||
# cannot filter out only one flag, some combinations of these flags produce buggy executables
|
||||
for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
|
||||
append-cflags $(test-flags-CC -mno-$i)
|
||||
append-cxxflags $(test-flags-CXX -mno-$i)
|
||||
done
|
||||
|
||||
# replace xhtml names with numeric equivalents
|
||||
find doc/manual -name \*.xml -exec sed -i \
|
||||
-e 's/ /\ /g' \
|
||||
-e 's/–/\–/g' \
|
||||
-e 's/←/\←/g' \
|
||||
-e 's/→/\→/g' \
|
||||
-e 's/↔/\↔/g' {} \+ || die
|
||||
|
||||
tc-export AR CC CXX LD RANLIB
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
|
||||
--disable-dbus
|
||||
--disable-kmods
|
||||
|
||||
$(usev !alsa --disable-alsa)
|
||||
$(usev debug --build-debug)
|
||||
$(usev !doc --disable-docs)
|
||||
$(usev !java --disable-java)
|
||||
$(usev !lvm --disable-devmapper)
|
||||
$(usev !opus --disable-libopus)
|
||||
$(usev !pulseaudio --disable-pulse)
|
||||
$(usev !python --disable-python)
|
||||
$(usev vboxwebsrv --enable-webservice)
|
||||
$(usev vnc --enable-vnc)
|
||||
)
|
||||
|
||||
if ! use headless ; then
|
||||
myconf+=(
|
||||
$(usev !opengl --disable-opengl)
|
||||
$(usev !qt5 --disable-qt)
|
||||
$(usev !sdl --disable-sdl)
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--build-headless
|
||||
--disable-opengl
|
||||
)
|
||||
fi
|
||||
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
myconf+=( --disable-vmmraw )
|
||||
fi
|
||||
|
||||
# bug #843437
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
CXXFLAGS=${CXXFLAGS}
|
||||
CFLAGS=${CFLAGS}
|
||||
EOF
|
||||
|
||||
# not an autoconf script
|
||||
edo ./configure "${myconf[@]}"
|
||||
|
||||
# Force usage of chosen Python implementation
|
||||
# bug #856121, bug #785835
|
||||
sed -i \
|
||||
-e '/VBOX_WITH_PYTHON.*=/d' \
|
||||
-e '/VBOX_PATH_PYTHON_INC.*=/d' \
|
||||
-e '/VBOX_LIB_PYTHON.*=/d' \
|
||||
AutoConfig.kmk || die
|
||||
|
||||
cat >> AutoConfig.kmk <<-EOF || die
|
||||
VBOX_WITH_PYTHON=$(usev python 1)
|
||||
VBOX_PATH_PYTHON_INC=$(python_get_includedir)
|
||||
VBOX_LIB_PYTHON=$(python_get_library_path)
|
||||
EOF
|
||||
|
||||
if use python ; then
|
||||
local mangled_python="${EPYTHON#python}"
|
||||
mangled_python="${mangled_python/.}"
|
||||
|
||||
# Stub out the script which defines what the Makefile ends up
|
||||
# building for. gen_python_deps.py gets called by the Makefile
|
||||
# with some args and it spits out a bunch of paths for a hardcoded
|
||||
# list of Pythons. We just override it with what we're actually using.
|
||||
# This minimises the amount of patching we have to do for new Pythons.
|
||||
cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
|
||||
print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
|
||||
print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
|
||||
print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
|
||||
print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
|
||||
EOF
|
||||
|
||||
chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
source ./env.sh || die
|
||||
|
||||
# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
|
||||
MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
|
||||
|
||||
local myemakeargs=(
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo
|
||||
VBOX_WITH_VBOXIMGMOUNT=1
|
||||
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
AS="$(tc-getCC)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
|
||||
TOOL_GCC3_CC="$(tc-getCC)"
|
||||
TOOL_GCC3_LD="$(tc-getCC)"
|
||||
TOOL_GCC3_AS="$(tc-getCC)"
|
||||
TOOL_GCC3_AR="$(tc-getAR)"
|
||||
TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GXX3_CC="$(tc-getCC)"
|
||||
TOOL_GXX3_CXX="$(tc-getCXX)"
|
||||
TOOL_GXX3_LD="$(tc-getCXX)"
|
||||
TOOL_GXX3_AS="$(tc-getCXX)"
|
||||
TOOL_GXX3_AR="$(tc-getAR)"
|
||||
TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}"
|
||||
TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
|
||||
VBOX_GCC_OPT="${CXXFLAGS}"
|
||||
VBOX_NM="$(tc-getNM)"
|
||||
|
||||
TOOL_YASM_AS=yasm
|
||||
)
|
||||
|
||||
if use amd64 && has_multilib_profile ; then
|
||||
myemakeargs+=(
|
||||
CC32="$(tc-getCC) -m32"
|
||||
CXX32="$(tc-getCXX) -m32"
|
||||
|
||||
TOOL_GCC32_CC="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_CXX="$(tc-getCXX) -m32"
|
||||
TOOL_GCC32_LD="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_AS="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_AR="$(tc-getAR)"
|
||||
TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GXX32_CC="$(tc-getCC) -m32"
|
||||
TOOL_GXX32_CXX="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_LD="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_AS="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_AR="$(tc-getAR)"
|
||||
TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
)
|
||||
fi
|
||||
|
||||
MAKE="kmk" emake "${myemakeargs[@]}" all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
|
||||
|
||||
local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
|
||||
|
||||
vbox_inst() {
|
||||
local binary="${1}"
|
||||
local perms="${2:-0750}"
|
||||
local path="${3:-${vbox_inst_path}}"
|
||||
|
||||
[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
|
||||
[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
|
||||
|
||||
insinto ${path}
|
||||
doins ${binary}
|
||||
fowners root:vboxusers ${path}/${binary}
|
||||
fperms ${perms} ${path}/${binary}
|
||||
}
|
||||
|
||||
# Create configuration files
|
||||
insinto /etc/vbox
|
||||
newins "${FILESDIR}/${PN}-4-config" vbox.cfg
|
||||
|
||||
# Set the correct libdir
|
||||
sed \
|
||||
-e "s@MY_LIBDIR@$(get_libdir)@" \
|
||||
-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
|
||||
|
||||
# Install the wrapper script
|
||||
exeinto ${vbox_inst_path}
|
||||
newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
|
||||
fowners root:vboxusers ${vbox_inst_path}/VBox
|
||||
fperms 0750 ${vbox_inst_path}/VBox
|
||||
|
||||
# Install binaries and libraries
|
||||
insinto ${vbox_inst_path}
|
||||
doins -r components
|
||||
|
||||
for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} \
|
||||
vboximg-mount *so *r0 iPxeBaseBin ; do
|
||||
vbox_inst ${each}
|
||||
done
|
||||
|
||||
# These binaries need to be suid root.
|
||||
for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
|
||||
vbox_inst ${each} 4750
|
||||
done
|
||||
|
||||
# Install EFI Firmware files (bug #320757)
|
||||
for each in VBoxEFI{32,64}.fd ; do
|
||||
vbox_inst ${each} 0644
|
||||
done
|
||||
|
||||
# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
|
||||
# VBoxXPCOMIPCD (bug #524202)
|
||||
for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/${each}
|
||||
done
|
||||
|
||||
# Symlink binaries to the shipped wrapper
|
||||
for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
|
||||
VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
|
||||
dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
|
||||
|
||||
if use pam ; then
|
||||
# VRDPAuth only works with this (bug #351949)
|
||||
dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
|
||||
fi
|
||||
|
||||
# set an env-variable for 3rd party tools
|
||||
echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
|
||||
doenvd "${T}/90virtualbox"
|
||||
|
||||
if ! use headless ; then
|
||||
vbox_inst rdesktop-vrdp
|
||||
if use sdl ; then
|
||||
vbox_inst VBoxSDL 4750
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
|
||||
|
||||
for each in vboxsdl VBoxSDL ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
fi
|
||||
|
||||
if use qt5 ; then
|
||||
vbox_inst VirtualBox
|
||||
vbox_inst VirtualBoxVM 4750
|
||||
for each in VirtualBox{,VM} ; do
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/${each}
|
||||
done
|
||||
|
||||
if use opengl ; then
|
||||
vbox_inst VBoxTestOGL
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
|
||||
fi
|
||||
|
||||
for each in virtualbox{,vm} VirtualBox{,VM} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r nls
|
||||
doins -r UnattendedTemplates
|
||||
|
||||
domenu ${PN}.desktop
|
||||
fi
|
||||
|
||||
pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
|
||||
for size in 16 32 48 64 128 ; do
|
||||
newicon -s ${size} ${PN}-${size}px.png ${PN}.png
|
||||
done
|
||||
newicon ${PN}-48px.png ${PN}.png
|
||||
doicon -s scalable ${PN}.svg
|
||||
popd &>/dev/null || die
|
||||
pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
|
||||
for size in 16 24 32 48 64 72 96 128 256 512 ; do
|
||||
for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
|
||||
icofile="${PN}-${ico}-${size}px.png"
|
||||
if [[ -f "${icofile}" ]] ; then
|
||||
newicon -s ${size} ${icofile} ${PN}-${ico}.png
|
||||
fi
|
||||
done
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use lvm ; then
|
||||
vbox_inst VBoxVolInfo 4750
|
||||
dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
|
||||
fi
|
||||
|
||||
if use sdk ; then
|
||||
insinto ${vbox_inst_path}
|
||||
doins -r sdk
|
||||
|
||||
if use java ; then
|
||||
java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
|
||||
java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use udev ; then
|
||||
local udevdir="$(get_udevdir)"
|
||||
local udev_file="VBoxCreateUSBNode.sh"
|
||||
local rules_file="10-virtualbox.rules"
|
||||
|
||||
insinto ${udevdir}
|
||||
doins ${udev_file}
|
||||
fowners root:vboxusers ${udevdir}/${udev_file}
|
||||
fperms 0750 ${udevdir}/${udev_file}
|
||||
|
||||
insinto ${udevdir}/rules.d
|
||||
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
|
||||
> "${T}"/${rules_file} || die
|
||||
doins "${T}"/${rules_file}
|
||||
fi
|
||||
|
||||
if use vboxwebsrv ; then
|
||||
vbox_inst vboxwebsrv
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
|
||||
newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
|
||||
newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
|
||||
fi
|
||||
|
||||
# Remove dead symlinks (bug #715338)
|
||||
find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die
|
||||
|
||||
# Fix version string in extensions or else they don't get accepted
|
||||
# by the virtualbox host process (see bug #438930)
|
||||
find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
|
||||
|
||||
local extensions_dir="${vbox_inst_path}/ExtensionPacks"
|
||||
|
||||
if use vnc ; then
|
||||
insinto ${extensions_dir}
|
||||
doins -r ExtensionPacks/VNC
|
||||
fi
|
||||
|
||||
if use dtrace ; then
|
||||
insinto ${extensions_dir}
|
||||
doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
|
||||
fi
|
||||
|
||||
if use doc ; then
|
||||
dodoc UserManual.pdf
|
||||
fi
|
||||
|
||||
if use python ; then
|
||||
local mangled_python="${EPYTHON#python}"
|
||||
mangled_python="${mangled_python/./_}"
|
||||
|
||||
local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython${mangled_python}.so"
|
||||
if [[ ! -x "${python_path_ext}" ]] ; then
|
||||
eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
|
||||
eerror "but none were installed. This may happen if support for a Python target"
|
||||
eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
|
||||
die "Incomplete installation of Python bindings! File a bug with Gentoo!"
|
||||
fi
|
||||
fi
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if use udev ; then
|
||||
udev_reload
|
||||
udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
tmpfiles_process virtualbox-vboxusb.conf
|
||||
|
||||
if ! use headless && use qt5 ; then
|
||||
elog "To launch VirtualBox just type: \"virtualbox\"."
|
||||
fi
|
||||
|
||||
elog "You must be in the vboxusers group to use VirtualBox."
|
||||
elog ""
|
||||
elog "The latest user manual is available for download at:"
|
||||
elog "https://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
|
||||
elog ""
|
||||
|
||||
optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
|
||||
optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
|
||||
optfeature "Guest additions ISO" app-emulation/virtualbox-additions
|
||||
|
||||
if ! use udev ; then
|
||||
ewarn "Without USE=udev, USB devices will likely not work in ${PN}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
|
||||
use udev && udev_reload
|
||||
}
|
@ -1,755 +0,0 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# To add a new Python here:
|
||||
# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
|
||||
# Do NOT skip this part. It'll end up silently not-building the Python extension
|
||||
# or otherwise misbehaving if you do.
|
||||
#
|
||||
# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
|
||||
#
|
||||
# May need to look at other distros (e.g. Arch Linux) to find patches for newer
|
||||
# Python versions as upstream tends to lag. Upstream may have patches on their
|
||||
# trunk branch but not release branch.
|
||||
#
|
||||
# See bug #785835, bug #856121.
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
|
||||
inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
|
||||
python-single-r1 tmpfiles toolchain-funcs udev xdg
|
||||
|
||||
MY_PN="VirtualBox"
|
||||
MY_P=${MY_PN}-${PV}
|
||||
|
||||
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="
|
||||
https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.8.tar.bz2
|
||||
gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${PV}.tar.xz ) )
|
||||
"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
|
||||
|
||||
unset WATCOM #856769
|
||||
|
||||
COMMON_DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
acct-group/vboxusers
|
||||
~app-emulation/virtualbox-modules-${PV}
|
||||
dev-libs/libtpms
|
||||
dev-libs/libxml2
|
||||
dev-libs/openssl:0=
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvpx:0=
|
||||
net-misc/curl
|
||||
sys-libs/zlib
|
||||
dbus? ( sys-apps/dbus )
|
||||
gui? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtdbus:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qthelp:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtx11extras:5
|
||||
dev-qt/qtxml:5
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
opengl? ( dev-qt/qtopengl:5 )
|
||||
)
|
||||
lvm? ( sys-fs/lvm2 )
|
||||
opengl? (
|
||||
media-libs/libglvnd[X]
|
||||
media-libs/vulkan-loader
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
)
|
||||
pam? ( sys-libs/pam )
|
||||
sdl? (
|
||||
media-libs/libsdl2[X,video]
|
||||
x11-libs/libX11
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXt
|
||||
)
|
||||
vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
|
||||
vde? ( net-misc/vde )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9 )
|
||||
"
|
||||
# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
|
||||
# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
|
||||
# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
|
||||
# based on *DEPEND doesn't work for BDEPEND at least right now.
|
||||
#
|
||||
# There's a comment in Config.kmk about it
|
||||
# ("With Java 11 wsimport was removed, usually part of a separate install now.")
|
||||
# but it needs more investigation.
|
||||
#
|
||||
# See bug #878299 to track this issue.
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
>=dev-libs/libxslt-1.1.19
|
||||
virtual/libcrypt:=
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
gui? (
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXrandr
|
||||
)
|
||||
java? ( virtual/jdk:1.8 )
|
||||
opengl? (
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXrandr
|
||||
virtual/glu
|
||||
)
|
||||
sdl? ( x11-libs/libXinerama )
|
||||
pulseaudio? ( media-libs/libpulse )
|
||||
udev? ( >=virtual/udev-171 )
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
gui? ( x11-libs/libxcb:= )
|
||||
java? ( virtual/jre:1.8 )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=app-arch/tar-1.34-r2
|
||||
>=dev-lang/yasm-0.6.2
|
||||
dev-libs/libIDL
|
||||
dev-util/glslang
|
||||
>=dev-build/kbuild-0.1.9998.3592
|
||||
sys-apps/which
|
||||
sys-devel/bin86
|
||||
sys-libs/libcap
|
||||
sys-power/iasl
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
app-text/docbook-sgml-dtd:4.4
|
||||
app-text/docbook-xsl-ns-stylesheets
|
||||
dev-texlive/texlive-basic
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexrecommended
|
||||
dev-texlive/texlive-latexextra
|
||||
dev-texlive/texlive-fontsrecommended
|
||||
dev-texlive/texlive-fontsextra
|
||||
dev-qt/qthelp:5
|
||||
)
|
||||
gui? ( dev-qt/linguist-tools:5 )
|
||||
nls? ( dev-qt/linguist-tools:5 )
|
||||
java? ( virtual/jdk:1.8 )
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
|
||||
"
|
||||
|
||||
QA_TEXTRELS="
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
"
|
||||
|
||||
QA_EXECSTACK="
|
||||
usr/lib64/virtualbox/iPxeBaseBin
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
|
||||
"
|
||||
|
||||
QA_WX_LOAD="
|
||||
usr/lib64/virtualbox/iPxeBaseBin
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
java? ( sdk )
|
||||
python? ( sdk )
|
||||
vboxwebsrv? ( java )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365
|
||||
|
||||
# This patch is needed to avoid automagic detection based on a hardcoded
|
||||
# list of Pythons in configure. It's necessary but not sufficient
|
||||
# (see the rest of the ebuild's logic for the remainder) to handle
|
||||
# proper Python selection.
|
||||
"${FILESDIR}"/${PN}-6.1.34-r3-python.patch
|
||||
|
||||
# 865361
|
||||
"${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch
|
||||
|
||||
"${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch
|
||||
"${FILESDIR}"/${PN}-7.0.10-python.patch
|
||||
"${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
|
||||
"${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch
|
||||
"${FILESDIR}"/${PN}-7.0.6-fix-libxml2.patch
|
||||
# 913109
|
||||
"${FILESDIR}"/${PN}-7.0.10-fix-binutils-hardened.patch
|
||||
|
||||
# Downloaded patchset
|
||||
"${WORKDIR}"/virtualbox-patches-7.0.8/patches
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
if ! use gui; then
|
||||
einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
|
||||
fi
|
||||
|
||||
if ! use opengl; then
|
||||
einfo "No USE=\"opengl\" selected, this build will lack"
|
||||
einfo "the OpenGL feature."
|
||||
fi
|
||||
if ! use python; then
|
||||
einfo "You have disabled the \"python\" USE flag. This will only"
|
||||
einfo "disable the python bindings being installed."
|
||||
fi
|
||||
if ! use nls && use gui; then
|
||||
einfo "USE=\"gui\" also selects USE=\"nls\". This build"
|
||||
einfo "will have NLS support."
|
||||
fi
|
||||
|
||||
# 749273
|
||||
local d=${ROOT}
|
||||
for i in usr "$(get_libdir)"; do
|
||||
d="${d}/$i"
|
||||
if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
|
||||
die "${d} should be owned by root, VirtualBox will not start otherwise"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Only add nopie patch when we're on hardened
|
||||
if gcc-specs-pie; then
|
||||
eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
|
||||
fi
|
||||
|
||||
# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
|
||||
rm -r kBuild/bin || die
|
||||
# Remove everything in tools except kBuildUnits
|
||||
find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
|
||||
|
||||
# Disable things unused or split into separate ebuilds
|
||||
sed -e "s@MY_LIBDIR@$(get_libdir)@" \
|
||||
"${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
|
||||
|
||||
if ! use pch; then
|
||||
# bug #753323
|
||||
printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
|
||||
>> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
|
||||
-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
|
||||
|
||||
# Do not use hard-coded ld (related to bug #488176)
|
||||
sed -e '/QUIET)ld /s@ld @$(LD) @' \
|
||||
-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
|
||||
|
||||
# Use PAM only when pam USE flag is enbaled (bug #376531)
|
||||
if ! use pam; then
|
||||
einfo "Disabling PAM removes the possibility to use the VRDP features."
|
||||
sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
|
||||
sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
|
||||
src/VBox/HostServices/Makefile.kmk || die
|
||||
echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
# add correct java path
|
||||
if use java; then
|
||||
sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
|
||||
-i "${S}"/Config.kmk || die
|
||||
java-pkg-opt-2_src_prepare
|
||||
fi
|
||||
|
||||
#856811 #864274
|
||||
# cannot filter out only one flag, some combinations of these flags produce buggy executables
|
||||
for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
|
||||
append-cflags $(test-flags-CC -mno-$i)
|
||||
append-cxxflags $(test-flags-CXX -mno-$i)
|
||||
done
|
||||
|
||||
# bug #843437
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
CXXFLAGS=${CXXFLAGS}
|
||||
CFLAGS=${CFLAGS}
|
||||
EOF
|
||||
|
||||
if use sdl; then
|
||||
sed -i 's/sdl-config/sdl2-config/' configure || die
|
||||
echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
#443830
|
||||
echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
|
||||
|
||||
if tc-is-clang; then
|
||||
# clang assembler chokes on comments starting with /
|
||||
sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
|
||||
|
||||
# clang does not support this extension
|
||||
eapply "${FILESDIR}"/${PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
|
||||
fi
|
||||
|
||||
# fix doc generation
|
||||
echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
|
||||
# replace xhtml names with numeric equivalents
|
||||
find doc/manual -name \*.xml -exec sed -i \
|
||||
-e 's/ /\ /g' \
|
||||
-e 's/–/\–/g' \
|
||||
-e 's/←/\←/g' \
|
||||
-e 's/→/\→/g' \
|
||||
-e 's/↔/\↔/g' {} \+ || die
|
||||
|
||||
# fix help path #891879
|
||||
echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
|
||||
|
||||
# 489208
|
||||
# Cannot patch the whole text, many translations. Use sed instead to replace the command
|
||||
find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
|
||||
's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die
|
||||
sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
|
||||
src/VBox/Frontends/VirtualBox/src/main.cpp \
|
||||
src/VBox/VMM/VMMR3/VM.cpp || die
|
||||
|
||||
# 890561
|
||||
echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
|
||||
|
||||
if ! use nls && ! use gui; then
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
VBOX_WITH_NLS :=
|
||||
VBOX_WITH_MAIN_NLS :=
|
||||
VBOX_WITH_PUEL_NLS :=
|
||||
VBOX_WITH_VBOXMANAGE_NLS :=
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-ld-disable-gold # bug #488176
|
||||
|
||||
tc-export AR CC CXX LD RANLIB
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
|
||||
--disable-kmods
|
||||
|
||||
$(usev !alsa --disable-alsa)
|
||||
$(usev !dbus --disable-dbus)
|
||||
$(usev debug --build-debug)
|
||||
$(usev !doc --disable-docs)
|
||||
$(usev !java --disable-java)
|
||||
$(usev !lvm --disable-devmapper)
|
||||
$(usev !pulseaudio --disable-pulse)
|
||||
$(usev !python --disable-python)
|
||||
$(usev vboxwebsrv --enable-webservice)
|
||||
$(usev vde --enable-vde)
|
||||
$(usev vnc --enable-vnc)
|
||||
)
|
||||
|
||||
if use gui || use sdl || use opengl; then
|
||||
myconf+=(
|
||||
$(usev !opengl --disable-opengl)
|
||||
$(usev !gui --disable-qt)
|
||||
$(usev !sdl --disable-sdl)
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--build-headless
|
||||
)
|
||||
fi
|
||||
|
||||
if use amd64 && ! has_multilib_profile; then
|
||||
myconf+=( --disable-vmmraw )
|
||||
fi
|
||||
|
||||
# not an autoconf script
|
||||
edo ./configure "${myconf[@]}"
|
||||
|
||||
# Force usage of chosen Python implementation
|
||||
# bug #856121, bug #785835
|
||||
sed -i \
|
||||
-e '/VBOX_WITH_PYTHON.*=/d' \
|
||||
-e '/VBOX_PATH_PYTHON_INC.*=/d' \
|
||||
-e '/VBOX_LIB_PYTHON.*=/d' \
|
||||
AutoConfig.kmk || die
|
||||
|
||||
cat >> AutoConfig.kmk <<-EOF || die
|
||||
VBOX_WITH_PYTHON=$(usev python 1)
|
||||
VBOX_PATH_PYTHON_INC=$(python_get_includedir)
|
||||
VBOX_LIB_PYTHON=$(python_get_library_path)
|
||||
EOF
|
||||
|
||||
if use python; then
|
||||
local mangled_python="${EPYTHON#python}"
|
||||
mangled_python="${mangled_python/.}"
|
||||
|
||||
# Stub out the script which defines what the Makefile ends up
|
||||
# building for. gen_python_deps.py gets called by the Makefile
|
||||
# with some args and it spits out a bunch of paths for a hardcoded
|
||||
# list of Pythons. We just override it with what we're actually using.
|
||||
# This minimises the amount of patching we have to do for new Pythons.
|
||||
cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
|
||||
print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
|
||||
print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
|
||||
print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
|
||||
print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
|
||||
EOF
|
||||
|
||||
chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
source ./env.sh || die
|
||||
|
||||
# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
|
||||
MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
|
||||
|
||||
local myemakeargs=(
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo
|
||||
VBOX_WITH_VBOXIMGMOUNT=1
|
||||
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
AS="$(tc-getCC)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
|
||||
TOOL_GCC3_CC="$(tc-getCC)"
|
||||
TOOL_GCC3_LD="$(tc-getCC)"
|
||||
TOOL_GCC3_AS="$(tc-getCC)"
|
||||
TOOL_GCC3_AR="$(tc-getAR)"
|
||||
TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GXX3_CC="$(tc-getCC)"
|
||||
TOOL_GXX3_CXX="$(tc-getCXX)"
|
||||
TOOL_GXX3_LD="$(tc-getCXX)"
|
||||
TOOL_GXX3_AS="$(tc-getCXX)"
|
||||
TOOL_GXX3_AR="$(tc-getAR)"
|
||||
TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}"
|
||||
TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
|
||||
VBOX_GCC_OPT="${CXXFLAGS}"
|
||||
VBOX_NM="$(tc-getNM)"
|
||||
|
||||
TOOL_YASM_AS=yasm
|
||||
)
|
||||
|
||||
if use amd64 && has_multilib_profile; then
|
||||
myemakeargs+=(
|
||||
CC32="$(tc-getCC) -m32"
|
||||
CXX32="$(tc-getCXX) -m32"
|
||||
|
||||
TOOL_GCC32_CC="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_CXX="$(tc-getCXX) -m32"
|
||||
TOOL_GCC32_LD="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_AS="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_AR="$(tc-getAR)"
|
||||
TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GXX32_CC="$(tc-getCC) -m32"
|
||||
TOOL_GXX32_CXX="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_LD="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_AS="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_AR="$(tc-getAR)"
|
||||
TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
)
|
||||
fi
|
||||
|
||||
MAKE="kmk" emake "${myemakeargs[@]}" all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
|
||||
|
||||
local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
|
||||
|
||||
vbox_inst() {
|
||||
local binary="${1}"
|
||||
local perms="${2:-0750}"
|
||||
local path="${3:-${vbox_inst_path}}"
|
||||
|
||||
[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
|
||||
[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
|
||||
|
||||
insinto ${path}
|
||||
doins ${binary}
|
||||
fowners root:vboxusers ${path}/${binary}
|
||||
fperms ${perms} ${path}/${binary}
|
||||
}
|
||||
|
||||
# Create configuration files
|
||||
insinto /etc/vbox
|
||||
newins "${FILESDIR}/${PN}-4-config" vbox.cfg
|
||||
|
||||
# Set the correct libdir
|
||||
sed \
|
||||
-e "s@MY_LIBDIR@$(get_libdir)@" \
|
||||
-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
|
||||
|
||||
# Install the wrapper script
|
||||
exeinto ${vbox_inst_path}
|
||||
newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
|
||||
fowners root:vboxusers ${vbox_inst_path}/VBox
|
||||
fperms 0750 ${vbox_inst_path}/VBox
|
||||
|
||||
# Install binaries and libraries
|
||||
insinto ${vbox_inst_path}
|
||||
doins -r components
|
||||
|
||||
for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
|
||||
vboximg-mount vbox-img *so *r0; do
|
||||
vbox_inst ${each}
|
||||
done
|
||||
|
||||
# These binaries need to be suid root.
|
||||
for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
|
||||
vbox_inst ${each} 4750
|
||||
done
|
||||
|
||||
# Install EFI Firmware files (bug #320757)
|
||||
for each in VBoxEFI{32,64}.fd ; do
|
||||
vbox_inst ${each} 0644
|
||||
done
|
||||
|
||||
# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
|
||||
# VBoxXPCOMIPCD (bug #524202)
|
||||
for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/${each}
|
||||
done
|
||||
|
||||
# Symlink binaries to the shipped wrapper
|
||||
for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
|
||||
VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
|
||||
dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
|
||||
|
||||
if use pam; then
|
||||
# VRDPAuth only works with this (bug #351949)
|
||||
dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
|
||||
fi
|
||||
|
||||
# set an env-variable for 3rd party tools
|
||||
echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
|
||||
# environment variables used during SDK binding installation
|
||||
echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
|
||||
echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
|
||||
doenvd "${T}/90virtualbox"
|
||||
|
||||
if use sdl; then
|
||||
vbox_inst VBoxSDL 4750
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
|
||||
|
||||
for each in vboxsdl VBoxSDL ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
fi
|
||||
|
||||
if use gui; then
|
||||
vbox_inst VirtualBox
|
||||
vbox_inst VirtualBoxVM 4750
|
||||
for each in VirtualBox{,VM} ; do
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/${each}
|
||||
done
|
||||
|
||||
if use opengl; then
|
||||
vbox_inst VBoxTestOGL
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
|
||||
fi
|
||||
|
||||
for each in virtualbox{,vm} VirtualBox{,VM} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r nls
|
||||
doins -r UnattendedTemplates
|
||||
|
||||
domenu ${PN}.desktop
|
||||
|
||||
pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
|
||||
for size in 16 32 48 64 128 ; do
|
||||
newicon -s ${size} ${PN}-${size}px.png ${PN}.png
|
||||
done
|
||||
newicon ${PN}-48px.png ${PN}.png
|
||||
doicon -s scalable ${PN}.svg
|
||||
popd &>/dev/null || die
|
||||
pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
|
||||
for size in 16 24 32 48 64 72 96 128 256 512 ; do
|
||||
for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
|
||||
icofile="${PN}-${ico}-${size}px.png"
|
||||
if [[ -f "${icofile}" ]]; then
|
||||
newicon -s ${size} ${icofile} ${PN}-${ico}.png
|
||||
fi
|
||||
done
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use lvm; then
|
||||
vbox_inst VBoxVolInfo 4750
|
||||
dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
|
||||
fi
|
||||
|
||||
if use sdk; then
|
||||
insinto ${vbox_inst_path}
|
||||
doins -r sdk
|
||||
|
||||
if use java; then
|
||||
java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
|
||||
java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use udev; then
|
||||
local udevdir="$(get_udevdir)"
|
||||
local udev_file="VBoxCreateUSBNode.sh"
|
||||
local rules_file="10-virtualbox.rules"
|
||||
|
||||
insinto ${udevdir}
|
||||
doins ${udev_file}
|
||||
fowners root:vboxusers ${udevdir}/${udev_file}
|
||||
fperms 0750 ${udevdir}/${udev_file}
|
||||
|
||||
insinto ${udevdir}/rules.d
|
||||
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
|
||||
> "${T}"/${rules_file} || die
|
||||
doins "${T}"/${rules_file}
|
||||
fi
|
||||
|
||||
if use vboxwebsrv; then
|
||||
vbox_inst vboxwebsrv
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
|
||||
newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
|
||||
newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
|
||||
fi
|
||||
|
||||
# Remove dead symlinks (bug #715338)
|
||||
find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die
|
||||
|
||||
# Fix version string in extensions or else they don't get accepted
|
||||
# by the virtualbox host process (see bug #438930)
|
||||
find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
|
||||
|
||||
local extensions_dir="${vbox_inst_path}/ExtensionPacks"
|
||||
|
||||
if use vnc; then
|
||||
insinto ${extensions_dir}
|
||||
doins -r ExtensionPacks/VNC
|
||||
fi
|
||||
|
||||
if use dtrace; then
|
||||
insinto ${extensions_dir}
|
||||
doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc UserManual.pdf UserManual.q{ch,hc}
|
||||
docompress -x /usr/share/doc/${PF}
|
||||
elif use gui; then
|
||||
dodoc "${WORKDIR}"/${PN}-help-${PV}/UserManual.q{ch,hc}
|
||||
docompress -x /usr/share/doc/${PF}
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
|
||||
if [[ ! -x "${python_path_ext}" ]]; then
|
||||
eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
|
||||
eerror "but none were installed. This may happen if support for a Python target"
|
||||
eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
|
||||
die "Incomplete installation of Python bindings! File a bug with Gentoo!"
|
||||
fi
|
||||
|
||||
# 378871
|
||||
local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
|
||||
pushd "${installer_dir}" &> /dev/null || die
|
||||
sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
|
||||
-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
|
||||
-i vboxapi/__init__.py || die
|
||||
# insert shebang, the files come without one
|
||||
find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
|
||||
python_domodule vboxapi
|
||||
popd &> /dev/null || die
|
||||
python_doscript vboxshell.py
|
||||
|
||||
# do not install the installer
|
||||
rm -r "${installer_dir}" || die
|
||||
fi
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if use udev; then
|
||||
udev_reload
|
||||
udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
tmpfiles_process virtualbox-vboxusb.conf
|
||||
|
||||
if use gui; then
|
||||
elog "To launch VirtualBox just type: \"virtualbox\"."
|
||||
fi
|
||||
|
||||
elog "You must be in the vboxusers group to use VirtualBox."
|
||||
elog ""
|
||||
elog "The latest user manual is available for download at:"
|
||||
elog "https://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
|
||||
elog ""
|
||||
|
||||
optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
|
||||
optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
|
||||
optfeature "Guest additions ISO" app-emulation/virtualbox-additions
|
||||
|
||||
if ! use udev; then
|
||||
ewarn "Without USE=udev, USB devices will likely not work in ${PN}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
|
||||
use udev && udev_reload
|
||||
}
|
@ -1,735 +0,0 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# To add a new Python here:
|
||||
# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
|
||||
# Do NOT skip this part. It'll end up silently not-building the Python extension
|
||||
# or otherwise misbehaving if you do.
|
||||
#
|
||||
# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
|
||||
#
|
||||
# May need to look at other distros (e.g. Arch Linux) to find patches for newer
|
||||
# Python versions as upstream tends to lag. Upstream may have patches on their
|
||||
# trunk branch but not release branch.
|
||||
#
|
||||
# See bug #785835, bug #856121.
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
|
||||
python-single-r1 tmpfiles toolchain-funcs udev xdg
|
||||
|
||||
MY_PN="VirtualBox"
|
||||
MY_P=${MY_PN}-${PV}
|
||||
|
||||
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="
|
||||
https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.8.tar.bz2
|
||||
gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${PV}.tar.xz ) )
|
||||
"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64"
|
||||
IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
|
||||
|
||||
unset WATCOM #856769
|
||||
|
||||
COMMON_DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
acct-group/vboxusers
|
||||
~app-emulation/virtualbox-modules-${PV}
|
||||
dev-libs/libtpms
|
||||
dev-libs/libxml2
|
||||
dev-libs/openssl:0=
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvpx:0=
|
||||
net-misc/curl
|
||||
sys-libs/zlib
|
||||
dbus? ( sys-apps/dbus )
|
||||
gui? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtdbus:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qthelp:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtx11extras:5
|
||||
dev-qt/qtxml:5
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
opengl? ( dev-qt/qtopengl:5 )
|
||||
)
|
||||
lvm? ( sys-fs/lvm2 )
|
||||
opengl? (
|
||||
media-libs/libglvnd[X]
|
||||
media-libs/vulkan-loader
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
)
|
||||
pam? ( sys-libs/pam )
|
||||
sdl? (
|
||||
media-libs/libsdl2[X,video]
|
||||
x11-libs/libX11
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXt
|
||||
)
|
||||
vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
|
||||
vde? ( net-misc/vde )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9 )
|
||||
"
|
||||
# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
|
||||
# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
|
||||
# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
|
||||
# based on *DEPEND doesn't work for BDEPEND at least right now.
|
||||
#
|
||||
# There's a comment in Config.kmk about it
|
||||
# ("With Java 11 wsimport was removed, usually part of a separate install now.")
|
||||
# but it needs more investigation.
|
||||
#
|
||||
# See bug #878299 to track this issue.
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
>=dev-libs/libxslt-1.1.19
|
||||
virtual/libcrypt:=
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
gui? (
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXrandr
|
||||
)
|
||||
java? ( virtual/jdk:1.8 )
|
||||
opengl? (
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXrandr
|
||||
virtual/glu
|
||||
)
|
||||
sdl? ( x11-libs/libXinerama )
|
||||
pulseaudio? ( media-libs/libpulse )
|
||||
udev? ( >=virtual/udev-171 )
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
gui? ( x11-libs/libxcb:= )
|
||||
java? ( virtual/jre:1.8 )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=app-arch/tar-1.34-r2
|
||||
>=dev-lang/yasm-0.6.2
|
||||
dev-libs/libIDL
|
||||
dev-util/glslang
|
||||
>=dev-build/kbuild-0.1.9998.3592
|
||||
sys-apps/which
|
||||
sys-devel/bin86
|
||||
sys-libs/libcap
|
||||
sys-power/iasl
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
app-text/docbook-sgml-dtd:4.4
|
||||
app-text/docbook-xsl-ns-stylesheets
|
||||
dev-texlive/texlive-basic
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexrecommended
|
||||
dev-texlive/texlive-latexextra
|
||||
dev-texlive/texlive-fontsrecommended
|
||||
dev-texlive/texlive-fontsextra
|
||||
dev-qt/qthelp:5
|
||||
)
|
||||
gui? ( dev-qt/linguist-tools:5 )
|
||||
nls? ( dev-qt/linguist-tools:5 )
|
||||
java? ( virtual/jdk:1.8 )
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
|
||||
"
|
||||
|
||||
QA_TEXTRELS="
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
"
|
||||
|
||||
QA_EXECSTACK="
|
||||
usr/lib64/virtualbox/iPxeBaseBin
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
|
||||
"
|
||||
|
||||
QA_WX_LOAD="
|
||||
usr/lib64/virtualbox/iPxeBaseBin
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib64/virtualbox/VMMR0.r0
|
||||
usr/lib64/virtualbox/VBoxDDR0.r0
|
||||
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
|
||||
"
|
||||
|
||||
REQUIRED_USE="
|
||||
java? ( sdk )
|
||||
python? ( sdk )
|
||||
vboxwebsrv? ( java )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365
|
||||
|
||||
# This patch is needed to avoid automagic detection based on a hardcoded
|
||||
# list of Pythons in configure. It's necessary but not sufficient
|
||||
# (see the rest of the ebuild's logic for the remainder) to handle
|
||||
# proper Python selection.
|
||||
"${FILESDIR}"/${PN}-6.1.34-r3-python.patch
|
||||
|
||||
# 865361
|
||||
"${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch
|
||||
|
||||
"${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch
|
||||
"${FILESDIR}"/${PN}-7.0.10-python.patch
|
||||
"${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
|
||||
"${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch
|
||||
"${FILESDIR}"/${PN}-7.0.6-fix-libxml2.patch
|
||||
|
||||
# Downloaded patchset
|
||||
"${WORKDIR}"/virtualbox-patches-7.0.8/patches
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
if ! use gui; then
|
||||
einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
|
||||
fi
|
||||
|
||||
if ! use opengl; then
|
||||
einfo "No USE=\"opengl\" selected, this build will lack"
|
||||
einfo "the OpenGL feature."
|
||||
fi
|
||||
if ! use python; then
|
||||
einfo "You have disabled the \"python\" USE flag. This will only"
|
||||
einfo "disable the python bindings being installed."
|
||||
fi
|
||||
if ! use nls && use gui; then
|
||||
einfo "USE=\"gui\" also selects USE=\"nls\". This build"
|
||||
einfo "will have NLS support."
|
||||
fi
|
||||
|
||||
# 749273
|
||||
local d=${ROOT}
|
||||
for i in usr "$(get_libdir)"; do
|
||||
d="${d}/$i"
|
||||
if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
|
||||
die "${d} should be owned by root, VirtualBox will not start otherwise"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Only add nopie patch when we're on hardened
|
||||
if gcc-specs-pie; then
|
||||
eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
|
||||
fi
|
||||
|
||||
# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
|
||||
rm -r kBuild/bin || die
|
||||
# Remove everything in tools except kBuildUnits
|
||||
find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
|
||||
|
||||
# Disable things unused or split into separate ebuilds
|
||||
sed -e "s@MY_LIBDIR@$(get_libdir)@" \
|
||||
"${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
|
||||
|
||||
if ! use pch; then
|
||||
# bug #753323
|
||||
printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
|
||||
>> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
# Respect LDFLAGS
|
||||
sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
|
||||
-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
|
||||
|
||||
# Do not use hard-coded ld (related to bug #488176)
|
||||
sed -e '/QUIET)ld /s@ld @$(LD) @' \
|
||||
-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
|
||||
|
||||
# Use PAM only when pam USE flag is enbaled (bug #376531)
|
||||
if ! use pam; then
|
||||
einfo "Disabling PAM removes the possibility to use the VRDP features."
|
||||
sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
|
||||
sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
|
||||
src/VBox/HostServices/Makefile.kmk || die
|
||||
echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
# add correct java path
|
||||
if use java; then
|
||||
sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
|
||||
-i "${S}"/Config.kmk || die
|
||||
java-pkg-opt-2_src_prepare
|
||||
fi
|
||||
|
||||
#856811 #864274
|
||||
# cannot filter out only one flag, some combinations of these flags produce buggy executables
|
||||
for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
|
||||
append-cflags $(test-flags-CC -mno-$i)
|
||||
append-cxxflags $(test-flags-CXX -mno-$i)
|
||||
done
|
||||
|
||||
# bug #843437
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
CXXFLAGS=${CXXFLAGS}
|
||||
CFLAGS=${CFLAGS}
|
||||
EOF
|
||||
|
||||
if use sdl; then
|
||||
sed -i 's/sdl-config/sdl2-config/' configure || die
|
||||
echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
|
||||
fi
|
||||
|
||||
#443830
|
||||
echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
|
||||
|
||||
if tc-is-clang; then
|
||||
# clang assembler chokes on comments starting with /
|
||||
sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
|
||||
|
||||
# clang does not support this extension
|
||||
eapply "${FILESDIR}"/${PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
|
||||
fi
|
||||
|
||||
# fix doc generation
|
||||
echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
|
||||
# replace xhtml names with numeric equivalents
|
||||
find doc/manual -name \*.xml -exec sed -i \
|
||||
-e 's/ /\ /g' \
|
||||
-e 's/–/\–/g' \
|
||||
-e 's/←/\←/g' \
|
||||
-e 's/→/\→/g' \
|
||||
-e 's/↔/\↔/g' {} \+ || die
|
||||
|
||||
# fix help path #891879
|
||||
echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
|
||||
|
||||
# 489208
|
||||
# Cannot patch the whole text, many translations. Use sed instead to replace the command
|
||||
find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
|
||||
's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die
|
||||
sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
|
||||
src/VBox/Frontends/VirtualBox/src/main.cpp \
|
||||
src/VBox/VMM/VMMR3/VM.cpp || die
|
||||
|
||||
# 890561
|
||||
echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
|
||||
|
||||
if ! use nls && ! use gui; then
|
||||
cat >> LocalConfig.kmk <<-EOF || die
|
||||
VBOX_WITH_NLS :=
|
||||
VBOX_WITH_MAIN_NLS :=
|
||||
VBOX_WITH_PUEL_NLS :=
|
||||
VBOX_WITH_VBOXMANAGE_NLS :=
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-ld-disable-gold # bug #488176
|
||||
|
||||
tc-export AR CC CXX LD RANLIB
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
|
||||
--disable-kmods
|
||||
|
||||
$(usev !alsa --disable-alsa)
|
||||
$(usev !dbus --disable-dbus)
|
||||
$(usev debug --build-debug)
|
||||
$(usev !doc --disable-docs)
|
||||
$(usev !java --disable-java)
|
||||
$(usev !lvm --disable-devmapper)
|
||||
$(usev !pulseaudio --disable-pulse)
|
||||
$(usev !python --disable-python)
|
||||
$(usev vboxwebsrv --enable-webservice)
|
||||
$(usev vde --enable-vde)
|
||||
$(usev vnc --enable-vnc)
|
||||
)
|
||||
|
||||
if use gui || use sdl || use opengl; then
|
||||
myconf+=(
|
||||
$(usev !opengl --disable-opengl)
|
||||
$(usev !gui --disable-qt)
|
||||
$(usev !sdl --disable-sdl)
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--build-headless
|
||||
)
|
||||
fi
|
||||
|
||||
if use amd64 && ! has_multilib_profile; then
|
||||
myconf+=( --disable-vmmraw )
|
||||
fi
|
||||
|
||||
# not an autoconf script
|
||||
edo ./configure "${myconf[@]}"
|
||||
|
||||
# Force usage of chosen Python implementation
|
||||
# bug #856121, bug #785835
|
||||
sed -i \
|
||||
-e '/VBOX_WITH_PYTHON.*=/d' \
|
||||
-e '/VBOX_PATH_PYTHON_INC.*=/d' \
|
||||
-e '/VBOX_LIB_PYTHON.*=/d' \
|
||||
AutoConfig.kmk || die
|
||||
|
||||
cat >> AutoConfig.kmk <<-EOF || die
|
||||
VBOX_WITH_PYTHON=$(usev python 1)
|
||||
VBOX_PATH_PYTHON_INC=$(python_get_includedir)
|
||||
VBOX_LIB_PYTHON=$(python_get_library_path)
|
||||
EOF
|
||||
|
||||
if use python; then
|
||||
local mangled_python="${EPYTHON#python}"
|
||||
mangled_python="${mangled_python/.}"
|
||||
|
||||
# Stub out the script which defines what the Makefile ends up
|
||||
# building for. gen_python_deps.py gets called by the Makefile
|
||||
# with some args and it spits out a bunch of paths for a hardcoded
|
||||
# list of Pythons. We just override it with what we're actually using.
|
||||
# This minimises the amount of patching we have to do for new Pythons.
|
||||
cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
|
||||
print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
|
||||
print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
|
||||
print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
|
||||
print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
|
||||
EOF
|
||||
|
||||
chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
source ./env.sh || die
|
||||
|
||||
# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
|
||||
MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
|
||||
MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
|
||||
|
||||
local myemakeargs=(
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo
|
||||
VBOX_WITH_VBOXIMGMOUNT=1
|
||||
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
AS="$(tc-getCC)"
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
|
||||
TOOL_GCC3_CC="$(tc-getCC)"
|
||||
TOOL_GCC3_LD="$(tc-getCC)"
|
||||
TOOL_GCC3_AS="$(tc-getCC)"
|
||||
TOOL_GCC3_AR="$(tc-getAR)"
|
||||
TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GXX3_CC="$(tc-getCC)"
|
||||
TOOL_GXX3_CXX="$(tc-getCXX)"
|
||||
TOOL_GXX3_LD="$(tc-getCXX)"
|
||||
TOOL_GXX3_AS="$(tc-getCXX)"
|
||||
TOOL_GXX3_AR="$(tc-getAR)"
|
||||
TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}"
|
||||
TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
|
||||
VBOX_GCC_OPT="${CXXFLAGS}"
|
||||
VBOX_NM="$(tc-getNM)"
|
||||
|
||||
TOOL_YASM_AS=yasm
|
||||
)
|
||||
|
||||
if use amd64 && has_multilib_profile; then
|
||||
myemakeargs+=(
|
||||
CC32="$(tc-getCC) -m32"
|
||||
CXX32="$(tc-getCXX) -m32"
|
||||
|
||||
TOOL_GCC32_CC="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_CXX="$(tc-getCXX) -m32"
|
||||
TOOL_GCC32_LD="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_AS="$(tc-getCC) -m32"
|
||||
TOOL_GCC32_AR="$(tc-getAR)"
|
||||
TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
|
||||
TOOL_GXX32_CC="$(tc-getCC) -m32"
|
||||
TOOL_GXX32_CXX="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_LD="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_AS="$(tc-getCXX) -m32"
|
||||
TOOL_GXX32_AR="$(tc-getAR)"
|
||||
TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
|
||||
)
|
||||
fi
|
||||
|
||||
MAKE="kmk" emake "${myemakeargs[@]}" all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
|
||||
|
||||
local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
|
||||
|
||||
vbox_inst() {
|
||||
local binary="${1}"
|
||||
local perms="${2:-0750}"
|
||||
local path="${3:-${vbox_inst_path}}"
|
||||
|
||||
[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
|
||||
[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
|
||||
|
||||
insinto ${path}
|
||||
doins ${binary}
|
||||
fowners root:vboxusers ${path}/${binary}
|
||||
fperms ${perms} ${path}/${binary}
|
||||
}
|
||||
|
||||
# Create configuration files
|
||||
insinto /etc/vbox
|
||||
newins "${FILESDIR}/${PN}-4-config" vbox.cfg
|
||||
|
||||
# Set the correct libdir
|
||||
sed \
|
||||
-e "s@MY_LIBDIR@$(get_libdir)@" \
|
||||
-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
|
||||
|
||||
# Install the wrapper script
|
||||
exeinto ${vbox_inst_path}
|
||||
newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
|
||||
fowners root:vboxusers ${vbox_inst_path}/VBox
|
||||
fperms 0750 ${vbox_inst_path}/VBox
|
||||
|
||||
# Install binaries and libraries
|
||||
insinto ${vbox_inst_path}
|
||||
doins -r components
|
||||
|
||||
for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
|
||||
vboximg-mount vbox-img *so *r0; do
|
||||
vbox_inst ${each}
|
||||
done
|
||||
|
||||
# These binaries need to be suid root.
|
||||
for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
|
||||
vbox_inst ${each} 4750
|
||||
done
|
||||
|
||||
# Install EFI Firmware files (bug #320757)
|
||||
for each in VBoxEFI{32,64}.fd ; do
|
||||
vbox_inst ${each} 0644
|
||||
done
|
||||
|
||||
# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
|
||||
# VBoxXPCOMIPCD (bug #524202)
|
||||
for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/${each}
|
||||
done
|
||||
|
||||
# Symlink binaries to the shipped wrapper
|
||||
for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
|
||||
VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
|
||||
dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
|
||||
|
||||
if use pam; then
|
||||
# VRDPAuth only works with this (bug #351949)
|
||||
dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
|
||||
fi
|
||||
|
||||
# set an env-variable for 3rd party tools
|
||||
echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
|
||||
doenvd "${T}/90virtualbox"
|
||||
|
||||
if use sdl; then
|
||||
vbox_inst VBoxSDL 4750
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
|
||||
|
||||
for each in vboxsdl VBoxSDL ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
fi
|
||||
|
||||
if use gui; then
|
||||
vbox_inst VirtualBox
|
||||
vbox_inst VirtualBoxVM 4750
|
||||
for each in VirtualBox{,VM} ; do
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/${each}
|
||||
done
|
||||
|
||||
if use opengl; then
|
||||
vbox_inst VBoxTestOGL
|
||||
pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
|
||||
fi
|
||||
|
||||
for each in virtualbox{,vm} VirtualBox{,VM} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r nls
|
||||
doins -r UnattendedTemplates
|
||||
|
||||
domenu ${PN}.desktop
|
||||
|
||||
pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
|
||||
for size in 16 32 48 64 128 ; do
|
||||
newicon -s ${size} ${PN}-${size}px.png ${PN}.png
|
||||
done
|
||||
newicon ${PN}-48px.png ${PN}.png
|
||||
doicon -s scalable ${PN}.svg
|
||||
popd &>/dev/null || die
|
||||
pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
|
||||
for size in 16 24 32 48 64 72 96 128 256 512 ; do
|
||||
for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
|
||||
icofile="${PN}-${ico}-${size}px.png"
|
||||
if [[ -f "${icofile}" ]]; then
|
||||
newicon -s ${size} ${icofile} ${PN}-${ico}.png
|
||||
fi
|
||||
done
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use lvm; then
|
||||
vbox_inst VBoxVolInfo 4750
|
||||
dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
|
||||
fi
|
||||
|
||||
if use sdk; then
|
||||
insinto ${vbox_inst_path}
|
||||
doins -r sdk
|
||||
|
||||
if use java; then
|
||||
java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
|
||||
java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use udev; then
|
||||
local udevdir="$(get_udevdir)"
|
||||
local udev_file="VBoxCreateUSBNode.sh"
|
||||
local rules_file="10-virtualbox.rules"
|
||||
|
||||
insinto ${udevdir}
|
||||
doins ${udev_file}
|
||||
fowners root:vboxusers ${udevdir}/${udev_file}
|
||||
fperms 0750 ${udevdir}/${udev_file}
|
||||
|
||||
insinto ${udevdir}/rules.d
|
||||
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
|
||||
> "${T}"/${rules_file} || die
|
||||
doins "${T}"/${rules_file}
|
||||
fi
|
||||
|
||||
if use vboxwebsrv; then
|
||||
vbox_inst vboxwebsrv
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
|
||||
newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
|
||||
newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
|
||||
fi
|
||||
|
||||
# Remove dead symlinks (bug #715338)
|
||||
find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die
|
||||
|
||||
# Fix version string in extensions or else they don't get accepted
|
||||
# by the virtualbox host process (see bug #438930)
|
||||
find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
|
||||
|
||||
local extensions_dir="${vbox_inst_path}/ExtensionPacks"
|
||||
|
||||
if use vnc; then
|
||||
insinto ${extensions_dir}
|
||||
doins -r ExtensionPacks/VNC
|
||||
fi
|
||||
|
||||
if use dtrace; then
|
||||
insinto ${extensions_dir}
|
||||
doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc UserManual.pdf UserManual.q{ch,hc}
|
||||
docompress -x /usr/share/doc/${PF}
|
||||
elif use gui; then
|
||||
dodoc "${WORKDIR}"/${PN}-help-${PV}/UserManual.q{ch,hc}
|
||||
docompress -x /usr/share/doc/${PF}
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
|
||||
if [[ ! -x "${python_path_ext}" ]]; then
|
||||
eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
|
||||
eerror "but none were installed. This may happen if support for a Python target"
|
||||
eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
|
||||
die "Incomplete installation of Python bindings! File a bug with Gentoo!"
|
||||
fi
|
||||
fi
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if use udev; then
|
||||
udev_reload
|
||||
udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
tmpfiles_process virtualbox-vboxusb.conf
|
||||
|
||||
if use gui; then
|
||||
elog "To launch VirtualBox just type: \"virtualbox\"."
|
||||
fi
|
||||
|
||||
elog "You must be in the vboxusers group to use VirtualBox."
|
||||
elog ""
|
||||
elog "The latest user manual is available for download at:"
|
||||
elog "https://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
|
||||
elog ""
|
||||
|
||||
optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
|
||||
optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
|
||||
optfeature "Guest additions ISO" app-emulation/virtualbox-additions
|
||||
|
||||
if ! use udev; then
|
||||
ewarn "Without USE=udev, USB devices will likely not work in ${PN}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
|
||||
use udev && udev_reload
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Replacement for the .NET runtime and class libraries in Wine"
|
||||
HOMEPAGE="https://wiki.winehq.org/Mono"
|
||||
SRC_URI="
|
||||
shared? ( https://github.com/madewokherd/wine-mono/releases/download/${P}/${P}-x86.tar.xz )
|
||||
!shared? ( https://github.com/madewokherd/wine-mono/releases/download/${P}/${P}-x86.msi )"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT MPL-1.1"
|
||||
SLOT="${PV}"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="+shared"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/wine/mono
|
||||
|
||||
if use shared; then
|
||||
doins -r ${P}
|
||||
else
|
||||
doins "${DISTDIR}"/${P}-x86.msi
|
||||
fi
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Replacement for the .NET runtime and class libraries in Wine"
|
||||
HOMEPAGE="https://wiki.winehq.org/Mono"
|
||||
SRC_URI="
|
||||
shared? ( https://github.com/madewokherd/wine-mono/releases/download/${P}/${P}-x86.tar.xz )
|
||||
!shared? ( https://github.com/madewokherd/wine-mono/releases/download/${P}/${P}-x86.msi )"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT MPL-1.1"
|
||||
SLOT="${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+shared"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/wine/mono
|
||||
|
||||
if use shared; then
|
||||
doins -r ${P}
|
||||
else
|
||||
doins "${DISTDIR}"/${P}-x86.msi
|
||||
fi
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
DIST wine-8.0.tar.xz 29054044 BLAKE2B baf8f96b665119c9f38a148a2472dbe8f6ca8d4641d9d09d48cb72cb4de2585c274b8b7981c2fa622ead6da2f087c57652e9b48edc8a17c0cfd6be9a36732f02 SHA512 53ba813b260a65a271ec575822725b97631f60038fb026dcc0fe66862711eedcc29a8feb29ff54ae4f64458f85c290d8f3838eff5e4c77a5420a7d2b951fef77
|
||||
DIST wine-8.21.tar.xz 29919212 BLAKE2B 2e1c135d1c247f4b268c0323538748944b01fe65c82dee27d81f70613aa2fe632c1b4d696f05838a6ab801579a4d13a191de0f4c1a2e2222d40ca767499a98c3 SHA512 4d04d40141d2ea5e548b76aed870ac28d8a03241ffd4e761979c795310baa19136e54a8e518c6ea9bf563c3b23d3c4eb1baefc9906d7eeca469e9942ff99dc40
|
||||
DIST wine-9.0.tar.xz 30007216 BLAKE2B cf53177201a2f7eeb35d0d8ce220f80808d979099a928ad60652d1dee92620c433cc105dffab4e9309f41766087ad1544ef49d2922538bb420d62f6dd64117a1 SHA512 838daf2c4581f83f8573b988036f517d57b84894b090a2a17433255d6d044dfa880e6724cdb83082a36c333df9d2083ab68ae53927622a620edd59f33462ada4
|
||||
DIST wine-9.1.tar.xz 30028220 BLAKE2B 92d4bbaf02b414b657351fb51cb3d3a5a267ab9242a3effc8296fa73b540e23dce534d4e3e82b492f4b8539ce459b40e6d44f6708da4e5585ab2afb22045b8cf SHA512 12ec508b1e457a94391ab3072ed602ff07da2e5beb4bbe4f76e42d71e87f7fa11f6531f1f1c71e96e884b10a99240a9eaf999867479b8eeadf3576df46e0a73a
|
||||
DIST wine-staging-8.0.tar.gz 9529620 BLAKE2B c9540195ea885d9f1e980232b0af471e92c61eb079cae35fdb3af5c13d4660b3466f751772440e38f15874082db296d16d1f1d68827a505b2dd949617eda0203 SHA512 76a729d7ced1ff634ddb455ddfaa66ca103b652f43cd152b57ada7431bb5fbb74f5e92bf2f4f329b6df6f5908130afad84e609cbce6df645d6cf8131e9b949f9
|
||||
DIST wine-staging-8.21.tar.gz 9669500 BLAKE2B 600ad4b5696a38adefbde2fb9f51623dc7a7d9249ba15ceddcf1062040d840064285c6d2602266fd90f3658f0bdfe2fbca6a486f40e6e3f317fe704553ce39c7 SHA512 abba6084f2aefa8507c2a79c688b717f8137375168e5457ee40a0c96bfce31e9dc44370ecb5a8e8a397e90ce2eb8543fd07b447bf48c4b2d4c68aac9b3674214
|
||||
DIST wine-staging-9.0.tar.gz 9577631 BLAKE2B 0012978f54c618e73d407dd49dccff02853912d0c015098889802518e8c51b280f5d60e11291335dafc68944ee01cbcb7fd6c5825ef10ae1520c7b82d9846718 SHA512 362209fcadcf029152b681c76beb231d0cc8de1609b994094f1dc88ab871fddda08b3d8c2fe36ceb38909a9d634c1ade864ca0f28a6a7715ec286a8b2884981f
|
||||
DIST wine-staging-9.1.tar.gz 9650475 BLAKE2B d5ef171f5314c3d980bf3404b4a7e51b57e8320fb3b08c42231078816b821b6a019e9d0dc2b11607d6f74bc7ab7c495166acafdc3c093136a44c9716084d7e9e SHA512 070e09acf8bca60a4f2512874f48f653cc03a7fcfcfef34b4f292731d49e0670a5cf69557c268fc5dc11f0a7a8e0e7347d9665b98e6bb47e0521e3fe164ff118
|
||||
|
@ -0,0 +1,469 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit autotools edo flag-o-matic multilib multilib-build
|
||||
inherit prefix python-any-r1 toolchain-funcs wrapper
|
||||
|
||||
WINE_GECKO=2.47.4
|
||||
WINE_MONO=8.1.0
|
||||
WINE_P=wine-$(ver_cut 1-2)
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine-staging.git"
|
||||
WINE_EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
|
||||
else
|
||||
(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
|
||||
SRC_URI="
|
||||
https://dl.winehq.org/wine/source/${WINE_SDIR}/${WINE_P}.tar.xz
|
||||
https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
fi
|
||||
S="${WORKDIR}/${WINE_P}"
|
||||
|
||||
DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
|
||||
HOMEPAGE="
|
||||
https://wiki.winehq.org/Wine-Staging
|
||||
https://gitlab.winehq.org/wine/wine-staging/
|
||||
"
|
||||
|
||||
LICENSE="LGPL-2.1+ BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff"
|
||||
SLOT="${PV}"
|
||||
IUSE="
|
||||
+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
|
||||
llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer
|
||||
kerberos +mingw +mono netapi nls opencl +opengl osmesa pcap perl
|
||||
pulseaudio samba scanner +sdl selinux smartcard +ssl +strip
|
||||
+truetype udev udisks +unwind usb v4l +vulkan wayland wow64
|
||||
+xcomposite xinerama
|
||||
"
|
||||
# bug #551124 for truetype
|
||||
# TODO: wow64 can be done without mingw if using clang (needs bug #912237)
|
||||
REQUIRED_USE="
|
||||
X? ( truetype )
|
||||
crossdev-mingw? ( mingw )
|
||||
wow64? ( abi_x86_64 !abi_x86_32 mingw )
|
||||
"
|
||||
|
||||
# tests are non-trivial to run, can hang easily, don't play well with
|
||||
# sandbox, and several need real opengl/vulkan or network access
|
||||
RESTRICT="test"
|
||||
|
||||
# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
|
||||
WINE_DLOPEN_DEPEND="
|
||||
X? (
|
||||
x11-libs/libXcursor[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXfixes[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXi[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXrandr[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXrender[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
|
||||
opengl? (
|
||||
media-libs/libglvnd[X,${MULTILIB_USEDEP}]
|
||||
osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
|
||||
)
|
||||
xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
|
||||
xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
cups? ( net-print/cups[${MULTILIB_USEDEP}] )
|
||||
fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
|
||||
kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
|
||||
netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
|
||||
sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
|
||||
ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
|
||||
truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
|
||||
udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
|
||||
v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
|
||||
vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
WINE_COMMON_DEPEND="
|
||||
${WINE_DLOPEN_DEPEND}
|
||||
X? (
|
||||
x11-libs/libX11[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXext[${MULTILIB_USEDEP}]
|
||||
)
|
||||
alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
|
||||
capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
|
||||
gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
|
||||
gstreamer? (
|
||||
dev-libs/glib:2[${MULTILIB_USEDEP}]
|
||||
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
|
||||
)
|
||||
opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
|
||||
pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
|
||||
pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
|
||||
scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
|
||||
smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] )
|
||||
udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
|
||||
unwind? (
|
||||
llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
|
||||
!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )
|
||||
wayland? (
|
||||
dev-libs/wayland[${MULTILIB_USEDEP}]
|
||||
x11-libs/libxkbcommon[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
${WINE_COMMON_DEPEND}
|
||||
app-emulation/wine-desktop-common
|
||||
dos? (
|
||||
|| (
|
||||
games-emulation/dosbox
|
||||
games-emulation/dosbox-staging
|
||||
)
|
||||
)
|
||||
gecko? (
|
||||
app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}]
|
||||
wow64? ( app-emulation/wine-gecko[abi_x86_32] )
|
||||
)
|
||||
gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
|
||||
mono? ( app-emulation/wine-mono:${WINE_MONO} )
|
||||
perl? (
|
||||
dev-lang/perl
|
||||
dev-perl/XML-LibXML
|
||||
)
|
||||
samba? ( net-fs/samba[winbind] )
|
||||
selinux? ( sec-policy/selinux-wine )
|
||||
udisks? ( sys-fs/udisks:2 )
|
||||
"
|
||||
DEPEND="
|
||||
${WINE_COMMON_DEPEND}
|
||||
sys-kernel/linux-headers
|
||||
X? ( x11-base/xorg-proto )
|
||||
"
|
||||
# gitapply.sh prefers git but can fallback to patch+extras
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
|| (
|
||||
dev-vcs/git
|
||||
(
|
||||
sys-apps/gawk
|
||||
sys-apps/util-linux
|
||||
)
|
||||
)
|
||||
|| (
|
||||
sys-devel/binutils
|
||||
sys-devel/lld
|
||||
)
|
||||
dev-lang/perl
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
mingw? ( !crossdev-mingw? (
|
||||
>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
|
||||
wow64? ( dev-util/mingw64-toolchain[abi_x86_32] )
|
||||
) )
|
||||
nls? ( sys-devel/gettext )
|
||||
wayland? ( dev-util/wayland-scanner )
|
||||
"
|
||||
IDEPEND=">=app-eselect/eselect-wine-2"
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
__clear_cache # unused on amd64+x86 (bug #900334)
|
||||
res_getservers # false positive
|
||||
)
|
||||
QA_FLAGS_IGNORED="usr/lib/.*/wine/.*-unix/odbc32.so" # has no compiled objects
|
||||
QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-7.17-noexecstack.patch
|
||||
"${FILESDIR}"/${PN}-7.20-unwind.patch
|
||||
"${FILESDIR}"/${PN}-8.13-rpath.patch
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
|
||||
local mingw=-w64-mingw32
|
||||
for mingw in $(usev abi_x86_64 x86_64${mingw}) \
|
||||
$(use abi_x86_32 || use wow64 && echo i686${mingw}); do
|
||||
if ! type -P ${mingw}-gcc >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
|
||||
eerror "yourself by installing sys-devel/crossdev then running:"
|
||||
eerror
|
||||
eerror " crossdev --target ${mingw}"
|
||||
eerror
|
||||
eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
|
||||
die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
|
||||
git-r3_src_unpack
|
||||
|
||||
# hack: use subshell to preserve state (including what git-r3 unpack
|
||||
# sets) for smart-live-rebuild as this is not the repo to look at
|
||||
(
|
||||
EGIT_COMMIT=$(<"${EGIT_CHECKOUT_DIR}"/staging/upstream-commit) || die
|
||||
EGIT_REPO_URI=${WINE_EGIT_REPO_URI}
|
||||
EGIT_CHECKOUT_DIR=${S}
|
||||
einfo "Fetching Wine commit matching the current patchset by default (${EGIT_COMMIT})"
|
||||
git-r3_src_unpack
|
||||
)
|
||||
else
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patchinstallargs=(
|
||||
--all
|
||||
--no-autoconf
|
||||
# patches known broken with USE=-mingw, retry occasionally (bug #921360)
|
||||
$(usev !mingw '
|
||||
-W winedevice-Default_Drivers
|
||||
-W fltmgr.sys-FltBuildDefaultSecurityDescriptor
|
||||
')
|
||||
${MY_WINE_STAGING_CONF}
|
||||
)
|
||||
|
||||
edo "${PYTHON}" ../${P}/staging/patchinstall.py "${patchinstallargs[@]}"
|
||||
|
||||
# sanity check, bumping these has a history of oversights
|
||||
local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
|
||||
dlls/appwiz.cpl/addons.c || die)
|
||||
if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
|
||||
local gmfatal=
|
||||
[[ ${PV} == *9999 ]] && gmfatal=nonfatal
|
||||
${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
if tc-is-clang; then
|
||||
if use mingw; then
|
||||
# -mabi=ms was ignored by <clang:16 then turned error in :17
|
||||
# if used without --target *-windows, then gets used in install
|
||||
# phase despite USE=mingw, drop as a quick fix for now
|
||||
sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
|
||||
else
|
||||
# fails in ./configure unless --enable-archs is passed, allow to
|
||||
# bypass with EXTRA_ECONF but is currently considered unsupported
|
||||
# (by Gentoo) as additional work is needed for (proper) support
|
||||
# note: also fails w/ :17, but unsure if safe to drop w/o mingw
|
||||
[[ ${EXTRA_ECONF} == *--enable-archs* ]] ||
|
||||
die "building ${PN} with clang is only supported with USE=mingw"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ensure .desktop calls this variant + slot
|
||||
sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
|
||||
|
||||
# datadir is not where wine-mono is installed, so prefixy alternate paths
|
||||
hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c
|
||||
|
||||
# always update for patches (including user's wrt #432348)
|
||||
eautoreconf
|
||||
tools/make_requests || die # perl
|
||||
# tip: if need more for user patches, with portage can e.g. do
|
||||
# echo "post_src_prepare() { tools/make_specfiles || die; }" \
|
||||
# > /etc/portage/env/app-emulation/wine-staging
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
WINE_PREFIX=/usr/lib/${P}
|
||||
WINE_DATADIR=/usr/share/${P}
|
||||
|
||||
local conf=(
|
||||
--prefix="${EPREFIX}"${WINE_PREFIX}
|
||||
--datadir="${EPREFIX}"${WINE_DATADIR}
|
||||
--includedir="${EPREFIX}"/usr/include/${P}
|
||||
--libdir="${EPREFIX}"${WINE_PREFIX}
|
||||
--mandir="${EPREFIX}"${WINE_DATADIR}/man
|
||||
|
||||
$(usev wow64 --enable-archs=x86_64,i386)
|
||||
|
||||
$(use_enable gecko mshtml)
|
||||
$(use_enable mono mscoree)
|
||||
--disable-tests
|
||||
|
||||
$(use_with X x)
|
||||
$(use_with alsa)
|
||||
$(use_with capi)
|
||||
$(use_with cups)
|
||||
$(use_with fontconfig)
|
||||
$(use_with gphoto2 gphoto)
|
||||
$(use_with gstreamer)
|
||||
$(use_with kerberos gssapi)
|
||||
$(use_with kerberos krb5)
|
||||
$(use_with mingw)
|
||||
$(use_with netapi)
|
||||
$(use_with nls gettext)
|
||||
$(use_with opencl)
|
||||
$(use_with opengl)
|
||||
$(use_with osmesa)
|
||||
--without-oss # media-sound/oss is not packaged (OSSv4)
|
||||
$(use_with pcap)
|
||||
$(use_with pulseaudio pulse)
|
||||
$(use_with scanner sane)
|
||||
$(use_with sdl)
|
||||
$(use_with smartcard pcsclite)
|
||||
$(use_with ssl gnutls)
|
||||
$(use_with truetype freetype)
|
||||
$(use_with udev)
|
||||
$(use_with udisks dbus) # dbus is only used for udisks
|
||||
$(use_with unwind)
|
||||
$(use_with usb)
|
||||
$(use_with v4l v4l2)
|
||||
$(use_with vulkan)
|
||||
$(use_with wayland)
|
||||
$(use_with xcomposite)
|
||||
$(use_with xinerama)
|
||||
)
|
||||
|
||||
filter-lto # build failure
|
||||
use custom-cflags || strip-flags # can break in obscure ways at runtime
|
||||
|
||||
# wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097)
|
||||
# (do self test until https://github.com/gentoo/gentoo/pull/28355)
|
||||
if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]]
|
||||
then
|
||||
has_version -b sys-devel/binutils &&
|
||||
append-ldflags -fuse-ld=bfd ||
|
||||
append-ldflags -fuse-ld=lld
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
if use mingw; then
|
||||
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
|
||||
|
||||
filter-flags -fno-plt # build failure
|
||||
|
||||
# CROSSCC was formerly recognized by wine, thus been using similar
|
||||
# variables (subject to change, esp. if ever make a mingw.eclass).
|
||||
local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}
|
||||
local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}}
|
||||
local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86)
|
||||
|
||||
conf+=(
|
||||
ac_cv_prog_x86_64_CC="${mingwcc_amd64}"
|
||||
ac_cv_prog_i386_CC="${mingwcc_x86}"
|
||||
|
||||
CROSSCFLAGS="${CROSSCFLAGS:-$(
|
||||
filter-flags '-fstack-protector*' #870136
|
||||
filter-flags '-mfunction-return=thunk*' #878849
|
||||
CC=${mingwcc} test-flags-CC ${CFLAGS:--O2}
|
||||
)}"
|
||||
|
||||
CROSSLDFLAGS="${CROSSLDFLAGS:-$(
|
||||
filter-flags '-fuse-ld=*'
|
||||
|
||||
CC=${mingwcc} test-flags-CCLD ${LDFLAGS}
|
||||
)}"
|
||||
)
|
||||
fi
|
||||
|
||||
# order matters with multilib: configure+compile 64->32, install 32->64
|
||||
local -i bits
|
||||
for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
|
||||
(
|
||||
einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
|
||||
|
||||
mkdir ../build${bits} || die
|
||||
cd ../build${bits} || die
|
||||
|
||||
if (( bits == 64 )); then
|
||||
conf+=( --enable-win64 )
|
||||
elif use amd64; then
|
||||
conf+=(
|
||||
$(usev abi_x86_64 --with-wine64=../build64)
|
||||
TARGETFLAGS=-m32 # for widl
|
||||
)
|
||||
# _setup is optional, but use over Wine's auto-detect (+#472038)
|
||||
multilib_toolchain_setup x86
|
||||
fi
|
||||
|
||||
ECONF_SOURCE=${S} econf "${conf[@]}"
|
||||
)
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use abi_x86_64 && emake -C ../build64 # do first
|
||||
use abi_x86_32 && emake -C ../build32
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
|
||||
use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
|
||||
|
||||
# Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64,
|
||||
# -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where
|
||||
# one or the other could be missing and that is unexpected for users
|
||||
# and some tools like winetricks)
|
||||
if use abi_x86_64; then
|
||||
if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
|
||||
dosym wine64 ${WINE_PREFIX}/bin/wine
|
||||
dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
|
||||
|
||||
# also install wine(1) man pages (incl. translations)
|
||||
local man
|
||||
for man in ../build64/loader/wine.*man; do
|
||||
: "${man##*/wine}"
|
||||
: "${_%.*}"
|
||||
insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
|
||||
newins ${man} wine.1
|
||||
done
|
||||
elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
|
||||
dosym wine ${WINE_PREFIX}/bin/wine64
|
||||
dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader
|
||||
fi
|
||||
fi
|
||||
|
||||
use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
|
||||
"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
|
||||
|
||||
# create variant wrappers for eselect-wine
|
||||
local bin
|
||||
for bin in "${ED}"${WINE_PREFIX}/bin/*; do
|
||||
make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
|
||||
done
|
||||
|
||||
if use mingw; then
|
||||
# don't let portage try to strip PE files with the wrong
|
||||
# strip executable and instead handle it here (saves ~120MB)
|
||||
dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
|
||||
|
||||
if use strip; then
|
||||
ebegin "Stripping Windows (PE) binaries"
|
||||
find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
|
||||
-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} +
|
||||
eend ${?} || die
|
||||
fi
|
||||
fi
|
||||
|
||||
dodoc ANNOUNCE* AUTHORS README* documentation/README*
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use !abi_x86_32 && use !wow64; then
|
||||
ewarn "32bit support is disabled. While 64bit applications themselves will"
|
||||
ewarn "work, be warned that it is not unusual that installers or other helpers"
|
||||
ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32,"
|
||||
ewarn "note the experimental/WIP USE=wow64 can allow 32bit without multilib."
|
||||
elif use abi_x86_32 && { use opengl || use vulkan; } &&
|
||||
has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'
|
||||
then
|
||||
ewarn "x11-drivers/nvidia-drivers is installed but is built without"
|
||||
ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit"
|
||||
ewarn "applications under ${PN} will likely not be usable."
|
||||
fi
|
||||
|
||||
eselect wine update --if-unset || die
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect wine update --if-unset || die
|
||||
}
|
@ -0,0 +1,423 @@
|
||||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
inherit autotools flag-o-matic multilib multilib-build
|
||||
inherit prefix toolchain-funcs wrapper
|
||||
|
||||
WINE_GECKO=2.47.4
|
||||
WINE_MONO=8.1.0
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
|
||||
else
|
||||
(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
|
||||
SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
|
||||
S="${WORKDIR}/wine-${PV}"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
|
||||
HOMEPAGE="
|
||||
https://www.winehq.org/
|
||||
https://gitlab.winehq.org/wine/wine/
|
||||
"
|
||||
|
||||
LICENSE="LGPL-2.1+ BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff"
|
||||
SLOT="${PV}"
|
||||
IUSE="
|
||||
+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
|
||||
llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer
|
||||
kerberos +mingw +mono netapi nls odbc opencl +opengl osmesa pcap
|
||||
perl pulseaudio samba scanner +sdl selinux smartcard +ssl +strip
|
||||
+truetype udev udisks +unwind usb v4l +vulkan wayland wow64
|
||||
+xcomposite xinerama"
|
||||
# bug #551124 for truetype
|
||||
# TODO?: wow64 can be done without mingw if using clang (needs bug #912237)
|
||||
REQUIRED_USE="
|
||||
X? ( truetype )
|
||||
crossdev-mingw? ( mingw )
|
||||
wow64? ( abi_x86_64 !abi_x86_32 mingw )
|
||||
"
|
||||
|
||||
# tests are non-trivial to run, can hang easily, don't play well with
|
||||
# sandbox, and several need real opengl/vulkan or network access
|
||||
RESTRICT="test"
|
||||
|
||||
# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
|
||||
WINE_DLOPEN_DEPEND="
|
||||
X? (
|
||||
x11-libs/libXcursor[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXfixes[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXi[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXrandr[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXrender[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
|
||||
opengl? (
|
||||
media-libs/libglvnd[X,${MULTILIB_USEDEP}]
|
||||
osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
|
||||
)
|
||||
xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
|
||||
xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
cups? ( net-print/cups[${MULTILIB_USEDEP}] )
|
||||
fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
|
||||
kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
|
||||
netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
|
||||
odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
|
||||
sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
|
||||
ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
|
||||
truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
|
||||
udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
|
||||
v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
|
||||
vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
WINE_COMMON_DEPEND="
|
||||
${WINE_DLOPEN_DEPEND}
|
||||
X? (
|
||||
x11-libs/libX11[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXext[${MULTILIB_USEDEP}]
|
||||
)
|
||||
alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
|
||||
capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
|
||||
gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
|
||||
gstreamer? (
|
||||
dev-libs/glib:2[${MULTILIB_USEDEP}]
|
||||
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
|
||||
)
|
||||
opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
|
||||
pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
|
||||
pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
|
||||
scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
|
||||
smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] )
|
||||
udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
|
||||
unwind? (
|
||||
llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
|
||||
!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )
|
||||
wayland? (
|
||||
dev-libs/wayland[${MULTILIB_USEDEP}]
|
||||
x11-libs/libxkbcommon[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
${WINE_COMMON_DEPEND}
|
||||
app-emulation/wine-desktop-common
|
||||
dos? (
|
||||
|| (
|
||||
games-emulation/dosbox
|
||||
games-emulation/dosbox-staging
|
||||
)
|
||||
)
|
||||
gecko? (
|
||||
app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}]
|
||||
wow64? ( app-emulation/wine-gecko[abi_x86_32] )
|
||||
)
|
||||
gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
|
||||
mono? ( app-emulation/wine-mono:${WINE_MONO} )
|
||||
perl? (
|
||||
dev-lang/perl
|
||||
dev-perl/XML-LibXML
|
||||
)
|
||||
samba? ( net-fs/samba[winbind] )
|
||||
selinux? ( sec-policy/selinux-wine )
|
||||
udisks? ( sys-fs/udisks:2 )
|
||||
"
|
||||
DEPEND="
|
||||
${WINE_COMMON_DEPEND}
|
||||
sys-kernel/linux-headers
|
||||
X? ( x11-base/xorg-proto )
|
||||
"
|
||||
BDEPEND="
|
||||
|| (
|
||||
sys-devel/binutils
|
||||
sys-devel/lld
|
||||
)
|
||||
dev-lang/perl
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
mingw? ( !crossdev-mingw? (
|
||||
>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
|
||||
wow64? ( dev-util/mingw64-toolchain[abi_x86_32] )
|
||||
) )
|
||||
nls? ( sys-devel/gettext )
|
||||
wayland? ( dev-util/wayland-scanner )
|
||||
"
|
||||
IDEPEND=">=app-eselect/eselect-wine-2"
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
__clear_cache # unused on amd64+x86 (bug #900338)
|
||||
res_getservers # false positive
|
||||
)
|
||||
QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-7.0-noexecstack.patch
|
||||
"${FILESDIR}"/${PN}-7.20-unwind.patch
|
||||
"${FILESDIR}"/${PN}-8.13-rpath.patch
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
|
||||
local mingw=-w64-mingw32
|
||||
for mingw in $(usev abi_x86_64 x86_64${mingw}) \
|
||||
$(use abi_x86_32 || use wow64 && echo i686${mingw}); do
|
||||
if ! type -P ${mingw}-gcc >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
|
||||
eerror "yourself by installing sys-devel/crossdev then running:"
|
||||
eerror
|
||||
eerror " crossdev --target ${mingw}"
|
||||
eerror
|
||||
eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
|
||||
die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# sanity check, bumping these has a history of oversights
|
||||
local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
|
||||
dlls/appwiz.cpl/addons.c || die)
|
||||
if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
|
||||
local gmfatal=
|
||||
[[ ${PV} == *9999 ]] && gmfatal=nonfatal
|
||||
${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
if tc-is-clang; then
|
||||
if use mingw; then
|
||||
# -mabi=ms was ignored by <clang:16 then turned error in :17
|
||||
# if used without --target *-windows, then gets used in install
|
||||
# phase despite USE=mingw, drop as a quick fix for now
|
||||
sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
|
||||
else
|
||||
# fails in ./configure unless --enable-archs is passed, allow to
|
||||
# bypass with EXTRA_ECONF but is currently considered unsupported
|
||||
# (by Gentoo) as additional work is needed for (proper) support
|
||||
# note: also fails w/ :17, but unsure if safe to drop w/o mingw
|
||||
[[ ${EXTRA_ECONF} == *--enable-archs* ]] ||
|
||||
die "building ${PN} with clang is only supported with USE=mingw"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ensure .desktop calls this variant + slot
|
||||
sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
|
||||
|
||||
# datadir is not where wine-mono is installed, so prefixy alternate paths
|
||||
hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c
|
||||
|
||||
# always update for patches (including user's wrt #432348)
|
||||
eautoreconf
|
||||
tools/make_requests || die # perl
|
||||
# tip: if need more for user patches, with portage can e.g. do
|
||||
# echo "post_src_prepare() { tools/make_specfiles || die; }" \
|
||||
# > /etc/portage/env/app-emulation/wine-vanilla
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
WINE_PREFIX=/usr/lib/${P}
|
||||
WINE_DATADIR=/usr/share/${P}
|
||||
|
||||
local conf=(
|
||||
--prefix="${EPREFIX}"${WINE_PREFIX}
|
||||
--datadir="${EPREFIX}"${WINE_DATADIR}
|
||||
--includedir="${EPREFIX}"/usr/include/${P}
|
||||
--libdir="${EPREFIX}"${WINE_PREFIX}
|
||||
--mandir="${EPREFIX}"${WINE_DATADIR}/man
|
||||
|
||||
$(usev wow64 --enable-archs=x86_64,i386)
|
||||
|
||||
$(use_enable gecko mshtml)
|
||||
$(use_enable mono mscoree)
|
||||
--disable-tests
|
||||
|
||||
$(use_with X x)
|
||||
$(use_with alsa)
|
||||
$(use_with capi)
|
||||
$(use_with cups)
|
||||
$(use_with fontconfig)
|
||||
$(use_with gphoto2 gphoto)
|
||||
$(use_with gstreamer)
|
||||
$(use_with kerberos gssapi)
|
||||
$(use_with kerberos krb5)
|
||||
$(use_with mingw)
|
||||
$(use_with netapi)
|
||||
$(use_with nls gettext)
|
||||
$(use_with opencl)
|
||||
$(use_with opengl)
|
||||
$(use_with osmesa)
|
||||
--without-oss # media-sound/oss is not packaged (OSSv4)
|
||||
$(use_with pcap)
|
||||
$(use_with pulseaudio pulse)
|
||||
$(use_with scanner sane)
|
||||
$(use_with sdl)
|
||||
$(use_with smartcard pcsclite)
|
||||
$(use_with ssl gnutls)
|
||||
$(use_with truetype freetype)
|
||||
$(use_with udev)
|
||||
$(use_with udisks dbus) # dbus is only used for udisks
|
||||
$(use_with unwind)
|
||||
$(use_with usb)
|
||||
$(use_with v4l v4l2)
|
||||
$(use_with vulkan)
|
||||
$(use_with wayland)
|
||||
$(use_with xcomposite)
|
||||
$(use_with xinerama)
|
||||
$(usev !odbc ac_cv_lib_soname_odbc=)
|
||||
)
|
||||
|
||||
filter-lto # build failure
|
||||
use custom-cflags || strip-flags # can break in obscure ways at runtime
|
||||
|
||||
# wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097)
|
||||
# (do self test until https://github.com/gentoo/gentoo/pull/28355)
|
||||
if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]]
|
||||
then
|
||||
has_version -b sys-devel/binutils &&
|
||||
append-ldflags -fuse-ld=bfd ||
|
||||
append-ldflags -fuse-ld=lld
|
||||
strip-unsupported-flags
|
||||
fi
|
||||
|
||||
if use mingw; then
|
||||
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
|
||||
|
||||
filter-flags -fno-plt # build failure
|
||||
|
||||
# CROSSCC was formerly recognized by wine, thus been using similar
|
||||
# variables (subject to change, esp. if ever make a mingw.eclass).
|
||||
local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}
|
||||
local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}}
|
||||
local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86)
|
||||
|
||||
conf+=(
|
||||
ac_cv_prog_x86_64_CC="${mingwcc_amd64}"
|
||||
ac_cv_prog_i386_CC="${mingwcc_x86}"
|
||||
|
||||
CROSSCFLAGS="${CROSSCFLAGS:-$(
|
||||
filter-flags '-fstack-protector*' #870136
|
||||
filter-flags '-mfunction-return=thunk*' #878849
|
||||
CC=${mingwcc} test-flags-CC ${CFLAGS:--O2}
|
||||
)}"
|
||||
|
||||
CROSSLDFLAGS="${CROSSLDFLAGS:-$(
|
||||
filter-flags '-fuse-ld=*'
|
||||
|
||||
CC=${mingwcc} test-flags-CCLD ${LDFLAGS}
|
||||
)}"
|
||||
)
|
||||
fi
|
||||
|
||||
# order matters with multilib: configure+compile 64->32, install 32->64
|
||||
local -i bits
|
||||
for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
|
||||
(
|
||||
einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
|
||||
|
||||
mkdir ../build${bits} || die
|
||||
cd ../build${bits} || die
|
||||
|
||||
if (( bits == 64 )); then
|
||||
conf+=( --enable-win64 )
|
||||
elif use amd64; then
|
||||
conf+=(
|
||||
$(usev abi_x86_64 --with-wine64=../build64)
|
||||
TARGETFLAGS=-m32 # for widl
|
||||
)
|
||||
# _setup is optional, but use over Wine's auto-detect (+#472038)
|
||||
multilib_toolchain_setup x86
|
||||
fi
|
||||
|
||||
ECONF_SOURCE=${S} econf "${conf[@]}"
|
||||
)
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use abi_x86_64 && emake -C ../build64 # do first
|
||||
use abi_x86_32 && emake -C ../build32
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
|
||||
use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
|
||||
|
||||
# Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64,
|
||||
# -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where
|
||||
# one or the other could be missing and that is unexpected for users
|
||||
# and some tools like winetricks)
|
||||
if use abi_x86_64; then
|
||||
if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
|
||||
dosym wine64 ${WINE_PREFIX}/bin/wine
|
||||
dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
|
||||
|
||||
# also install wine(1) man pages (incl. translations)
|
||||
local man
|
||||
for man in ../build64/loader/wine.*man; do
|
||||
: "${man##*/wine}"
|
||||
: "${_%.*}"
|
||||
insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
|
||||
newins ${man} wine.1
|
||||
done
|
||||
elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
|
||||
dosym wine ${WINE_PREFIX}/bin/wine64
|
||||
dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader
|
||||
fi
|
||||
fi
|
||||
|
||||
use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
|
||||
"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
|
||||
|
||||
# create variant wrappers for eselect-wine
|
||||
local bin
|
||||
for bin in "${ED}"${WINE_PREFIX}/bin/*; do
|
||||
make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
|
||||
done
|
||||
|
||||
if use mingw; then
|
||||
# don't let portage try to strip PE files with the wrong
|
||||
# strip executable and instead handle it here (saves ~120MB)
|
||||
dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
|
||||
|
||||
if use strip; then
|
||||
ebegin "Stripping Windows (PE) binaries"
|
||||
find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
|
||||
-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} +
|
||||
eend ${?} || die
|
||||
fi
|
||||
fi
|
||||
|
||||
dodoc ANNOUNCE* AUTHORS README* documentation/README*
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use !abi_x86_32 && use !wow64; then
|
||||
ewarn "32bit support is disabled. While 64bit applications themselves will"
|
||||
ewarn "work, be warned that it is not unusual that installers or other helpers"
|
||||
ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32,"
|
||||
ewarn "note the experimental/WIP USE=wow64 can allow 32bit without multilib."
|
||||
elif use abi_x86_32 && { use opengl || use vulkan; } &&
|
||||
has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'
|
||||
then
|
||||
ewarn "x11-drivers/nvidia-drivers is installed but is built without"
|
||||
ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit"
|
||||
ewarn "applications under ${PN} will likely not be usable."
|
||||
fi
|
||||
|
||||
eselect wine update --if-unset || die
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect wine update --if-unset || die
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST datovka-4.22.0.tar.xz 3132780 BLAKE2B 6aa94a4ae37fe4ff12738902c3f721058ce2bb86946f7150cbdda1b9b38b4e14ae43a10252e9d10784a1549c2ab508291e7323635da0aa8b1d7d5d2338946ff3 SHA512 43ea3eb7b1f06596f7babedaaff3a7950f6e893b71cdcb8482fb5a7c11861369e080ca2058c39c0ca362c8917ae90e4058f614958057e87039b186b3ba5d5863
|
||||
DIST datovka-4.22.1.tar.xz 3154932 BLAKE2B 957080b1a7a0a9ec94c5c7be2a21c707a1e0693c5c218a07e291af4808154a09083bcfd4b1d70aa34469b66263d1528bb1b1a70f494fd386570fbc31d85e332a SHA512 f4774de6b199fc1ccef43a78ea32067118d3bdd0fb2e1a1ebf83c75b7f6debc577a40a9104113396d5ef1263621d908c13b8316ee591aa309e6cb108118d9f8f
|
||||
DIST datovka-4.23.1.tar.xz 3190276 BLAKE2B a74e338b372dbb3b5d1778db820cadfe6661b4a12fd63f4a954e767e6f2509006857187b6453d8daf4c2bf2979276b01b685e20858d887992e62573bc806fca3 SHA512 5b885eb3f511fe58c388879a67957b6fa510de8c94c62f5e7a4e3233beb549b7079adaedb6f31932cd5e007125de599d00fe8a3ae3d23d08e519e186670ce9d2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue