parent
3b69376c4a
commit
ea0abb412f
@ -1,23 +1,23 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
MANIFEST Manifest.files.gz 29456 BLAKE2B ab2d03c993c1f70585a20930530a7ab0b8acbd1a71920a9e6290b50377414814238b39accc9ddf2d3d1098a048cf850e9295f266638f7cfd6847aed3661b6f7d SHA512 d12b7996e6fc825eb064f0a000182bdfccd818a6ca03dfd45d9da516261255128cd8b17a66ac94961a82b97cc7f6236b0461267a0fbcf1ba088262f2285022dc
|
||||
TIMESTAMP 2020-04-29T06:09:04Z
|
||||
MANIFEST Manifest.files.gz 29467 BLAKE2B 1d966ad5becf20b0496d4a77e7dc195de8e7d88e8475abe4879bb0c76db607b5f95fb9a71e1fabaa5415c314601448e468ef267a47b9f413f2978842ffbfec5d SHA512 5a3b50e47c4eff7c51d15fd5955359d15426232952c2003e3a3088684c7b99804c19ef7bf673e49cff61d08440be24a09ce2bb51c26fd4e545797b30ac239add
|
||||
TIMESTAMP 2020-04-29T09:09:05Z
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAl6pGgBfFIAAAAAALgAo
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAl6pRDFfFIAAAAAALgAo
|
||||
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUx
|
||||
RDZBQkI2M0JGQ0ZCNEJBMDJGREYxQ0VDNTkwRUVBQzkxODkyNTAACgkQ7FkO6skY
|
||||
klAQTw//fIY27D5CapaaDFUe8Z8LE2QpbhZELuzkRjhiv6GKa6XEk5ub7m2kRnuL
|
||||
GfE/D6sHG30a1KAadl8QEXjonXrg/7WsiqYubDrUlz2ZaPsO4FO8BQnP4ibQntCK
|
||||
tc3V+QtWO4cPEmFLlsrnOryrAcTPVRCgJbWIXynr92npcXlYug73avsdBUM26q9s
|
||||
XDWq+VrqpRi6j/3ZWxQhfW8GIYlJeq5A766reqb2yyTXObCCCzAQ3kcBgDZw420d
|
||||
4I7A00M83g0BSBYRd5aUPvUqBuH+zSdOYDUBilXNNi+Vc0gql/kpbMORC1N1vC9r
|
||||
oGhapaUceqde61KAqOfS31z06e7XjTyjMDVqpDwI8kIXs+gmcU3adC2Q4MJR3jDr
|
||||
0dfvioA/iUFAJrAXY4Jn7f2LLpoopSajcuqidshw2JQtrKEA8XnzNCSdmlROme4p
|
||||
2NPjdQOjgfY/yOLidpR2pBWVpYwLGbKKe0VKreyowZaYmMJHmE9jaQVZ0t03ATGi
|
||||
0ga6/PGdFN3JRzcZXg0a6oz1a8n/YICOEAVISSfZmed/JZVEDqob3En9lLWAYq/T
|
||||
qNs7X6++yaRC0OKl6GOzJeYM5Y1qRTs9TSReO5KPf46abT4smeomNN1cQYDToTai
|
||||
IeSiA8/KpIaEp8F+GoVxKR5bXwy9pC2602RdqohMhiN4iXODEtQ=
|
||||
=rjmb
|
||||
klDk/w/9HJPnOtHsITlLIWYEouV4/OqqTlfdgZlFP0hv5nHYyYbqOexGTX4YkgX4
|
||||
ka2Rsw9JdXE9+LC52NnMskHm2DoDfm2+Pn3B7WNLHj0lvH/IkC++MXRl0q3kiyn/
|
||||
5LLAcnk93Rr8FOqAko2qj++mswEcM3skB0EfT3gWUMcwrxXDq6kRkGzohgdq3WNJ
|
||||
paTYUmjE/pvBBLUiDZkjGGX8EnImhOa3gxTJx99qN/vDi7ZZNXVUgQGPUblU86xR
|
||||
oQoC15k6QvVKlTK43dFbagp1tRb2FDflnlI+8E17PPp0Hs8iWrmtGnnOtXoN2iLC
|
||||
p5IsLoZ2Biy0ZHiAozpr2m/xYJCYYK/LEZhFWCZ+/C6Sli99CYv61eR69kDwz0o/
|
||||
i+yjvWbewEjoSq+AAlwhRtFnltmtJ/O6CzNa3quyqNM4QX65dSKb3YjXjNoy3RI9
|
||||
RCUnkdDz2TkX7qqmFiQlu7r6US5Ml2AhuCqhRoQeGZmtKx2C/G86bt5N0kzB3D9C
|
||||
DeeSbmQ1NP0wpfxx3GMDU+sbKw7SPqsinWkXHFyPV7IzIlTiCG0jW7cPZcYEt8LW
|
||||
+9BA7SMmR/uvm7/+yazJY70M3jgOiIh7r1mG/dTugqv+Os25+D6s6WiZkyafRvPX
|
||||
8rtzmTx7c64kqAnIfUir7uQNrH6GTjjmQ5UaaWuoY13fxpGPLY4=
|
||||
=bCl2
|
||||
-----END PGP SIGNATURE-----
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
AUX jitterentropy-rngd-1.1.0-do-not-strip-and-compress.patch 581 BLAKE2B ee6f98d762fea06504ea7157ea2b13ececeaef1ee204cf0e5d63fc0932e1c41da13b2a8ad0cb8564548fcabe1989693ed16c7d461f75844323864e457e8fb804 SHA512 7c42e8deebf0d36fdd91b879cbc28eab1a92d413f64ab5f19eeaa214b51f6e96866c1bd53fdd6c2c4e335ae156cef24d2bba4c1dd6b557d96e89b61618703241
|
||||
AUX jitterentropy-rngd-initd 338 BLAKE2B a717848317980f0376058c04f53cfc7ac4e771ffbd926b36f2f5e18e121d846aa9248b38cfae7d1c6e4c2241e0c1124394d9b5b58d2d119bf455d0d8786e74df SHA512 1993262b47e703514bba9a4dff18e58ff70b6b109a2eb3097b0231467ea7f948c6fb6d0f695988de6c2d41fa2295a8a40af19124572b8e72fe09610eaf8caa39
|
||||
DIST jitterentropy-rngd-1.1.0.tar.gz 25891 BLAKE2B f711b173c68b74cbc0dbac1ae1b7a2beb5352b38e411f96172aa36ac7f720f05469f5fac2fa97b3514ec11fbe2ccfe0351ee7df8f51a8b36a566635ef93e4d08 SHA512 32835475b604e502caaab9b0d1cd9fe2920c126a27841669f6cf9c717094bfd4c11feab0f9f706ee4cf4caeedf26ced7039075499a3faaf41830c72968544646
|
||||
EBUILD jitterentropy-rngd-1.1.0.ebuild 599 BLAKE2B 78eec9773308331161880ec16b83108625ecae51fad2e0c5ebbc0044a2add2b69b67f691316d03e9b1cf3cbdfe9b7fa37631459a5383bfe0ab15c678cd220eaa SHA512 3dd11d7648f2ff86afd0f097a35e66bc488b56a0323c9adc74147a44dc7dd42d74f4cbefe017eda780c4d34a3337eb3faba39871027e5e6caddbd8192ded2a48
|
||||
EBUILD jitterentropy-rngd-1.1.0.ebuild 605 BLAKE2B 04c2f307c31d2b26befd16f5e39d81445ae958fe7c5003363210ec25d5f00a87f0aef27f66757274f181b8303b649bf71dd0511c56eeb055bebdc94853b96d70 SHA512 7c4d42890396959d69ae8a215e9bf23ba2546655814baa7830b444208e7067fcd481cd7f3fae64b67551f457ef7fac8180e65436e44502b31be903a5599f7b4f
|
||||
MISC metadata.xml 598 BLAKE2B 50854b04b1cf0b6370888000503a850d5a34b9cc49fbe917f26ff0a6d4fed2204e1b1921d06a1238c47d31fb92c82d8631a56c2fa60e6ef88b7d84aee4897aed SHA512 d13cb55c4649dff554018e04025e741c51397785f2951d1aa8ceb0f7712a2ed48c39b57ac4f6c197f8a4c96bfe8ba44023107201df5ab603d7ea2f11b0713227
|
||||
|
Binary file not shown.
@ -1,15 +1,7 @@
|
||||
DIST VBoxGuestAdditions_5.2.32.iso 49620992 BLAKE2B 04853f4b9a95898263ca7238a78b5d8751882a21874e4745d675642185542eb617f2a74b3e55b4444067822511d33b6d358e37e179d1b1c6464d701a8ab45a54 SHA512 86f1d7071a9033b7826dcacbcf23822acc772d909af8a8a12345bd5fe68375677b522d0e1987f2908412d5a29369d0a1221fd099f8b692c8d25fe9cbe40fd11e
|
||||
DIST VBoxGuestAdditions_5.2.36.iso 49661952 BLAKE2B 181c26b5362ebdd8508bcc5b3f75993fc6ab7036093004a614c5153a8c772e2bdaab309adc452cfe78ee09fbd528c00a875193f4183b75e3cb6ce169b4f68507 SHA512 4be8e943f61b17445b17d092db84ddd6841d933bf2b8dd1fad7cc0095d31932347f861e110917ca6d0ebec2ee62b2afa7e5977123830e50a4e0e4a6c1872e28e
|
||||
DIST VBoxGuestAdditions_5.2.40.iso 49770496 BLAKE2B 4d9ca6cde78da325575f56f0b12d7beccfd09a564b98c808495ac8425f47bd0ce1b86a5cfb79c30256b36b109032013a0677ff07c45808324ca3b85efe5b7f51 SHA512 a2ea5539de454bb062dffa0b61ac4962c8932539ab0cdaae98f7703528c201bc856b0597b92c20e83fab5b97981be3811061386022ca3687d8c102983e05ec7b
|
||||
DIST VBoxGuestAdditions_6.0.16.iso 77201408 BLAKE2B 713381429cbef6685c4890c47dc0896571ca24cacc96d73903cdd91220a6b5ba7c6012c69d62489eaabd1fe75dd0000a3415d7d316fbc79b3b8ac2cf45cba75a SHA512 d17de374714023b02fef76bad53a15fe4d5d4bc752e900843419e9c3ba4988bd9bdc8fd6797bb4fdfa722d0f41ff144ed6865a0778609a7aea5e96de34c7beb8
|
||||
DIST VBoxGuestAdditions_6.0.20.iso 77297664 BLAKE2B 72c3e6b3c757d866bbf94cb2593b81d05362dcb1485db8412c8c3a95a7619754eeeaa75f8d813bd26bb3c27a718e3f687fb5904dd2574d29eb96988f48fcc67b SHA512 16c69ddee28650ac35ee25bead96568cdfe269042ed6a4138b5870322ff9dab405ea844d75886a0b52c44f0c47a34814a30d48734a6683df6b6ad042b1bea68d
|
||||
DIST VBoxGuestAdditions_6.1.4.iso 59688960 BLAKE2B e7c86bbb2eddfc1e9dd555a5d9e5b808194a0124f0cf3bfb09aa226a89cd348cf979f523361fbd0cc400912709310592f938e56ef410a9f81c1bb514db58c2e7 SHA512 a1e8f404c3d58adc60adb6a14cecc3e56f0705bd810891038d2fd6691e9f54f61daa4ffe804c77005b2764cb7c7c8d97fb67077e05aca94cf21c4afa89cd7f4a
|
||||
DIST VBoxGuestAdditions_6.1.6.iso 59760640 BLAKE2B dac4f92c851d37ad995ff631f1b7ecda702c3dce5b299232fc7ec956009fb13e09fc0e5d6980d09c4a9f1b58ab5fcff93c791ecc0fb184cefa701f072e68b87c SHA512 b87cc85d46ffcbf6ae8b21ef5932144b956f59925a1c5a87bbcc81dd9dbd845b1f3f282b92cea3dcc15d3e338e676dd58f81762e27019c1fb6736c541b1fdd9a
|
||||
EBUILD virtualbox-additions-5.2.32.ebuild 710 BLAKE2B 300f594457535bad16e10b7242da27091ff0e8fe20e3db76b73f4b6a47e525f4a39f972c2ab80b0ddf6a1908d2e84996368d12e73e8feb3c7a16cee2e325f447 SHA512 ee73c7a249ae300709068273d0fbde262883334d079fe618d3fc8715112c3c52b8b07cde5229f8fe8312cc7611088ba0742fc4233a25fd75683e58dbe1376cb6
|
||||
EBUILD virtualbox-additions-5.2.36.ebuild 711 BLAKE2B b26c7ff1e2302c53e08ca632ca1531b11529f714702e41ebf0c9626dd0014f7955b8f1c247592cc0ce70504defe3cf208d4104b9953358d185ed87c2d0913137 SHA512 455688eafa83a3b01af4c8c516ccb102b7f6008e9e029fb5543b843c9926bc6f59aa0d5bd2da933ffc0d3ae923d90c35171bbc1dd499983a5a5be4070be73ecb
|
||||
EBUILD virtualbox-additions-5.2.40.ebuild 710 BLAKE2B 5cc278d912a575945517dca38dd421209cb449ec1a75ead026dee8bf7664f38824aea1b16e378493d61d1d01eb564fa10886aa2c5a37e5ce67c1f53b40f4c745 SHA512 a0b54219ba2d003e3af5986bec95c6aedb97aa529ab72ea5f3cc80a6b8ee457cb5d8608d1e115c8661d700e694b19533cb1a65e4f59784bc30d6b87e73c6d3d2
|
||||
EBUILD virtualbox-additions-6.0.16.ebuild 768 BLAKE2B bf059ba8cc66f0cd95ed56f055a0c552621817f036996a5df95f664f7689a642453d3b065eea0b2cc510ca7a0fdcb1d39c72704e935b04ed21aa870c3a3bc8c8 SHA512 4c3281e2c7069f644e9e8b2d2ac181fe5be9b4805c7788a8009f3269595d800af17f4e97101ff3696d4a9568f104502fa162c92c3883b0808bafa3b82e07ce18
|
||||
EBUILD virtualbox-additions-6.0.20.ebuild 768 BLAKE2B bf059ba8cc66f0cd95ed56f055a0c552621817f036996a5df95f664f7689a642453d3b065eea0b2cc510ca7a0fdcb1d39c72704e935b04ed21aa870c3a3bc8c8 SHA512 4c3281e2c7069f644e9e8b2d2ac181fe5be9b4805c7788a8009f3269595d800af17f4e97101ff3696d4a9568f104502fa162c92c3883b0808bafa3b82e07ce18
|
||||
EBUILD virtualbox-additions-6.1.4.ebuild 763 BLAKE2B c57b3c6b7602771dc32a940bd3c770407809cd5acb5b02e80c0f9c2e5cbacd000e267a2cf4081f19ea17a4744b2e0eb7e40dde9662fc2ef00f478a83522b3dfa SHA512 eeb8c4d8333f2044e41eb908463b37508fa31a74cd4eefa09ec9da7def8790d71a9f55c7404c9d2355480b5547adcf0f5438fa35a0b0c9513307f26cf46b8ff5
|
||||
EBUILD virtualbox-additions-6.1.6.ebuild 763 BLAKE2B c57b3c6b7602771dc32a940bd3c770407809cd5acb5b02e80c0f9c2e5cbacd000e267a2cf4081f19ea17a4744b2e0eb7e40dde9662fc2ef00f478a83522b3dfa SHA512 eeb8c4d8333f2044e41eb908463b37508fa31a74cd4eefa09ec9da7def8790d71a9f55c7404c9d2355480b5547adcf0f5438fa35a0b0c9513307f26cf46b8ff5
|
||||
MISC metadata.xml 260 BLAKE2B 55d9eb1793faf23ffb69c904a9daf755cefe1b1e04fc2331e792a81acc1b699591acb85e005a96e70167e4eba8444e0cfc8f03be4fcdc19487ad6b1cea356f4a SHA512 443c9c27369b12fa4d23ac7e9add34dbf93b54d560ca946dac97801698b79401a80d88c6570530e641ad4f7231a8c1419682e1e11af2b171ca2854c598e05635
|
||||
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_PN=VBoxGuestAdditions
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=${MY_PN}_${MY_PV}
|
||||
|
||||
DESCRIPTION="CD image containing guest additions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
|
||||
|
||||
LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
RESTRICT="mirror"
|
||||
|
||||
RDEPEND="!app-emulation/virtualbox-bin
|
||||
!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_unpack() {
|
||||
return 0
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/${PN/-additions}
|
||||
newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_PN=VBoxGuestAdditions
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=${MY_PN}_${MY_PV}
|
||||
|
||||
DESCRIPTION="CD image containing guest additions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
|
||||
|
||||
LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE=""
|
||||
RESTRICT="mirror"
|
||||
|
||||
RDEPEND="!app-emulation/virtualbox-bin
|
||||
!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_unpack() {
|
||||
return 0
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/${PN/-additions}
|
||||
newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_PN=VBoxGuestAdditions
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=${MY_PN}_${MY_PV}
|
||||
|
||||
DESCRIPTION="CD image containing guest additions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
|
||||
|
||||
LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
RESTRICT="mirror"
|
||||
|
||||
RDEPEND="!app-emulation/virtualbox-bin
|
||||
!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_unpack() {
|
||||
return 0
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/${PN/-additions}
|
||||
newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_PN=VBoxGuestAdditions
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=${MY_PN}_${MY_PV}
|
||||
|
||||
DESCRIPTION="CD image containing guest additions for VirtualBox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
|
||||
|
||||
LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
RESTRICT="mirror"
|
||||
|
||||
RDEPEND="!app-emulation/virtualbox-bin
|
||||
!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_unpack() {
|
||||
return 0
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/${PN/-additions}
|
||||
newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
|
||||
}
|
@ -1,287 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5)"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
|
||||
MY_P="VirtualBox-${VBOX_PV}-Linux"
|
||||
# needed as sometimes the extpack gets another build ID
|
||||
EXTP_PV="${VBOX_PV}"
|
||||
EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
EXTP_P="${EXTP_PN}-${EXTP_PV}"
|
||||
# needed as sometimes the SDK gets another build ID
|
||||
SDK_PV="${VBOX_PV}"
|
||||
SDK_P="VirtualBoxSDK-${SDK_PV}"
|
||||
|
||||
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
|
||||
x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
|
||||
https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 PUEL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
|
||||
RESTRICT="bindist mirror"
|
||||
|
||||
if [[ "${PV}" != *beta* ]] ; then
|
||||
SRC_URI+="
|
||||
sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
|
||||
IUSE+=" sdk"
|
||||
fi
|
||||
|
||||
DEPEND="app-arch/unzip
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
RDEPEND="!!app-emulation/virtualbox
|
||||
!app-emulation/virtualbox-additions
|
||||
~app-emulation/virtualbox-modules-${MAIN_PV}
|
||||
!headless? (
|
||||
dev-libs/glib
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
media-libs/libpng
|
||||
media-libs/libsdl[X]
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXft
|
||||
x11-libs/libXi
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
chm? ( dev-libs/expat )
|
||||
)
|
||||
dev-libs/libxml2
|
||||
sys-fs/lvm2
|
||||
x11-libs/libXau
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXmu
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE
|
||||
x11-libs/libXdmcp
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
S="${WORKDIR}"
|
||||
|
||||
QA_PREBUILT="opt/VirtualBox/*"
|
||||
|
||||
PYTHON_UPDATER_IGNORE="1"
|
||||
|
||||
src_unpack() {
|
||||
unpack_makeself ${MY_P}_${ARCH}.run
|
||||
unpack ./VirtualBox.tar.bz2
|
||||
|
||||
mkdir "${S}"/${EXTP_PN} || die
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
unpack ${EXTP_P}.tar.gz
|
||||
popd &>/dev/null || die
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
unpack VirtualBoxSDK-${SDK_PV}.zip
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# create virtualbox configurations files
|
||||
insinto /etc/vbox
|
||||
newins "${FILESDIR}/${PN}-config" vbox.cfg
|
||||
|
||||
if ! use headless ; then
|
||||
newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
|
||||
|
||||
# set up symlinks (bug #572012)
|
||||
dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
|
||||
|
||||
local size ico icofile
|
||||
for size in 16 24 32 48 64 72 96 128 256 ; do
|
||||
pushd "${S}"/icons/${size}x${size} &>/dev/null || die
|
||||
if [[ -f "virtualbox.png" ]] ; then
|
||||
doicon -s ${size} virtualbox.png
|
||||
fi
|
||||
for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
|
||||
icofile="virtualbox-${ico}.png"
|
||||
if [[ -f "${icofile}" ]] ; then
|
||||
doicon -s ${size} ${icofile}
|
||||
fi
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
done
|
||||
doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
|
||||
insinto /usr/share/pixmaps
|
||||
newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
|
||||
fi
|
||||
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
|
||||
doins -r linux.${ARCH}
|
||||
doins ExtPack* PXE-Intel.rom
|
||||
popd &>/dev/null || die
|
||||
rm -rf "${S}"/${EXTP_PN}
|
||||
|
||||
insinto /opt/VirtualBox
|
||||
dodir /opt/bin
|
||||
|
||||
doins UserManual.pdf
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
doins -r sdk
|
||||
fi
|
||||
|
||||
if use additions; then
|
||||
doins -r additions
|
||||
fi
|
||||
|
||||
if use vboxwebsrv; then
|
||||
doins vboxwebsrv
|
||||
fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
|
||||
fperms 0750 /opt/VirtualBox/vboxwebsrv
|
||||
dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
|
||||
newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
|
||||
newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
|
||||
fi
|
||||
|
||||
if use rdesktop-vrdp; then
|
||||
doins rdesktop-vrdp
|
||||
doins -r rdesktop-vrdp-keymaps
|
||||
fperms 0750 /opt/VirtualBox/rdesktop-vrdp
|
||||
dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
|
||||
fi
|
||||
|
||||
if ! use headless && use chm; then
|
||||
doins kchmviewer VirtualBox.chm
|
||||
fowners root:vboxusers /opt/VirtualBox/kchmviewer
|
||||
fperms 0750 /opt/VirtualBox/kchmviewer
|
||||
fi
|
||||
|
||||
# This ebuild / package supports only py2.7. When py3 comes is unknown.
|
||||
# The compile phase makes VBoxPython2_7.so.
|
||||
# py3 support would presumably require a binary pre-compiled by py3.
|
||||
use python && doins VBoxPython.so VBoxPython2_7.so
|
||||
|
||||
rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
|
||||
vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
|
||||
VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
|
||||
webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
|
||||
90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
|
||||
VBoxPython?_*.so
|
||||
|
||||
if use headless ; then
|
||||
rm -rf VBoxSDL VirtualBox VBoxKeyboard.so
|
||||
fi
|
||||
|
||||
doins -r *
|
||||
|
||||
# create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
|
||||
dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
|
||||
dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
|
||||
dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
|
||||
dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
|
||||
dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
|
||||
|
||||
local each
|
||||
for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,NetNAT,TestOGL,ExtPackHelperApp}; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 0750 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
# VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
|
||||
fperms 4750 /opt/VirtualBox/VBoxNetAdpCtl
|
||||
fperms 4750 /opt/VirtualBox/VBoxNetDHCP
|
||||
fperms 4750 /opt/VirtualBox/VBoxNetNAT
|
||||
|
||||
if ! use headless ; then
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
for each in VBox{SDL,Headless} VirtualBox; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 4510 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
|
||||
else
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
|
||||
fperms 4510 /opt/VirtualBox/VBoxHeadless
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
|
||||
fi
|
||||
|
||||
exeinto /opt/VirtualBox
|
||||
newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
|
||||
fowners root:vboxusers /opt/VirtualBox/VBox.sh
|
||||
fperms 0750 /opt/VirtualBox/VBox.sh
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
|
||||
dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
|
||||
|
||||
# set an env-variable for 3rd party tools
|
||||
echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
|
||||
doenvd "${T}/90virtualbox"
|
||||
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}/rules.d
|
||||
doins "${FILESDIR}"/10-virtualbox.rules
|
||||
sed "s@%UDEVDIR%@${udevdir}@" \
|
||||
-i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
|
||||
# move udev scripts into ${udevdir} (bug #372491)
|
||||
mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
|
||||
gnome2_icon_cache_update
|
||||
|
||||
udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
|
||||
|
||||
elog ""
|
||||
if ! use headless ; then
|
||||
elog "To launch VirtualBox just type: \"VirtualBox\""
|
||||
elog ""
|
||||
fi
|
||||
elog "You must be in the vboxusers group to use VirtualBox."
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Please visit http://www.virtualbox.org/wiki/Editions for"
|
||||
elog "an overview about the different features of ${PN}"
|
||||
elog "and virtualbox-ose"
|
||||
if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
}
|
@ -1,287 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5)"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
|
||||
MY_P="VirtualBox-${VBOX_PV}-Linux"
|
||||
# needed as sometimes the extpack gets another build ID
|
||||
EXTP_PV="${VBOX_PV}"
|
||||
EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
EXTP_P="${EXTP_PN}-${EXTP_PV}"
|
||||
# needed as sometimes the SDK gets another build ID
|
||||
SDK_PV="${VBOX_PV}"
|
||||
SDK_P="VirtualBoxSDK-${SDK_PV}"
|
||||
|
||||
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
|
||||
x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
|
||||
https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 PUEL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
|
||||
RESTRICT="bindist mirror"
|
||||
|
||||
if [[ "${PV}" != *beta* ]] ; then
|
||||
SRC_URI+="
|
||||
sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
|
||||
IUSE+=" sdk"
|
||||
fi
|
||||
|
||||
DEPEND="app-arch/unzip
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
RDEPEND="!!app-emulation/virtualbox
|
||||
!app-emulation/virtualbox-additions
|
||||
~app-emulation/virtualbox-modules-${MAIN_PV}
|
||||
!headless? (
|
||||
dev-libs/glib
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
media-libs/libpng
|
||||
media-libs/libsdl[X]
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXft
|
||||
x11-libs/libXi
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
chm? ( dev-libs/expat )
|
||||
)
|
||||
dev-libs/libxml2
|
||||
sys-fs/lvm2
|
||||
x11-libs/libXau
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXmu
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE
|
||||
x11-libs/libXdmcp
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
S="${WORKDIR}"
|
||||
|
||||
QA_PREBUILT="opt/VirtualBox/*"
|
||||
|
||||
PYTHON_UPDATER_IGNORE="1"
|
||||
|
||||
src_unpack() {
|
||||
unpack_makeself ${MY_P}_${ARCH}.run
|
||||
unpack ./VirtualBox.tar.bz2
|
||||
|
||||
mkdir "${S}"/${EXTP_PN} || die
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
unpack ${EXTP_P}.tar.gz
|
||||
popd &>/dev/null || die
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
unpack VirtualBoxSDK-${SDK_PV}.zip
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# create virtualbox configurations files
|
||||
insinto /etc/vbox
|
||||
newins "${FILESDIR}/${PN}-config" vbox.cfg
|
||||
|
||||
if ! use headless ; then
|
||||
newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
|
||||
|
||||
# set up symlinks (bug #572012)
|
||||
dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
|
||||
|
||||
local size ico icofile
|
||||
for size in 16 24 32 48 64 72 96 128 256 ; do
|
||||
pushd "${S}"/icons/${size}x${size} &>/dev/null || die
|
||||
if [[ -f "virtualbox.png" ]] ; then
|
||||
doicon -s ${size} virtualbox.png
|
||||
fi
|
||||
for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
|
||||
icofile="virtualbox-${ico}.png"
|
||||
if [[ -f "${icofile}" ]] ; then
|
||||
doicon -s ${size} ${icofile}
|
||||
fi
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
done
|
||||
doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
|
||||
insinto /usr/share/pixmaps
|
||||
newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
|
||||
fi
|
||||
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
|
||||
doins -r linux.${ARCH}
|
||||
doins ExtPack* PXE-Intel.rom
|
||||
popd &>/dev/null || die
|
||||
rm -rf "${S}"/${EXTP_PN}
|
||||
|
||||
insinto /opt/VirtualBox
|
||||
dodir /opt/bin
|
||||
|
||||
doins UserManual.pdf
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
doins -r sdk
|
||||
fi
|
||||
|
||||
if use additions; then
|
||||
doins -r additions
|
||||
fi
|
||||
|
||||
if use vboxwebsrv; then
|
||||
doins vboxwebsrv
|
||||
fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
|
||||
fperms 0750 /opt/VirtualBox/vboxwebsrv
|
||||
dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
|
||||
newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
|
||||
newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
|
||||
fi
|
||||
|
||||
if use rdesktop-vrdp; then
|
||||
doins rdesktop-vrdp
|
||||
doins -r rdesktop-vrdp-keymaps
|
||||
fperms 0750 /opt/VirtualBox/rdesktop-vrdp
|
||||
dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
|
||||
fi
|
||||
|
||||
if ! use headless && use chm; then
|
||||
doins kchmviewer VirtualBox.chm
|
||||
fowners root:vboxusers /opt/VirtualBox/kchmviewer
|
||||
fperms 0750 /opt/VirtualBox/kchmviewer
|
||||
fi
|
||||
|
||||
# This ebuild / package supports only py2.7. When py3 comes is unknown.
|
||||
# The compile phase makes VBoxPython2_7.so.
|
||||
# py3 support would presumably require a binary pre-compiled by py3.
|
||||
use python && doins VBoxPython.so VBoxPython2_7.so
|
||||
|
||||
rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
|
||||
vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
|
||||
VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
|
||||
webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
|
||||
90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
|
||||
VBoxPython?_*.so
|
||||
|
||||
if use headless ; then
|
||||
rm -rf VBoxSDL VirtualBox VBoxKeyboard.so
|
||||
fi
|
||||
|
||||
doins -r *
|
||||
|
||||
# create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
|
||||
dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
|
||||
dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
|
||||
dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
|
||||
dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
|
||||
dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
|
||||
|
||||
local each
|
||||
for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,NetNAT,TestOGL,ExtPackHelperApp}; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 0750 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
# VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
|
||||
fperms 4750 /opt/VirtualBox/VBoxNetAdpCtl
|
||||
fperms 4750 /opt/VirtualBox/VBoxNetDHCP
|
||||
fperms 4750 /opt/VirtualBox/VBoxNetNAT
|
||||
|
||||
if ! use headless ; then
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
for each in VBox{SDL,Headless} VirtualBox; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 4510 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
|
||||
else
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
|
||||
fperms 4510 /opt/VirtualBox/VBoxHeadless
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
|
||||
fi
|
||||
|
||||
exeinto /opt/VirtualBox
|
||||
newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
|
||||
fowners root:vboxusers /opt/VirtualBox/VBox.sh
|
||||
fperms 0750 /opt/VirtualBox/VBox.sh
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
|
||||
dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
|
||||
|
||||
# set an env-variable for 3rd party tools
|
||||
echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
|
||||
doenvd "${T}/90virtualbox"
|
||||
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}/rules.d
|
||||
doins "${FILESDIR}"/10-virtualbox.rules
|
||||
sed "s@%UDEVDIR%@${udevdir}@" \
|
||||
-i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
|
||||
# move udev scripts into ${udevdir} (bug #372491)
|
||||
mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
|
||||
gnome2_icon_cache_update
|
||||
|
||||
udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
|
||||
|
||||
elog ""
|
||||
if ! use headless ; then
|
||||
elog "To launch VirtualBox just type: \"VirtualBox\""
|
||||
elog ""
|
||||
fi
|
||||
elog "You must be in the vboxusers group to use VirtualBox."
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Please visit http://www.virtualbox.org/wiki/Editions for"
|
||||
elog "an overview about the different features of ${PN}"
|
||||
elog "and virtualbox-ose"
|
||||
if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
}
|
@ -1,292 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
KEYWORDS="~amd64" #~x86
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
|
||||
MY_P="VirtualBox-${VBOX_PV}-Linux"
|
||||
# needed as sometimes the extpack gets another build ID
|
||||
EXTP_PV="${VBOX_PV}"
|
||||
EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
EXTP_P="${EXTP_PN}-${EXTP_PV}"
|
||||
# needed as sometimes the SDK gets another build ID
|
||||
SDK_PV="${VBOX_PV}"
|
||||
SDK_P="VirtualBoxSDK-${SDK_PV}"
|
||||
|
||||
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
|
||||
https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
|
||||
#x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
|
||||
|
||||
LICENSE="GPL-2 PUEL"
|
||||
SLOT="0"
|
||||
IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
|
||||
RESTRICT="bindist mirror"
|
||||
|
||||
if [[ "${PV}" != *beta* ]] ; then
|
||||
SRC_URI+="
|
||||
sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
|
||||
IUSE+=" sdk"
|
||||
fi
|
||||
|
||||
DEPEND="app-arch/unzip
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
RDEPEND="!!app-emulation/virtualbox
|
||||
!app-emulation/virtualbox-additions
|
||||
acct-group/vboxusers
|
||||
~app-emulation/virtualbox-modules-${MAIN_PV}
|
||||
!headless? (
|
||||
dev-libs/glib
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
media-libs/libpng
|
||||
media-libs/libsdl[X]
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXft
|
||||
x11-libs/libXi
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
chm? ( dev-libs/expat )
|
||||
)
|
||||
dev-libs/libxml2
|
||||
sys-fs/lvm2
|
||||
x11-libs/libXau
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXmu
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE
|
||||
x11-libs/libXdmcp
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
S="${WORKDIR}"
|
||||
|
||||
QA_PREBUILT="opt/VirtualBox/*"
|
||||
|
||||
PYTHON_UPDATER_IGNORE="1"
|
||||
|
||||
src_unpack() {
|
||||
unpack_makeself ${MY_P}_${ARCH}.run
|
||||
unpack ./VirtualBox.tar.bz2
|
||||
|
||||
mkdir "${S}"/${EXTP_PN} || die
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
unpack ${EXTP_P}.tar.gz
|
||||
popd &>/dev/null || die
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
unpack VirtualBoxSDK-${SDK_PV}.zip
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# create virtualbox configurations files
|
||||
insinto /etc/vbox
|
||||
newins "${FILESDIR}/${PN}-config" vbox.cfg
|
||||
|
||||
if ! use headless ; then
|
||||
newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
|
||||
|
||||
# set up symlinks (bug #572012)
|
||||
dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
|
||||
|
||||
local size ico icofile
|
||||
for size in 16 24 32 48 64 72 96 128 256 ; do
|
||||
pushd "${S}"/icons/${size}x${size} &>/dev/null || die
|
||||
if [[ -f "virtualbox.png" ]] ; then
|
||||
doicon -s ${size} virtualbox.png
|
||||
fi
|
||||
for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
|
||||
icofile="virtualbox-${ico}.png"
|
||||
if [[ -f "${icofile}" ]] ; then
|
||||
doicon -s ${size} ${icofile}
|
||||
fi
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
done
|
||||
doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
|
||||
insinto /usr/share/pixmaps
|
||||
newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
|
||||
fi
|
||||
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
|
||||
doins -r linux.${ARCH}
|
||||
doins ExtPack* PXE-Intel.rom
|
||||
popd &>/dev/null || die
|
||||
rm -rf "${S}"/${EXTP_PN}
|
||||
|
||||
insinto /opt/VirtualBox
|
||||
dodir /opt/bin
|
||||
|
||||
doins UserManual.pdf
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
doins -r sdk
|
||||
fi
|
||||
|
||||
if use additions; then
|
||||
doins -r additions
|
||||
fi
|
||||
|
||||
if use vboxwebsrv; then
|
||||
doins vboxwebsrv
|
||||
fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
|
||||
fperms 0750 /opt/VirtualBox/vboxwebsrv
|
||||
dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
|
||||
newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
|
||||
newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
|
||||
fi
|
||||
|
||||
if use rdesktop-vrdp; then
|
||||
doins rdesktop-vrdp
|
||||
doins -r rdesktop-vrdp-keymaps
|
||||
fperms 0750 /opt/VirtualBox/rdesktop-vrdp
|
||||
dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
|
||||
fi
|
||||
|
||||
if ! use headless && use chm; then
|
||||
doins kchmviewer VirtualBox.chm
|
||||
fowners root:vboxusers /opt/VirtualBox/kchmviewer
|
||||
fperms 0750 /opt/VirtualBox/kchmviewer
|
||||
fi
|
||||
|
||||
# This ebuild / package supports only py2.7. When py3 comes is unknown.
|
||||
# The compile phase makes VBoxPython2_7.so.
|
||||
# py3 support would presumably require a binary pre-compiled by py3.
|
||||
use python && doins VBoxPython.so
|
||||
|
||||
rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
|
||||
vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
|
||||
VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
|
||||
webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
|
||||
90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
|
||||
VBoxPython?_*.so
|
||||
|
||||
if use headless ; then
|
||||
rm -rf VBoxSDL VirtualBox{,VM} VBoxKeyboard.so
|
||||
fi
|
||||
|
||||
doins -r *
|
||||
|
||||
# create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
|
||||
dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
|
||||
dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
|
||||
dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
|
||||
dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
|
||||
dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
|
||||
|
||||
local each
|
||||
for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,TestOGL,ExtPackHelperApp} $(usex headless '' VirtualBox) ; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 0750 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
# VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
|
||||
for each in VBoxNet{AdpCtl,DHCP,NAT} $(usex headless '' VirtualBoxVM) ; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 4750 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
|
||||
if ! use headless ; then
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
for each in VBox{SDL,Headless} ; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 4510 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
|
||||
else
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
|
||||
fperms 4510 /opt/VirtualBox/VBoxHeadless
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
|
||||
fi
|
||||
|
||||
exeinto /opt/VirtualBox
|
||||
newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
|
||||
fowners root:vboxusers /opt/VirtualBox/VBox.sh
|
||||
fperms 0750 /opt/VirtualBox/VBox.sh
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
|
||||
dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
|
||||
|
||||
# set an env-variable for 3rd party tools
|
||||
echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
|
||||
doenvd "${T}/90virtualbox"
|
||||
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}/rules.d
|
||||
doins "${FILESDIR}"/10-virtualbox.rules
|
||||
sed "s@%UDEVDIR%@${udevdir}@" \
|
||||
-i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
|
||||
# move udev scripts into ${udevdir} (bug #372491)
|
||||
mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
|
||||
udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
|
||||
|
||||
elog ""
|
||||
if ! use headless ; then
|
||||
elog "To launch VirtualBox just type: \"VirtualBox\""
|
||||
elog ""
|
||||
fi
|
||||
elog "You must be in the vboxusers group to use VirtualBox."
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Please visit http://www.virtualbox.org/wiki/Editions for"
|
||||
elog "an overview about the different features of ${PN}"
|
||||
elog "and virtualbox-ose"
|
||||
if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
@ -1,292 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
KEYWORDS="~amd64" #~x86
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
|
||||
MY_P="VirtualBox-${VBOX_PV}-Linux"
|
||||
# needed as sometimes the extpack gets another build ID
|
||||
EXTP_PV="${VBOX_PV}"
|
||||
EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
EXTP_P="${EXTP_PN}-${EXTP_PV}"
|
||||
# needed as sometimes the SDK gets another build ID
|
||||
SDK_PV="${VBOX_PV}"
|
||||
SDK_P="VirtualBoxSDK-${SDK_PV}"
|
||||
|
||||
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
|
||||
https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
|
||||
#x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
|
||||
|
||||
LICENSE="GPL-2 PUEL"
|
||||
SLOT="0"
|
||||
IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
|
||||
RESTRICT="bindist mirror"
|
||||
|
||||
if [[ "${PV}" != *beta* ]] ; then
|
||||
SRC_URI+="
|
||||
sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
|
||||
IUSE+=" sdk"
|
||||
fi
|
||||
|
||||
DEPEND="app-arch/unzip
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
RDEPEND="!!app-emulation/virtualbox
|
||||
!app-emulation/virtualbox-additions
|
||||
acct-group/vboxusers
|
||||
~app-emulation/virtualbox-modules-${MY_PV,,}
|
||||
!headless? (
|
||||
dev-libs/glib
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
media-libs/libpng
|
||||
media-libs/libsdl[X]
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXft
|
||||
x11-libs/libXi
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
chm? ( dev-libs/expat )
|
||||
)
|
||||
dev-libs/libxml2
|
||||
sys-fs/lvm2
|
||||
x11-libs/libXau
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXmu
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE
|
||||
x11-libs/libXdmcp
|
||||
${PYTHON_DEPS}"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
S="${WORKDIR}"
|
||||
|
||||
QA_PREBUILT="opt/VirtualBox/*"
|
||||
|
||||
PYTHON_UPDATER_IGNORE="1"
|
||||
|
||||
src_unpack() {
|
||||
unpack_makeself ${MY_P}_${ARCH}.run
|
||||
unpack ./VirtualBox.tar.bz2
|
||||
|
||||
mkdir "${S}"/${EXTP_PN} || die
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
unpack ${EXTP_P}.tar.gz
|
||||
popd &>/dev/null || die
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
unpack VirtualBoxSDK-${SDK_PV}.zip
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# create virtualbox configurations files
|
||||
insinto /etc/vbox
|
||||
newins "${FILESDIR}/${PN}-config" vbox.cfg
|
||||
|
||||
if ! use headless ; then
|
||||
newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
|
||||
|
||||
# set up symlinks (bug #572012)
|
||||
dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
|
||||
|
||||
local size ico icofile
|
||||
for size in 16 24 32 48 64 72 96 128 256 ; do
|
||||
pushd "${S}"/icons/${size}x${size} &>/dev/null || die
|
||||
if [[ -f "virtualbox.png" ]] ; then
|
||||
doicon -s ${size} virtualbox.png
|
||||
fi
|
||||
for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
|
||||
icofile="virtualbox-${ico}.png"
|
||||
if [[ -f "${icofile}" ]] ; then
|
||||
doicon -s ${size} ${icofile}
|
||||
fi
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
done
|
||||
doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
|
||||
insinto /usr/share/pixmaps
|
||||
newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
|
||||
fi
|
||||
|
||||
pushd "${S}"/${EXTP_PN} &>/dev/null || die
|
||||
insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
|
||||
doins -r linux.${ARCH}
|
||||
doins ExtPack* PXE-Intel.rom
|
||||
popd &>/dev/null || die
|
||||
rm -rf "${S}"/${EXTP_PN}
|
||||
|
||||
insinto /opt/VirtualBox
|
||||
dodir /opt/bin
|
||||
|
||||
doins UserManual.pdf
|
||||
|
||||
if [[ "${PV}" != *beta* ]] && use sdk ; then
|
||||
doins -r sdk
|
||||
fi
|
||||
|
||||
if use additions; then
|
||||
doins -r additions
|
||||
fi
|
||||
|
||||
if use vboxwebsrv; then
|
||||
doins vboxwebsrv
|
||||
fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
|
||||
fperms 0750 /opt/VirtualBox/vboxwebsrv
|
||||
dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
|
||||
newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
|
||||
newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
|
||||
fi
|
||||
|
||||
if use rdesktop-vrdp; then
|
||||
doins rdesktop-vrdp
|
||||
doins -r rdesktop-vrdp-keymaps
|
||||
fperms 0750 /opt/VirtualBox/rdesktop-vrdp
|
||||
dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
|
||||
fi
|
||||
|
||||
if ! use headless && use chm; then
|
||||
doins kchmviewer VirtualBox.chm
|
||||
fowners root:vboxusers /opt/VirtualBox/kchmviewer
|
||||
fperms 0750 /opt/VirtualBox/kchmviewer
|
||||
fi
|
||||
|
||||
# This ebuild / package supports only py2.7. When py3 comes is unknown.
|
||||
# The compile phase makes VBoxPython2_7.so.
|
||||
# py3 support would presumably require a binary pre-compiled by py3.
|
||||
use python && doins VBoxPython.so
|
||||
|
||||
rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
|
||||
vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
|
||||
VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
|
||||
webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
|
||||
90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
|
||||
VBoxPython?_*.so
|
||||
|
||||
if use headless ; then
|
||||
rm -rf VBoxSDL VirtualBox{,VM} VBoxKeyboard.so
|
||||
fi
|
||||
|
||||
doins -r *
|
||||
|
||||
# create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
|
||||
dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
|
||||
dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
|
||||
dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
|
||||
dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
|
||||
dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
|
||||
|
||||
local each
|
||||
for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,TestOGL,ExtPackHelperApp} $(usex headless '' VirtualBox) ; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 0750 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
# VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
|
||||
for each in VBoxNet{AdpCtl,DHCP,NAT} $(usex headless '' VirtualBoxVM) ; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 4750 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
|
||||
if ! use headless ; then
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
for each in VBox{SDL,Headless} ; do
|
||||
fowners root:vboxusers /opt/VirtualBox/${each}
|
||||
fperms 4510 /opt/VirtualBox/${each}
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
|
||||
done
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
|
||||
else
|
||||
# Hardened build: Mark selected binaries set-user-ID-on-execution
|
||||
fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
|
||||
fperms 4510 /opt/VirtualBox/VBoxHeadless
|
||||
pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
|
||||
fi
|
||||
|
||||
exeinto /opt/VirtualBox
|
||||
newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
|
||||
fowners root:vboxusers /opt/VirtualBox/VBox.sh
|
||||
fperms 0750 /opt/VirtualBox/VBox.sh
|
||||
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
|
||||
dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
|
||||
dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
|
||||
|
||||
# set an env-variable for 3rd party tools
|
||||
echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
|
||||
doenvd "${T}/90virtualbox"
|
||||
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}/rules.d
|
||||
doins "${FILESDIR}"/10-virtualbox.rules
|
||||
sed "s@%UDEVDIR%@${udevdir}@" \
|
||||
-i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
|
||||
# move udev scripts into ${udevdir} (bug #372491)
|
||||
mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
|
||||
udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
|
||||
|
||||
elog ""
|
||||
if ! use headless ; then
|
||||
elog "To launch VirtualBox just type: \"VirtualBox\""
|
||||
elog ""
|
||||
fi
|
||||
elog "You must be in the vboxusers group to use VirtualBox."
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Please visit http://www.virtualbox.org/wiki/Editions for"
|
||||
elog "an overview about the different features of ${PN}"
|
||||
elog "and virtualbox-ose"
|
||||
if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
@ -1,15 +1,7 @@
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.32-132073.tar.gz 26917593 BLAKE2B e52c746299d32ae908892791d8fb9b4dda264875e66bf0459adfbc64381001e9be1800a8ac93bbea14dceb47a0e81cf79c29a4c0796f7c4a30021e4beb036cfa SHA512 382ed45a90981397da7d46925a73c5aa0cc870fe41992c87ccd3d3a33420b199e4a0a19761a6c6ebeacf93450e2937d81befb6fdaf7fb7961827e23f0f24c645
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.36-135684.tar.gz 26989444 BLAKE2B fae15190bb434918e1ee15582c261b0bf33fbffa0ada922708892cc63ef8ca007decc7611394b056207df4f3ceb9fef781ace6f05e357e4849ae619ccc810b84 SHA512 c2a8f905ddde2c75a852e0391cfef252d45c6582994be53de8198c5c6276fe1827610620ae7e515c7cd7358ae8c9ab49766a8d968ea371895e7553955fd9cdec
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.40-137108.tar.gz 26737982 BLAKE2B 4a050067c0111929fe73695ec4f057e6b33cb224c034ca564beb65cc4fb73491b2c03e0b88ddb77ede5fbd392b0e0c9eae3226f937998b2c06484ff083b4a714 SHA512 5e3e528707b7f3eab19db5358258a69518996a98364e57df9853a549d7310b8db58b40041470f263b212fe6e2bb163e745a3b9b7567c681834d99442289407f4
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.16-135674.tar.gz 23164167 BLAKE2B 59885f2710e8169c28cc1f5e0e9edb3b761030aee1eeeb645bed1085e145a02fb2e518108cf4426620a369b17b6ce7ff4b5c442ef69b29b33257993603874d7c SHA512 de4732d1c3ef5589c3af388c71003a1a1b4b48c7c47f26ab8b5950ccd2b906c3785af2e310df27e8f9b83ecf572857c4178c8f7cb96d3a3bca103da4fbc036ea
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.20-137117.tar.gz 23238318 BLAKE2B 160e92cb889c765ae28eccb535478af81377d6ce2cadde53e572c41e52f230ca266975b8fe37db0743450bb9e90b23d2fe6d1974496bbb93280381de1379cdd6 SHA512 26f81b5ca3aa5c8423ea42cd1d650657351114f46373d9ca7fa08895865229008d1dff225b9caae6a603758da1c15d2b025da6add86fded377a2700bdbf9b65c
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.4-136177.tar.gz 10997977 BLAKE2B 066a0302b53a62ef27f5c0fafc499e8fd8f253807bc8808e88c32a4b71872c0cc8a57ffc6727f9e2bf7f6ba1b4e1d41c3001b8e9b3e490acfd4339bf8b02dfdd SHA512 373aa70182c4f86de14c40026f1d435832f2f377a8fe422fcbc3644b5e6a5f7abfc56df3f4b9acf1fa70cccb0bc483f12b6f70f6009a725ca0fa1b7e38dbfeab
|
||||
DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.6-137129.tar.gz 10999815 BLAKE2B f7c0e3ec1ba3c2eb991f76a574c1605eebc0a2a40751f6c822f37cbff743b642c9c09ce8dcebc725bdf51f2099dc044aed6486909ab7dd9d62335a1dd483bfb1 SHA512 938564a68e7b18a83022329217c2304470a3682ccd5a837be3caa1b802d3c7bed450428c1d3176fac571eb8a53dca2405ca53853163ad613ef056bc3b3beef68
|
||||
EBUILD virtualbox-extpack-oracle-5.2.32.132073.ebuild 1013 BLAKE2B 822e606ede4d2981350c5a553af7632bb310ad32bb57bd6ecd6c65c9c105f3c571243df92c0be0400b483488e063f6f8def5dd7c63ab2fb5b936bccb26cfb00e SHA512 5d68098ef54662639f62de3262297e912d8b786a9509c5692363830a2f343d6ff5f217bf8db25f53dd7d9f38a86a354de8948e920437acc0fa70f4ba9fdb5a07
|
||||
EBUILD virtualbox-extpack-oracle-5.2.36.135684.ebuild 1014 BLAKE2B 98430a4df92cb561f976e21c54549b34bb6667ca8e11b8cd05fae0e143bacb5f558d9714454f4d2c7dcdc3e118c436a3245e81b8964ca006c713dfa1db620744 SHA512 aa348126bfa07bada186d37b61cb381c72259cb91649c269115aa5323e8f677add4174b7e6a6319c7b1eb116ef73d14eeef81dc59ec327a6a60e249516a7fa6e
|
||||
EBUILD virtualbox-extpack-oracle-5.2.40.137108.ebuild 1013 BLAKE2B 5fbd8cd2a629c410b9d06669cab58e7bfcb7bd05ff0585cfe60e786a9edf121408ce040a47b96b2f0648ae30a5d97e02cd081dd73164b3233d6172693b562891 SHA512 4d8b9d7223797ba02c71d213d6e690cfc272945c74003e7aee5991136d484359d06f825f8c1963533e9f8af6f0471da963dab65441abc81defcd2e0aa036f187
|
||||
EBUILD virtualbox-extpack-oracle-6.0.16.135674.ebuild 1073 BLAKE2B d8455cc34906468bcca74b6b97d036697f73ccaa7a9e4dd8e75c0788d77992fa47cf17b36af62252d1ab60d414139d2e6d91573205e511bdab74811dea664fae SHA512 be6697071823d650e389c892bf09fb84b5aa5ca98211ee2b13e9af3aaa5182890ab3f1d3b7fc004c9995c645e9c2a2a279dd2c8676ced2802406a7ce9d1e46a6
|
||||
EBUILD virtualbox-extpack-oracle-6.0.20.137117.ebuild 1073 BLAKE2B d8455cc34906468bcca74b6b97d036697f73ccaa7a9e4dd8e75c0788d77992fa47cf17b36af62252d1ab60d414139d2e6d91573205e511bdab74811dea664fae SHA512 be6697071823d650e389c892bf09fb84b5aa5ca98211ee2b13e9af3aaa5182890ab3f1d3b7fc004c9995c645e9c2a2a279dd2c8676ced2802406a7ce9d1e46a6
|
||||
EBUILD virtualbox-extpack-oracle-6.1.4.136177.ebuild 1068 BLAKE2B 33ade4b37520ea9e963ccdb462ab3e84b9670440490d30eed75dadf10facdbca1573e438d011365c8489240c06cb9ec6c208c1cc2197ad9f40e8623afcef9fa6 SHA512 0bf4c4bb7bde40d808056b2ac8877bda00c5e529f3056f1e476222ab7c8bbcb0eb6478c3636e012037c00407ae9b9a3f47271742272fa9262270b435a3312611
|
||||
EBUILD virtualbox-extpack-oracle-6.1.6.137129.ebuild 1068 BLAKE2B 33ade4b37520ea9e963ccdb462ab3e84b9670440490d30eed75dadf10facdbca1573e438d011365c8489240c06cb9ec6c208c1cc2197ad9f40e8623afcef9fa6 SHA512 0bf4c4bb7bde40d808056b2ac8877bda00c5e529f3056f1e476222ab7c8bbcb0eb6478c3636e012037c00407ae9b9a3f47271742272fa9262270b435a3312611
|
||||
MISC metadata.xml 260 BLAKE2B 55d9eb1793faf23ffb69c904a9daf755cefe1b1e04fc2331e792a81acc1b699591acb85e005a96e70167e4eba8444e0cfc8f03be4fcdc19487ad6b1cea356f4a SHA512 443c9c27369b12fa4d23ac7e9add34dbf93b54d560ca946dac97801698b79401a80d88c6570530e641ad4f7231a8c1419682e1e11af2b171ca2854c598e05635
|
||||
|
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5)"
|
||||
DEP_PV="${MY_PV}"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
DEP_PV="${MAIN_PV}"
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
|
||||
|
||||
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"
|
||||
|
||||
LICENSE="PUEL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
RESTRICT="bindist mirror strip"
|
||||
|
||||
RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
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,42 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5)"
|
||||
DEP_PV="${MY_PV}"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
DEP_PV="${MAIN_PV}"
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
|
||||
|
||||
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"
|
||||
|
||||
LICENSE="PUEL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE=""
|
||||
RESTRICT="bindist mirror strip"
|
||||
|
||||
RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
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,43 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
|
||||
DEP_PV="${MY_PV}"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
DEP_PV="${MAIN_PV}"
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
|
||||
|
||||
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"
|
||||
|
||||
LICENSE="PUEL"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
RESTRICT="bindist mirror strip"
|
||||
|
||||
RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
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,43 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib
|
||||
|
||||
MAIN_PV="$(ver_cut 1-3)"
|
||||
if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
|
||||
MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
|
||||
DEP_PV="${MY_PV}"
|
||||
MY_PV="${MY_PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
else
|
||||
MY_PV="${MAIN_PV}"
|
||||
DEP_PV="${MAIN_PV}"
|
||||
fi
|
||||
VBOX_BUILD_ID="$(ver_cut 4)"
|
||||
MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
|
||||
MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
|
||||
|
||||
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"
|
||||
|
||||
LICENSE="PUEL"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
RESTRICT="bindist mirror strip"
|
||||
|
||||
RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
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,229 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod systemd user toolchain-funcs
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P="VirtualBox-${MY_PV}"
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.2.16-patches-02.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="X"
|
||||
|
||||
RDEPEND="
|
||||
X? ( x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libXmu
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXext
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE )
|
||||
sys-apps/dbus
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-libs/pam
|
||||
sys-power/iasl
|
||||
x11-base/xorg-proto
|
||||
"
|
||||
PDEPEND="
|
||||
X? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
BUILD_TARGETS="all"
|
||||
BUILD_TARGET_ARCH="${ARCH}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
export DISTCC_DISABLE=1 #674256
|
||||
MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
|
||||
vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
|
||||
use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
|
||||
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
|
||||
# Create and unpack a tarball with the sources of the Linux guest
|
||||
# kernel modules, to include all the needed files
|
||||
"${S}"/src/VBox/Additions/linux/export_modules.sh "${WORKDIR}/vbox-kmod.tar.gz"
|
||||
unpack ./vbox-kmod.tar.gz
|
||||
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
cd "${S}"
|
||||
rm -rf kBuild/bin tools
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# PaX fixes (see bug #298988)
|
||||
pushd "${WORKDIR}" &>/dev/null || die
|
||||
eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
|
||||
popd &>/dev/null || die
|
||||
|
||||
# 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
|
||||
|
||||
# stupid new header references...
|
||||
local vboxheader mdir
|
||||
for vboxheader in {product,revision,version}-generated.h ; do
|
||||
for mdir in vbox{guest,sf} ; do
|
||||
ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
|
||||
"${WORKDIR}/${mdir}/${vboxheader}"
|
||||
done
|
||||
done
|
||||
|
||||
# Remove pointless GCC version check
|
||||
sed -e '/^check_gcc$/d' -i configure || die
|
||||
|
||||
rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# build the user-space tools, warnings are harmless
|
||||
local cmd=(
|
||||
./configure
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
echo "${cmd[@]}"
|
||||
"${cmd[@]}" || die "configure failed"
|
||||
source ./env.sh
|
||||
export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
MAKE="kmk" \
|
||||
emake TOOL_YASM_AS=yasm \
|
||||
VBOX_ONLY_ADDITIONS=1 \
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
# 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)
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
|
||||
cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
|
||||
|
||||
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
|
||||
|
||||
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_preinst() {
|
||||
enewgroup vboxguest
|
||||
enewuser vboxguest -1 /bin/sh /dev/null vboxguest
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
enewgroup vboxsf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
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 "Also make sure you use the Mesa library for OpenGL:"
|
||||
elog " eselect opengl set xorg-x11"
|
||||
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 ""
|
||||
}
|
@ -1,229 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod systemd user toolchain-funcs
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P="VirtualBox-${MY_PV}"
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.2.36-patches-01.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE="X"
|
||||
|
||||
RDEPEND="
|
||||
X? ( x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libXmu
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXext
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE )
|
||||
sys-apps/dbus
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-libs/pam
|
||||
sys-power/iasl
|
||||
x11-base/xorg-proto
|
||||
"
|
||||
PDEPEND="
|
||||
X? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
BUILD_TARGETS="all"
|
||||
BUILD_TARGET_ARCH="${ARCH}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
export DISTCC_DISABLE=1 #674256
|
||||
MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
|
||||
vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
|
||||
use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
|
||||
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
|
||||
# Create and unpack a tarball with the sources of the Linux guest
|
||||
# kernel modules, to include all the needed files
|
||||
"${S}"/src/VBox/Additions/linux/export_modules.sh "${WORKDIR}/vbox-kmod.tar.gz"
|
||||
unpack ./vbox-kmod.tar.gz
|
||||
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
cd "${S}"
|
||||
rm -rf kBuild/bin tools
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# PaX fixes (see bug #298988)
|
||||
pushd "${WORKDIR}" &>/dev/null || die
|
||||
eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
|
||||
popd &>/dev/null || die
|
||||
|
||||
# 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
|
||||
|
||||
# stupid new header references...
|
||||
local vboxheader mdir
|
||||
for vboxheader in {product,revision,version}-generated.h ; do
|
||||
for mdir in vbox{guest,sf} ; do
|
||||
ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
|
||||
"${WORKDIR}/${mdir}/${vboxheader}"
|
||||
done
|
||||
done
|
||||
|
||||
# Remove pointless GCC version check
|
||||
sed -e '/^check_gcc$/d' -i configure || die
|
||||
|
||||
rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# build the user-space tools, warnings are harmless
|
||||
local cmd=(
|
||||
./configure
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
echo "${cmd[@]}"
|
||||
"${cmd[@]}" || die "configure failed"
|
||||
source ./env.sh
|
||||
export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
MAKE="kmk" \
|
||||
emake TOOL_YASM_AS=yasm \
|
||||
VBOX_ONLY_ADDITIONS=1 \
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
# 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)
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
|
||||
cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
|
||||
|
||||
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
|
||||
|
||||
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_preinst() {
|
||||
enewgroup vboxguest
|
||||
enewuser vboxguest -1 /bin/sh /dev/null vboxguest
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
enewgroup vboxsf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
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 "Also make sure you use the Mesa library for OpenGL:"
|
||||
elog " eselect opengl set xorg-x11"
|
||||
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 ""
|
||||
}
|
@ -1,216 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod systemd toolchain-funcs
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P="VirtualBox-${MY_PV}"
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.0.16-patches-01.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="X"
|
||||
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
RDEPEND="
|
||||
acct-group/vboxguest
|
||||
acct-group/vboxsf
|
||||
acct-user/vboxguest
|
||||
X? ( x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libXmu
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXext
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE )
|
||||
sys-apps/dbus
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-libs/pam
|
||||
sys-power/iasl
|
||||
x11-base/xorg-proto
|
||||
"
|
||||
PDEPEND="
|
||||
X? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
BUILD_TARGETS="all"
|
||||
BUILD_TARGET_ARCH="${ARCH}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
|
||||
|
||||
pkg_setup() {
|
||||
export DISTCC_DISABLE=1 #674256
|
||||
MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
|
||||
vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
|
||||
use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
|
||||
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# 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 || die
|
||||
eend
|
||||
popd &>/dev/null || die
|
||||
|
||||
# PaX fixes (see bug #298988)
|
||||
pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
|
||||
eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
|
||||
popd &>/dev/null || die
|
||||
|
||||
# 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
|
||||
|
||||
rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# build the user-space tools, warnings are harmless
|
||||
local cmd=(
|
||||
./configure
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
echo "${cmd[@]}"
|
||||
"${cmd[@]}" || die "configure failed"
|
||||
source ./env.sh
|
||||
export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
MAKE="kmk" \
|
||||
emake TOOL_YASM_AS=yasm \
|
||||
VBOX_ONLY_ADDITIONS=1 \
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
# 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)
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
|
||||
cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
|
||||
|
||||
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
|
||||
|
||||
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_pkg_postinst
|
||||
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 "Also make sure you use the Mesa library for OpenGL:"
|
||||
elog " eselect opengl set xorg-x11"
|
||||
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 ""
|
||||
}
|
@ -1,215 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod systemd toolchain-funcs
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P="VirtualBox-${MY_PV}"
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.1.0_rc1-patches-01.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="X"
|
||||
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
RDEPEND="
|
||||
acct-group/vboxguest
|
||||
acct-group/vboxsf
|
||||
acct-user/vboxguest
|
||||
X? ( x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libXmu
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXext
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE )
|
||||
sys-apps/dbus
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-libs/pam
|
||||
sys-power/iasl
|
||||
x11-base/xorg-proto
|
||||
"
|
||||
PDEPEND="
|
||||
X? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
BUILD_TARGETS="all"
|
||||
BUILD_TARGET_ARCH="${ARCH}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
|
||||
|
||||
pkg_setup() {
|
||||
export DISTCC_DISABLE=1 #674256
|
||||
MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
|
||||
vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
|
||||
use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
|
||||
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# 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 || die
|
||||
eend
|
||||
popd &>/dev/null || die
|
||||
|
||||
# PaX fixes (see bug #298988)
|
||||
pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
|
||||
eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
|
||||
popd &>/dev/null || die
|
||||
|
||||
# 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
|
||||
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# build the user-space tools, warnings are harmless
|
||||
local cmd=(
|
||||
./configure
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
echo "${cmd[@]}"
|
||||
"${cmd[@]}" || die "configure failed"
|
||||
source ./env.sh
|
||||
export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
MAKE="kmk" \
|
||||
emake TOOL_YASM_AS=yasm \
|
||||
VBOX_ONLY_ADDITIONS=1 \
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
# 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)
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
|
||||
cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
|
||||
|
||||
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
|
||||
|
||||
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_pkg_postinst
|
||||
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 "Also make sure you use the Mesa library for OpenGL:"
|
||||
elog " eselect opengl set xorg-x11"
|
||||
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 ""
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# Copyright 1999-2020 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-bin
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod toolchain-funcs user
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="pax_kernel"
|
||||
|
||||
RDEPEND="!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
BUILD_TARGETS="all"
|
||||
BUILD_TARGET_ARCH="${ARCH}"
|
||||
MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup vboxusers
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use pax_kernel && kernel_is -ge 3 0 0 ; then
|
||||
eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
doins "${FILESDIR}"/virtualbox.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
# Copyright 1999-2020 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-bin
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod toolchain-funcs user
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE="pax_kernel"
|
||||
|
||||
RDEPEND="!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
BUILD_TARGETS="all"
|
||||
MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
|
||||
MODULESD_VBOXDRV_ENABLED="yes"
|
||||
MODULESD_VBOXNETADP_ENABLED="no"
|
||||
MODULESD_VBOXNETFLT_ENABLED="no"
|
||||
# The following is a security measure that comes directly from usptream.
|
||||
# Do NOT remove this!!!
|
||||
MODULESD_VBOXPCI_ADDITIONS=(
|
||||
"blacklist vboxpci"
|
||||
"install vboxpci /bin/true"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup vboxusers
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use pax_kernel && kernel_is -ge 3 0 0 ; then
|
||||
eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
# Copyright 1999-2020 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-bin
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod toolchain-funcs
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="pax_kernel"
|
||||
|
||||
RDEPEND="!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
BUILD_TARGETS="all"
|
||||
MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
|
||||
MODULESD_VBOXDRV_ENABLED="yes"
|
||||
MODULESD_VBOXNETADP_ENABLED="no"
|
||||
MODULESD_VBOXNETFLT_ENABLED="no"
|
||||
# The following is a security measure that comes directly from usptream.
|
||||
# Do NOT remove this!!!
|
||||
MODULESD_VBOXPCI_ADDITIONS=(
|
||||
"blacklist vboxpci"
|
||||
"install vboxpci /bin/true"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use pax_kernel && kernel_is -ge 3 0 0 ; then
|
||||
eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
# Copyright 1999-2020 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-bin
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod toolchain-funcs
|
||||
|
||||
MY_P="vbox-kernel-module-src-${PV}"
|
||||
DESCRIPTION="Kernel Modules for Virtualbox"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="pax_kernel"
|
||||
|
||||
RDEPEND="!=app-emulation/virtualbox-9999"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
BUILD_TARGETS="all"
|
||||
MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})"
|
||||
MODULESD_VBOXDRV_ENABLED="yes"
|
||||
MODULESD_VBOXNETADP_ENABLED="no"
|
||||
MODULESD_VBOXNETFLT_ENABLED="no"
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use pax_kernel && kernel_is -ge 3 0 0 ; then
|
||||
eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
insinto /usr/lib/modules-load.d/
|
||||
newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Remove vboxpci.ko from current running kernel
|
||||
find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete
|
||||
linux-mod_pkg_postinst
|
||||
}
|
@ -1,497 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=VirtualBox-${MY_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/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.16-patches-02.tar.xz"
|
||||
|
||||
LICENSE="GPL-2 dtrace? ( CDDL )"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="alsa debug doc dtrace headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
|
||||
|
||||
RDEPEND="!app-emulation/virtualbox-bin
|
||||
~app-emulation/virtualbox-modules-${PV}
|
||||
dev-libs/libIDL
|
||||
>=dev-libs/libxslt-1.1.19
|
||||
net-misc/curl
|
||||
dev-libs/libxml2
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvpx:0=
|
||||
sys-libs/zlib:=
|
||||
!headless? (
|
||||
media-libs/libsdl:0[X,video]
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
opengl? ( virtual/opengl media-libs/freeglut )
|
||||
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
|
||||
)
|
||||
)
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
lvm? ( sys-fs/lvm2 )
|
||||
opus? ( media-libs/opus )
|
||||
udev? ( >=virtual/udev-171 )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9 )
|
||||
${PYTHON_DEPS}"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-libs/libcap
|
||||
sys-power/iasl
|
||||
virtual/pkgconfig
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
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
|
||||
)
|
||||
!headless? ( x11-libs/libXinerama )
|
||||
java? ( >=virtual/jdk-1.6 )
|
||||
pam? ( sys-libs/pam )
|
||||
pax_kernel? ( sys-apps/elfix )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
qt5? ( dev-qt/linguist-tools:5 )
|
||||
vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
|
||||
${PYTHON_DEPS}"
|
||||
RDEPEND="${RDEPEND}
|
||||
java? ( >=virtual/jre-1.6 )"
|
||||
|
||||
QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
|
||||
usr/lib/virtualbox/VBoxSDL.so
|
||||
usr/lib/virtualbox/VBoxSharedFolders.so
|
||||
usr/lib/virtualbox/VBoxDD2.so
|
||||
usr/lib/virtualbox/VBoxOGLrenderspu.so
|
||||
usr/lib/virtualbox/VBoxPython.so
|
||||
usr/lib/virtualbox/VBoxDD.so
|
||||
usr/lib/virtualbox/VBoxDDU.so
|
||||
usr/lib/virtualbox/VBoxREM64.so
|
||||
usr/lib/virtualbox/VBoxSharedClipboard.so
|
||||
usr/lib/virtualbox/VBoxHeadless.so
|
||||
usr/lib/virtualbox/VBoxRT.so
|
||||
usr/lib/virtualbox/VBoxREM.so
|
||||
usr/lib/virtualbox/VBoxSettings.so
|
||||
usr/lib/virtualbox/VBoxKeyboard.so
|
||||
usr/lib/virtualbox/VBoxSharedCrOpenGL.so
|
||||
usr/lib/virtualbox/VBoxVMM.so
|
||||
usr/lib/virtualbox/VirtualBox.so
|
||||
usr/lib/virtualbox/VBoxOGLhosterrorspu.so
|
||||
usr/lib/virtualbox/components/VBoxC.so
|
||||
usr/lib/virtualbox/components/VBoxSVCM.so
|
||||
usr/lib/virtualbox/components/VBoxDDU.so
|
||||
usr/lib/virtualbox/components/VBoxRT.so
|
||||
usr/lib/virtualbox/components/VBoxREM.so
|
||||
usr/lib/virtualbox/components/VBoxVMM.so
|
||||
usr/lib/virtualbox/VBoxREM32.so
|
||||
usr/lib/virtualbox/VBoxPython2_7.so
|
||||
usr/lib/virtualbox/VBoxXPCOMC.so
|
||||
usr/lib/virtualbox/VBoxOGLhostcrutil.so
|
||||
usr/lib/virtualbox/VBoxNetDHCP.so
|
||||
usr/lib/virtualbox/VBoxNetNAT.so"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
java? ( sdk )
|
||||
python? ( sdk )
|
||||
vboxwebsrv? ( java )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
|
||||
tc-ld-disable-gold #bug 488176
|
||||
tc-export CC CXX LD AR RANLIB
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Replace pointless GCC version check with something less stupid.
|
||||
# This is needed for the qt5 version check.
|
||||
sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -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
|
||||
|
||||
# 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
|
||||
elog "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
|
||||
|
||||
# Only add nopie patch when we're on hardened
|
||||
if gcc-specs-pie ; then
|
||||
eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
|
||||
fi
|
||||
|
||||
# Only add paxmark patch when we're on pax_kernel
|
||||
if use pax_kernel ; then
|
||||
eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
|
||||
fi
|
||||
|
||||
rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
doecho() {
|
||||
echo "$@"
|
||||
"$@" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--disable-dbus
|
||||
--disable-kmods
|
||||
$(usex alsa '' --disable-alsa)
|
||||
$(usex debug --build-debug '')
|
||||
$(usex doc '' --disable-docs)
|
||||
$(usex java '' --disable-java)
|
||||
$(usex lvm '' --disable-devmapper)
|
||||
$(usex opus --build-libopus '')
|
||||
$(usex pulseaudio '' --disable-pulse)
|
||||
$(usex python '' --disable-python)
|
||||
$(usex vboxwebsrv --enable-webservice '')
|
||||
$(usex vnc --enable-vnc '')
|
||||
)
|
||||
if ! use headless ; then
|
||||
myconf+=(
|
||||
$(usex opengl '' --disable-opengl)
|
||||
$(usex qt5 '' --disable-qt)
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--build-headless
|
||||
--disable-opengl
|
||||
)
|
||||
fi
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
myconf+=( --disable-vmmraw )
|
||||
fi
|
||||
# not an autoconf script
|
||||
doecho ./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}"
|
||||
MAKE="kmk" emake \
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo \
|
||||
TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
|
||||
TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
|
||||
TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
|
||||
VBOX_GCC_OPT="${CXXFLAGS}" \
|
||||
TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
|
||||
all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local binpath="release"
|
||||
use debug && binpath="debug"
|
||||
cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
|
||||
|
||||
local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile
|
||||
|
||||
vbox_inst() {
|
||||
local binary="${1}"
|
||||
local perms="${2:-0750}"
|
||||
local path="${3:-${vbox_inst_path}}"
|
||||
|
||||
[[ -n "${binary}" ]] || die "vbox_inst: No binray 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-5-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
|
||||
|
||||
# *.rc files for x86_64 are only available on multilib systems
|
||||
local rcfiles="*.rc"
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
rcfiles=""
|
||||
fi
|
||||
for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; 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)
|
||||
pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
|
||||
for fwfile in VBoxEFI{32,64}.fd ; do
|
||||
vbox_inst ${fwfile} 0644
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
|
||||
# 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{headless,manage} VBox{Headless,Manage,VRDP} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
|
||||
|
||||
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 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
|
||||
|
||||
if use qt5 ; then
|
||||
vbox_inst VirtualBox 4750
|
||||
pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox
|
||||
|
||||
if use opengl ; then
|
||||
vbox_inst VBoxTestOGL
|
||||
pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL
|
||||
fi
|
||||
|
||||
for each in virtualbox VirtualBox ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r nls
|
||||
doins -r UnattendedTemplates
|
||||
|
||||
newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${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
|
||||
# New way of handling USB device nodes for VBox (bug #356215)
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}
|
||||
doins VBoxCreateUSBNode.sh
|
||||
fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
insinto ${udevdir}/rules.d
|
||||
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
|
||||
> "${T}"/10-virtualbox.rules || die
|
||||
doins "${T}"/10-virtualbox.rules
|
||||
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
|
||||
|
||||
# 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" -print0 \
|
||||
| xargs --no-run-if-empty --null sed -i '/Version/s@_Gentoo@@' \
|
||||
|| die
|
||||
|
||||
if use vnc ; then
|
||||
insinto ${vbox_inst_path}/ExtensionPacks
|
||||
doins -r ExtensionPacks/VNC
|
||||
fi
|
||||
|
||||
if use dtrace ; then
|
||||
insinto ${vbox_inst_path}/ExtensionPacks
|
||||
doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
|
||||
fi
|
||||
|
||||
if use doc ; then
|
||||
dodoc UserManual.pdf
|
||||
fi
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
|
||||
if use udev ; then
|
||||
udevadm control --reload-rules \
|
||||
&& udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
tmpfiles_process /usr/lib/tmpfiles.d/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 "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Starting with version 4.0.0, ${PN} has USB-1 support."
|
||||
elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
elog "package."
|
||||
elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
|
||||
elog "the \"extension\" USE flag. For installation of the guest additions ISO"
|
||||
elog "image, please emerge"
|
||||
elog " app-emulation/virtualbox-additions"
|
||||
elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
if ! use udev ; then
|
||||
elog ""
|
||||
elog "WARNING!"
|
||||
elog "Without USE=udev, USB devices will likely not work in ${PN}."
|
||||
elif [ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
}
|
@ -1,496 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7,8}} )
|
||||
inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=VirtualBox-${MY_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/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.36-patches-01.tar.xz"
|
||||
|
||||
LICENSE="GPL-2 dtrace? ( CDDL )"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE="alsa debug doc dtrace headless java libressl lvm pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
|
||||
|
||||
RDEPEND="!app-emulation/virtualbox-bin
|
||||
~app-emulation/virtualbox-modules-${PV}
|
||||
dev-libs/libIDL
|
||||
>=dev-libs/libxslt-1.1.19
|
||||
net-misc/curl
|
||||
dev-libs/libxml2
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvpx:0=
|
||||
media-libs/opus
|
||||
sys-libs/zlib:=
|
||||
!headless? (
|
||||
media-libs/libsdl:0[X,video]
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
opengl? ( virtual/opengl media-libs/freeglut )
|
||||
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
|
||||
)
|
||||
)
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
lvm? ( sys-fs/lvm2 )
|
||||
udev? ( >=virtual/udev-171 )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9 )
|
||||
${PYTHON_DEPS}"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-libs/libcap
|
||||
sys-power/iasl
|
||||
virtual/pkgconfig
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
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
|
||||
)
|
||||
!headless? ( x11-libs/libXinerama )
|
||||
java? ( >=virtual/jdk-1.6 )
|
||||
pam? ( sys-libs/pam )
|
||||
pax_kernel? ( sys-apps/elfix )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
qt5? ( dev-qt/linguist-tools:5 )
|
||||
vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
|
||||
${PYTHON_DEPS}"
|
||||
RDEPEND="${RDEPEND}
|
||||
java? ( >=virtual/jre-1.6 )"
|
||||
|
||||
QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
|
||||
usr/lib/virtualbox/VBoxSDL.so
|
||||
usr/lib/virtualbox/VBoxSharedFolders.so
|
||||
usr/lib/virtualbox/VBoxDD2.so
|
||||
usr/lib/virtualbox/VBoxOGLrenderspu.so
|
||||
usr/lib/virtualbox/VBoxPython.so
|
||||
usr/lib/virtualbox/VBoxDD.so
|
||||
usr/lib/virtualbox/VBoxDDU.so
|
||||
usr/lib/virtualbox/VBoxREM64.so
|
||||
usr/lib/virtualbox/VBoxSharedClipboard.so
|
||||
usr/lib/virtualbox/VBoxHeadless.so
|
||||
usr/lib/virtualbox/VBoxRT.so
|
||||
usr/lib/virtualbox/VBoxREM.so
|
||||
usr/lib/virtualbox/VBoxSettings.so
|
||||
usr/lib/virtualbox/VBoxKeyboard.so
|
||||
usr/lib/virtualbox/VBoxSharedCrOpenGL.so
|
||||
usr/lib/virtualbox/VBoxVMM.so
|
||||
usr/lib/virtualbox/VirtualBox.so
|
||||
usr/lib/virtualbox/VBoxOGLhosterrorspu.so
|
||||
usr/lib/virtualbox/components/VBoxC.so
|
||||
usr/lib/virtualbox/components/VBoxSVCM.so
|
||||
usr/lib/virtualbox/components/VBoxDDU.so
|
||||
usr/lib/virtualbox/components/VBoxRT.so
|
||||
usr/lib/virtualbox/components/VBoxREM.so
|
||||
usr/lib/virtualbox/components/VBoxVMM.so
|
||||
usr/lib/virtualbox/VBoxREM32.so
|
||||
usr/lib/virtualbox/VBoxPython2_7.so
|
||||
usr/lib/virtualbox/VBoxXPCOMC.so
|
||||
usr/lib/virtualbox/VBoxOGLhostcrutil.so
|
||||
usr/lib/virtualbox/VBoxNetDHCP.so
|
||||
usr/lib/virtualbox/VBoxNetNAT.so"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
java? ( sdk )
|
||||
python? ( sdk )
|
||||
vboxwebsrv? ( java )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
|
||||
tc-ld-disable-gold #bug 488176
|
||||
tc-export CC CXX LD AR RANLIB
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Replace pointless GCC version check with something less stupid.
|
||||
# This is needed for the qt5 version check.
|
||||
sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -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
|
||||
|
||||
# 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
|
||||
elog "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
|
||||
|
||||
# Only add nopie patch when we're on hardened
|
||||
if gcc-specs-pie ; then
|
||||
eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
|
||||
fi
|
||||
|
||||
# Only add paxmark patch when we're on pax_kernel
|
||||
if use pax_kernel ; then
|
||||
eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
|
||||
fi
|
||||
|
||||
rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
doecho() {
|
||||
echo "$@"
|
||||
"$@" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--disable-dbus
|
||||
--disable-kmods
|
||||
$(usex alsa '' --disable-alsa)
|
||||
$(usex debug --build-debug '')
|
||||
$(usex doc '' --disable-docs)
|
||||
$(usex java '' --disable-java)
|
||||
$(usex lvm '' --disable-devmapper)
|
||||
$(usex pulseaudio '' --disable-pulse)
|
||||
$(usex python '' --disable-python)
|
||||
$(usex vboxwebsrv --enable-webservice '')
|
||||
$(usex vnc --enable-vnc '')
|
||||
)
|
||||
if ! use headless ; then
|
||||
myconf+=(
|
||||
$(usex opengl '' --disable-opengl)
|
||||
$(usex qt5 '' --disable-qt)
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--build-headless
|
||||
--disable-opengl
|
||||
)
|
||||
fi
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
myconf+=( --disable-vmmraw )
|
||||
fi
|
||||
# not an autoconf script
|
||||
doecho ./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}"
|
||||
MAKE="kmk" emake \
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo \
|
||||
TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
|
||||
TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
|
||||
TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
|
||||
VBOX_GCC_OPT="${CXXFLAGS}" \
|
||||
TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
|
||||
all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local binpath="release"
|
||||
use debug && binpath="debug"
|
||||
cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
|
||||
|
||||
local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile
|
||||
|
||||
vbox_inst() {
|
||||
local binary="${1}"
|
||||
local perms="${2:-0750}"
|
||||
local path="${3:-${vbox_inst_path}}"
|
||||
|
||||
[[ -n "${binary}" ]] || die "vbox_inst: No binray 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-5-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
|
||||
|
||||
# *.rc files for x86_64 are only available on multilib systems
|
||||
local rcfiles="*.rc"
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
rcfiles=""
|
||||
fi
|
||||
for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; 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)
|
||||
pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
|
||||
for fwfile in VBoxEFI{32,64}.fd ; do
|
||||
vbox_inst ${fwfile} 0644
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
|
||||
# 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{headless,manage} VBox{Headless,Manage,VRDP} ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
|
||||
|
||||
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 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
|
||||
|
||||
if use qt5 ; then
|
||||
vbox_inst VirtualBox 4750
|
||||
pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox
|
||||
|
||||
if use opengl ; then
|
||||
vbox_inst VBoxTestOGL
|
||||
pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL
|
||||
fi
|
||||
|
||||
for each in virtualbox VirtualBox ; do
|
||||
dosym ${vbox_inst_path}/VBox /usr/bin/${each}
|
||||
done
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r nls
|
||||
doins -r UnattendedTemplates
|
||||
|
||||
newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${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
|
||||
# New way of handling USB device nodes for VBox (bug #356215)
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}
|
||||
doins VBoxCreateUSBNode.sh
|
||||
fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
insinto ${udevdir}/rules.d
|
||||
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
|
||||
> "${T}"/10-virtualbox.rules || die
|
||||
doins "${T}"/10-virtualbox.rules
|
||||
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
|
||||
|
||||
# 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" -print0 \
|
||||
| xargs --no-run-if-empty --null sed -i '/Version/s@_Gentoo@@' \
|
||||
|| die
|
||||
|
||||
if use vnc ; then
|
||||
insinto ${vbox_inst_path}/ExtensionPacks
|
||||
doins -r ExtensionPacks/VNC
|
||||
fi
|
||||
|
||||
if use dtrace ; then
|
||||
insinto ${vbox_inst_path}/ExtensionPacks
|
||||
doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
|
||||
fi
|
||||
|
||||
if use doc ; then
|
||||
dodoc UserManual.pdf
|
||||
fi
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
|
||||
if use udev ; then
|
||||
udevadm control --reload-rules \
|
||||
&& udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
tmpfiles_process /usr/lib/tmpfiles.d/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 "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Starting with version 4.0.0, ${PN} has USB-1 support."
|
||||
elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
elog "package."
|
||||
elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
|
||||
elog "the \"extension\" USE flag. For installation of the guest additions ISO"
|
||||
elog "image, please emerge"
|
||||
elog " app-emulation/virtualbox-additions"
|
||||
elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
if ! use udev ; then
|
||||
elog ""
|
||||
elog "WARNING!"
|
||||
elog "Without USE=udev, USB devices will likely not work in ${PN}."
|
||||
elif [ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
}
|
@ -1,511 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7,8}} )
|
||||
inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=VirtualBox-${MY_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/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.0.16-patches-01.tar.xz"
|
||||
|
||||
LICENSE="GPL-2 dtrace? ( CDDL )"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="alsa debug doc dtrace headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
|
||||
|
||||
CDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
!app-emulation/virtualbox-bin
|
||||
acct-group/vboxusers
|
||||
~app-emulation/virtualbox-modules-${PV}
|
||||
dev-libs/libIDL
|
||||
>=dev-libs/libxslt-1.1.19
|
||||
net-misc/curl
|
||||
dev-libs/libxml2
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvpx:0=
|
||||
sys-libs/zlib:=
|
||||
!headless? (
|
||||
media-libs/libsdl:0[X,video]
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
opengl? ( virtual/opengl media-libs/freeglut )
|
||||
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
|
||||
)
|
||||
)
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
lvm? ( sys-fs/lvm2 )
|
||||
opus? ( media-libs/opus )
|
||||
udev? ( >=virtual/udev-171 )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9 )
|
||||
"
|
||||
DEPEND="
|
||||
${CDEPEND}
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
!headless? ( x11-libs/libXinerama )
|
||||
pam? ( sys-libs/pam )
|
||||
pax_kernel? ( sys-apps/elfix )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
qt5? ( dev-qt/linguist-tools:5 )
|
||||
vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
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.6 )
|
||||
"
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
java? ( >=virtual/jre-1.6 )
|
||||
"
|
||||
|
||||
QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
|
||||
usr/lib/virtualbox/VBoxSDL.so
|
||||
usr/lib/virtualbox/VBoxSharedFolders.so
|
||||
usr/lib/virtualbox/VBoxDD2.so
|
||||
usr/lib/virtualbox/VBoxOGLrenderspu.so
|
||||
usr/lib/virtualbox/VBoxPython.so
|
||||
usr/lib/virtualbox/VBoxDD.so
|
||||
usr/lib/virtualbox/VBoxDDU.so
|
||||
usr/lib/virtualbox/VBoxREM64.so
|
||||
usr/lib/virtualbox/VBoxSharedClipboard.so
|
||||
usr/lib/virtualbox/VBoxHeadless.so
|
||||
usr/lib/virtualbox/VBoxRT.so
|
||||
usr/lib/virtualbox/VBoxREM.so
|
||||
usr/lib/virtualbox/VBoxSettings.so
|
||||
usr/lib/virtualbox/VBoxKeyboard.so
|
||||
usr/lib/virtualbox/VBoxSharedCrOpenGL.so
|
||||
usr/lib/virtualbox/VBoxVMM.so
|
||||
usr/lib/virtualbox/VirtualBox.so
|
||||
usr/lib/virtualbox/VBoxOGLhosterrorspu.so
|
||||
usr/lib/virtualbox/components/VBoxC.so
|
||||
usr/lib/virtualbox/components/VBoxSVCM.so
|
||||
usr/lib/virtualbox/components/VBoxDDU.so
|
||||
usr/lib/virtualbox/components/VBoxRT.so
|
||||
usr/lib/virtualbox/components/VBoxREM.so
|
||||
usr/lib/virtualbox/components/VBoxVMM.so
|
||||
usr/lib/virtualbox/VBoxREM32.so
|
||||
usr/lib/virtualbox/VBoxPython2_7.so
|
||||
usr/lib/virtualbox/VBoxXPCOMC.so
|
||||
usr/lib/virtualbox/VBoxOGLhostcrutil.so
|
||||
usr/lib/virtualbox/VBoxNetDHCP.so
|
||||
usr/lib/virtualbox/VBoxNetNAT.so"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
java? ( sdk )
|
||||
python? ( sdk )
|
||||
vboxwebsrv? ( java )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
|
||||
tc-ld-disable-gold #bug 488176
|
||||
tc-export CC CXX LD AR RANLIB
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Replace pointless GCC version check with something less stupid.
|
||||
# This is needed for the qt5 version check.
|
||||
sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -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
|
||||
|
||||
# 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
|
||||
elog "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
|
||||
|
||||
# Only add nopie patch when we're on hardened
|
||||
if gcc-specs-pie ; then
|
||||
eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
|
||||
fi
|
||||
|
||||
# Only add paxmark patch when we're on pax_kernel
|
||||
if use pax_kernel ; then
|
||||
eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
|
||||
fi
|
||||
|
||||
rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
doecho() {
|
||||
echo "$@"
|
||||
"$@" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--disable-dbus
|
||||
--disable-kmods
|
||||
$(usex alsa '' --disable-alsa)
|
||||
$(usex debug --build-debug '')
|
||||
$(usex doc '' --disable-docs)
|
||||
$(usex java '' --disable-java)
|
||||
$(usex lvm '' --disable-devmapper)
|
||||
$(usex opus '' --disable-libopus)
|
||||
$(usex pulseaudio '' --disable-pulse)
|
||||
$(usex python '' --disable-python)
|
||||
$(usex vboxwebsrv --enable-webservice '')
|
||||
$(usex vnc --enable-vnc '')
|
||||
)
|
||||
if ! use headless ; then
|
||||
myconf+=(
|
||||
$(usex opengl '' --disable-opengl)
|
||||
$(usex qt5 '' --disable-qt)
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--build-headless
|
||||
--disable-opengl
|
||||
)
|
||||
fi
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
myconf+=( --disable-vmmraw )
|
||||
fi
|
||||
# not an autoconf script
|
||||
doecho ./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}"
|
||||
MAKE="kmk" emake \
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo \
|
||||
TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
|
||||
TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
|
||||
TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
|
||||
VBOX_GCC_OPT="${CXXFLAGS}" \
|
||||
TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
|
||||
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
|
||||
|
||||
# *.rc files for x86_64 are only available on multilib systems
|
||||
local rcfiles="*.rc"
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
rcfiles=""
|
||||
fi
|
||||
for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} *so *r0 ${rcfiles} 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
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
# New way of handling USB device nodes for VBox (bug #356215)
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}
|
||||
doins VBoxCreateUSBNode.sh
|
||||
fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
insinto ${udevdir}/rules.d
|
||||
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
|
||||
> "${T}"/10-virtualbox.rules || die
|
||||
doins "${T}"/10-virtualbox.rules
|
||||
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
|
||||
|
||||
# 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" -print0 \
|
||||
| xargs --no-run-if-empty --null 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
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
xdg_pkg_preinst
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if use udev ; then
|
||||
udevadm control --reload-rules \
|
||||
&& udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
tmpfiles_process /usr/lib/tmpfiles.d/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 "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Starting with version 4.0.0, ${PN} has USB-1 support."
|
||||
elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
elog "package."
|
||||
elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
|
||||
elog "the \"extension\" USE flag. For installation of the guest additions ISO"
|
||||
elog "image, please emerge"
|
||||
elog " app-emulation/virtualbox-additions"
|
||||
elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
if ! use udev ; then
|
||||
elog ""
|
||||
elog "WARNING!"
|
||||
elog "Without USE=udev, USB devices will likely not work in ${PN}."
|
||||
elif [[ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ]] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
}
|
@ -1,507 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P=VirtualBox-${MY_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/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.1.14-patches-01.tar.xz"
|
||||
|
||||
LICENSE="GPL-2 dtrace? ( CDDL )"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="alsa debug doc dtrace headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
|
||||
|
||||
CDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
!app-emulation/virtualbox-bin
|
||||
acct-group/vboxusers
|
||||
~app-emulation/virtualbox-modules-${PV}
|
||||
dev-libs/libIDL
|
||||
>=dev-libs/libxslt-1.1.19
|
||||
net-misc/curl
|
||||
dev-libs/libxml2
|
||||
media-libs/libpng:0=
|
||||
media-libs/libvpx:0=
|
||||
sys-libs/zlib:=
|
||||
!headless? (
|
||||
media-libs/libsdl:0[X,video]
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
opengl? ( virtual/opengl media-libs/freeglut )
|
||||
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
|
||||
)
|
||||
)
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
lvm? ( sys-fs/lvm2 )
|
||||
opus? ( media-libs/opus )
|
||||
udev? ( >=virtual/udev-171 )
|
||||
vnc? ( >=net-libs/libvncserver-0.9.9 )
|
||||
"
|
||||
DEPEND="
|
||||
${CDEPEND}
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
!headless? ( x11-libs/libXinerama )
|
||||
pam? ( sys-libs/pam )
|
||||
pax_kernel? ( sys-apps/elfix )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
qt5? ( dev-qt/linguist-tools:5 )
|
||||
vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
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.6 )
|
||||
"
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
java? ( >=virtual/jre-1.6 )
|
||||
"
|
||||
|
||||
QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
|
||||
usr/lib/virtualbox/VBoxSDL.so
|
||||
usr/lib/virtualbox/VBoxSharedFolders.so
|
||||
usr/lib/virtualbox/VBoxDD2.so
|
||||
usr/lib/virtualbox/VBoxOGLrenderspu.so
|
||||
usr/lib/virtualbox/VBoxPython.so
|
||||
usr/lib/virtualbox/VBoxDD.so
|
||||
usr/lib/virtualbox/VBoxDDU.so
|
||||
usr/lib/virtualbox/VBoxREM64.so
|
||||
usr/lib/virtualbox/VBoxSharedClipboard.so
|
||||
usr/lib/virtualbox/VBoxHeadless.so
|
||||
usr/lib/virtualbox/VBoxRT.so
|
||||
usr/lib/virtualbox/VBoxREM.so
|
||||
usr/lib/virtualbox/VBoxSettings.so
|
||||
usr/lib/virtualbox/VBoxKeyboard.so
|
||||
usr/lib/virtualbox/VBoxSharedCrOpenGL.so
|
||||
usr/lib/virtualbox/VBoxVMM.so
|
||||
usr/lib/virtualbox/VirtualBox.so
|
||||
usr/lib/virtualbox/VBoxOGLhosterrorspu.so
|
||||
usr/lib/virtualbox/components/VBoxC.so
|
||||
usr/lib/virtualbox/components/VBoxSVCM.so
|
||||
usr/lib/virtualbox/components/VBoxDDU.so
|
||||
usr/lib/virtualbox/components/VBoxRT.so
|
||||
usr/lib/virtualbox/components/VBoxREM.so
|
||||
usr/lib/virtualbox/components/VBoxVMM.so
|
||||
usr/lib/virtualbox/VBoxREM32.so
|
||||
usr/lib/virtualbox/VBoxPython2_7.so
|
||||
usr/lib/virtualbox/VBoxXPCOMC.so
|
||||
usr/lib/virtualbox/VBoxOGLhostcrutil.so
|
||||
usr/lib/virtualbox/VBoxNetDHCP.so
|
||||
usr/lib/virtualbox/VBoxNetNAT.so"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
java? ( sdk )
|
||||
python? ( sdk )
|
||||
vboxwebsrv? ( java )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-opt-2_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
|
||||
tc-ld-disable-gold #bug 488176
|
||||
tc-export CC CXX LD AR RANLIB
|
||||
export HOST_CC="$(tc-getBUILD_CC)"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
rm -r kBuild/bin tools || die
|
||||
|
||||
# Replace pointless GCC version check with something less stupid.
|
||||
# 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
|
||||
|
||||
# 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
|
||||
elog "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
|
||||
|
||||
# Only add nopie patch when we're on hardened
|
||||
if gcc-specs-pie ; then
|
||||
eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
|
||||
fi
|
||||
|
||||
# Only add paxmark patch when we're on pax_kernel
|
||||
if use pax_kernel ; then
|
||||
eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
|
||||
fi
|
||||
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
doecho() {
|
||||
echo "$@"
|
||||
"$@" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--disable-dbus
|
||||
--disable-kmods
|
||||
$(usex alsa '' --disable-alsa)
|
||||
$(usex debug --build-debug '')
|
||||
$(usex doc '' --disable-docs)
|
||||
$(usex java '' --disable-java)
|
||||
$(usex lvm '' --disable-devmapper)
|
||||
$(usex opus '' --disable-libopus)
|
||||
$(usex pulseaudio '' --disable-pulse)
|
||||
$(usex python '' --disable-python)
|
||||
$(usex vboxwebsrv --enable-webservice '')
|
||||
$(usex vnc --enable-vnc '')
|
||||
)
|
||||
if ! use headless ; then
|
||||
myconf+=(
|
||||
$(usex opengl '' --disable-opengl)
|
||||
$(usex qt5 '' --disable-qt)
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--build-headless
|
||||
--disable-opengl
|
||||
)
|
||||
fi
|
||||
if use amd64 && ! has_multilib_profile ; then
|
||||
myconf+=( --disable-vmmraw )
|
||||
fi
|
||||
# not an autoconf script
|
||||
doecho ./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}"
|
||||
MAKE="kmk" emake \
|
||||
VBOX_BUILD_PUBLISHER=_Gentoo \
|
||||
TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
|
||||
TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
|
||||
TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
|
||||
TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
|
||||
VBOX_GCC_OPT="${CXXFLAGS}" \
|
||||
TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
|
||||
VBOX_WITH_VBOXIMGMOUNT=1 \
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
# New way of handling USB device nodes for VBox (bug #356215)
|
||||
local udevdir="$(get_udevdir)"
|
||||
insinto ${udevdir}
|
||||
doins VBoxCreateUSBNode.sh
|
||||
fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
|
||||
fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
|
||||
insinto ${udevdir}/rules.d
|
||||
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
|
||||
> "${T}"/10-virtualbox.rules || die
|
||||
doins "${T}"/10-virtualbox.rules
|
||||
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
|
||||
|
||||
# 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" -print0 \
|
||||
| xargs --no-run-if-empty --null 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
|
||||
|
||||
newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
xdg_pkg_preinst
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if use udev ; then
|
||||
udevadm control --reload-rules \
|
||||
&& udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
tmpfiles_process /usr/lib/tmpfiles.d/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 "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
|
||||
elog ""
|
||||
elog "For advanced networking setups you should emerge:"
|
||||
elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
|
||||
elog ""
|
||||
elog "Starting with version 4.0.0, ${PN} has USB-1 support."
|
||||
elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
elog "package."
|
||||
elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
|
||||
elog "the \"extension\" USE flag. For installation of the guest additions ISO"
|
||||
elog "image, please emerge"
|
||||
elog " app-emulation/virtualbox-additions"
|
||||
elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
|
||||
elog " app-emulation/virtualbox-extpack-oracle"
|
||||
if ! use udev ; then
|
||||
elog ""
|
||||
elog "WARNING!"
|
||||
elog "Without USE=udev, USB devices will likely not work in ${PN}."
|
||||
elif [[ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ]] ; then
|
||||
elog ""
|
||||
elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
|
||||
elog "or else USB in ${PN} won't work."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
}
|
Binary file not shown.
@ -1,3 +1,5 @@
|
||||
DIST transifex-client-0.12.4.tar.gz 179349 BLAKE2B 4287bf32a31a5319f54ae5f141f53fa00554c542d7f0f1000e985547f01029b05dc18f38ef992d37c08c6c0ab54d934a4ab37c37f0bfee299d824224316acbad SHA512 516531a0c5a7242da27e8b34a0513b24b806d3b3a271cfe29b31ef7969472f82a37e6fbb1d6198feb1c5bd99d7503bacf3f162808504415ea46670af3fe2369e
|
||||
DIST transifex-client-0.13.9.tar.gz 197283 BLAKE2B 9fd6f63a54d09f190f7dd6701e4994e4fd67e23cf630dcb49641a3c7356e55f1146be7c2a590fb09a52cccfa99e709c48fffd7df416d1d4c10231c4f42919380 SHA512 3dc4a1e713a797ce1ea626c9e85dd353fec3034ba21ab04bc89e5b927e0298b4f6560a793eec50d1a99c7ab340462c33d18c1e159697c476001be868cb7f87fa
|
||||
EBUILD transifex-client-0.12.4.ebuild 638 BLAKE2B 0b53b4af9264e9b5bfe96cbfe08da48a16ecce00fc06779c2cf54c622efddb4096fbe414fc9d45c74c51f058f9795ea765c29b371768041ddb2435d592786b46 SHA512 1273f8da1fb49837fe52447fca6010b9054239b0d9599ae5ba0d9ffde40f9bf9d993a6c31e849450a46d6d1f1641589c1350cb0117bc40a96faa3a7325ae7f20
|
||||
MISC metadata.xml 312 BLAKE2B 4f8f44c33d8e28af1666aed00cd0536cf010425d878769c0354ccee3e09a05314a61336ca16a012c6f9a453370df95410e02835123fa09b04bb9b6e6be9b39c7 SHA512 2f46ebd28eab7970044d6ce2570abce4507e3a6087ffd6b3825e005a25645d24f0b9c1fa08c31cbfe7d4a4795d6318e0cb72a959b36934055dbb95aa4d688272
|
||||
EBUILD transifex-client-0.13.9.ebuild 752 BLAKE2B dc7f82627952cc2c41d72a41f845797027967defe130907fbbbde85048d50efe08c5a56e8c7a9837f628a9a1560d2fb77d54880b36d21186ca6a361b3919431e SHA512 4601968457c93840f7c99f5ff4bc7c897a08c32b743cb9e5b4b8fffd5f4bfde98c1642f487dd8ba400deb6380b1df6c1ec3d7b6371b51f912143d036e9ac332b
|
||||
MISC metadata.xml 511 BLAKE2B cb47fd7af2c99fe027060cd09a0ed4943faf219f1a9117be347e317c651d68f4a8d6967a51d899f6e125110138cfd47242b8818ef0bdf51f8b08d3989680ed79 SHA512 e1ff78568bc8bc8c80a48ffe569deb6fe36f431443ef10903a3fe03ea3f2b1452e0c145388c7225d0dfcac126b692276b27e8973a8875788234924a1d2cd8c31
|
||||
|
@ -0,0 +1,27 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A command line interface for Transifex"
|
||||
HOMEPAGE="https://pypi.org/project/transifex-client/ https://www.transifex.net/"
|
||||
SRC_URI="mirror://pypi/t/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )"
|
||||
RDEPEND="<dev-python/python-slugify-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.19.1[${PYTHON_USEDEP}]
|
||||
<dev-python/six-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/urllib3-1.24.2[${PYTHON_USEDEP}]"
|
||||
|
||||
distutils_enable_tests setup.py
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DIST_AUTHOR=DAVECROSS
|
||||
DIST_VERSION=v3.0.3
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Perl extension for comparing arrays"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
virtual/perl-Carp
|
||||
dev-perl/Moo
|
||||
dev-perl/Type-Tiny
|
||||
"
|
||||
DEPEND="
|
||||
dev-perl/Module-Build
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-perl/Module-Build-0.420.0
|
||||
test? ( ${RDEPEND}
|
||||
dev-perl/Test-NoWarnings
|
||||
)
|
||||
"
|
||||
PERL_RM_FILES=("t/pod.t" "t/pod_coverage.t")
|
@ -1,3 +1,5 @@
|
||||
DIST Array-Compare-v3.0.1.tar.gz 9481 BLAKE2B e97b69dae2deed13e2963b009706754ada64546834a81b0a383b50fcf293d30d243d4e148d454a5fbe962e8b54e1dfa3ab03f7d59948ccb0a58a475496fda132 SHA512 33d433448d3a0cf30ca0761bd36f4087b0c596d950c8e6bc107ec3ed6a645fb79ceb6ac12f9fdec981dc4a441bd1030b41a66bc0f2fd1bbf6471946107ac2f5d
|
||||
DIST Array-Compare-v3.0.3.tar.gz 9831 BLAKE2B 2440fdac5aed53e4195b8f679aa1309870b0be3c1c00c745d68f4c038cb57d5deac1c852b0d63cab5cbfca5cbdb956c1ddd3b19596ddb876bf9750da1e7caea6 SHA512 a2b3b7c7f153c30548d3e90bbe77ad8d609cd0abcb6a0f188c90b4f09f9be457906694cdd3d819a75a33aeab088586c0636d3f212dd5354d0cbcbe713897c867
|
||||
EBUILD Array-Compare-3.0.1.ebuild 551 BLAKE2B d6842ae2934601ea9963a1650b8d6de5861c6711933cbb282d2c2f0ae9385f6237bb118ef22041cad28ca37642cc818265abd75c4ef86fdb388bd285ca26dda3 SHA512 d656ca56bb2a6a23af22a8a1030e5754dd73d95382af1150ef6acb21bb2735b654f7e83bcc67abd7f8b8b26869e8f0501ee2069f90a80b4da7b4c062e94b3ac8
|
||||
EBUILD Array-Compare-3.0.3.ebuild 589 BLAKE2B 461bff2a442aea59d6ceb349361eadfdad0abd100f6485c9ea292f35aee21726d7ef1abbc0872b046196a976714eea732d02e790d7ac634bd4f046302a4af385 SHA512 d862f0ebb95dca14eb2c43f66a0c4b2913fbc2cb1d743da296de9e4abb04fefdddfd87fc3858447f1814d1153374b96458ca340ba9c01d98a12841a3596b16eb
|
||||
MISC metadata.xml 398 BLAKE2B 85cb87dc087cbebd9574646c7150148d694e937bc508a2b7f402811401537c5bd1688c957414dedf47a6c103683c3de5bfec4dc620aa23ff341bd4eaf29c9e2c SHA512 72ed7b8e8ecef772f37fa18b6938b1fe4b8cefbb7c13de073b40610a14034d9771b93608239e0050d9eee2f16d452872083049c38b9505b02434544504f90128
|
||||
|
@ -0,0 +1,13 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DIST_AUTHOR=GAAS
|
||||
DIST_VERSION=1.00
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Set up array elements as aliases"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
@ -1,3 +1,4 @@
|
||||
DIST Array-RefElem-1.00.tar.gz 2030 BLAKE2B 5849c06d97b7d6291ad5c97317fcf5383205cb6fa17d1eba046af652c6c072433733989b206e93895b7e5a7b04829085d1d93794065484fe0d05284e840405d8 SHA512 dd56af05e74462553d1a76d9b39b451af9376bebf2b2aa8653f16df9b0d1cad320c2a8539c592179a17c981ca4369b06b5343cef2642eeb2928640cb99caf23f
|
||||
EBUILD Array-RefElem-1.0.0-r1.ebuild 449 BLAKE2B db49f2f1c95b98ee111c99a64f8c27c1128e3c20c0f4a0de105585205b00a419564136268b58c191b9f0e839a95c7a58d24ffcc1603dfa0d6f64fa2dec003963 SHA512 fa16485d8cb81316297dbf1f88a0b43222ff3ed59cc87688dbba936b6a5ded9574bfd16c10dbf753bb6a8c74577b025f0b4e522dca6b3908d84452ea67d1088a
|
||||
EBUILD Array-RefElem-1.0.0-r2.ebuild 428 BLAKE2B 44ae4808fa757fe3636e525be20e24a1c3ff8ec1db020c930c8be06ac324cc98db5507d72ef00864cc15818538c270388dfad1183cff76306d4f5f6d2222beae SHA512 3216607f59a585bb9a351603f94f963d78b8b4faa1911a922cb8e567632ff9741db20f0b7ca25c0d575d0708ea86225d6c8a7c459c362a55c650e6b7913ec7b5
|
||||
MISC metadata.xml 398 BLAKE2B ca89e45e07c0bc7e7d162a28cfeda60b6c58003b95e45aef83df86a635b2875d44575786a1fd34f7e1c66965f70554de78835ac80c1fe1ce2f5141b6c29e5068 SHA512 e56bf464308b7ca620ba10c938efec3d08c665302e49e3f343d19a1e29cc0418d2fbcd9f75727f955df279b67d949fe6368f3a52a5cafa6d9d368eb5f744c661
|
||||
|
@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DIST_AUTHOR=ADAMK
|
||||
DIST_VERSION=1.02
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Calculate windows/subsets/pages of arrays"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-perl/Params-Util-0.120.0
|
||||
"
|
||||
BDEPEND="${RDEPEND}
|
||||
test? (
|
||||
virtual/perl-Test-Simple
|
||||
)
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.02-no-dot-inc.patch"
|
||||
)
|
||||
PERL_RM_FILES=(
|
||||
"t/97_meta.t"
|
||||
"t/98_pod.t"
|
||||
"t/99_pmv.t"
|
||||
)
|
@ -1,3 +1,5 @@
|
||||
AUX Array-Window-1.02-no-dot-inc.patch 469 BLAKE2B 31e82e3fa663ae74f4be422a6fd23a0dd764da2b9adf83bd50be9f344a315aeffeaf0424039e75301012c2d1bd402cb7ca532ec9e52b84215c45e06460d36f11 SHA512 8ef4ed23fee4bd2967515d7416f411fbbebe317abcb55a513a0da5687659e9fd65e1b5b413df0d41dc21ea7d976b1a3ba5a9a895a22f96ff65c71cd5ee9e9bf3
|
||||
DIST Array-Window-1.02.tar.gz 26434 BLAKE2B d9da2b9fd1e8107f7505306cbd23be0a18dcc0cf7286022f743e43c73bf5f83e5b690d410a475bdf9f74555df5a7dda854ea320b28180959122b80b8ae034c13 SHA512 ae28c4d36b6a5f6ab0b229b42ec3ae97f3d55da1f94cde1cddd5c7c7633e55437f610b39fd126e5b63982778c0afa1f7b4a5dfa98757fe391200319d2a7f894e
|
||||
EBUILD Array-Window-1.20.0-r1.ebuild 629 BLAKE2B b931a81a1eec1cd3abf548b7a40fe834db13c221ac7e13a69e7c3fc686370a8333940209b3c70d8c91f87a62cd69fcdda0faeee3cc6ad2913350f2f2272b9690 SHA512 68f55bf9583f2d8e0c755045297746d77911d5ecfc236d24a443141257546ba58b44da6685587f385752ba76a06d7d7082a2a141bc14d8cc1da754b2fd0ac8c7
|
||||
EBUILD Array-Window-1.20.0-r2.ebuild 538 BLAKE2B caec9f1aa8c3e74e27e8ff892653a297d3dc0aeafb2f475bf9621b510c17a3544539f1a1b0bcfc9fd270d382829bb9a7b65b7b66840f74f2d2c89fceea526533 SHA512 5415b4edb5c56224ece83c0e220f26cfa162f8520b267354473c8ebc67ad8ba01e2a3cbcc3e88b1f7db4564670f7cd11470235be674e6f67ef7088e6537b5ad9
|
||||
MISC metadata.xml 396 BLAKE2B cc555164980ce7a28378d61394e840cfe0918fa1b60e0f77e01ea69d993565a30d292e9b106ca47b576acd0bfc3d7dee6dc86259b23d1635bed335d31c3526ce SHA512 854ad5afc69437eb9ea21f2e979ddb599d8e401d32b15037355ec3129ce32a1d1fa2f3332ac2dc6483c88808036a09528ad596c8185db3c699c0ebcd8823edd8
|
||||
|
@ -0,0 +1,21 @@
|
||||
From a611484135caeddcd28e65d6ee8f5794a6e8f982 Mon Sep 17 00:00:00 2001
|
||||
From: Kent Fredric <kentnl@gentoo.org>
|
||||
Date: Wed, 29 Apr 2020 20:33:15 +1200
|
||||
Subject: Fix loading from inc/ on perl 5.28+
|
||||
|
||||
---
|
||||
Makefile.PL | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.PL b/Makefile.PL
|
||||
index 67c6d3b..de84e50 100644
|
||||
--- a/Makefile.PL
|
||||
+++ b/Makefile.PL
|
||||
@@ -1,3 +1,4 @@
|
||||
+use lib '.';
|
||||
use inc::Module::Install 0.75;
|
||||
|
||||
all_from 'lib/Array/Window.pm';
|
||||
--
|
||||
2.26.2
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST aws-xray-sdk-2.4.2.tar.gz 66737 BLAKE2B 5f062299ad28ee12d4f90bbdcb03d691fb9a5888054eae4759b9a0e916f720e71a9b9e01fd4d11106499395c5c1aa1ec90ec4874301a34657cd04b00cb5450e3 SHA512 3d12e96a54a2fc65bd6b6772b1e9cc72c09620d9a8b900780afb6c4051b88f0ada1e2da2e31bf93c37a881514e2ae79692a287a63b44845e0e2b8cb33109f81f
|
||||
EBUILD aws-xray-sdk-python-2.4.2.ebuild 824 BLAKE2B d3038e7aa08ed57c0b716f7472334300bdab8994d8b1569fdd7986cb8ee5715fe485b5ce539eb1efd4087a783544f0349762722644d4bcab2db618e2c8ecc38c SHA512 21b23a0c0c3e11de858b08b87c3f22363141cb0a2b890256da6b8fad6f06bee753f4082a8d9d09bb22b0b9908ac7278a09f312cc638efc2e887aab03c7b61c89
|
||||
EBUILD aws-xray-sdk-python-2.4.2.ebuild 826 BLAKE2B 46d407c86eb1050c03cdd3b3b7636aca7f81d634f809e7b9e9eddbd429b2edc00692a34ce5e1323433aa0a5e679827c9e5afa9cbb8d9f9271b4cbf8e2058bd3f SHA512 73cdca73f719bc40fc504079904d5417fc50d8d5a2f217ece4e46aaa577b30aa928306690341081769d1bb180da2451967ebbf084777a50f5e3065e0d764956d
|
||||
MISC metadata.xml 453 BLAKE2B 78db6d0eab2360b69ec4b17c073e47d10693c8b63b5f0c9f28aa8905453085c9595bed462a7d010480ff37b8b11083e2ce93e24da7cd59413592a5b4fe63cd8c SHA512 5206f2494c0eb5ab56f9673e837b2878aec4f512f6ef6dd8b70ca66a0e5c9c18b5626d9a90541adb158f0d08e0644ed2fb02fa3b80283a0883713eb45fa21e2d
|
||||
|
@ -1,3 +1,5 @@
|
||||
DIST jsondiff-1.1.2.tar.gz 7803 BLAKE2B cbfcfdb2c6c3bb721b4db43aca1d66649257db2cd9feb9655015e621fcd90c72af087696b9553a10ac89cdaf5f23d8748463e1a13bdb19207e34e12e66629544 SHA512 ca96bb80a6f7a34c8c5bcde74856dc1c4935b3e2979330ecfc33432aff83968e671b2aaf310c77f2c7d431be1ae6e20a960879700ba3c903a09a48b23d4c0288
|
||||
DIST jsondiff-1.2.0.tar.gz 15076 BLAKE2B 2d659598e6c647c8ea6622fc982808381e570c6ced23b5e77431b52e9fa746a5dbc743c739506362497d1f45dd2c290f23f459713ef31e927c05816e56659762 SHA512 5aa391ccc42d07330dfcf272b78aeb130f6f9033ca8b00cbea93549e32f07b98ea84cd6a1e61ab331da3de92838c69a501f95a9adb5f48e2eec46eb653264d55
|
||||
EBUILD jsondiff-1.1.2.ebuild 836 BLAKE2B 4f6fbd241419838ac7fe9060bbb12599773409954b69b9d2c7720684638fdc01c4505301ac73eedbfcedbbc81c840b761c29c3f26c4906699e45729a36d0f580 SHA512 9342596313ffe7ad344460438a740402239c167e8b021eed6a80ab035a37ea4910da1ecc56e5f8f206349b3c08ebb1e07260cdb20636fcf6461a595658b1446f
|
||||
EBUILD jsondiff-1.2.0.ebuild 762 BLAKE2B bf333f1820ea0d60156ffc6e243a48c04a2428676f16c01210c3d6b087a2d1583c6bf8a08d18a316ccc14c655091b9f5a72d773aefd33588f7ce975bdc71767d SHA512 84d34aeebb50154de3f66faafb743023f38642d44b7809340665873daf7ecc8c024026b564095c39304d93e600066c01f2fd7858ff368c67b367018bb7b505c1
|
||||
MISC metadata.xml 435 BLAKE2B 3ea5af8e9063a07c6d3d93225a712395a351a368bf689e512b45e6225e23a543771839e756ee53cf51142b6309f0b1ecd20fff6203a69ae754c44893d09c5274 SHA512 d1b50f01a0a5f2381fe41e4da073fd00afd4443a76d692c7a2227e50b178e9b990c4c40b72d1beeeab7cc8e5f1a9a52beb758a5adbd088eb787b9f2d08844eff
|
||||
|
@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Diff JSON and JSON-like structures in Python"
|
||||
HOMEPAGE="https://github.com/xlwings/jsondiff https://pypi.org/project/jsondiff/"
|
||||
SRC_URI="https://github.com/fzumstein/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/nose-random[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests nose
|
||||
|
||||
python_prepare_all() {
|
||||
# Avoid file collision with jsonpatch's jsondiff cli.
|
||||
sed -e "/'jsondiff=jsondiff.cli/ d" -i setup.py || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
DIST nose-random-1.0.0.tar.gz 3776 BLAKE2B 18dc40b13fcb970c4d2edeb6be9c6f3e710b36d14dcdc4a56c6e3ecf811ab2acd6be3e1c1cea2231eb5dc10581c77f201220354c77f3d9f67d89d894ed8b4f24 SHA512 9c62413fb00c3b774954ae7a65b08b122ae0dd2b24377efba8de345597b4ce4952aad09a0c2fea7f9d92f57a3664908fccd6eabadf32074a35978c958ea2b66f
|
||||
EBUILD nose-random-1.0.0.ebuild 498 BLAKE2B 5e24800b431e86c980b99f3ece5af4c8e4eb1755888a7a73df55bc33732677d032a1dd1556aaba48af2354e4fbf66f97d68abab3022c2b6fcb920b8848763785 SHA512 e94fbaa83f1dede642a02d11421d8f022f7112d2f9541c88897b202d5a9d610b95fb61a363d3b80a19ce390dc19f4ac5b64cf79739bf714a8016e9fd7f2cef56
|
||||
MISC metadata.xml 338 BLAKE2B e8be381e5e42a081be3637b77a9b5356dd7d74d0352976badfca62bdf7b65c04554552703b3e12e169ec1c4b57d07cedcf75387a0fd65a8177213f0de8bffa9c SHA512 b3e03151085bcaa51e2108d7e69042523148aaba924415421323d53005c1d047103827ed99bf064cda4f02cc313b3ff4e5fc681bccb5f1f23a82b40a744ed9bc
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>python@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>chutzpah@gentoo.org</email>
|
||||
<name>Patrick McLean</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,20 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Nose plugin to facilitate randomized unit testing"
|
||||
HOMEPAGE="https://github.com/fzumstein/nose-random"
|
||||
SRC_URI="https://github.com/fzumstein/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="dev-python/nose[${PYTHON_USEDEP}]"
|
||||
|
||||
# no tests
|
@ -0,0 +1,3 @@
|
||||
DIST python-slugify-1.2.6.tar.gz 8439 BLAKE2B 74699bf80408e1b6a705525b0ada2612cc6224a2ac1e17ce21230ed684af144c0f72ad99b32674bf19bd716d2cfc3a2f0da6f74facc99acba16e3ebc1873f3f3 SHA512 ad45958d03892d8db75967b150f25509c05ab2a87d5ac4a2ed12fccccfe1f86d7db26c406c6de22ba759b77fe772cc0c00d0e517c71db085618f62094ddadfd2
|
||||
EBUILD python-slugify-1.2.6.ebuild 592 BLAKE2B 00ef244b20205d5a6e36641f0cde4beb17e1eaf80280b7910d7d30ac2e3435a6ff749c4caa72e5846eec36f614e3dfc30fa66be354e686b489c0aa79241dfb04 SHA512 2d656cdc12c1abcc595b253a6125c0c6caa629e620d6fbc26a6ef0d20f6b7e7d0bb3b0986e334242111ff131d66e589fb7fc0cdaae72bedb47dd9502573ffe4a
|
||||
MISC metadata.xml 503 BLAKE2B 57ca9410de0bb0833413a7005395601ecc9cc74f612f0bc0584e2c686a4df9b7477f057e17a567e360e7a70abc7ec82955a947972120f6637089780712ffbe23 SHA512 62a7512dc2ad3baaba77ade0fd6a22046cd6e950c340850a7e027ceda1d85eff063ec87427fe744369656703449d2670ea6c8f555d27bace6c330d00aabd4651
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>gentoo.2019@r123.de</email>
|
||||
<name>Robert Siebeck</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="pypi">python-slugify</remote-id>
|
||||
<remote-id type="github">un33k/python-slugify</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A Python Slugify application that handles Unicode"
|
||||
HOMEPAGE="https://github.com/un33k/python-slugify https://pypi.org/project/python-slugify/"
|
||||
SRC_URI="https://github.com/un33k/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-python/unidecode[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
distutils_enable_tests unittest
|
@ -1,7 +1,7 @@
|
||||
AUX statsmodels-0.11.1-tests.patch 1915 BLAKE2B 90c13595a80cf1e59e81c483746f4b7e25bbb47d03211c39fda4dc9f441b03a9e793398d88e235ab53895e3d08cf97f7080d961317c4ea3fab04e011f0e5b64b SHA512 ec7f858b1af512d0bf591d35681b8663041e08e64a6e223e56cf600316a203259cd6386d2004bf884224608945b9e4938e9d39f8370d11c8914f6b773cd2773d
|
||||
DIST statsmodels-0.10.2.tar.gz 14065612 BLAKE2B 0df1268de5e4108b3cc541df87a5b9d2321bd3062d4daf1cc1aa62ab08ee777bace2f10bdfb51f088a66f15287c62cf851b3f43efa7eb1227e71c06632e80d55 SHA512 bd1c0784b0b17a3ca69fef5848f5eea8dcf76b1943599a5e5c285e45b7fcc7e44c0e388f007913d420ff6f3cb66a653d1c43e6e8addef534ff5572fa69ffb54a
|
||||
DIST statsmodels-0.11.1.tar.gz 15381516 BLAKE2B a40cf9138edd8a9a6707a550d9885e0610f9bc666fcd73a60bd11ade6dcfa806ecd912a725cf2a13902e92f31af2c3e82f244280f70586bb3359dc8fc2842508 SHA512 54afe55a23b431154c159f44d284aa093f3368988f0695c0f3fbb206046cdfb171ab2ba51ce94285d567b8536141f93a1ef404b5f7222f1e61264baf0541926d
|
||||
EBUILD statsmodels-0.10.2.ebuild 1855 BLAKE2B e4cf4ef55a20b88f2417c001ed60d68dcc82a6a0f77a2327fb28639ed4c112f0f660594d681a86267ffc017fa1df03245f5cb93cc9c702dffc76f86011fbc784 SHA512 5cd7223c3b1a1a69fc2e01a7945531b91be2ecf5e7ca3e3f468da4b805153967a0261fce7258e13e82b2797fcf44a40a54240dc4d563875588596c658818151c
|
||||
EBUILD statsmodels-0.10.2.ebuild 1853 BLAKE2B 3ee1ea4e063f910e9c33864d9bb71287410e754d1b805f5fc82f13415985e41eff0e885b11dc8343b229a4e15cb3841b9de56ce98038200b457a9770e0bdbcf9 SHA512 3486f76fb0197f505f1c3cd140d89664b3aa5a4bd3965c54d77a91dc8dc8083f789aa6687b0e8daa0370af9b87eb0e087558319f43791e5abfa9048a7f5e8369
|
||||
EBUILD statsmodels-0.11.1.ebuild 2020 BLAKE2B 84767231ba2f550ba13e7c37fa1d86da86a43a3e529a120e10eae3de287da8bbff879a22f7637f15a31264ebfae516c52d3b9d565b4ae306a96ec518d5c89141 SHA512 a145d93ea7ae2991e7d979591b55bf320d2a8ad5e0438bd942a729f1bace2c4bec11c7f80cd9e1d53f547ae22bc5bc3e9e03db3a3ec0829a23240761207a6622
|
||||
EBUILD statsmodels-9999.ebuild 1984 BLAKE2B 7ee4c8dbe27a102107ac29f0438b8608492cadde4bb6740cfc7c70781885ef256164a994f592bbd6a00b75767f3c756f1297e16d8ff4fbb6e752a54f26c0e95a SHA512 8e3bcafaa6251aec5e3bfc40afefc00608a5c13eb80ebe5a9eccbcd2dfb8072f10f88679710cd757c70aaee88865d6abc830b7fd1a0faae1caa0b8b7d80748f1
|
||||
MISC metadata.xml 1310 BLAKE2B de8c73b0fb91a3bd65b2ee149b3ef01b3f93c78dfaf1642f9c81335e21c0ace42a771a0901a30dfebc7a8bbb80e9fb7057bd047a26035e103c7ece9e9dbef58a SHA512 96bfb2a3e0b677a67c0256bfcdc76b3621eac9d9242c2aaa7d22322bb53be9bb2185ed82a2fa65cb7cd16df7562c1999ac0d936471608700030ecff4de7174b6
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,725 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
CDEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
DEPEND="${CDEPEND}
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
DEPEND="${DEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
|
||||
"${FILESDIR}"/git-2.23.0-avoid_empty_remote_line.patch #698384
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
grep -q getdelim "${ROOT%/}"/usr/include/stdio.h && \
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
|
||||
has_version '>=app-text/asciidoc-8.0' \
|
||||
&& myopts+=( ASCIIDOC8=YesPlease )
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED%/}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED%/}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED%/}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED%/}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED%/}"/usr/libexec/git-core/git-svn \
|
||||
"${ED%/}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED%/}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[ ${rc} -eq 0 ] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,725 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
CDEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
DEPEND="${CDEPEND}
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
DEPEND="${DEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
|
||||
"${FILESDIR}"/git-2.23.0-avoid_empty_remote_line.patch #698384
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
grep -q getdelim "${ROOT%/}"/usr/include/stdio.h && \
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
|
||||
has_version '>=app-text/asciidoc-8.0' \
|
||||
&& myopts+=( ASCIIDOC8=YesPlease )
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED%/}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED%/}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED%/}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED%/}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED%/}"/usr/libexec/git-core/git-svn \
|
||||
"${ED%/}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED%/}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[ ${rc} -eq 0 ] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,728 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
DEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
BDEPEND="${BDEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local extlibs myopts
|
||||
|
||||
myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version '>=app-text/asciidoc-8.0' ; then
|
||||
myopts+=( ASCIIDOC8=YesPlease )
|
||||
fi
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,728 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
DEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
BDEPEND="${BDEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local extlibs myopts
|
||||
|
||||
myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version '>=app-text/asciidoc-8.0' ; then
|
||||
myopts+=( ASCIIDOC8=YesPlease )
|
||||
fi
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,728 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
DEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
BDEPEND="${BDEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local extlibs myopts
|
||||
|
||||
myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version '>=app-text/asciidoc-8.0' ; then
|
||||
myopts+=( ASCIIDOC8=YesPlease )
|
||||
fi
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,728 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
DEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
BDEPEND="${BDEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local extlibs myopts
|
||||
|
||||
myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version '>=app-text/asciidoc-8.0' ; then
|
||||
myopts+=( ASCIIDOC8=YesPlease )
|
||||
fi
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,728 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
DEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
BDEPEND="${BDEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local extlibs myopts
|
||||
|
||||
myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version '>=app-text/asciidoc-8.0' ; then
|
||||
myopts+=( ASCIIDOC8=YesPlease )
|
||||
fi
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,728 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
DEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
BDEPEND="${BDEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local extlibs myopts
|
||||
|
||||
myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version '>=app-text/asciidoc-8.0' ; then
|
||||
myopts+=( ASCIIDOC8=YesPlease )
|
||||
fi
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,728 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
GENTOO_DEPEND_ON_PERL=no
|
||||
|
||||
# bug #329479: git-remote-testgit is not multiple-version aware
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7}} )
|
||||
|
||||
inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
|
||||
|
||||
PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
||||
# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
|
||||
# See https://git-scm.com/docs/gitworkflows#_graduation
|
||||
# In order of stability:
|
||||
# 9999-r0: maint
|
||||
# 9999-r1: master
|
||||
# 9999-r2: next
|
||||
# 9999-r3: pu
|
||||
case "${PVR}" in
|
||||
9999) EGIT_BRANCH=maint ;;
|
||||
9999-r1) EGIT_BRANCH=master ;;
|
||||
9999-r2) EGIT_BRANCH=next;;
|
||||
9999-r3) EGIT_BRANCH=pu ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_rc/.rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DOC_VER="${MY_PV}"
|
||||
|
||||
DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
|
||||
HOMEPAGE="https://www.git-scm.com/"
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
SRC_URI_SUFFIX="xz"
|
||||
SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
|
||||
[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
|
||||
SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
doc? (
|
||||
${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
)"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
|
||||
|
||||
# Common to both DEPEND and RDEPEND
|
||||
DEPEND="
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
sys-libs/zlib
|
||||
pcre? (
|
||||
pcre-jit? ( dev-libs/libpcre2[jit(+)] )
|
||||
!pcre-jit? ( dev-libs/libpcre )
|
||||
)
|
||||
perl? ( dev-lang/perl:=[-build(-)] )
|
||||
tk? ( dev-lang/tk:0= )
|
||||
curl? (
|
||||
net-misc/curl
|
||||
webdav? ( dev-libs/expat )
|
||||
)
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
iconv? ( virtual/libiconv )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
gpg? ( app-crypt/gnupg )
|
||||
perl? (
|
||||
dev-perl/Error
|
||||
dev-perl/MailTools
|
||||
dev-perl/Authen-SASL
|
||||
cgi? (
|
||||
dev-perl/CGI
|
||||
highlight? ( app-text/highlight )
|
||||
)
|
||||
cvs? (
|
||||
>=dev-vcs/cvsps-2.1:0
|
||||
dev-perl/DBI
|
||||
dev-perl/DBD-SQLite
|
||||
)
|
||||
mediawiki? (
|
||||
dev-perl/DateTime-Format-ISO8601
|
||||
dev-perl/HTML-Tree
|
||||
dev-perl/MediaWiki-API
|
||||
)
|
||||
subversion? (
|
||||
dev-vcs/subversion[-dso,perl]
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/TermReadKey
|
||||
)
|
||||
)
|
||||
perforce? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
# This is how info docs are created with Git:
|
||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
||||
# .texi --(makeinfo)---------> .info
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-text/docbook2X
|
||||
app-text/xmlto
|
||||
sys-apps/texinfo
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
test? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
# Live ebuild builds man pages and HTML docs, additionally
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
BDEPEND="${BDEPEND}
|
||||
app-text/asciidoc"
|
||||
fi
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
cgi? ( perl )
|
||||
cvs? ( perl )
|
||||
mediawiki? ( perl )
|
||||
mediawiki-experimental? ( mediawiki )
|
||||
subversion? ( perl )
|
||||
webdav? ( curl )
|
||||
pcre-jit? ( pcre )
|
||||
perforce? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# bug #350330 - automagic CVS when we don't want it is bad.
|
||||
"${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
|
||||
|
||||
"${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
|
||||
|
||||
# Make submodule output quiet
|
||||
"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use subversion && has_version "dev-vcs/subversion[dso]"; then
|
||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
||||
ewarn "have been warned."
|
||||
fi
|
||||
if use perforce ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
# This is needed because for some obscure reasons future calls to make don't
|
||||
# pick up these exports if we export them in src_unpack()
|
||||
exportmakeopts() {
|
||||
local extlibs myopts
|
||||
|
||||
myopts=(
|
||||
ASCIIDOC_NO_ROFF=YesPlease
|
||||
$(usex cvs '' NO_CVS=YesPlease)
|
||||
$(usex elibc_musl NO_REGEX=YesPlease '')
|
||||
$(usex iconv '' NO_ICONV=YesPlease)
|
||||
$(usex nls '' NO_GETTEXT=YesPlease)
|
||||
$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
|
||||
$(usex perforce '' NO_PYTHON=YesPlease)
|
||||
$(usex subversion '' NO_SVN_TESTS=YesPlease)
|
||||
$(usex threads '' NO_PTHREADS=YesPlease)
|
||||
$(usex tk '' NO_TCLTK=YesPlease)
|
||||
)
|
||||
|
||||
if use blksha1 ; then
|
||||
myopts+=( BLK_SHA1=YesPlease )
|
||||
elif use ppcsha1 ; then
|
||||
myopts+=( PPC_SHA1=YesPlease )
|
||||
fi
|
||||
|
||||
if use curl ; then
|
||||
use webdav || myopts+=( NO_EXPAT=YesPlease )
|
||||
else
|
||||
myopts+=( NO_CURL=YesPlease )
|
||||
fi
|
||||
|
||||
# broken assumptions, because of static build system ...
|
||||
myopts+=(
|
||||
NO_FINK=YesPlease
|
||||
NO_DARWIN_PORTS=YesPlease
|
||||
INSTALL=install
|
||||
TAR=tar
|
||||
SHELL_PATH="${EPREFIX}/bin/sh"
|
||||
SANE_TOOL_PATH=
|
||||
OLD_ICONV=
|
||||
NO_EXTERNAL_GREP=
|
||||
)
|
||||
|
||||
# For svn-fe
|
||||
extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
|
||||
|
||||
# can't define this to null, since the entire makefile depends on it
|
||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
|
||||
|
||||
if use pcre; then
|
||||
if use pcre-jit; then
|
||||
myopts+=( USE_LIBPCRE2=YesPlease )
|
||||
extlibs+=( -lpcre2-8 )
|
||||
else
|
||||
myopts+=(
|
||||
USE_LIBPCRE1=YesPlease
|
||||
NO_LIBPCRE1_JIT=YesPlease
|
||||
)
|
||||
extlibs+=( -lpcre )
|
||||
fi
|
||||
fi
|
||||
# Disabled until ~m68k-mint can be keyworded again
|
||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
||||
# myopts+=(
|
||||
# NO_MMAP=YesPlease
|
||||
# NO_IPV6=YesPlease
|
||||
# NO_STRLCPY=YesPlease
|
||||
# NO_MEMMEM=YesPlease
|
||||
# NO_MKDTEMP=YesPlease
|
||||
# NO_MKSTEMPS=YesPlease
|
||||
# )
|
||||
# fi
|
||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-*-aix* ]]; then
|
||||
myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
|
||||
fi
|
||||
if [[ ${CHOST} == *-solaris* ]]; then
|
||||
myopts+=(
|
||||
NEEDS_LIBICONV=YesPlease
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
)
|
||||
if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
|
||||
myopts+=( HAVE_GETDELIM=1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version '>=app-text/asciidoc-8.0' ; then
|
||||
myopts+=( ASCIIDOC8=YesPlease )
|
||||
fi
|
||||
|
||||
# Bug 290465:
|
||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
||||
if [[ "${CHOST}" == *-uclibc* ]] ; then
|
||||
myopts+=( NO_NSEC=YesPlease )
|
||||
use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
|
||||
fi
|
||||
|
||||
export MY_MAKEOPTS="${myopts[@]}"
|
||||
export EXTLIBS="${extlibs[@]}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
|
||||
cd "${S}" || die
|
||||
unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
if use doc ; then
|
||||
pushd "${S}"/Documentation &>/dev/null || die
|
||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
else
|
||||
git-r3_src_unpack
|
||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# add experimental patches to improve mediawiki support
|
||||
# see patches for origin
|
||||
if use mediawiki-experimental ; then
|
||||
PATCHES+=(
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
|
||||
"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
||||
-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
|
||||
-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
|
||||
-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
|
||||
-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
|
||||
Makefile contrib/svn-fe/Makefile || die
|
||||
|
||||
# Fix docbook2texi command
|
||||
sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
|
||||
Documentation/Makefile || die
|
||||
}
|
||||
|
||||
git_emake() {
|
||||
# bug #320647: PYTHON_PATH
|
||||
local PYTHON_PATH=""
|
||||
use perforce && PYTHON_PATH="${PYTHON}"
|
||||
emake ${MY_MAKEOPTS} \
|
||||
prefix="${EPREFIX}"/usr \
|
||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
||||
perllibdir="$(use perl && perl_get_raw_vendorlib)" \
|
||||
sysconfdir="${EPREFIX}"/etc \
|
||||
DESTDIR="${D}" \
|
||||
GIT_TEST_OPTS="--no-color" \
|
||||
OPTAR="$(tc-getAR)" \
|
||||
OPTCC="$(tc-getCC)" \
|
||||
OPTCFLAGS="${CFLAGS}" \
|
||||
OPTLDFLAGS="${LDFLAGS}" \
|
||||
PERL_PATH="${EPREFIX}/usr/bin/perl" \
|
||||
PERL_MM_OPT="" \
|
||||
PYTHON_PATH="${PYTHON_PATH}" \
|
||||
V=1 \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
exportmakeopts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
git_emake || die "emake failed"
|
||||
|
||||
if use emacs ; then
|
||||
elisp-compile contrib/emacs/git{,-blame}.el
|
||||
fi
|
||||
|
||||
if use perl && use cgi ; then
|
||||
git_emake \
|
||||
gitweb \
|
||||
|| die "emake gitweb (cgi) failed"
|
||||
fi
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
pushd contrib/credential/osxkeychain &>/dev/null || die
|
||||
git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
|
||||
|| die "emake credential-osxkeychain"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd Documentation &>/dev/null || die
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git_emake man \
|
||||
|| die "emake man failed"
|
||||
if use doc ; then
|
||||
git_emake info html \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
else
|
||||
if use doc ; then
|
||||
git_emake info \
|
||||
|| die "emake info html failed"
|
||||
fi
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
# by defining EXTLIBS we override the detection for libintl and
|
||||
# libiconv, bug #516168
|
||||
local nlsiconv=()
|
||||
use nls && use !elibc_glibc && nlsiconv+=( -lintl )
|
||||
use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
|
||||
git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
|
||||
|| die "emake svn-fe failed"
|
||||
if use doc ; then
|
||||
# svn-fe.1 requires the full USE=doc dependency stack
|
||||
git_emake svn-fe.1 \
|
||||
|| die "emake svn-fe.1 failed"
|
||||
git_emake svn-fe.html \
|
||||
|| die "svn-fe.html failed"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
git_emake || die "emake git-credential-libsecret failed"
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake git-subtree
|
||||
# git-subtree.1 requires the full USE=doc dependency stack
|
||||
use doc && git_emake git-subtree.html git-subtree.1
|
||||
popd &>/dev/null || die
|
||||
|
||||
pushd contrib/diff-highlight &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake
|
||||
popd &>/dev/null || die
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
git_emake install || die "make install failed"
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]]; then
|
||||
dobin contrib/credential/osxkeychain/git-credential-osxkeychain
|
||||
fi
|
||||
|
||||
# Depending on the tarball and manual rebuild of the documentation, the
|
||||
# manpages may exist in either OR both of these directories.
|
||||
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
|
||||
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
|
||||
dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
|
||||
use doc && dodir /usr/share/doc/${PF}/html
|
||||
local d
|
||||
for d in / /howto/ /technical/ ; do
|
||||
docinto ${d}
|
||||
dodoc Documentation${d}*.txt
|
||||
if use doc ; then
|
||||
docinto ${d}/html
|
||||
dodoc Documentation${d}*.html
|
||||
fi
|
||||
done
|
||||
docinto /
|
||||
# Upstream does not ship this pre-built :-(
|
||||
use doc && doinfo Documentation/{git,gitman}.info
|
||||
|
||||
newbashcomp contrib/completion/git-completion.bash ${PN}
|
||||
bashcomp_alias git gitk
|
||||
# Not really a bash-completion file (bug #477920)
|
||||
# but still needed uncompressed (bug #507480)
|
||||
insinto /usr/share/${PN}
|
||||
doins contrib/completion/git-prompt.sh
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install ${PN} contrib/emacs/git.{el,elc}
|
||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
|
||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
|
||||
# don't add automatically to the load-path, so the sitefile
|
||||
# can do a conditional loading
|
||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
#dobin contrib/fast-import/git-p4 # Moved upstream
|
||||
#dodoc contrib/fast-import/git-p4.txt # Moved upstream
|
||||
newbin contrib/fast-import/import-tars.perl import-tars
|
||||
exeinto /usr/libexec/git-core/
|
||||
newexe contrib/git-resurrect.sh git-resurrect
|
||||
|
||||
# git-subtree
|
||||
pushd contrib/subtree &>/dev/null || die
|
||||
git_emake install || die "Failed to emake install for git-subtree"
|
||||
if use doc ; then
|
||||
# Do not move git subtree install-man outside USE=doc!
|
||||
git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
|
||||
fi
|
||||
newdoc README README.git-subtree
|
||||
dodoc git-subtree.txt
|
||||
popd &>/dev/null || die
|
||||
|
||||
if use mediawiki ; then
|
||||
pushd contrib/mw-to-git &>/dev/null || die
|
||||
git_emake install
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# diff-highlight
|
||||
dobin contrib/diff-highlight/diff-highlight
|
||||
newdoc contrib/diff-highlight/README README.diff-highlight
|
||||
|
||||
# git-jump
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/git-jump/git-jump
|
||||
newdoc contrib/git-jump/README git-jump.txt
|
||||
|
||||
# git-contacts
|
||||
exeinto /usr/libexec/git-core/
|
||||
doexe contrib/contacts/git-contacts
|
||||
dodoc contrib/contacts/git-contacts.txt
|
||||
|
||||
if use gnome-keyring ; then
|
||||
pushd contrib/credential/libsecret &>/dev/null || die
|
||||
dobin git-credential-libsecret
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
if use subversion ; then
|
||||
pushd contrib/svn-fe &>/dev/null || die
|
||||
dobin svn-fe
|
||||
dodoc svn-fe.txt
|
||||
if use doc ; then
|
||||
# Do not move svn-fe.1 outside USE=doc!
|
||||
doman svn-fe.1
|
||||
docinto html
|
||||
dodoc svn-fe.html
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
dodir /usr/share/${PN}/contrib
|
||||
# The following are excluded:
|
||||
# completion - installed above
|
||||
# diff-highlight - done above
|
||||
# emacs - installed above
|
||||
# examples - these are stuff that is not used in Git anymore actually
|
||||
# git-jump - done above
|
||||
# gitview - installed above
|
||||
# p4import - excluded because fast-import has a better one
|
||||
# patches - stuff the Git guys made to go upstream to other places
|
||||
# persistent-https - TODO
|
||||
# mw-to-git - TODO
|
||||
# subtree - build seperately
|
||||
# svnimport - use git-svn
|
||||
# thunderbird-patch-inline - fixes thunderbird
|
||||
local contrib_objects=(
|
||||
buildsystems
|
||||
fast-import
|
||||
hg-to-git
|
||||
hooks
|
||||
remotes2config.sh
|
||||
rerere-train.sh
|
||||
stats
|
||||
workdir
|
||||
)
|
||||
local i
|
||||
for i in "${contrib_objects[@]}" ; do
|
||||
cp -rf \
|
||||
"${S}"/contrib/${i} \
|
||||
"${ED}"/usr/share/${PN}/contrib \
|
||||
|| die "Failed contrib ${i}"
|
||||
done
|
||||
|
||||
if use perl && use cgi ; then
|
||||
# We used to install in /usr/share/${PN}/gitweb
|
||||
# but upstream installs in /usr/share/gitweb
|
||||
# so we will install a symlink and use their location for compat with other
|
||||
# distros
|
||||
dosym ../gitweb /usr/share/${PN}/gitweb
|
||||
|
||||
# INSTALL discusses configuration issues, not just installation
|
||||
docinto /
|
||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
||||
newdoc "${S}"/gitweb/README README.gitweb
|
||||
|
||||
for d in "${ED}"/usr/lib{,64}/perl5/ ; do
|
||||
if test -d "${d}" ; then find "${d}" \
|
||||
-name .packlist \
|
||||
-delete || die
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -rf "${ED}"/usr/share/gitweb
|
||||
fi
|
||||
|
||||
if ! use subversion ; then
|
||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
|
||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
||||
systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
|
||||
systemd_dounit "${FILESDIR}/git-daemon.socket"
|
||||
fi
|
||||
|
||||
perl_delete_localpod
|
||||
|
||||
# Remove disabled linguas
|
||||
# we could remove sources in src_prepare, but install does not
|
||||
# handle missing locale dir well
|
||||
rm_loc() {
|
||||
if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
|
||||
rm -r "${ED}/usr/share/locale/${1}" || die
|
||||
fi
|
||||
}
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local disabled=()
|
||||
local tests_cvs=(
|
||||
t9200-git-cvsexportcommit.sh
|
||||
t9400-git-cvsserver-server.sh
|
||||
t9401-git-cvsserver-crlf.sh
|
||||
t9402-git-cvsserver-refs.sh
|
||||
t9600-cvsimport.sh
|
||||
t9601-cvsimport-vendor-branch.sh
|
||||
t9602-cvsimport-branches-tags.sh
|
||||
t9603-cvsimport-patchsets.sh
|
||||
t9604-cvsimport-timestamps.sh
|
||||
)
|
||||
local tests_perl=(
|
||||
t3701-add-interactive.sh
|
||||
t5502-quickfetch.sh
|
||||
t5512-ls-remote.sh
|
||||
t5520-pull.sh
|
||||
t7106-reset-unborn-branch.sh
|
||||
t7501-commit.sh
|
||||
)
|
||||
# Bug #225601 - t0004 is not suitable for root perm
|
||||
# Bug #219839 - t1004 is not suitable for root perm
|
||||
# t0001-init.sh - check for init notices EPERM* fails
|
||||
local tests_nonroot=(
|
||||
t0001-init.sh
|
||||
t0004-unwritable.sh
|
||||
t0070-fundamental.sh
|
||||
t1004-read-tree-m-u-wf.sh
|
||||
t3700-add.sh
|
||||
t7300-clean.sh
|
||||
)
|
||||
# t9100 still fails with symlinks in SVN 1.7
|
||||
local test_svn=( t9100-git-svn-basic.sh )
|
||||
|
||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
||||
if ! has_version app-arch/unzip ; then
|
||||
einfo "Disabling tar-tree tests"
|
||||
disabled+=( t5000-tar-tree.sh )
|
||||
fi
|
||||
|
||||
local cvs=0
|
||||
use cvs && let cvs=${cvs}+1
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
if [[ ${cvs} -eq 1 ]]; then
|
||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
||||
ewarn "You should retest with FEATURES=userpriv!"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
einfo "Skipping other tests that require being non-root"
|
||||
disabled+=( ${tests_nonroot[@]} )
|
||||
else
|
||||
[[ ${cvs} -gt 0 ]] && \
|
||||
has_version dev-vcs/cvs && \
|
||||
let cvs=${cvs}+1
|
||||
[[ ${cvs} -gt 1 ]] && \
|
||||
has_version "dev-vcs/cvs[server]" && \
|
||||
let cvs=${cvs}+1
|
||||
if [[ ${cvs} -lt 3 ]]; then
|
||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
||||
disabled+=( ${tests_cvs[@]} )
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use perl ; then
|
||||
einfo "Disabling tests that need Perl"
|
||||
disabled+=( ${tests_perl[@]} )
|
||||
fi
|
||||
|
||||
einfo "Disabling tests that fail with SVN 1.7"
|
||||
disabled+=( ${test_svn[@]} )
|
||||
|
||||
# Reset all previously disabled tests
|
||||
pushd t &>/dev/null || die
|
||||
local i
|
||||
for i in *.sh.DISABLED ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
||||
done
|
||||
einfo "Disabled tests:"
|
||||
for i in ${disabled[@]} ; do
|
||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
|
||||
done
|
||||
|
||||
# Avoid the test system removing the results because we want them ourselves
|
||||
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
|
||||
-i Makefile || die
|
||||
|
||||
# Clean old results first, must always run
|
||||
nonfatal git_emake clean
|
||||
popd &>/dev/null || die
|
||||
|
||||
# Now run the tests, keep going if we hit an error, and don't terminate on
|
||||
# failure
|
||||
local rc
|
||||
einfo "Start test run"
|
||||
#MAKEOPTS=-j1
|
||||
nonfatal git_emake --keep-going test
|
||||
rc=$?
|
||||
|
||||
# Display nice results, now print the results
|
||||
pushd t &>/dev/null || die
|
||||
nonfatal git_emake aggregate-results
|
||||
|
||||
# And bail if there was a problem
|
||||
[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
|
||||
}
|
||||
|
||||
showpkgdeps() {
|
||||
local pkg=$1
|
||||
shift
|
||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
|
||||
elog "completion."
|
||||
elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
|
||||
elog "Note that the prompt bash code is now in that separate script"
|
||||
elog "These additional scripts need some dependencies:"
|
||||
echo
|
||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
||||
showpkgdeps git-instaweb \
|
||||
"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
|
||||
echo
|
||||
use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
Wed, 29 Apr 2020 06:09:00 +0000
|
||||
Wed, 29 Apr 2020 09:09:01 +0000
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue