Moved old packages to myold repo.

This commit is contained in:
László Valkó 2023-08-04 02:45:00 +02:00
parent 1d456757a9
commit 0edfb9f077
59 changed files with 0 additions and 8209 deletions

View file

@ -1,11 +0,0 @@
AUX fontconfig.Gentoo.properties 11196 BLAKE2B 31abb25a488c4680ee6a276d4c4fd0f0c8da5572a923cc1f755a6baf6ef007453c1cda4fb280fa108ae124c888a5b36b05658a9695dc5311f859742fbf9e7a79 SHA512 1802e52383a04efd0d7fb4d6a3903f99128dce90afcb10b9dd0d3515e5feafb807449024dbe5742c7dfa9d43736e474412e1a289e06b29cf3a58e59deedd56f9
AUX fontconfig.properties 11196 BLAKE2B 31abb25a488c4680ee6a276d4c4fd0f0c8da5572a923cc1f755a6baf6ef007453c1cda4fb280fa108ae124c888a5b36b05658a9695dc5311f859742fbf9e7a79 SHA512 1802e52383a04efd0d7fb4d6a3903f99128dce90afcb10b9dd0d3515e5feafb807449024dbe5742c7dfa9d43736e474412e1a289e06b29cf3a58e59deedd56f9
AUX oracle-jdk-bin-1.7.env 880 BLAKE2B c5cc5d09534e9ada0c05f9eda0a0609ae81d39d985ba21610955af8b532381030ed6231e0f129fe1648fe4a711c49896afc6797ba31f540bb6db38d269b6f117 SHA512 f230fd95f07638690b1ce64bf25b366b6fb11828735e7bb75fa30152435485e4f529f73e88a50f623db348c0ed68ea5617b7691f4c1c3be56b37216d0a7fa59a
AUX oracle-jdk-bin.env.sh 833 BLAKE2B 2e8254aff8d35795f073fb599c1c51dcd2ecb0356b4e90977577b9cd41376c3517a72e634bfb1420c37c8149af89044f48aa374480b26a19c875d4c1b78390eb SHA512 8d41679b4631016dbe98b15368ed027df9e6f4d96db17133c56bbf16b9a81be908d139617bc5350aa6b0e51bddc56bb1ce1abc5a8a4fad74868172cfdde6ffd8
DIST UnlimitedJCEPolicyJDK7.zip 7426 BLAKE2B 1cd63919e35248e25e4e104c8f87deed84db70280c7a4262c999d02edc8f9757c8ac6a369ac326686f61da7391f1788ec1da65d253e0bc6ff674c4e0c7dc3fb7 SHA512 02eca7da8f3fffea388431d5352290535a63d53a1f5c795d6511ccba62445787a0ee6ad4bc1852e5262860b6d607ba2a8c6a3dbb0c3e1d7c3a67ac7bbc783204
DIST jdk-7u80-linux-i586.tar.gz 154850445 BLAKE2B a94426088fa12456b74b24938279e9415d73cdb45857fa9b6234a9b5de24962690a28cf00097103f1cd94b3b9a7fd3eabb137edcca9572e035d6f27dca8a7608 SHA512 69e2ee7964b18e9e8b57db917b303eb9ea629c432300fe4749177118d2f5c365e72b976649e21354643fe4957120a2b23de025bab4dc45977837d4847a61ffb6
DIST jdk-7u80-linux-x64.tar.gz 153530841 BLAKE2B 9ff05c97b65b3b49f4d5088fa4b021aaa58806a1d9937b3c65db8e25bd44465880e66f60b75483bed12b9f562d3bf6430480516a86724a16262776231044a95e SHA512 a772878f740e87835bafc82841e8f4c1dfbe8bc79e072d3f6c5c74d3a206eb9001a53b474d91a22819c7c0d6407ed88993635c39738779c2b08c22c7a1c2e9e9
DIST jdk-8u241-linux-i586.tar.gz 195143852 BLAKE2B 595e614fb34122a72fca5ce70a4ed4702e725a2f3a3084c7f6a86be8901799f9b4eb11b04b9b054d59d011a285276922532dbc52a04e33a5c49b9a22fe9bdcb4 SHA512 66edeb10d4ab38e05f74a17f8bdfe681069e2ca14a42b2c0f6159cefed6ccba69581086d0d6209476cb731913451b58a3a503bc28456ac6c5ef68722d124a04d
DIST jdk-8u241-linux-x64.tar.gz 194545143 BLAKE2B 13369d68bc0c328c4efbba90697080fe4d65fb8167bc9b20b92b6d4d6845c48486c53f2371e362fdb6195e8ffdb3ad8f4b486115ffbcf3e2f8e2966b6ad46d4c SHA512 1123fb82926ac207fdbfc1dd3efd588832feed15cac755d1ca604e321816c2fb3c695b9ce3f99b5a14f6c45973cc8dadae87d5c79c49d67336f8a5cb50c56050
EBUILD oracle-jdk-bin-1.7.0.80.ebuild 7525 BLAKE2B cf5997f8872494b1334653c7637a72472326f04be56460c5cdce7b318b96867fbd921c2d1a124f29e78d1e0a0c1e5bf9c1841af8e22a8daac22ba55ccb41975b SHA512 5526de842d446d6e78ab783cb905c11733b951e61f2f4b6d0bd2a0bdc5776e6c83b10612d1889dcef139e352fa6f187facb60633ab80496da30bcd8cd70f3508
EBUILD oracle-jdk-bin-1.8.0.241.ebuild 8238 BLAKE2B 39a8ef091be7f6195367ae50fb18d7d12f0e9255ce9d04012eb2da8f6be067c096f8f3d17b266c16409391ff6b64236434b273a2c4b36b8aad640af86100aca1 SHA512 e5877fc6bcf3498300e516384434ff423fb7920de365278a1aa104c1147398af1e7b263d2dff94e0321d84d0dfacc0b04b0e337cbcb32339e504a9d44f4fe563

View file

@ -1,161 +0,0 @@
# Version
version=1
# Component Font Mappings
allfonts.chinese-gb18030=-misc-ming for iso10646 -medium-r-normal--*-%d-*-*-c-*-iso10646-1
allfonts.chinese-gb18030.motif=-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
allfonts.chinese-big5=-arphic technology co.-ar pl mingti2l big5-medium-r-normal--*-%d-*-*-c-*-iso10646-1
allfonts.chinese-big5.motif=-taipei-fixed-medium-r-normal--*-%d-*-*-c-*-big5-0
allfonts.lucida=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
serif.plain.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.plain.latin-1=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.plain.latin-1.motif=-b&h-luxi serif-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.bold.latin-1=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.latin-1.motif=-b&h-luxi serif-bold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.italic.latin-1=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.latin-1.motif=-b&h-luxi serif-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.bolditalic.latin-1=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.latin-1.motif=-b&h-luxi serif-bold-i-normal--*-%d-*-*-p-*-iso8859-1
sansserif.plain.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.plain.latin-1.motif=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1
sansserif.bold.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.latin-1.motif=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1
sansserif.italic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.latin-1.motif=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.latin-1.motif=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1
monospaced.plain.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.plain.latin-1.motif=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.bold.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.latin-1.motif=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.italic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.latin-1.motif=-b&h-luxi mono-medium-i-normal--*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.latin-1.motif=-b&h-luxi mono-bold-i-normal--*-%d-*-*-m-*-iso8859-1
dialog.plain.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.plain.latin-1.motif=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1
dialog.bold.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.latin-1.motif=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1
dialog.italic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.latin-1.motif=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.latin-1.motif=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1
dialoginput.plain.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.plain.latin-1.motif=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.bold.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.latin-1.motif=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.italic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.latin-1.motif=-b&h-luxi mono-medium-i-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.latin-1.motif=-b&h-luxi mono-bold-i-normal--*-%d-*-*-m-*-iso8859-1
# Search Sequences
sequence.allfonts=latin-1
sequence.allfonts.Big5=latin-1,chinese-big5
sequence.allfonts.GB2312=latin-1,chinese-gb18030
sequence.allfonts.x-euc-jp-linux=latin-1,japanese-x0208
sequence.allfonts.EUC-KR=latin-1,korean
sequence.allfonts.GB18030=latin-1,chinese-gb18030
sequence.fallback=lucida,chinese-big5,chinese-gb18030,japanese-x0208,korean
# Exclusion Ranges
exclusion.japanese-x0208=0390-03d6,2200-22ef,2701-27be
# Font File Names
filename.-arphic_technology_co.-ar_pl_mingti2l_big5-medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts/bsmi00lp.ttf
filename.-misc-baekmuk_batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/batang.ttf
filename.-misc-baekmuk_gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/gulim.ttf
filename.-misc-kochi_gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
filename.-misc-kochi_mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
filename.-misc-ming for iso10646 -medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/hkscs-ming/min_uni.ttf
# AWT X11 font paths
awtfontpath.latin-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/Type1
awtfontpath.chinese-big5=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts
awtfontpath.chinese-gb18030=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts
awtfontpath.japanese-x0208=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/kochi-substitute
awtfontpath.korean=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts

View file

@ -1,161 +0,0 @@
# Version
version=1
# Component Font Mappings
allfonts.chinese-gb18030=-misc-ming for iso10646 -medium-r-normal--*-%d-*-*-c-*-iso10646-1
allfonts.chinese-gb18030.motif=-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
allfonts.chinese-big5=-arphic technology co.-ar pl mingti2l big5-medium-r-normal--*-%d-*-*-c-*-iso10646-1
allfonts.chinese-big5.motif=-taipei-fixed-medium-r-normal--*-%d-*-*-c-*-big5-0
allfonts.lucida=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
serif.plain.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.plain.latin-1=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.plain.latin-1.motif=-b&h-luxi serif-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.bold.latin-1=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.latin-1.motif=-b&h-luxi serif-bold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.italic.latin-1=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.latin-1.motif=-b&h-luxi serif-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
serif.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
serif.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
serif.bolditalic.latin-1=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.latin-1.motif=-b&h-luxi serif-bold-i-normal--*-%d-*-*-p-*-iso8859-1
sansserif.plain.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.plain.latin-1.motif=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1
sansserif.bold.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.latin-1.motif=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1
sansserif.italic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.latin-1.motif=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
sansserif.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
sansserif.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
sansserif.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.latin-1.motif=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1
monospaced.plain.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.plain.latin-1.motif=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.bold.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.latin-1.motif=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
monospaced.italic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.latin-1.motif=-b&h-luxi mono-medium-i-normal--*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
monospaced.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
monospaced.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
monospaced.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.latin-1.motif=-b&h-luxi mono-bold-i-normal--*-%d-*-*-m-*-iso8859-1
dialog.plain.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.plain.latin-1.motif=-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1
dialog.bold.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.latin-1.motif=-b&h-luxi sans-bold-r-normal--*-%d-*-*-p-*-iso8859-1
dialog.italic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.latin-1.motif=-b&h-luxi sans-medium-i-normal--*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.japanese-x0208=-misc-kochi gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialog.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialog.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialog.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.latin-1.motif=-b&h-luxi sans-bold-i-normal--*-%d-*-*-p-*-iso8859-1
dialoginput.plain.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.plain.latin-1.motif=-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.bold.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.latin-1.motif=-b&h-luxi mono-bold-r-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.italic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.latin-1.motif=-b&h-luxi mono-medium-i-normal--*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.japanese-x0208=-misc-kochi mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
dialoginput.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1
dialoginput.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
dialoginput.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.latin-1.motif=-b&h-luxi mono-bold-i-normal--*-%d-*-*-m-*-iso8859-1
# Search Sequences
sequence.allfonts=latin-1
sequence.allfonts.Big5=latin-1,chinese-big5
sequence.allfonts.GB2312=latin-1,chinese-gb18030
sequence.allfonts.x-euc-jp-linux=latin-1,japanese-x0208
sequence.allfonts.EUC-KR=latin-1,korean
sequence.allfonts.GB18030=latin-1,chinese-gb18030
sequence.fallback=lucida,chinese-big5,chinese-gb18030,japanese-x0208,korean
# Exclusion Ranges
exclusion.japanese-x0208=0390-03d6,2200-22ef,2701-27be
# Font File Names
filename.-arphic_technology_co.-ar_pl_mingti2l_big5-medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts/bsmi00lp.ttf
filename.-misc-baekmuk_batang-medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/batang.ttf
filename.-misc-baekmuk_gulim-medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/gulim.ttf
filename.-misc-kochi_gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
filename.-misc-kochi_mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
filename.-misc-ming for iso10646 -medium-r-normal--*-%d-*-*-c-*-iso10646-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/hkscs-ming/min_uni.ttf
# AWT X11 font paths
awtfontpath.latin-1=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/Type1
awtfontpath.chinese-big5=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts
awtfontpath.chinese-gb18030=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts
awtfontpath.japanese-x0208=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/kochi-substitute
awtfontpath.korean=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts

View file

@ -1,17 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
VERSION="Oracle JDK @PV@"
JAVA_HOME="@GENTOO_PORTAGE_EPREFIX@/opt/@P@"
JDK_HOME="@GENTOO_PORTAGE_EPREFIX@/opt/@P@"
JAVAC=${JAVA_HOME}/bin/javac
PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
LDPATH="${JAVA_HOME}/jre/lib/@PLATFORM@/:${JAVA_HOME}/jre/lib/@PLATFORM@/xawt/:${JAVA_HOME}/jre/lib/@PLATFORM@/server/"
MANPATH="@GENTOO_PORTAGE_EPREFIX@/opt/@P@/man"
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="1.7"
BOOTCLASSPATH="${JAVA_HOME}/jre/lib/resources.jar:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/sunrsasign.jar:${JAVA_HOME}/jre/lib/jsse.jar:${JAVA_HOME}/jre/lib/jce.jar:${JAVA_HOME}/jre/lib/charsets.jar:${JAVA_HOME}/jre/classes"
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"

View file

@ -1,16 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
VERSION="Oracle JDK ${PV}"
JAVA_HOME="${EPREFIX}/opt/${P}"
JDK_HOME="${EPREFIX}/opt/${P}"
JAVAC="\${JAVA_HOME}/bin/javac"
PATH="\${JAVA_HOME}/bin:\${JAVA_HOME}/jre/bin"
ROOTPATH="\${JAVA_HOME}/bin:\${JAVA_HOME}/jre/bin"
LDPATH="\${JAVA_HOME}/jre/lib/$(get_system_arch)/:\${JAVA_HOME}/jre/lib/$(get_system_arch)/server/"
MANPATH="${EPREFIX}/opt/${P}/man"
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="${SLOT}"
BOOTCLASSPATH="\${JAVA_HOME}/jre/lib/resources.jar:\${JAVA_HOME}/jre/lib/rt.jar:\${JAVA_HOME}/jre/lib/sunrsasign.jar:\${JAVA_HOME}/jre/lib/jsse.jar:\${JAVA_HOME}/jre/lib/jce.jar:\${JAVA_HOME}/jre/lib/charsets.jar:\${JAVA_HOME}/jre/classes"
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"

View file

@ -1,243 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="6"
inherit eutils java-vm-2 prefix versionator
MY_PV="$(get_version_component_range 2)u$(get_version_component_range 4)"
S_PV="$(replace_version_separator 3 '_')"
# This URIs need to be updated when bumping!
JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html#jdk-${MY_PV}-oth-JPR"
JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html"
# This is a list of archs supported by this update.
# Currently arm comes and goes.
AT_AVAILABLE=( amd64 x86 )
# Sometimes some or all of the demos are missing, this is to not have to rewrite half
# the ebuild when it happens.
DEMOS_AVAILABLE=( )
#amd64 x86 x64-solaris x86-solaris sparc-solaris sparc64-solaris x86-macos x64-macos )
FX_VERSION="2_2_$(get_version_component_range 4)"
AT_x86="jdk-${MY_PV}-linux-i586.tar.gz"
AT_amd64="jdk-${MY_PV}-linux-x64.tar.gz"
FXDEMOS_linux="javafx_samples-${FX_VERSION}-linux.zip"
DEMOS_x86="${FXDEMOS_linux} jdk-${MY_PV}-linux-i586-demos.tar.gz"
DEMOS_amd64="${FXDEMOS_linux} jdk-${MY_PV}-linux-x64-demos.tar.gz"
JCE_DIR="UnlimitedJCEPolicy"
JCE_FILE="${JCE_DIR}JDK7.zip"
DESCRIPTION="Oracle's Java SE Development Kit"
HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
for d in "${AT_AVAILABLE[@]}"; do
SRC_URI+=" ${d}? ("
SRC_URI+=" $(eval "echo \${$(echo AT_${d/-/_})}")"
if has ${d} "${DEMOS_AVAILABLE[@]}"; then
SRC_URI+=" examples? ( $(eval "echo \${$(echo DEMOS_${d/-/_})}") )"
fi
SRC_URI+=" )"
done
unset d
SRC_URI+=" jce? ( ${JCE_FILE} )"
LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
SLOT="1.7"
KEYWORDS="amd64 x86"
IUSE="+X alsa aqua derby doc examples +fontconfig jce nsplugin pax_kernel selinux source"
RESTRICT="fetch strip"
QA_PREBUILT="*"
COMMON_DEP=""
RDEPEND="${COMMON_DEP}
X? ( !aqua? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXi
x11-libs/libXrender
x11-libs/libXtst
) )
alsa? ( media-libs/alsa-lib )
doc? ( dev-java/java-sdk-docs:1.7 )
fontconfig? ( media-libs/fontconfig )
!prefix? ( sys-libs/glibc )
selinux? ( sec-policy/selinux-java )"
# scanelf won't create a PaX header, so depend on paxctl to avoid fallback
# marking. #427642
DEPEND="${COMMON_DEP}
jce? ( app-arch/unzip )
examples? ( kernel_linux? ( app-arch/unzip ) )
pax_kernel? ( sys-apps/paxctl )"
S="${WORKDIR}"/jdk${S_PV}
check_tarballs_available() {
local uri=$1; shift
local dl= unavailable=
for dl in "${@}"; do
[[ ! -f "${DISTDIR}/${dl}" ]] && unavailable+=" ${dl}"
done
if [[ -n "${unavailable}" ]]; then
if [[ -z ${_check_tarballs_available_once} ]]; then
einfo
einfo "Oracle requires you to download the needed files manually after"
einfo "accepting their license through a javascript capable web browser."
einfo
_check_tarballs_available_once=1
fi
einfo "Download the following files:"
for dl in ${unavailable}; do
einfo " ${dl}"
done
einfo "at '${uri}'"
einfo "and move them to '${DISTDIR}'"
einfo
einfo "If the above mentioned urls do not point to the correct version anymore,"
einfo "please download the files from Oracle's java download archive:"
einfo
einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-${MY_PV}-oth-JPR"
einfo
fi
}
pkg_nofetch() {
local distfiles=( $(eval "echo \${$(echo AT_${ARCH/-/_})}") )
if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
distfiles+=( $(eval "echo \${$(echo DEMOS_${ARCH/-/_})}") )
fi
check_tarballs_available "${JDK_URI}" "${distfiles[@]}"
use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}"
}
src_prepare() {
if use jce; then
mv "${WORKDIR}"/${JCE_DIR} "${S}"/jre/lib/security/ || die
fi
eapply_user
}
src_install() {
local dest="/opt/${P}"
local ddest="${ED}${dest}"
# Create files used as storage for system preferences.
mkdir jre/.systemPrefs || die
touch jre/.systemPrefs/.system.lock || die
touch jre/.systemPrefs/.systemRootModFile || die
# We should not need the ancient plugin for Firefox 2 anymore, plus it has
# writable executable segments
if use x86; then
rm -vf {,jre/}lib/i386/libjavaplugin_oji.so \
{,jre/}lib/i386/libjavaplugin_nscp*.so
rm -vrf jre/plugin/i386
fi
# Without nsplugin flag, also remove the new plugin
local arch=${ARCH};
use x86 && arch=i386;
if ! use nsplugin; then
rm -vf {,jre/}lib/${arch}/libnpjp2.so \
{,jre/}lib/${arch}/libjavaplugin_jni.so
fi
dodoc COPYRIGHT
docinto html
dodoc README.html
dodir "${dest}"
cp -pPR bin include jre lib man "${ddest}" || die
if use derby; then
cp -pPR db "${ddest}" || die
fi
if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
cp -pPR demo sample "${ddest}" || die
if use kernel_linux; then
cp -pPR "${WORKDIR}"/javafx-samples-${FX_VERSION//_/.} \
"${ddest}"/javafx-samples || die
fi
fi
if use jce; then
dodir "${dest}"/jre/lib/security/strong-jce
mv "${ddest}"/jre/lib/security/US_export_policy.jar \
"${ddest}"/jre/lib/security/strong-jce || die
mv "${ddest}"/jre/lib/security/local_policy.jar \
"${ddest}"/jre/lib/security/strong-jce || die
dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \
"${dest}"/jre/lib/security/US_export_policy.jar
dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \
"${dest}"/jre/lib/security/local_policy.jar
fi
# if use nsplugin; then
# install_mozilla_plugin "${dest}"/jre/lib/${arch}/libnpjp2.so
# fi
if use source; then
cp -p src.zip "${ddest}" || die
fi
if use !arm ; then
# Install desktop file for the Java Control Panel.
# Using ${PN}-${SLOT} to prevent file collision with jre and or
# other slots. make_desktop_entry can't be used as ${P} would
# end up in filename.
newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
sun-jcontrol-${PN}-${SLOT}.png || die
sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
-e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
-e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
-e "s#Application;##" \
-e "/Encoding/d" \
jre/lib/desktop/applications/sun_java.desktop \
> "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
fi
# Prune all fontconfig files so libfontconfig will be used and only install
# a Gentoo specific one if fontconfig is disabled.
# http://docs.oracle.com/javase/7/docs/technotes/guides/intl/fontconfig.html
rm "${ddest}"/jre/lib/fontconfig.*
if ! use fontconfig; then
cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
eprefixify "${T}"/fontconfig.properties
insinto "${dest}"/jre/lib/
doins "${T}"/fontconfig.properties
fi
# This needs to be done before CDS - #215225
java-vm_set-pax-markings "${ddest}"
# see bug #207282
einfo "Creating the Class Data Sharing archives"
case ${ARCH} in
arm|ia64)
${ddest}/bin/java -client -Xshare:dump || die
;;
x86)
${ddest}/bin/java -client -Xshare:dump || die
# limit heap size for large memory on x86 #467518
# this is a workaround and shouldn't be needed.
${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
;;
*)
${ddest}/bin/java -server -Xshare:dump || die
;;
esac
# Remove empty dirs we might have copied
find "${D}" -type d -empty -exec rmdir -v {} + || die
set_java_env
java-vm_revdep-mask
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
}

View file

@ -1,291 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit desktop gnome2-utils java-vm-2 prefix versionator
KEYWORDS="-* amd64 x86"
if [[ "$(get_version_component_range 4)" == 0 ]] ; then
S_PV="$(get_version_component_range 1-3)"
else
MY_PV_EXT="u$(get_version_component_range 4)"
S_PV="$(get_version_component_range 1-4)"
fi
MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
declare -A ARCH_FILES
ARCH_FILES[amd64]="jdk-${MY_PV}-linux-x64.tar.gz"
ARCH_FILES[arm]="jdk-${MY_PV}-linux-arm32-vfp-hflt.tar.gz"
ARCH_FILES[arm64]="jdk-${MY_PV}-linux-arm64-vfp-hflt.tar.gz"
ARCH_FILES[x86]="jdk-${MY_PV}-linux-i586.tar.gz"
ARCH_FILES[x64-macos]="jdk-${MY_PV}-macosx-x64.dmg"
ARCH_FILES[sparc64-solaris]="jdk-${MY_PV}-solaris-sparcv9.tar.gz"
ARCH_FILES[x64-solaris]="jdk-${MY_PV}-solaris-x64.tar.gz"
for keyword in ${KEYWORDS//-\*} ; do
case "${keyword#\~}" in
*-linux) continue ;;
x64-macos) demo="jdk-${MY_PV}-macosx-x86_64-demos.zip" ;;
*) demo=${ARCH_FILES[${keyword#\~}]/./-demos.} ;;
esac
SRC_URI+="
${keyword#\~}? (
${ARCH_FILES[${keyword#\~}]}
)"
done
DESCRIPTION="Oracle's Java SE Development Kit"
HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
LICENSE="Oracle-BCLA-JavaSE"
SLOT="1.8"
IUSE="alsa commercial cups doc +fontconfig headless-awt javafx jce nsplugin selinux source visualvm"
REQUIRED_USE="javafx? ( alsa fontconfig )"
RESTRICT="bindist fetch preserve-libs strip"
QA_PREBUILT="*"
# NOTES:
#
# * cups is dlopened.
#
# * libpng is also dlopened but only by libsplashscreen, which isn't
# important, so we can exclude that.
#
# * We still need to work out the exact AWT and JavaFX dependencies
# under MacOS. It doesn't appear to use many, if any, of the
# dependencies below.
#
RDEPEND="!x64-macos? (
!headless-awt? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXi
x11-libs/libXrender
x11-libs/libXtst
)
javafx? (
dev-libs/glib:2
dev-libs/libxml2:2
dev-libs/libxslt
media-libs/freetype:2
x11-libs/cairo
x11-libs/gtk+:2
x11-libs/libX11
x11-libs/libXtst
x11-libs/libXxf86vm
x11-libs/pango
virtual/opengl
)
)
alsa? ( media-libs/alsa-lib )
cups? ( net-print/cups )
doc? ( dev-java/java-sdk-docs:${SLOT} )
fontconfig? ( media-libs/fontconfig:1.0 )
!prefix? ( sys-libs/glibc:* )
selinux? ( sec-policy/selinux-java )"
DEPEND="app-arch/zip"
S="${WORKDIR}/jdk$(replace_version_separator 3 _ ${S_PV})"
pkg_nofetch() {
local a
einfo "Please download these files and move them to your distfiles directory:"
einfo
for a in ${A} ; do
[[ ! -f ${DISTDIR}/${a} ]] && einfo " ${a}"
done
einfo
einfo " http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
einfo
einfo "If the above mentioned URL does not point to the correct version anymore,"
einfo "please download the file from Oracle's Java download archive:"
einfo
einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html"
einfo
}
src_unpack() {
if use x64-macos ; then
mkdir -p "${T}"/dmgmount || die
hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
-mountpoint "${T}"/dmgmount || die
local jdkgen=$(get_version_component_range 2)
local uver=$(get_version_component_range 4)
( cd "${T}" &&
xar -xf "${T}/dmgmount/JDK ${jdkgen} Update ${uver}.pkg" \
jdk${PV//.}.pkg/Payload ) || die
zcat "${T}"/jdk${PV//.}.pkg/Payload | cpio -idv || die
hdiutil detach "${T}"/dmgmount || die
mv Contents/Home "${S}" || die
fi
default
}
src_prepare() {
default
if [[ -n ${JAVA_PKG_STRICT} ]] ; then
# Mark this binary early to run it now.
pax-mark m ./bin/javap
eqawarn "Ensure that this only calls trackJavaUsage(). If not, see bug #559936."
eqawarn
eqawarn "$(./bin/javap -J-Duser.home=${T} -c sun.misc.PostVMInitHook || die)"
fi
# Remove the hook that calls Oracle's evil usage tracker. Not just
# because it's evil but because it breaks the sandbox during builds
# and we can't find any other feasible way to disable it or make it
# write somewhere else. See bug #559936 for details.
zip -d jre/lib/rt.jar sun/misc/PostVMInitHook.class || die
}
src_install() {
local dest="/opt/${P}"
local ddest="${ED}${dest#/}"
# Create files used as storage for system preferences.
mkdir jre/.systemPrefs || die
touch jre/.systemPrefs/.system.lock || die
touch jre/.systemPrefs/.systemRootModFile || die
if ! use alsa ; then
rm -vf jre/lib/*/libjsoundalsa.* || die
fi
if ! use commercial ; then
rm -vfr lib/missioncontrol jre/lib/jfr* || die
fi
if use headless-awt ; then
rm -vf {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
{,jre/}bin/{javaws,policytool} \
bin/appletviewer || die
fi
if ! use javafx ; then
rm -vf jre/lib/*/lib*{decora,fx,glass,prism}* \
jre/lib/*/libgstreamer-lite.* {,jre/}lib/{,ext/}*fx* \
bin/*javafx* bin/javapackager || die
fi
if ! use nsplugin ; then
rm -vf jre/lib/*/libnpjp2.* || die
else
local nsplugin=$(echo jre/lib/*/libnpjp2.*)
local nsplugin_link=${nsplugin##*/}
nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
fi
# Even though plugins linked against multiple ffmpeg versions are
# provided, they generally lag behind what Gentoo has available.
rm -vf jre/lib/*/libavplugin* || die
# Prune all fontconfig files so that libfontconfig will be used.
rm -v jre/lib/fontconfig.* || die
# Packaged as dev-util/visualvm but some users prefer this version.
use visualvm || find -name "*visualvm*" -exec rm -vfr {} + || die
# Install desktop file for the Java Control Panel. Using
# ${PN}-${SLOT} to prevent file collision with JRE and other slots.
if [[ -d jre/lib/desktop/icons ]] ; then
local icon
pushd jre/lib/desktop/icons >/dev/null || die
for icon in */*/apps/sun-jcontrol.png ; do
insinto /usr/share/icons/"${icon%/*}"
newins "${icon}" sun-jcontrol-${PN}-${SLOT}.png
done
popd >/dev/null || die
make_desktop_entry \
"${dest}"/bin/jcontrol \
"Java Control Panel for Oracle JDK ${SLOT}" \
sun-jcontrol-${PN}-${SLOT} \
"Settings;Java;"
fi
dodoc COPYRIGHT
dodir "${dest}"
cp -pPR bin include jre lib man "${ddest}" || die
ln -s policy/$(usex jce unlimited limited)/{US_export,local}_policy.jar \
"${ddest}"/jre/lib/security/ || die
if use source ; then
cp -v src.zip "${ddest}" || die
if use javafx ; then
cp -v javafx-src.zip "${ddest}" || die
fi
fi
# Only install Gentoo-specific fontconfig if flag is disabled.
# https://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
if ! use fontconfig ; then
insinto "${dest}"/jre/lib/
doins "$(prefixify_ro "${FILESDIR}"/fontconfig.properties)"
fi
# Needs to be done before CDS, bug #215225.
java-vm_set-pax-markings "${ddest}"
# See bug #207282.
einfo "Creating the Class Data Sharing archives"
case ${ARCH} in
arm|ia64)
${ddest}/bin/java -client -Xshare:dump || die
;;
x86)
${ddest}/bin/java -client -Xshare:dump || die
# limit heap size for large memory on x86 #467518
# this is a workaround and shouldn't be needed.
${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
;;
*)
${ddest}/bin/java -server -Xshare:dump || die
;;
esac
# Remove empty dirs we might have copied.
find "${D}" -type d -empty -exec rmdir -v {} + || die
if use x64-macos ; then
local lib
for lib in lib{decora_sse,glass,prism_{common,es2,sw}}.dylib ; do
ebegin "Fixing self-reference of ${lib}"
install_name_tool \
-id "${EPREFIX}${dest}"/jre/lib/${lib} \
"${ddest}"/jre/lib/${lib} || die
eend $?
done
fi
java-vm_install-env "${FILESDIR}"/${PN}.env.sh
java-vm_revdep-mask
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
gnome2_icon_cache_update
java-vm-2_pkg_postinst
if ! use headless-awt && ! use javafx ; then
ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
ewarn "require this and they may fail with a confusing error message."
fi
}
pkg_postrm() {
gnome2_icon_cache_update
java-vm-2_pkg_postrm
}

View file

@ -1,9 +0,0 @@
AUX 20php5-envd 145 BLAKE2B 06476b8fc04d1e835496b417ac752f0834ddbe8584e4fddc6db0aa5e6845b82cdea0a1355c77125375dcdd0f0a3c19de5f3a8a64ee93950f96c437a16f971567 SHA512 581aa86479e3cd584ee1bc6dc6d4a135fe8ec343fe5519566d728d81f7018cfb23658bd0c0368951d380982c75adbb4f45acf3c146868aaf4e4ec8e9f2fad1ce
AUX php-fpm_at-simple.service 316 BLAKE2B 0ba10f3e3b004fbf14956e1e4f04f59b8a127e6717fe6b92c09b9f931033a11551c75fbbee9010f6b694c5a8758ca0eec9eed457ae304ba0dea8f2c256c3b8d4 SHA512 7367a3f8d3874f8e0c76f331ba613a0250db02f60ad9f87affaf448dcb5bc34bcecb91d88f415764a12b24b46ae3d1b738a002af9f77a4b707e916e83a0021fd
AUX php-fpm_at.service 317 BLAKE2B f13fc38fcc0575a8517ee8d07b120efda37eabd2355061d0fdc303604c6b02ad42d7301180d86c977d5e585f5dd685343c592e37a6e0f44933707be79e0b77e0 SHA512 27982f9e2d958bfa75c89c7d3531e48d17fc388b1cdcbc8e09051b236b1184ee2baabdfcc567c19d9fcd067d4b3b86f171015616d8da42fccdabd89432d865e8
AUX php-icu-70.patch 1833 BLAKE2B f184d3ae52c6fc25329cbcd01abda2680739ebe29d1b4a97a3aaf6697b4dff385bdf423a4e41571ca534a57e35797a017c4bb507ce74db7f0a26455f90869e40 SHA512 f820320784ab7c99c23ac563b4908f33b6407204ad0486611e3471d7576477c016928534bb396587558061bc5d98e2deab4ad99e49b6c2746bfd06de729c7ae7
AUX php-icu-fix.patch 404 BLAKE2B 9ddd108f1817f54eb1c3d20dfe7eda1f3a618f56bb44d89a174fec36c576363bc3e80b9b348fae67dbbd897ba18ce2f97b8b70b46a7b80382f8a68f5be40d84d SHA512 57aa49c580c489497bc54f2824c1f99fd104e7b1b7c524b7a0626ddcd28ed1c1867d1ada171ae381905c872b1ae564c0515e574c05e6d468f263b038b2f4597a
DIST php-5.6.40.tar.xz 12472236 BLAKE2B f41147eaec9b15e965540f9e871691cc88848dd619bae6af85e7bba0130b71ce91bad5cdbbadbb537c42df83369f5c731007339a9d9e21e689e913c135201afc SHA512 997b5a952a60cf9166671cc91fcc34c674dd62bfd5cb0a9cdf3fdf2d088b5d19943d94c1cf193f8ab71fc4957d9a9a4c7c2fb8826f937501c1c0a0858f10e329
DIST php-patches-7.1.33bp.tar.bz2 39945 BLAKE2B 9f7137f61b7ea07cc263b054401a319042f5a40d6cdaf3561a45778ae009e3279c72f2a6a0f9c97805bc39acef1c8c9d72d290c2ce873f44209fb2d65d620810 SHA512 8e36fb57bdadfcc4e976ecb7dc8f44290dc3b507eb27f4445aa2c8eba528e7cb53286e7fd9b1b9141f12fd6e29278282e4f0eb6445ed06046dd48a1d5d1bc789
EBUILD php-5.6.40-r7.ebuild 23052 BLAKE2B 799886bc2362de5e0914c5f7426101b303ebdaf242ef4c01a3561d3b3ac328a5b5253c96cb742e09adb0896ebd61a6063a81f8bc6333987c674273c24b99beeb SHA512 6050f731fb361e926248d10df4702a167513231fdf3081a08b93410c8bab37fab57e2df11900d08263fab6ee5321f5828d41234e79799ed8ce0c5d80a99e4abd
MISC metadata.xml 3352 BLAKE2B 155c08bb52b049c3f79557d27ab6be9402cd35797cd385d53fc8c239c0eca089f65e106d54beca0642b8d182bfd0e172886b863a692575e9002140af7a62fa08 SHA512 f37c4c7b709bf91da6db41b0468c36cebffc630dabdcf4d43259017be5cf0577bb329ed0e206ff14d68bacc33425fba4789fc13fa34aa61acccce9fda11eee86

View file

@ -1,2 +0,0 @@
MANPATH="/usr/lib/php5/man/"
CONFIG_PROTECT_MASK="/etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/"

View file

@ -1,13 +0,0 @@
[Unit]
Description=The PHP FastCGI Process Manager
After=network.target
[Service]
Type=simple
PIDFile=/run/php-fpm/php-fpm-%I.pid
ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View file

@ -1,14 +0,0 @@
[Unit]
Description=The PHP FastCGI Process Manager
After=network.target
[Service]
Type=notify
PIDFile=/run/php-fpm/php-fpm-%I.pid
ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View file

@ -1,42 +0,0 @@
diff -Naur a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp 2022-02-12 10:06:56.410352885 +0100
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp 2022-02-12 10:07:41.236949927 +0100
@@ -74,7 +74,11 @@
clearCurrentCharIter();
}
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
+#else
UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
+#endif
{
if (typeid(*this) != typeid(that)) {
return FALSE;
diff -Naur a/ext/intl/breakiterator/codepointiterator_internal.h b/ext/intl/breakiterator/codepointiterator_internal.h
--- a/ext/intl/breakiterator/codepointiterator_internal.h 2022-02-12 10:06:56.410352885 +0100
+++ b/ext/intl/breakiterator/codepointiterator_internal.h 2022-02-12 10:07:41.236949927 +0100
@@ -39,7 +39,11 @@
virtual ~CodePointBreakIterator();
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+ virtual bool operator==(const BreakIterator& that) const;
+#else
virtual UBool operator==(const BreakIterator& that) const;
+#endif
virtual CodePointBreakIterator* clone(void) const;
diff -Naur a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
--- a/ext/intl/locale/locale_methods.c 2019-01-09 10:54:13.000000000 +0100
+++ b/ext/intl/locale/locale_methods.c 2022-02-12 10:08:21.679684186 +0100
@@ -1324,7 +1324,7 @@
if( token && (token==cur_lang_tag) ){
/* check if the char. after match is SEPARATOR */
chrcheck = token + (strlen(cur_loc_range));
- if( isIDSeparator(*chrcheck) || isEndOfTag(*chrcheck) ){
+ if( isIDSeparator(*chrcheck) || isKeywordSeparator(*chrcheck) || isEndOfTag(*chrcheck) ){
if( cur_lang_tag){
efree( cur_lang_tag );
}

View file

@ -1,12 +0,0 @@
--- php-5.6.40/acinclude.m4 2021-01-31 11:00:18.549678215 +0100
+++ php-5.6.40/acinclude.m4 2021-01-31 11:01:50.030900044 +0100
@@ -2212,6 +2212,9 @@
if test "$PKG_CONFIG icu-io --atleast-version=60"; then
ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
fi
+
+ ICU_CFLAGS="$ICU_CFLAGS -DU_DEFINE_FALSE_AND_TRUE=1"
+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_DEFINE_FALSE_AND_TRUE=1"
])
dnl

View file

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>php-bugs@gentoo.org</email>
<name>PHP</name>
</maintainer>
<use>
<flag name="argon2">Enable password hashing algorithm from <pkg>app-crypt/argon2</pkg></flag>
<flag name="bcmath">Add support for libbcmath</flag>
<flag name="cli">Enable CLI SAPI</flag>
<flag name="coverage">
Include gcov symbols for test coverage and lcov reports. Only
useful for extension developers, and requires GCC.
</flag>
<flag name="ctype">Enable ctype functions</flag>
<flag name="embed">Enable embed SAPI </flag>
<flag name="enchant">Add supports Enchant spelling library. </flag>
<flag name="ffi"> Add foreign function interface (ffi extension) support</flag>
<flag name="fileinfo"> Add fileinfo extension support</flag>
<flag name="filter">Add filter extension support</flag>
<flag name="flatfile">Add dbm support for flat files</flag>
<flag name="fpm">Enable the FastCGI Process Manager SAPI</flag>
<flag name="gd">Adds support for gd (bundled with PHP)</flag>
<flag name="hash">Enable the hash extension</flag>
<flag name="inifile">Add dbm support for .ini files</flag>
<flag name="json">Enable JSON support</flag>
<flag name="ldap-sasl">Add SASL support for the PHP LDAP extension</flag>
<flag name="libmysqlclient">
Use libmyslclient driver for mysql, mysqli, PDO_Mysql (not recommended)
</flag>
<flag name="lmdb">Enable support for <pkg>dev-db/lmdb</pkg> db backend</flag>
<flag name="intl">
Enables the intl extension for extended internalization support
</flag>
<flag name="opcache">
Enables built-in opcode cache, replacing pecl-apc et al.
</flag>
<flag name="pcntl">Add support for process creation functions</flag>
<flag name="pdo">Enable the bundled PDO extensions</flag>
<flag name="phar">
Enables the phar extension to provide phar archive support
</flag>
<flag name="phpdbg">
Enable the PHP Debug Command Line SAPI (like gdb for php)
</flag>
<flag name="session-mm">
Include <pkg>dev-libs/mm</pkg> support for session storage
</flag>
<flag name="sharedmem">Add support for shared memory use</flag>
<flag name="simplexml">Support for SimpleXML</flag>
<flag name="sodium">
Enable support for crypto through <pkg>dev-libs/libsodium</pkg>
</flag>
<flag name="sybase-ct">Add support for Sybase-CT</flag>
<flag name="sysvipc">
Support for System V-compatible inter-process communication
</flag>
<flag name="tokenizer">Add support for the PHP file parser</flag>
<flag name="tokyocabinet">
Enable support for <pkg>dev-db/tokyocabinet</pkg> db backend</flag>
<flag name="xmlreader">Enable XMLReader support</flag>
<flag name="xmlwriter">Enable XMLWriter support</flag>
<flag name="xslt">Enable the XSL extension</flag>
<flag name="vpx">Enable webp support for GD in php-5.x</flag>
<flag name="wddx">Add support for Web Distributed Data eXchange</flag>
<flag name="webp">Enable webp support for GD in php-7.x</flag>
<flag name="zip-encryption">Enable ZIP file encryption from <pkg>dev-libs/libzip</pkg></flag>
</use>
</pkgmetadata>

View file

@ -1,795 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit autotools flag-o-matic systemd
PATCH_V="7.1.33bp"
DESCRIPTION="The PHP language runtime engine"
HOMEPAGE="https://secure.php.net/"
SRC_URI="https://php.net/distributions/${P}.tar.xz
https://gitweb.gentoo.org/proj/php-patches.git/snapshot/php-patches-${PATCH_V}.tar.bz2"
LICENSE="PHP-3.01
BSD
Zend-2.0
bcmath? ( LGPL-2.1+ )
fpm? ( BSD-2 )
gd? ( gd )
unicode? ( BSD-2 LGPL-2.1 )"
SLOT="$(ver_cut 1-2)"
KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
# We can build the following SAPIs in the given order
SAPIS="embed cli cgi fpm apache2"
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
IUSE="${IUSE}
${SAPIS/cli/+cli}
threads"
IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
coverage crypt +ctype curl debug
enchant exif +fileinfo +filter firebird
+flatfile ftp gd gdbm gmp +hash +iconv imap inifile
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
mhash mssql mysql libmysqlclient mysqli nls
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
readline recode selinux +session sharedmem
+simplexml snmp soap sockets spell sqlite ssl
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
# The supported (that is, autodetected) versions of BDB are listed in
# the ./configure script. Other versions *work*, but we need to stick to
# the ones that can be detected to avoid a repeat of bug #564824.
COMMON_DEPEND="
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
>=dev-libs/libpcre-8.32[unicode]
fpm? ( acl? ( sys-apps/acl ) )
apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
berkdb? ( || ( sys-libs/db:5.3
sys-libs/db:5.1
sys-libs/db:4.8
sys-libs/db:4.7
sys-libs/db:4.6
sys-libs/db:4.5 ) )
bzip2? ( app-arch/bzip2:0= )
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
cjk? ( !gd? (
virtual/jpeg:0
media-libs/libpng:0=
sys-libs/zlib:0=
) )
coverage? ( dev-util/lcov )
crypt? ( >=dev-libs/libmcrypt-2.4 )
curl? ( >=net-misc/curl-7.10.5 )
enchant? ( app-text/enchant )
exif? ( !gd? (
virtual/jpeg:0
media-libs/libpng:0=
sys-libs/zlib:0=
) )
firebird? ( dev-db/firebird )
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
gmp? ( dev-libs/gmp:0= )
iconv? ( virtual/libiconv )
imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
intl? ( dev-libs/icu:= )
iodbc? ( dev-db/libiodbc )
kerberos? ( virtual/krb5 )
ldap? ( >=net-nds/openldap-1.2.11 )
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
mssql? ( dev-db/freetds[mssql] )
libmysqlclient? (
mysql? ( <dev-db/mysql-connector-c-8.0:0= )
mysqli? ( <dev-db/mysql-connector-c-8.0:0= )
)
nls? ( sys-devel/gettext )
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
odbc? ( >=dev-db/unixODBC-1.8.13 )
postgres? ( dev-db/postgresql:* )
qdbm? ( dev-db/qdbm )
readline? ( sys-libs/readline:0= )
recode? ( app-text/recode )
sharedmem? ( dev-libs/mm )
simplexml? ( >=dev-libs/libxml2-2.6.8 )
snmp? ( >=net-analyzer/net-snmp-5.2 )
soap? ( >=dev-libs/libxml2-2.6.8 )
spell? ( >=app-text/aspell-0.50 )
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
ssl? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
)
sybase-ct? ( dev-db/freetds )
tidy? ( app-text/htmltidy )
truetype? (
=media-libs/freetype-2*
>=media-libs/t1lib-5.0.0
!gd? (
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
)
unicode? ( dev-libs/oniguruma:= )
vpx? ( media-libs/libvpx:0= )
wddx? ( >=dev-libs/libxml2-2.6.8 )
xml? ( >=dev-libs/libxml2-2.6.8 )
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
xpm? (
x11-libs/libXpm
virtual/jpeg:0
media-libs/libpng:0= sys-libs/zlib:0=
)
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
zip? ( sys-libs/zlib:0= )
zlib? ( sys-libs/zlib:0= )
"
RDEPEND="${COMMON_DEPEND}
virtual/mta
fpm? (
selinux? ( sec-policy/selinux-phpfpm )
systemd? ( sys-apps/systemd ) )"
DEPEND="${COMMON_DEPEND}
app-arch/xz-utils
>=sys-devel/bison-3.0.1
sys-devel/flex
>=sys-devel/m4-1.4.3
>=sys-devel/libtool-1.5.18"
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
REQUIRED_USE="
|| ( cli cgi fpm apache2 embed )
cli? ( ^^ ( readline libedit ) )
truetype? ( gd zlib )
vpx? ( gd zlib )
cjk? ( gd zlib )
exif? ( gd zlib )
xpm? ( gd zlib )
gd? ( zlib )
simplexml? ( xml )
soap? ( xml )
wddx? ( xml )
xmlrpc? ( || ( xml iconv ) )
xmlreader? ( xml )
xslt? ( xml )
ldap-sasl? ( ldap )
mhash? ( hash )
phar? ( hash )
recode? ( !imap !mysql !mysqli !libmysqlclient )
libmysqlclient? ( || (
mysql
mysqli
pdo
) )
qdbm? ( !gdbm )
readline? ( !libedit )
sharedmem? ( !threads )
"
PHP_MV="$(ver_cut 1)"
PATCHES=(
"${FILESDIR}"/php-icu-fix.patch
"${FILESDIR}"/php-icu-70.patch
)
php_install_ini() {
local phpsapi="${1}"
# work out where we are installing the ini file
php_set_ini_dir "${phpsapi}"
# Always install the production INI file, bug 611214.
local phpinisrc="php.ini-production-${phpsapi}"
cp php.ini-production "${phpinisrc}" || die
# default to /tmp for save_path, bug #282768
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
# Set the extension dir
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
-i "${phpinisrc}" || die
# Set the include path to point to where we want to find PEAR packages
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
dodir "${PHP_INI_DIR#${EPREFIX}}"
insinto "${PHP_INI_DIR#${EPREFIX}}"
newins "${phpinisrc}" php.ini
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
elog
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
if use opcache; then
elog "Adding opcache to $PHP_EXT_INI_DIR"
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
"${D}/${PHP_EXT_INI_DIR}"/opcache.ini
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
"${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
fi
# SAPI-specific handling
if [[ "${sapi}" == "fpm" ]] ; then
einfo "Installing FPM config file php-fpm.conf"
insinto "${PHP_INI_DIR#${EPREFIX}}"
doins sapi/fpm/php-fpm.conf
fi
dodoc php.ini-{development,production}
}
php_set_ini_dir() {
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
}
src_prepare() {
local patchdir="${WORKDIR}/php-patches-${PATCH_V}"
eapply "${patchdir}/"
eapply "${PATCHES[@]}"
# Copy test binaries from patches
local ext_src
for ext_src in exif iconv ; do
cp "${patchdir}/${ext_src}/"* "ext/${ext_src}/tests/" || die
done
# Change PHP branding
# Get the alpha/beta/rc version
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
-i configure.in || die "Unable to change PHP branding"
# Patch PHP to show Gentoo as the server platform
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
-i configure.in || die "Failed to fix server platform name"
# Prevent PHP from activating the Apache config,
# as we will do that ourselves
sed -i \
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
|| die
# Patch PHP to support heimdal instead of mit-krb5
if has_version "app-crypt/heimdal" ; then
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|| die "Failed to fix heimdal libname"
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|| die "Failed to fix heimdal crypt library reference"
fi
eapply_user
# Force rebuilding aclocal.m4
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
mv configure.in configure.ac || die
eautoreconf
if [[ ${CHOST} == *-darwin* ]] ; then
# http://bugs.php.net/bug.php?id=48795, bug #343481
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
fi
}
src_configure() {
addpredict /usr/share/snmp/mibs/.index #nowarn
addpredict /var/lib/net-snmp/mib_indexes #nowarn
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
# The php-fpm config file wants localstatedir to be ${EPREFIX}/var
# and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
local our_conf=(
--prefix="${PHP_DESTDIR}"
--mandir="${PHP_DESTDIR}/man"
--infodir="${PHP_DESTDIR}/info"
--libdir="${PHP_DESTDIR}/lib"
--with-libdir="$(get_libdir)"
--localstatedir="${EPREFIX}/var"
--without-pear
$(use_enable threads maintainer-zts)
)
our_conf+=(
$(use_enable bcmath bcmath)
$(use_with bzip2 bz2 "${EPREFIX}/usr")
$(use_enable calendar calendar)
$(use_enable coverage gcov)
$(use_enable ctype ctype)
$(use_with curl curl "${EPREFIX}/usr")
$(use_enable xml dom)
$(use_with enchant enchant "${EPREFIX}/usr")
$(use_enable exif exif)
$(use_enable fileinfo fileinfo)
$(use_enable filter filter)
$(use_enable ftp ftp)
$(use_with nls gettext "${EPREFIX}/usr")
$(use_with gmp gmp "${EPREFIX}/usr")
$(use_enable hash hash)
$(use_with mhash mhash "${EPREFIX}/usr")
$(use_with iconv iconv \
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
$(use_enable intl intl)
$(use_enable ipv6 ipv6)
$(use_enable json json)
$(use_with kerberos kerberos "${EPREFIX}/usr")
$(use_enable xml libxml)
$(use_with xml libxml-dir "${EPREFIX}/usr")
$(use_enable unicode mbstring)
$(use_with crypt mcrypt "${EPREFIX}/usr")
$(use_with mssql mssql "${EPREFIX}/usr")
$(use_with unicode onig "${EPREFIX}/usr")
$(use_with ssl openssl "${EPREFIX}/usr")
$(use_with ssl openssl-dir "${EPREFIX}/usr")
$(use_enable pcntl pcntl)
$(use_enable phar phar)
$(use_enable pdo pdo)
$(use_enable opcache opcache)
$(use_with postgres pgsql "${EPREFIX}/usr")
$(use_enable posix posix)
$(use_with spell pspell "${EPREFIX}/usr")
$(use_with recode recode "${EPREFIX}/usr")
$(use_enable simplexml simplexml)
$(use_enable sharedmem shmop)
$(use_with snmp snmp "${EPREFIX}/usr")
$(use_enable soap soap)
$(use_enable sockets sockets)
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
$(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
$(use_enable sysvipc sysvmsg)
$(use_enable sysvipc sysvsem)
$(use_enable sysvipc sysvshm)
$(use_with tidy tidy "${EPREFIX}/usr")
$(use_enable tokenizer tokenizer)
$(use_enable wddx wddx)
$(use_enable xml xml)
$(use_enable xmlreader xmlreader)
$(use_enable xmlwriter xmlwriter)
$(use_with xmlrpc xmlrpc)
$(use_with xslt xsl "${EPREFIX}/usr")
$(use_enable zip zip)
$(use_with zlib zlib "${EPREFIX}/usr")
$(use_enable debug debug)
)
# DBA support
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|| use qdbm ; then
our_conf+=( "--enable-dba${shared}" )
fi
# DBA drivers support
our_conf+=(
$(use_with cdb cdb)
$(use_with berkdb db4 "${EPREFIX}/usr")
$(use_enable flatfile flatfile)
$(use_with gdbm gdbm "${EPREFIX}/usr")
$(use_enable inifile inifile)
$(use_with qdbm qdbm "${EPREFIX}/usr")
)
# Support for the GD graphics library
our_conf+=(
$(use_with truetype freetype-dir "${EPREFIX}/usr")
$(use_with truetype t1lib "${EPREFIX}/usr")
$(use_enable cjk gd-jis-conv)
$(use_with gd jpeg-dir "${EPREFIX}/usr")
$(use_with gd png-dir "${EPREFIX}/usr")
$(use_with xpm xpm-dir "${EPREFIX}/usr")
$(use_with vpx vpx-dir "${EPREFIX}/usr")
)
# enable gd last, so configure can pick up the previous settings
our_conf+=( $(use_with gd gd) )
# IMAP support
if use imap ; then
our_conf+=(
$(use_with imap imap "${EPREFIX}/usr")
$(use_with ssl imap-ssl "${EPREFIX}/usr")
)
fi
# Interbase/firebird support
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
# LDAP support
if use ldap ; then
our_conf+=(
$(use_with ldap ldap "${EPREFIX}/usr")
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
)
fi
# MySQL support
local mysqllib="mysqlnd"
local mysqlilib="mysqlnd"
use libmysqlclient && mysqllib="${EPREFIX}/usr"
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
our_conf+=( $(use_with mysql mysql "${mysqllib}") )
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
if use mysql || use mysqli ; then
our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
fi
# ODBC support
our_conf+=(
$(use_with odbc unixODBC "${EPREFIX}/usr")
$(use_with iodbc iodbc "${EPREFIX}/usr")
)
# Oracle support
our_conf+=( $(use_with oci8-instant-client oci8) )
# PDO support
if use pdo ; then
our_conf+=(
$(use_with mssql pdo-dblib)
$(use_with mysql pdo-mysql "${mysqllib}")
$(use_with postgres pdo-pgsql)
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
$(use_with oci8-instant-client pdo-oci)
)
fi
# readline/libedit support
our_conf+=(
$(use_with readline readline "${EPREFIX}/usr")
$(use_with libedit libedit "${EPREFIX}/usr")
)
# Session support
if use session ; then
our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
else
our_conf+=( $(use_enable session session) )
fi
# Use pic for shared modules such as apache2's mod_php
our_conf+=( --with-pic )
# we use the system copy of pcre
# --with-pcre-regex affects ext/pcre
# --with-pcre-dir affects ext/filter and ext/zip
our_conf+=(
--with-pcre-regex="${EPREFIX}/usr"
--with-pcre-dir="${EPREFIX}/usr"
)
# Catch CFLAGS problems
# Fixes bug #14067.
# Changed order to run it in reverse for bug #32022 and #12021.
replace-cpu-flags "k6*" "i586"
# Cache the ./configure test results between SAPIs.
our_conf+=( --cache-file="${T}/config.cache" )
# Support user-passed configuration parameters
our_conf+=( ${EXTRA_ECONF:-} )
# Support the Apache2 extras, they must be set globally for all
# SAPIs to work correctly, especially for external PHP extensions
mkdir -p "${WORKDIR}/sapis-build" || die
for one_sapi in $SAPIS ; do
use "${one_sapi}" || continue
php_set_ini_dir "${one_sapi}"
# The BUILD_DIR variable is used to determine where to output
# the files that autotools creates. This was all originally
# based on the autotools-utils eclass.
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
cp -a "${S}" "${BUILD_DIR}" || die
cd "${BUILD_DIR}" || die
local sapi_conf=(
--with-config-file-path="${PHP_INI_DIR}"
--with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
)
for sapi in $SAPIS ; do
case "$sapi" in
cli|cgi|embed|fpm)
if [[ "${one_sapi}" == "${sapi}" ]] ; then
sapi_conf+=( "--enable-${sapi}" )
if [[ "fpm" == "${sapi}" ]] ; then
sapi_conf+=(
$(use_with acl fpm-acl)
$(use_with systemd fpm-systemd)
)
fi
else
sapi_conf+=( "--disable-${sapi}" )
fi
;;
apache2)
if [[ "${one_sapi}" == "${sapi}" ]] ; then
sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
else
sapi_conf+=( --without-apxs2 )
fi
;;
esac
done
# Construct the $myeconfargs array by concatenating $our_conf
# (the common args) and $sapi_conf (the SAPI-specific args).
local myeconfargs=( "${our_conf[@]}" )
myeconfargs+=( "${sapi_conf[@]}" )
pushd "${BUILD_DIR}" > /dev/null || die
econf "${myeconfargs[@]}"
popd > /dev/null || die
done
}
src_compile() {
# snmp seems to run during src_compile, too (bug #324739)
addpredict /usr/share/snmp/mibs/.index #nowarn
addpredict /var/lib/net-snmp/mib_indexes #nowarn
for sapi in ${SAPIS} ; do
if use "${sapi}"; then
cd "${WORKDIR}/sapis-build/$sapi" || \
die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
emake
fi
done
}
src_install() {
# see bug #324739 for what happens when we don't have that
addpredict /usr/share/snmp/mibs/.index #nowarn
# grab the first SAPI that got built and install common files from there
local first_sapi=""
for sapi in $SAPIS ; do
if use $sapi ; then
first_sapi=$sapi
break
fi
done
# Makefile forgets to create this before trying to write to it...
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
# Install php environment (without any sapis)
cd "${WORKDIR}/sapis-build/$first_sapi" || die
emake INSTALL_ROOT="${D}" \
install-build install-headers install-programs
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
# Create the directory where we'll put version-specific php scripts
keepdir "/usr/share/php${PHP_MV}"
local sapi="", file=""
local sapi_list=""
for sapi in ${SAPIS}; do
if use "${sapi}" ; then
einfo "Installing SAPI: ${sapi}"
cd "${WORKDIR}/sapis-build/${sapi}" || die
if [[ "${sapi}" == "apache2" ]] ; then
# We're specifically not using emake install-sapi as libtool
# may cause unnecessary relink failures (see bug #351266)
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
newins ".libs/libphp5$(get_libname)" \
"libphp${PHP_MV}$(get_libname)"
keepdir "/usr/$(get_libdir)/apache2/modules"
else
# needed each time, php_install_ini would reset it
local dest="${PHP_DESTDIR#${EPREFIX}}"
into "${dest}"
case "$sapi" in
cli)
source="sapi/cli/php"
;;
cgi)
source="sapi/cgi/php-cgi"
;;
fpm)
source="sapi/fpm/php-fpm"
;;
embed)
source="libs/libphp${PHP_MV}$(get_libname)"
;;
*)
die "unhandled sapi in src_install"
;;
esac
if [[ "${source}" == *"$(get_libname)" ]]; then
dolib.so "${source}"
else
dobin "${source}"
local name="$(basename ${source})"
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
fi
fi
php_install_ini "${sapi}"
# construct correct SAPI string for php-config
# thanks to ferringb for the bash voodoo
if [[ "${sapi}" == "apache2" ]]; then
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
else
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
fi
fi
done
# Installing opcache module
if use opcache ; then
into "${PHP_DESTDIR#${EPREFIX}}"
dolib.so "modules/opcache$(get_libname)"
fi
# Install env.d files
newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
# set php-config variable correctly (bug #278439)
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
if use fpm ; then
if use systemd; then
systemd_newunit "${FILESDIR}/php-fpm_at.service" \
"php-fpm@${SLOT}.service"
else
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
"php-fpm@${SLOT}.service"
fi
fi
}
src_test() {
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
if [[ ! -x "${PHP_BIN}" ]] ; then
ewarn "Test phase requires USE=cli, skipping"
return
else
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
fi
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
fi
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
"session.save_path=${T}" \
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
"session.save_path=${T}"
for name in ${EXPECTED_TEST_FAILURES}; do
mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
done
local failed="$(find -name '*.out')"
if [[ ${failed} != "" ]] ; then
ewarn "The following test cases failed unexpectedly:"
for name in ${failed}; do
ewarn " ${name/.out/}"
done
else
einfo "No unexpected test failures, all fine"
fi
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
local passed=""
for name in ${EXPECTED_TEST_FAILURES}; do
[[ -f "${name}.diff" ]] && continue
passed="${passed} ${name}"
done
if [[ ${passed} != "" ]] ; then
einfo "The following test cases passed unexpectedly:"
for name in ${passed}; do
ewarn " ${passed}"
done
else
einfo "None of the known-to-fail tests passed, all fine"
fi
fi
}
pkg_postinst() {
# Output some general info to the user
if use apache2 ; then
elog
elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
elog "your apache2 command. OpenRC users can append that string to"
elog "APACHE2_OPTS in /etc/conf.d/apache2."
elog
elog "The apache module configuration file 70_mod_php.conf is"
elog "provided (and maintained) by eselect-php."
elog
fi
# Create the symlinks for php
for m in ${SAPIS}; do
[[ ${m} == 'embed' ]] && continue;
if use $m ; then
local ci=$(eselect php show $m)
if [[ -z $ci ]]; then
eselect php set $m php${SLOT} || die
einfo "Switched ${m} to use php:${SLOT}"
einfo
elif [[ $ci != "php${SLOT}" ]] ; then
elog "To switch $m to use php:${SLOT}, run"
elog " eselect php set $m php${SLOT}"
elog
fi
fi
done
# Remove dead symlinks for SAPIs that were just disabled. For
# example, if the user has the cgi SAPI enabled, then he has an
# eselect-php symlink for it. If he later reinstalls PHP with
# USE="-cgi", that symlink will break. This call to eselect is
# supposed to remove that dead link per bug 572436.
eselect php cleanup || die
if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
elog "To build extensions for this version of PHP, you will need to"
elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
elog
fi
# Warn about the removal of PHP_INI_VERSION if the user has it set.
if [[ -n "${PHP_INI_VERSION}" ]]; then
ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
ewarn 'remove it from your configuration at your convenience. See'
ewarn
ewarn ' https://bugs.gentoo.org/611214'
ewarn
ewarn 'for more information.'
fi
elog "For details on how version slotting works, please see"
elog "the wiki:"
elog
elog " https://wiki.gentoo.org/wiki/PHP"
elog
}
pkg_postrm() {
# This serves two purposes. First, if we have just removed the last
# installed version of PHP, then this will remove any dead symlinks
# belonging to eselect-php. Second, if a user upgrades slots from
# (say) 5.6 to 7.0 and depcleans the old slot, then this will update
# his existing symlinks to point to the new 7.0 installation. The
# latter is bug 432962.
#
# Note: the eselect-php package may not be installed at this point,
# so we can't die() if this command fails.
eselect php cleanup
}

View file

@ -1,8 +0,0 @@
AUX 50guile-gentoo.el 38 BLAKE2B e96c6cf48d1522d89450e11d339c76210c672377208b56951791b83c6ef22b2c872d313084e199dd5d7b533a99106a87dbc7f15b5ee6126f71bf5f2e84165ffa SHA512 5c00bcabe2d7cc03013dc7a54b2c653940c08098ca5646d7c73624cb1ca04376ae9dcf88a7166b1925c69f0c5d192d90f6bd790fdef8ed8c3b0f9d163c987da5
AUX guile-2-snarf.patch 1274 BLAKE2B e9efdd1e14560579131ecff748add4f97de730678e6f766681be72f95bf99ab36edd8bc7279701084d13f3fa762968af814760bcf9b8778c73c956c282bb3c93 SHA512 49d015b08d0bcf5d27aa43d4a595b2ccb4366dffe0f5d159162c8c7747fb9fdbe84056a737f3c81a6e39281d91109bfa4aa98c85dd0e757c17ab668a1dd46f24
AUX guile-2.0.14-configure-clang16.patch 2083 BLAKE2B db51de35520459eef3b66102a77afbcc492f2762e5629c5c63239dff9169f51104dbbadbedccfbdb3c83b051bd80ec82807f7a4e0ba1d43cc4c292b6a5d3ecc6 SHA512 40b1f6c4f2a04da26ceb0ffb6d016476b673d142ce465895c4fc241b24cb4dc0f3b0e759d51817f9cad27cea7c9cb56dc38507312f28af27daed6f362c70bb4c
AUX guile-2.0.14-darwin.patch 1026 BLAKE2B 9193732cfb74931f7bf8e9b55c5c9dd2621ef6271c8d18190e0ed94d90decde85272f271bbbe7d3c4dd0dd509e51fae3f7f0af42872a0b9ebb87396c9e69a9d2 SHA512 151d19f171656105d87336f81dd8c34273d07a3e88aa03ac5ca8d640c79ab317a90ef06097858bf627e4666fba747faea45237c73e7bc6462d19d8f0d1904d53
AUX guile-2.0.14-ia64-fix-crash-thread-context-switch.patch 2426 BLAKE2B 5b2073a3780794e9466d8e5434ab98a91a821408ab792abbfaf61d09c95e113b99746b0da850115b4534bda00b1313cef5bb9b08c90c8bf9a04c81b1eb78faa3 SHA512 082f98ac4ee2f40dd3762006bf5c43022088b2286c9a8d63ae9e234d3c8527f3afcfba8076e0c8578e7fbed257294db6ce1a4513661b89f821579dc121d449ae
DIST guile-2.0.14.tar.xz 4615196 BLAKE2B 97e26635c941309b713b632371bc9df7361d3d7d524af3d2c67275f3151dc9c51bd774155bd3c1caf6950d4e839afe8b019f553b5a7223c447bb19c8a97d608c SHA512 2cad60ab8aa77be44bc4988eaa3a2f0652637f315322abd6011c18f1800c3a461eefa15a14fd54d0d48031b093bc56dfc6cd15dc0a8260b97b40521bff793db6
EBUILD guile-2.0.14-r5.ebuild 2403 BLAKE2B 2c6cd345ea0f7402724ddcd4b74df9ea26d3ccde3e01eb9d2f56ae314fdf2bd7fff9551aab9b00cd9ec2b19c99356d556476782c3c1e60f0fd448e88d93737fe SHA512 b4e3337089b4096480733fab0e877ff5a77a8d1c13bcf20c3321d1925b2701e18cc07d0fdd45407361b0cc3c16a4e7b5d27d220577c36330a329d77bae0a2921
MISC metadata.xml 1137 BLAKE2B a7804962f0827541dd7e1d10d962700f32734d5dd4f04688c1f07838109ecf68f68d3601f86786a893c6c68c1f8d5144e254d4c82fcad53f6edc12bba9f6cc51 SHA512 5bb0ed15c972f967899c24e290550fb10bb830222dce3890413d9978870d0f00942ebfec738372418958ee99048017ebd25e8fc4c6d175027eef1448bc12384a

View file

@ -1 +0,0 @@
(add-to-list 'load-path "@SITELISP@")

View file

@ -1,47 +0,0 @@
From f775ab3654357fcaad294b95efb0b1c16de1eda8 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Sun, 19 Feb 2017 22:58:40 +0000
Subject: guile-snarf: skip -g* arguments to avoid build failure
* libguile/guile-snarf.in: skip -g* arguments to avoid failure on
-ggdb3.
Bug: https://bugs.gentoo.org/608190
Bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25803
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
libguile/guile-snarf.in | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in
index 47bbc04..22dc1d3 100644
--- a/libguile/guile-snarf.in
+++ b/libguile/guile-snarf.in
@@ -95,10 +95,22 @@ if [ x"$CPP" = x ] ; then cpp="@CPP@" ; else cpp="$CPP" ; fi
trap "rm -rf $tempdir" 0 1 2 15
+# filter out -g* flags from commandline
+# as some flags like -ggdb3 cause CPP
+
+cpp_args=""
+for arg in "$@"
+do
+ case "$arg" in
+ -g*) ;; # skip debug flag
+ *) cpp_args="$cpp_args $arg" ;;
+ esac
+done
+
if [ ! "$outfile" = "-" ] ; then
- modern_snarf "$@" > $outfile
+ modern_snarf $cpp_args > $outfile
else
- modern_snarf "$@"
+ modern_snarf $cpp_args
fi
# zonk outfile if errors occurred
--
cgit v1.0-41-gc330

View file

@ -1,71 +0,0 @@
https://src.fedoraproject.org/rpms/guile/c/7fcab121be7d2bc8e3e48d0da476127b86cec90c?branch=rawhide
These issues have already been fixed upstream via gnulib imports:
commit 7e641595cd9b45ce7339e21c20a8ab81af9278f6
Author: Andy Wingo <wingo@pobox.com>
Date: Wed Feb 15 21:41:24 2017 +0100
Update Gnulib to v0.1-1157-gb03f418.
commit a91b95cca2d397c84f8b9bbd602d40209a7092ce
Author: Andy Wingo <wingo@pobox.com>
Date: Wed Jan 20 21:52:54 2021 +0100
Update Gnulib to v0.1-4379-g2ef5a9b4b
Also bump required autoconf version to 2.64, as required by Gnulib.
--- a/m4/link.m4
+++ b/m4/link.m4
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_LINK],
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <unistd.h>
+ #include <stdio.h>
]],
[[int result = 0;
if (!link ("conftest.a", "conftest.b/"))
--- a/m4/round.m4
+++ b/m4/round.m4
@@ -57,7 +57,7 @@ int main()
* (double) (1U << ((DBL_MANT_DIG + 3) / 5))
* (double) (1U << ((DBL_MANT_DIG + 4) / 5));
volatile double x = 0.5 - 0.5 / TWO_MANT_DIG;
- exit (x < 0.5 && round (x) != 0.0);
+ return x < 0.5 && round (x) != 0.0;
}]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no],
[case "$host_os" in
netbsd* | aix*) gl_cv_func_round_works="guessing no";;
Avoid implicit ints in the guile_cv_localtime_cache check. It cause
the check to always fail with strict(er) C99 compilers that do not
support implicit int.
Submitted upstream:
<https://lists.gnu.org/archive/html/bug-guile/2022-12/msg00017.html>
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60022>
--- a/configure.ac
+++ b/configure.ac
@@ -1086,7 +1086,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
# include <stdlib.h>
#endif
extern char **environ;
-unset_TZ ()
+int unset_TZ ()
{
char **from, **to;
for (to = from = environ; (*to = *from); from++)
@@ -1095,7 +1095,7 @@ unset_TZ ()
}
char TZ_GMT0[] = "TZ=GMT0";
char TZ_PST8[] = "TZ=PST8";
-main()
+int main()
{
time_t now = time ((time_t *) 0);
int hour_GMT0, hour_unset;

View file

@ -1,38 +0,0 @@
fix compilation on Darwin
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23
https://bugs.gentoo.org/show_bug.cgi?id=612338
--- guile-2.0.14/libguile/filesys.c
+++ guile-2.0.14/libguile/filesys.c
@@ -1486,6 +1486,9 @@
mode_bits = scm_i_mode_bits (mode);
}
+#ifdef __APPLE__
+ open_flags &= O_APPEND|O_SHLOCK|O_EXLOCK|O_CLOEXEC;
+#endif
SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
if (rv == -1)
SCM_SYSERROR;
--- guile-2.0.14/libguile/stime.c
+++ guile-2.0.14/libguile/stime.c
@@ -830,6 +830,10 @@
#ifdef HAVE_POSIX_CPUTIME
{
+#ifdef __APPLE__
+ if (clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &posix_run_time_base) == 0)
+ get_internal_run_time = get_internal_run_time_posix_timer;
+#else
clockid_t dummy;
/* Only use the _POSIX_CPUTIME clock if it's going to work across
@@ -839,6 +843,7 @@
get_internal_run_time = get_internal_run_time_posix_timer;
else
errno = 0;
+#endif
}
#endif /* HAVE_POSIX_CPUTIME */
#endif /* HAVE_CLOCKTIME */

View file

@ -1,63 +0,0 @@
From f92888853439a8ded221f3423865c78de2a96a14 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Sun, 5 Nov 2017 09:30:45 +0000
Subject: ia64: Fix crash in thread context switch.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes <https://bugs.gnu.org/29151> and <https://bugs.gentoo.org/613986>.
Backtrace looks like that:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x200000000014a5c0 in scm_ia64_longjmp (JB=0x6000000000817020, VAL=1) at continuations.c:372
372 t->pending_rbs_continuation->backing_store,
[Current thread is 1 (Thread 0x2000000000049340 (LWP 8190))]
(gdb) bt
#0 0x200000000014a5c0 in scm_ia64_longjmp (JB=0x6000000000817020, VAL=1) at continuations.c:372
#1 0x2000000000148e00 in scm_c_abort (vm=0x60000000000edea0, tag=0x6000000000795ba0, n=0, argv=0x60000fffff7f0ce0, cookie=-1) at control.c:239
#2 0x2000000000149070 in scm_at_abort (tag=0x6000000000795ba0, args=0x304) at control.c:258
(gdb) print t
$2 = (scm_i_thread *) 0x6000000000068000
(gdb) print t->pending_rbs_continuation
$3 = (scm_t_contregs *) 0xffeb
The problem here is the value of 't->pending_rbs_continuation' pointer.
It's supposed to poin to a register stack pointer or be NULL if not yet
backed up.
The problem is it is never initialized to NULL at creation time and
contained garbage on stack. Sometimes people are lucky and have zeros
on stack and guile works. But sometimes there is something and guile
crashes.
The fix is trivial: initialize 'pending_rbs_continuation = NULL'
at thread registration time (the same way other threads are registered).
Reported-by: Matt Turner
* libguile/threads.c (guilify_self_1): Initialize pending_rbs_continuation
to avoid crash on ia64.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
libguile/threads.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libguile/threads.c b/libguile/threads.c
index 9ceb5b8..770f62c 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -395,6 +395,7 @@ guilify_self_1 (struct GC_stack_base *base, int needs_unregister)
t.base = base->mem_base;
#ifdef __ia64__
t.register_backing_store_base = base->reg_base;
+ t.pending_rbs_continuation = 0;
#endif
t.continuation_root = SCM_EOL;
t.continuation_base = t.base;
--
cgit v1.0-41-gc330

View file

@ -1,92 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit flag-o-matic autotools
DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
HOMEPAGE="https://www.gnu.org/software/guile/"
SRC_URI="mirror://gnu/guile/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
LICENSE="LGPL-3+"
IUSE="debug debug-malloc +deprecated +networking +nls +regex +threads" # upstream recommended +networking +nls
# emacs useflag removal not working
REQUIRED_USE="regex" # workaround for bug 596322
RESTRICT="strip"
RDEPEND="
>=dev-libs/boehm-gc-7.0:=[threads?]
dev-libs/gmp:=
dev-libs/libffi:=
dev-libs/libltdl:=
dev-libs/libunistring:0=
sys-devel/libtool
sys-libs/ncurses:0=
sys-libs/readline:0=
virtual/libcrypt:="
DEPEND="${RDEPEND}
virtual/pkgconfig
sys-apps/texinfo
sys-devel/gettext"
SLOT="12/22" # subslot is soname version
MAJOR="2.0"
# guile generates ELF files without use of C or machine code
# It's a false positive. bug #677600
QA_PREBUILT='*[.]go'
DOCS=( GUILE-VERSION HACKING README )
PATCHES=(
"${FILESDIR}/${PN}-2-snarf.patch"
"${FILESDIR}/${P}-darwin.patch"
"${FILESDIR}/${P}-ia64-fix-crash-thread-context-switch.patch"
"${FILESDIR}/${P}-configure-clang16.patch"
)
src_prepare() {
default
eautoreconf
}
src_configure() {
# see bug #178499
filter-flags -ftree-vectorize
econf \
--disable-error-on-warning \
--disable-rpath \
--disable-static \
--enable-posix \
--without-libgmp-prefix \
--without-libiconv-prefix \
--without-libintl-prefix \
--without-libltdl-prefix \
--without-libreadline-prefix \
--without-libunistring-prefix \
$(use_enable debug guile-debug) \
$(use_enable debug-malloc) \
$(use_enable deprecated) \
$(use_enable networking) \
$(use_enable nls) \
$(use_enable regex) \
$(use_with threads)
}
src_install() {
default
find "${ED}" -name '*.la' -delete || die
# From Novell
# https://bugzilla.novell.com/show_bug.cgi?id=874028#c0
dodir /usr/share/gdb/auto-load/$(get_libdir)
mv "${ED}"/usr/$(get_libdir)/libguile-*-gdb.scm "${ED}"/usr/share/gdb/auto-load/$(get_libdir) || die
# necessary for registering slib, see bug 206896
keepdir /usr/share/guile/site
# Dark magic necessary for some deps
dosym libguile-2.0.so /usr/$(get_libdir)/libguile.so
}

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>scheme@gentoo.org</email>
<name>Gentoo Scheme Project</name>
</maintainer>
<longdescription lang="en">
Guile is a library designed to help programmers create flexible applications. Using Guile in an application allows programmers to write plug-ins, or modules (there are many names, but the concept is essentially the same) and users to use them to have an application fit their needs.
</longdescription>
<use>
<flag name="debug-freelist">Include garbage collector freelist debugging code</flag>
<flag name="debug-malloc">Include malloc debugging code</flag>
<flag name="deprecated">Enable deprecated features</flag>
<flag name="discouraged"> (implied by deprecated) enable merely discouraged features</flag>
<flag name="networking">Include networking interfaces</flag>
<flag name="regex"> Include regular expression interfaces</flag>
</use>
<upstream>
<remote-id type="savannah">guile</remote-id>
</upstream>
</pkgmetadata>

View file

@ -1,851 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @DEAD
# @ECLASS: cmake-utils.eclass
# @MAINTAINER:
# kde@gentoo.org
# @AUTHOR:
# Tomáš Chvátal <scarabeus@gentoo.org>
# Maciej Mrozowski <reavertm@gentoo.org>
# (undisclosed contributors)
# Original author: Zephyrus (zephyrus@mirach.it)
# @SUPPORTED_EAPIS: 5 6 7
# @PROVIDES: ninja-utils
# @BLURB: common ebuild functions for cmake-based packages
# @DEPRECATED: cmake.eclass
# @DESCRIPTION:
# DEPRECATED: This no longer receives any changes. Everyone must port to cmake.eclass.
# The cmake-utils eclass makes creating ebuilds for cmake-based packages much easier.
# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
# builds (default), in-source builds and an implementation of the well-known use_enable
# and use_with functions for CMake.
if [[ -z ${_CMAKE_UTILS_ECLASS} ]]; then
_CMAKE_UTILS_ECLASS=1
# @ECLASS_VARIABLE: BUILD_DIR
# @DESCRIPTION:
# Build directory where all cmake processed files should be generated.
# For in-source build it's fixed to ${CMAKE_USE_DIR}.
# For out-of-source build it can be overridden, by default it uses
# ${WORKDIR}/${P}_build.
#
# This variable has been called CMAKE_BUILD_DIR formerly.
# It is set under that name for compatibility.
# @ECLASS_VARIABLE: CMAKE_BINARY
# @DESCRIPTION:
# Eclass can use different cmake binary than the one provided in by system.
: ${CMAKE_BINARY:=cmake}
# @ECLASS_VARIABLE: CMAKE_BUILD_TYPE
# @DESCRIPTION:
# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
# If about to be set - needs to be set before invoking cmake-utils_src_configure.
# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
# specific compiler flags overriding make.conf.
: ${CMAKE_BUILD_TYPE:=Gentoo}
# @ECLASS_VARIABLE: CMAKE_IN_SOURCE_BUILD
# @DEFAULT_UNSET
# @DESCRIPTION:
# Set to enable in-source build.
# @ECLASS_VARIABLE: CMAKE_MAKEFILE_GENERATOR
# @DEFAULT_UNSET
# @DESCRIPTION:
# Specify a makefile generator to be used by cmake.
# At this point only "emake" and "ninja" are supported.
# In EAPI 7 and above, the default is set to "ninja",
# whereas in EAPIs below 7, it is set to "emake".
# @ECLASS_VARIABLE: CMAKE_MIN_VERSION
# @DESCRIPTION:
# Specify the minimum required CMake version.
: ${CMAKE_MIN_VERSION:=3.9.6}
# @ECLASS_VARIABLE: CMAKE_REMOVE_MODULES
# @DESCRIPTION:
# Do we want to remove anything? yes or whatever else for no
: ${CMAKE_REMOVE_MODULES:=yes}
# @ECLASS_VARIABLE: CMAKE_REMOVE_MODULES_LIST
# @DESCRIPTION:
# Space-separated list of CMake modules that will be removed in $S during src_prepare,
# in order to force packages to use the system version.
: ${CMAKE_REMOVE_MODULES_LIST:=FindBLAS FindLAPACK}
# @ECLASS_VARIABLE: CMAKE_USE_DIR
# @DESCRIPTION:
# Sets the directory where we are working with cmake.
# For example when application uses autotools and only one
# plugin needs to be done by cmake.
# By default it uses ${S}.
# @ECLASS_VARIABLE: CMAKE_VERBOSE
# @DESCRIPTION:
# Set to OFF to disable verbose messages during compilation
: ${CMAKE_VERBOSE:=ON}
# @ECLASS_VARIABLE: CMAKE_WARN_UNUSED_CLI
# @DESCRIPTION:
# Warn about variables that are declared on the command line
# but not used. Might give false-positives.
# "no" to disable (default) or anything else to enable.
# @ECLASS_VARIABLE: CMAKE_EXTRA_CACHE_FILE
# @USER_VARIABLE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Specifies an extra cache file to pass to cmake. This is the analog of EXTRA_ECONF
# for econf and is needed to pass TRY_RUN results when cross-compiling.
# Should be set by user in a per-package basis in /etc/portage/package.env.
# @ECLASS_VARIABLE: CMAKE_UTILS_QA_SRC_DIR_READONLY
# @USER_VARIABLE
# @DEFAULT_UNSET
# @DESCRIPTION:
# After running cmake-utils_src_prepare, sets ${S} to read-only. This is
# a user flag and should under _no circumstances_ be set in the ebuild.
# Helps in improving QA of build systems that write to source tree.
case ${EAPI} in
5) : ${CMAKE_WARN_UNUSED_CLI:=no} ;;
6|7) : ${CMAKE_WARN_UNUSED_CLI:=yes} ;;
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac
inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing xdg-utils
case ${EAPI} in
[56])
: ${CMAKE_MAKEFILE_GENERATOR:=emake}
inherit eutils multilib
;;
*)
: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
;;
esac
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
if [[ ${WANT_CMAKE} ]]; then
if [[ ${EAPI} != [56] ]]; then
die "\${WANT_CMAKE} has been removed and is a no-op now"
else
eqawarn "\${WANT_CMAKE} has been removed and is a no-op now"
fi
fi
[[ ${PREFIX} ]] && die "\${PREFIX} has been removed and is a no-op now"
case ${CMAKE_MAKEFILE_GENERATOR} in
emake)
BDEPEND="sys-devel/make"
;;
ninja)
BDEPEND="dev-util/ninja"
;;
*)
eerror "Unknown value for \${CMAKE_MAKEFILE_GENERATOR}"
die "Value ${CMAKE_MAKEFILE_GENERATOR} is not supported"
;;
esac
if [[ ${PN} != cmake ]]; then
BDEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}"
fi
case ${EAPI} in
7) ;;
*) DEPEND=" ${BDEPEND}" ;;
esac
# Internal functions used by cmake-utils_use_*
_cmake_use_me_now() {
debug-print-function ${FUNCNAME} "$@"
local arg=$2
[[ ! -z $3 ]] && arg=$3
[[ ${EAPI} == 5 ]] || die "${FUNCNAME[1]} is banned in EAPI 6 and later: use -D$1<related_CMake_variable>=\"\$(usex $2)\" instead"
local uper capitalised x
[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
if [[ ! -z $3 ]]; then
# user specified the use name so use it
echo "-D$1$3=$(use $2 && echo ON || echo OFF)"
else
# use all various most used combinations
uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
for x in $2 $uper $capitalised; do
echo "-D$1$x=$(use $2 && echo ON || echo OFF) "
done
fi
}
_cmake_use_me_now_inverted() {
debug-print-function ${FUNCNAME} "$@"
local arg=$2
[[ ! -z $3 ]] && arg=$3
if [[ ${EAPI} != 5 && "${FUNCNAME[1]}" != cmake-utils_use_find_package ]] ; then
die "${FUNCNAME[1]} is banned in EAPI 6 and later: use -D$1<related_CMake_variable>=\"\$(usex $2)\" instead"
fi
local uper capitalised x
[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
if [[ ! -z $3 ]]; then
# user specified the use name so use it
echo "-D$1$3=$(use $2 && echo OFF || echo ON)"
else
# use all various most used combinations
uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
for x in $2 $uper $capitalised; do
echo "-D$1$x=$(use $2 && echo OFF || echo ON) "
done
fi
}
# Determine using IN or OUT source build
_cmake_check_build_dir() {
: ${CMAKE_USE_DIR:=${S}}
if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
# we build in source dir
BUILD_DIR="${CMAKE_USE_DIR}"
else
# Respect both the old variable and the new one, depending
# on which one was set by the ebuild.
if [[ ! ${BUILD_DIR} && ${CMAKE_BUILD_DIR} ]]; then
if [[ ${EAPI} != [56] ]]; then
eerror "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR."
die "The ebuild must be migrated to BUILD_DIR."
else
eqawarn "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR."
eqawarn "Please migrate the ebuild to use the new one."
fi
# In the next call, both variables will be set already
# and we'd have to know which one takes precedence.
_RESPECT_CMAKE_BUILD_DIR=1
fi
if [[ ${_RESPECT_CMAKE_BUILD_DIR} ]]; then
BUILD_DIR=${CMAKE_BUILD_DIR:-${WORKDIR}/${P}_build}
else
: ${BUILD_DIR:=${WORKDIR}/${P}_build}
fi
fi
# Backwards compatibility for getting the value.
[[ ${EAPI} == [56] ]] && CMAKE_BUILD_DIR=${BUILD_DIR}
mkdir -p "${BUILD_DIR}" || die
echo ">>> Working in BUILD_DIR: \"$BUILD_DIR\""
}
# Determine which generator to use
_cmake_generator_to_use() {
local generator_name
case ${CMAKE_MAKEFILE_GENERATOR} in
ninja)
# if ninja is enabled but not installed, the build could fail
# this could happen if ninja is manually enabled (eg. make.conf) but not installed
case ${EAPI} in
5|6)
if ! ROOT=/ has_version dev-util/ninja; then
die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR."
fi
;;
*)
if ! has_version -b dev-util/ninja; then
die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR."
fi
;;
esac
generator_name="Ninja"
;;
emake)
generator_name="Unix Makefiles"
;;
*)
eerror "Unknown value for \${CMAKE_MAKEFILE_GENERATOR}"
die "Value ${CMAKE_MAKEFILE_GENERATOR} is not supported"
;;
esac
echo ${generator_name}
}
# @FUNCTION: cmake_comment_add_subdirectory
# @USAGE: <subdirectory>
# @DESCRIPTION:
# Comment out one or more add_subdirectory calls in CMakeLists.txt in the current directory
cmake_comment_add_subdirectory() {
if [[ -z ${1} ]]; then
die "comment_add_subdirectory must be passed at least one directory name to comment"
fi
if [[ -e "CMakeLists.txt" ]]; then
local d
for d in $@; do
sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${d//\//\\/}[[:space:]]*)/I s/^/#DONOTCOMPILE /" \
-i CMakeLists.txt || die "failed to comment add_subdirectory(${d})"
done
fi
}
# @FUNCTION: comment_add_subdirectory
# @USAGE: <subdirectory>
# @DESCRIPTION:
# Comment out an add_subdirectory call in CMakeLists.txt in the current directory
# Banned in EAPI 6 and later - use cmake_comment_add_subdirectory instead.
comment_add_subdirectory() {
[[ ${EAPI} == 5 ]] || die "comment_add_subdirectory is banned in EAPI 6 and later - use cmake_comment_add_subdirectory instead"
cmake_comment_add_subdirectory "$@"
}
# @FUNCTION: cmake-utils_use_with
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_with. See ebuild(5).
#
# `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
# and -DWITH_FOO=OFF if it is disabled.
cmake-utils_use_with() { _cmake_use_me_now WITH_ "$@" ; }
# @FUNCTION: cmake-utils_use_enable
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
# and -DENABLE_FOO=OFF if it is disabled.
cmake-utils_use_enable() { _cmake_use_me_now ENABLE_ "$@" ; }
# @FUNCTION: cmake-utils_use_find_package
# @USAGE: <USE flag> <package name>
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_find_package foo LibFoo` echoes -DCMAKE_DISABLE_FIND_PACKAGE_LibFoo=OFF
# if foo is enabled and -DCMAKE_DISABLE_FIND_PACKAGE_LibFoo=ON if it is disabled.
# This can be used to make find_package optional.
cmake-utils_use_find_package() {
if [[ ${EAPI} != 5 && "$#" != 2 ]] ; then
die "Usage: cmake-utils_use_find_package <USE flag> <package name>"
fi
_cmake_use_me_now_inverted CMAKE_DISABLE_FIND_PACKAGE_ "$@" ;
}
# @FUNCTION: cmake_use_find_package
# @USAGE: <USE flag> <package name>
# @DESCRIPTION:
# Alias for cmake-utils_use_find_package.
cmake_use_find_package() {
if [[ "$#" != 2 ]] ; then
die "Usage: cmake_use_find_package <USE flag> <package name>"
fi
cmake-utils_use_find_package "$@" ;
}
# @FUNCTION: cmake-utils_use_disable
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on inversion of use_enable. See ebuild(5).
#
# `cmake-utils_use_enable foo FOO` echoes -DDISABLE_FOO=OFF if foo is enabled
# and -DDISABLE_FOO=ON if it is disabled.
cmake-utils_use_disable() { _cmake_use_me_now_inverted DISABLE_ "$@" ; }
# @FUNCTION: cmake-utils_use_no
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_disable. See ebuild(5).
#
# `cmake-utils_use_no foo FOO` echoes -DNO_FOO=OFF if foo is enabled
# and -DNO_FOO=ON if it is disabled.
cmake-utils_use_no() { _cmake_use_me_now_inverted NO_ "$@" ; }
# @FUNCTION: cmake-utils_use_want
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
# and -DWANT_FOO=OFF if it is disabled.
cmake-utils_use_want() { _cmake_use_me_now WANT_ "$@" ; }
# @FUNCTION: cmake-utils_use_build
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_build foo FOO` echoes -DBUILD_FOO=ON if foo is enabled
# and -DBUILD_FOO=OFF if it is disabled.
cmake-utils_use_build() { _cmake_use_me_now BUILD_ "$@" ; }
# @FUNCTION: cmake-utils_use_has
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
# and -DHAVE_FOO=OFF if it is disabled.
cmake-utils_use_has() { _cmake_use_me_now HAVE_ "$@" ; }
# @FUNCTION: cmake-utils_use_use
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use_use foo FOO` echoes -DUSE_FOO=ON if foo is enabled
# and -DUSE_FOO=OFF if it is disabled.
cmake-utils_use_use() { _cmake_use_me_now USE_ "$@" ; }
# @FUNCTION: cmake-utils_use
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_use foo FOO` echoes -DFOO=ON if foo is enabled
# and -DFOO=OFF if it is disabled.
cmake-utils_use() { _cmake_use_me_now "" "$@" ; }
# @FUNCTION: cmake-utils_useno
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild(5).
#
# `cmake-utils_useno foo NOFOO` echoes -DNOFOO=OFF if foo is enabled
# and -DNOFOO=ON if it is disabled.
cmake-utils_useno() { _cmake_use_me_now_inverted "" "$@" ; }
# Internal function for modifying hardcoded definitions.
# Removes dangerous definitions that override Gentoo settings.
_cmake_modify-cmakelists() {
debug-print-function ${FUNCNAME} "$@"
# Only edit the files once
grep -qs "<<< Gentoo configuration >>>" "${CMAKE_USE_DIR}"/CMakeLists.txt && return 0
# Comment out all set (<some_should_be_user_defined_variable> value)
find "${CMAKE_USE_DIR}" -name CMakeLists.txt -exec sed \
-e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE\([[:space:]].*)\|)\)/I{s/^/#_cmake_modify_IGNORE /g}' \
-e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \
-e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \
-e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \
-i {} + || die "${LINENO}: failed to disable hardcoded settings"
local x
for x in $(find "${CMAKE_USE_DIR}" -name CMakeLists.txt -exec grep -l "^#_cmake_modify_IGNORE" {} +;); do
einfo "Hardcoded definition(s) removed in $(echo "${x}" | cut -c $((${#CMAKE_USE_DIR}+2))-):"
einfo "$(grep -se '^#_cmake_modify_IGNORE' ${x} | cut -c 22-99)"
done
# NOTE Append some useful summary here
cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_ || die
MESSAGE(STATUS "<<< Gentoo configuration >>>
Build type \${CMAKE_BUILD_TYPE}
Install path \${CMAKE_INSTALL_PREFIX}
Compiler flags:
C \${CMAKE_C_FLAGS}
C++ \${CMAKE_CXX_FLAGS}
Linker flags:
Executable \${CMAKE_EXE_LINKER_FLAGS}
Module \${CMAKE_MODULE_LINKER_FLAGS}
Shared \${CMAKE_SHARED_LINKER_FLAGS}\n")
_EOF_
}
# temporary function for moving cmake cleanups from from src_configure -> src_prepare.
# bug #378850
_cmake_cleanup_cmake() {
: ${CMAKE_USE_DIR:=${S}}
if [[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] ; then
local name
for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
find "${S}" -name ${name}.cmake -exec rm -v {} + || die
done
fi
# check if CMakeLists.txt exist and if no then die
if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then
eerror "Unable to locate CMakeLists.txt under:"
eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
eerror "Consider not inheriting the cmake eclass."
die "FATAL: Unable to find CMakeLists.txt"
fi
# Remove dangerous things.
_cmake_modify-cmakelists
}
# @FUNCTION: cmake-utils_src_prepare
# @DESCRIPTION:
# Apply ebuild and user patches.
cmake-utils_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
pushd "${S}" > /dev/null || die
if [[ ${EAPI} != 5 ]]; then
default_src_prepare
_cmake_cleanup_cmake
else
debug-print "$FUNCNAME: PATCHES=$PATCHES"
[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
debug-print "$FUNCNAME: applying user patches"
epatch_user
fi
popd > /dev/null || die
# make ${S} read-only in order to detect broken build-systems
if [[ ${CMAKE_UTILS_QA_SRC_DIR_READONLY} && ! ${CMAKE_IN_SOURCE_BUILD} ]]; then
chmod -R a-w "${S}"
fi
_CMAKE_UTILS_SRC_PREPARE_HAS_RUN=1
}
# @VARIABLE: mycmakeargs
# @DEFAULT_UNSET
# @DESCRIPTION:
# Optional cmake defines as a bash array. Should be defined before calling
# src_configure.
# @CODE
# src_configure() {
# local mycmakeargs=(
# $(cmake-utils_use_with openconnect)
# )
#
# cmake-utils_src_configure
# }
# @CODE
# @FUNCTION: cmake-utils_src_configure
# @DESCRIPTION:
# General function for configuring with cmake. Default behaviour is to start an
# out-of-source build.
cmake-utils_src_configure() {
debug-print-function ${FUNCNAME} "$@"
if [[ ! ${_CMAKE_UTILS_SRC_PREPARE_HAS_RUN} ]]; then
if [[ ${EAPI} != [56] ]]; then
die "FATAL: cmake-utils_src_prepare has not been run"
else
eqawarn "cmake-utils_src_prepare has not been run, please open a bug on https://bugs.gentoo.org/"
fi
fi
[[ ${EAPI} == 5 ]] && _cmake_cleanup_cmake
_cmake_check_build_dir
# Fix xdg collision with sandbox
xdg_environment_reset
# @SEE CMAKE_BUILD_TYPE
if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
# Handle release builds
if ! has debug ${IUSE//+} || ! use debug; then
local CPPFLAGS=${CPPFLAGS}
append-cppflags -DNDEBUG
fi
fi
# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.)
local build_rules=${BUILD_DIR}/gentoo_rules.cmake
cat > "${build_rules}" <<- _EOF_ || die
SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM-ATT_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c -x assembler <SOURCE>" CACHE STRING "ASM-ATT compile command" FORCE)
SET (CMAKE_ASM-ATT_LINK_FLAGS "-nostdlib" CACHE STRING "ASM-ATT link flags" FORCE)
SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE)
_EOF_
local myCC=$(tc-getCC) myCXX=$(tc-getCXX) myFC=$(tc-getFC)
# !!! IMPORTANT NOTE !!!
# Single slash below is intentional. CMake is weird and wants the
# CMAKE_*_VARIABLES split into two elements: the first one with
# compiler path, and the second one with all command-line options,
# space separated.
local toolchain_file=${BUILD_DIR}/gentoo_toolchain.cmake
cat > ${toolchain_file} <<- _EOF_ || die
SET (CMAKE_ASM_COMPILER "${myCC/ /;}")
SET (CMAKE_ASM-ATT_COMPILER "${myCC/ /;}")
SET (CMAKE_C_COMPILER "${myCC/ /;}")
SET (CMAKE_CXX_COMPILER "${myCXX/ /;}")
SET (CMAKE_Fortran_COMPILER "${myFC/ /;}")
SET (CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive manager" FORCE)
SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE)
SET (CMAKE_SYSTEM_PROCESSOR "${CHOST%%-*}")
_EOF_
# We are using the C compiler for assembly by default.
local -x ASMFLAGS=${CFLAGS}
local -x PKG_CONFIG=$(tc-getPKG_CONFIG)
if tc-is-cross-compiler; then
local sysname
case "${KERNEL:-linux}" in
Cygwin) sysname="CYGWIN_NT-5.1" ;;
HPUX) sysname="HP-UX" ;;
linux) sysname="Linux" ;;
Winnt)
sysname="Windows"
cat >> "${toolchain_file}" <<- _EOF_ || die
SET (CMAKE_RC_COMPILER $(tc-getRC))
_EOF_
;;
*) sysname="${KERNEL}" ;;
esac
cat >> "${toolchain_file}" <<- _EOF_ || die
SET (CMAKE_SYSTEM_NAME "${sysname}")
_EOF_
if [ "${SYSROOT:-/}" != "/" ] ; then
# When cross-compiling with a sysroot (e.g. with crossdev's emerge wrappers)
# we need to tell cmake to use libs/headers from the sysroot but programs from / only.
cat >> "${toolchain_file}" <<- _EOF_ || die
SET (CMAKE_FIND_ROOT_PATH "${SYSROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
_EOF_
fi
fi
if use prefix-guest; then
cat >> "${build_rules}" <<- _EOF_ || die
# in Prefix we need rpath and must ensure cmake gets our default linker path
# right ... except for Darwin hosts
IF (NOT APPLE)
SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
CACHE STRING "" FORCE)
ELSE ()
SET (CMAKE_PREFIX_PATH "${EPREFIX}/usr" CACHE STRING "" FORCE)
SET (CMAKE_MACOSX_RPATH ON CACHE BOOL "" FORCE)
SET (CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
SET (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
ENDIF (NOT APPLE)
_EOF_
fi
# Common configure parameters (invariants)
local common_config=${BUILD_DIR}/gentoo_common_config.cmake
local libdir=$(get_libdir)
cat > "${common_config}" <<- _EOF_ || die
SET (CMAKE_GENTOO_BUILD ON CACHE BOOL "Indicate Gentoo package build")
SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
SET (CMAKE_INSTALL_INFODIR "${EPREFIX}/usr/share/info" CACHE PATH "")
SET (CMAKE_INSTALL_MANDIR "${EPREFIX}/usr/share/man" CACHE PATH "")
SET (CMAKE_USER_MAKE_RULES_OVERRIDE "${build_rules}" CACHE FILEPATH "Gentoo override rules")
_EOF_
# See bug 689410
if [[ "${ARCH}" == riscv ]]; then
echo 'SET (CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX '"${libdir#lib}"' CACHE STRING "library search suffix" FORCE)' >> "${common_config}" || die
fi
[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
if [[ ${EAPI} != [56] ]]; then
cat >> "${common_config}" <<- _EOF_ || die
SET (CMAKE_INSTALL_DOCDIR "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "")
SET (BUILD_SHARED_LIBS ON CACHE BOOL "")
_EOF_
fi
# Wipe the default optimization flags out of CMake
if [[ ${CMAKE_BUILD_TYPE} != Gentoo && ${EAPI} != 5 ]]; then
cat >> ${common_config} <<- _EOF_ || die
SET (CMAKE_ASM_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_ASM-ATT_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_MODULE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
SET (CMAKE_STATIC_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
_EOF_
fi
# Convert mycmakeargs to an array, for backwards compatibility
# Make the array a local variable since <=portage-2.1.6.x does not
# support global arrays (see bug #297255).
local mycmakeargstype=$(declare -p mycmakeargs 2>&-)
if [[ "${mycmakeargstype}" != "declare -a mycmakeargs="* ]]; then
if [[ -n "${mycmakeargstype}" ]] ; then
if [[ ${EAPI} == 5 ]]; then
eqawarn "Declaring mycmakeargs as a variable is deprecated. Please use an array instead."
else
die "Declaring mycmakeargs as a variable is banned in EAPI=${EAPI}. Please use an array instead."
fi
fi
local mycmakeargs_local=(${mycmakeargs})
else
local mycmakeargs_local=("${mycmakeargs[@]}")
fi
if [[ ${CMAKE_WARN_UNUSED_CLI} == no ]] ; then
local warn_unused_cli="--no-warn-unused-cli"
else
local warn_unused_cli=""
fi
# Common configure parameters (overridable)
# NOTE CMAKE_BUILD_TYPE can be only overridden via CMAKE_BUILD_TYPE eclass variable
# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
local cmakeargs=(
${warn_unused_cli}
-C "${common_config}"
-G "$(_cmake_generator_to_use)"
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
"${mycmakeargs_local[@]}"
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
$([[ ${EAPI} == 5 ]] && echo -DCMAKE_INSTALL_DO_STRIP=OFF)
-DCMAKE_TOOLCHAIN_FILE="${toolchain_file}"
"${MYCMAKEARGS}"
)
if [[ -n "${CMAKE_EXTRA_CACHE_FILE}" ]] ; then
cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" )
fi
pushd "${BUILD_DIR}" > /dev/null || die
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
"${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
popd > /dev/null || die
}
# @FUNCTION: cmake-utils_src_compile
# @DESCRIPTION:
# General function for compiling with cmake.
# Automatically detects the build type. All arguments are passed to emake.
cmake-utils_src_compile() {
debug-print-function ${FUNCNAME} "$@"
cmake-utils_src_make "$@"
}
# @FUNCTION: _cmake_ninja_src_make
# @INTERNAL
# @DESCRIPTION:
# Build the package using ninja generator
_cmake_ninja_src_make() {
debug-print-function ${FUNCNAME} "$@"
[[ -e build.ninja ]] || die "build.ninja not found. Error during configure stage."
eninja "$@"
}
# @FUNCTION: _cmake_emake_src_make
# @INTERNAL
# @DESCRIPTION:
# Build the package using make generator
_cmake_emake_src_make() {
debug-print-function ${FUNCNAME} "$@"
[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
emake VERBOSE=1 "$@" || die
else
emake "$@" || die
fi
}
# @FUNCTION: cmake-utils_src_make
# @DESCRIPTION:
# Function for building the package. Automatically detects the build type.
# All arguments are passed to emake.
cmake-utils_src_make() {
debug-print-function ${FUNCNAME} "$@"
_cmake_check_build_dir
pushd "${BUILD_DIR}" > /dev/null || die
_cmake_${CMAKE_MAKEFILE_GENERATOR}_src_make "$@"
popd > /dev/null || die
}
# @FUNCTION: cmake-utils_src_test
# @DESCRIPTION:
# Function for testing the package. Automatically detects the build type.
cmake-utils_src_test() {
debug-print-function ${FUNCNAME} "$@"
_cmake_check_build_dir
pushd "${BUILD_DIR}" > /dev/null || die
[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
[[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure )
set -- ctest -j "$(makeopts_jobs "${MAKEOPTS}" 999)" \
--test-load "$(makeopts_loadavg)" "${myctestargs[@]}" "$@"
echo "$@" >&2
if "$@" ; then
einfo "Tests succeeded."
popd > /dev/null || die
return 0
else
if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then
# on request from Diego
eerror "Tests failed. Test log ${BUILD_DIR}/Testing/Temporary/LastTest.log follows:"
eerror "--START TEST LOG--------------------------------------------------------------"
cat "${BUILD_DIR}/Testing/Temporary/LastTest.log"
eerror "--END TEST LOG----------------------------------------------------------------"
die "Tests failed."
else
die "Tests failed. When you file a bug, please attach the following file: \n\t${BUILD_DIR}/Testing/Temporary/LastTest.log"
fi
# die might not die due to nonfatal
popd > /dev/null || die
return 1
fi
}
# @FUNCTION: cmake-utils_src_install
# @DESCRIPTION:
# Function for installing the package. Automatically detects the build type.
cmake-utils_src_install() {
debug-print-function ${FUNCNAME} "$@"
_cmake_check_build_dir
pushd "${BUILD_DIR}" > /dev/null || die
DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" || die "died running ${CMAKE_MAKEFILE_GENERATOR} install"
popd > /dev/null || die
pushd "${S}" > /dev/null || die
einstalldocs
popd > /dev/null || die
}
fi

View file

@ -1,773 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/sysadmin/cvsroot/portoverlay/myhardened/eclass/flag-o-matic.eclass,v 1.1 2011/01/03 11:47:17 valko Exp $
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
# toolchain@gentoo.org
# @BLURB: common functions to manipulate and query toolchain flags
# @DESCRIPTION:
# This eclass contains a suite of functions to help developers sanely
# and safely manage toolchain flags in their builds.
inherit eutils toolchain-funcs multilib
################ DEPRECATED functions ################
# The following are still present to avoid breaking existing
# code more than necessary; however they are deprecated. Please
# use gcc-specs-* from toolchain-funcs.eclass instead, if you
# need to know which hardened techs are active in the compiler.
# See bug #100974
#
# has_hardened
# has_pie
# has_pic
# has_ssp_all
# has_ssp
# {C,CXX,F,FC}FLAGS that we allow in strip-flags
# Note: shell globs and character lists are allowed
setup-allowed-flags() {
if [[ -z ${ALLOWED_FLAGS} ]] ; then
export ALLOWED_FLAGS="-pipe"
export ALLOWED_FLAGS="${ALLOWED_FLAGS} -O -O0 -O1 -O2 -mcpu -march -mtune"
export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fstack-protector -fstack-protector-all"
export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking -fno-strict-overflow"
export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-PIE -fno-pie -fno-unit-at-a-time"
export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+"
export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident"
export ALLOWED_FLAGS="${ALLOWED_FLAGS} -W* -w"
fi
# allow a bunch of flags that negate features / control ABI
ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all \
-fno-strict-aliasing -fno-bounds-checking -fstrict-overflow -fno-omit-frame-pointer"
ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs \
-mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 \
-mno-sse4.2 -mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow \
-mno-popcnt -mno-abm \
-mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt \
-msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \
-mieee -mieee-with-inexact -mschedule \
-mtls-direct-seg-refs -mno-tls-direct-seg-refs \
-mflat -mno-flat -mno-faster-structs -mfaster-structs \
-m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
-msecure-plt -m*-toc -D* -U*"
# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
# NOTE: currently -Os have issues with gcc3 and K6* arch's
export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks"
return 0
}
# Raw appending of the reverse flag.
# Only supports {-f<flag>,-fno-<flag>} flag types currently.
_reverse-append() {
[[ -z $1 ]] && return 0
local f rf
f=$1
if [[ ${f} =~ ^-fno-.* ]]; then
rf=${f/-fno-/-f}
elif [[ ${f} =~ ^-f.* ]]; then
rf=${f/-f/-fno-}
else
return 0
fi
_is_flagq CFLAGS ${rf} || append-cflags $(test-flags-CC ${rf})
_is_flagq CPPFLAGS ${rf} || append-cppflags $(test-flags-CXX ${rf})
_is_flagq CXXFLAGS ${rf} || append-cxxflags $(test-flags-CXX ${rf})
{ _is_flagq FCFLAGS ${rf} && _is_flagq FFLAGS ${rf} ;} || \
append-fflags $(test-flags-FC ${rf})
}
# Inverted filters for hardened compiler.
# This is trying to unpick the hardened compiler defaults.
_filter-hardened() {
local f
for f in "$@" ; do
case "${f}" in
# Ideally we should only concern ourselves with PIE flags,
# not -fPIC or -fpic, but too many places filter -fPIC without
# thinking about -fPIE.
-fPIC|-fpic|-fPIE|-fpie|-Wl,pie|-pie)
gcc-specs-pie && { is-flagq -nopie || append-flags -nopie ;};;
-fstack-protector)
gcc-specs-ssp && _reverse-append ${f};;
-fstack-protector-all)
gcc-specs-ssp-to-all && _reverse-append ${f};;
-fno-strict-overflow)
gcc-specs-nostrict && _reverse-append ${f};;
esac
done
}
# Remove occurrences of strings from variable given in $1
# Strings removed are matched as globs, so for example
# '-O*' would remove -O1, -O2 etc.
_filter-var() {
local f x VAR VAL
declare -a new
VAR=$1
shift
eval VAL=\${${VAR}}
for f in ${VAL}; do
for x in "$@"; do
# Note this should work with globs like -O*
[[ ${f} == ${x} ]] && continue 2
done
eval new\[\${\#new\[@]}]=\${f}
done
eval export ${VAR}=\${new\[*]}
}
# @FUNCTION: filter-flags
# @USAGE: <flags>
# @DESCRIPTION:
# Remove particular <flags> from {C,CPP,CXX,F,FC}FLAGS. Accepts shell globs.
filter-flags() {
_filter-hardened "$@"
_filter-var CFLAGS "$@"
_filter-var CPPFLAGS "$@"
_filter-var CXXFLAGS "$@"
_filter-var FFLAGS "$@"
_filter-var FCFLAGS "$@"
return 0
}
# @FUNCTION: filter-lfs-flags
# @DESCRIPTION:
# Remove flags that enable Large File Support.
filter-lfs-flags() {
[[ -n $@ ]] && die "filter-lfs-flags takes no arguments"
filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
}
# @FUNCTION: append-cppflags
# @USAGE: <flags>
# @DESCRIPTION:
# Add extra <flags> to the current CPPFLAGS.
append-cppflags() {
[[ -z $* ]] && return 0
export CPPFLAGS="${CPPFLAGS} $*"
return 0
}
# @FUNCTION: append-cflags
# @USAGE: <flags>
# @DESCRIPTION:
# Add extra <flags> to the current CFLAGS.
append-cflags() {
[[ -z $* ]] && return 0
export CFLAGS="${CFLAGS} $*"
return 0
}
# @FUNCTION: append-cxxflags
# @USAGE: <flags>
# @DESCRIPTION:
# Add extra <flags> to the current CXXFLAGS.
append-cxxflags() {
[[ -z $* ]] && return 0
export CXXFLAGS="${CXXFLAGS} $*"
return 0
}
# @FUNCTION: append-fflags
# @USAGE: <flags>
# @DESCRIPTION:
# Add extra <flags> to the current {F,FC}FLAGS.
append-fflags() {
[[ -z $* ]] && return 0
export FFLAGS="${FFLAGS} $*"
export FCFLAGS="${FCFLAGS} $*"
return 0
}
# @FUNCTION: append-lfs-flags
# @DESCRIPTION:
# Add flags that enable Large File Support.
append-lfs-flags() {
[[ -n $@ ]] && die "append-lfs-flags takes no arguments"
append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
}
# @FUNCTION: append-flags
# @USAGE: <flags>
# @DESCRIPTION:
# Add extra <flags> to your current {C,CXX,F,FC}FLAGS.
append-flags() {
[[ -z $* ]] && return 0
append-cflags "$@"
append-cxxflags "$@"
append-fflags "$@"
return 0
}
# @FUNCTION: replace-flags
# @USAGE: <old> <new>
# @DESCRIPTION:
# Replace the <old> flag with <new>. Accepts shell globs for <old>.
replace-flags() {
[[ $# != 2 ]] \
&& echo && eerror "Usage: replace-flags <old flag> <new flag>" \
&& die "replace-flags takes 2 arguments, not $#"
local f fset
declare -a new_CFLAGS new_CXXFLAGS new_FFLAGS new_FCFLAGS
for fset in CFLAGS CXXFLAGS FFLAGS FCFLAGS; do
# Looping over the flags instead of using a global
# substitution ensures that we're working with flag atoms.
# Otherwise globs like -O* have the potential to wipe out the
# list of flags.
for f in ${!fset}; do
# Note this should work with globs like -O*
[[ ${f} == ${1} ]] && f=${2}
eval new_${fset}\[\${\#new_${fset}\[@]}]=\${f}
done
eval export ${fset}=\${new_${fset}\[*]}
done
return 0
}
# @FUNCTION: replace-cpu-flags
# @USAGE: <old> <new>
# @DESCRIPTION:
# Replace cpu flags (like -march/-mcpu/-mtune) that select the <old> cpu
# with flags that select the <new> cpu. Accepts shell globs for <old>.
replace-cpu-flags() {
local newcpu="$#" ; newcpu="${!newcpu}"
while [ $# -gt 1 ] ; do
# quote to make sure that no globbing is done (particularly on
# ${oldcpu}) prior to calling replace-flags
replace-flags "-march=${1}" "-march=${newcpu}"
replace-flags "-mcpu=${1}" "-mcpu=${newcpu}"
replace-flags "-mtune=${1}" "-mtune=${newcpu}"
shift
done
return 0
}
_is_flagq() {
local x
for x in ${!1} ; do
[[ ${x} == $2 ]] && return 0
done
return 1
}
# @FUNCTION: is-flagq
# @USAGE: <flag>
# @DESCRIPTION:
# Returns shell true if <flag> is in {C,CXX,F,FC}FLAGS, else returns shell false. Accepts shell globs.
is-flagq() {
[[ -n $2 ]] && die "Usage: is-flag <flag>"
_is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1 || _is_flagq FFLAGS $1 || _is_flagq FCFLAGS $1
}
# @FUNCTION: is-flag
# @USAGE: <flag>
# @DESCRIPTION:
# Echo's "true" if flag is set in {C,CXX,F,FC}FLAGS. Accepts shell globs.
is-flag() {
is-flagq "$@" && echo true
}
# @FUNCTION: is-ldflagq
# @USAGE: <flag>
# @DESCRIPTION:
# Returns shell true if <flag> is in LDFLAGS, else returns shell false. Accepts shell globs.
is-ldflagq() {
[[ -n $2 ]] && die "Usage: is-ldflag <flag>"
_is_flagq LDFLAGS $1
}
# @FUNCTION: is-ldflag
# @USAGE: <flag>
# @DESCRIPTION:
# Echo's "true" if flag is set in LDFLAGS. Accepts shell globs.
is-ldflag() {
is-ldflagq "$@" && echo true
}
# @FUNCTION: filter-mfpmath
# @USAGE: <math types>
# @DESCRIPTION:
# Remove specified math types from the fpmath flag. For example, if the user
# has -mfpmath=sse,386, running `filter-mfpmath sse` will leave the user with
# -mfpmath=386.
filter-mfpmath() {
local orig_mfpmath new_math prune_math
# save the original -mfpmath flag
orig_mfpmath=$(get-flag -mfpmath)
# get the value of the current -mfpmath flag
new_math=$(get-flag mfpmath)
new_math=" ${new_math//,/ } "
# figure out which math values are to be removed
prune_math=""
for prune_math in "$@" ; do
new_math=${new_math/ ${prune_math} / }
done
new_math=$(echo ${new_math})
new_math=${new_math// /,}
if [[ -z ${new_math} ]] ; then
# if we're removing all user specified math values are
# slated for removal, then we just filter the flag
filter-flags ${orig_mfpmath}
else
# if we only want to filter some of the user specified
# math values, then we replace the current flag
replace-flags ${orig_mfpmath} -mfpmath=${new_math}
fi
return 0
}
# @FUNCTION: strip-flags
# @DESCRIPTION:
# Strip C[XX]FLAGS of everything except known good/safe flags.
strip-flags() {
local x y flag NEW_CFLAGS NEW_CXXFLAGS NEW_FFLAGS NEW_FCFLAGS
setup-allowed-flags
local NEW_CFLAGS=""
local NEW_CXXFLAGS=""
local NEW_FFLAGS=""
local NEW_FCFLAGS=""
# Allow unstable C[XX]FLAGS if we are using unstable profile ...
if has "~$(tc-arch)" ${ACCEPT_KEYWORDS} ; then
ALLOWED_FLAGS="${ALLOWED_FLAGS} ${UNSTABLE_FLAGS}"
fi
set -f # disable pathname expansion
for x in ${CFLAGS}; do
for y in ${ALLOWED_FLAGS}; do
flag=${x%%=*}
if [ "${flag%%${y}}" = "" ] ; then
NEW_CFLAGS="${NEW_CFLAGS} ${x}"
break
fi
done
done
for x in ${CXXFLAGS}; do
for y in ${ALLOWED_FLAGS}; do
flag=${x%%=*}
if [ "${flag%%${y}}" = "" ] ; then
NEW_CXXFLAGS="${NEW_CXXFLAGS} ${x}"
break
fi
done
done
for x in ${FFLAGS}; do
for y in ${ALLOWED_FLAGS}; do
flag=${x%%=*}
if [ "${flag%%${y}}" = "" ] ; then
NEW_FFLAGS="${NEW_FFLAGS} ${x}"
break
fi
done
done
for x in ${FCFLAGS}; do
for y in ${ALLOWED_FLAGS}; do
flag=${x%%=*}
if [ "${flag%%${y}}" = "" ] ; then
NEW_FCFLAGS="${NEW_FCFLAGS} ${x}"
break
fi
done
done
# In case we filtered out all optimization flags fallback to -O2
if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then
NEW_CFLAGS="${NEW_CFLAGS} -O2"
fi
if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then
NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2"
fi
if [ "${FFLAGS/-O}" != "${FFLAGS}" -a "${NEW_FFLAGS/-O}" = "${NEW_FFLAGS}" ]; then
NEW_FFLAGS="${NEW_FFLAGS} -O2"
fi
if [ "${FCFLAGS/-O}" != "${FCFLAGS}" -a "${NEW_FCFLAGS/-O}" = "${NEW_FCFLAGS}" ]; then
NEW_FCFLAGS="${NEW_FCFLAGS} -O2"
fi
set +f # re-enable pathname expansion
export CFLAGS="${NEW_CFLAGS}"
export CXXFLAGS="${NEW_CXXFLAGS}"
export FFLAGS="${NEW_FFLAGS}"
export FCFLAGS="${NEW_FCFLAGS}"
return 0
}
test-flag-PROG() {
local comp=$1
local flags="$2"
[[ -z ${comp} || -z ${flags} ]] && \
return 1
local PROG=$(tc-get${comp})
${PROG} ${flags} -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1
}
# @FUNCTION: test-flag-CC
# @USAGE: <flag>
# @DESCRIPTION:
# Returns shell true if <flag> is supported by the C compiler, else returns shell false.
test-flag-CC() { test-flag-PROG "CC" "$1"; }
# @FUNCTION: test-flag-CXX
# @USAGE: <flag>
# @DESCRIPTION:
# Returns shell true if <flag> is supported by the C++ compiler, else returns shell false.
test-flag-CXX() { test-flag-PROG "CXX" "$1"; }
# @FUNCTION: test-flag-F77
# @USAGE: <flag>
# @DESCRIPTION:
# Returns shell true if <flag> is supported by the Fortran 77 compiler, else returns shell false.
test-flag-F77() { test-flag-PROG "F77" "$1"; }
# @FUNCTION: test-flag-FC
# @USAGE: <flag>
# @DESCRIPTION:
# Returns shell true if <flag> is supported by the Fortran 90 compiler, else returns shell false.
test-flag-FC() { test-flag-PROG "FC" "$1"; }
test-flags-PROG() {
local comp=$1
local flags
local x
shift
[[ -z ${comp} ]] && return 1
x=""
for x in "$@" ; do
test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}"
done
echo "${flags}"
# Just bail if we dont have any flags
[[ -n ${flags} ]]
}
# @FUNCTION: test-flags-CC
# @USAGE: <flags>
# @DESCRIPTION:
# Returns shell true if <flags> are supported by the C compiler, else returns shell false.
test-flags-CC() { test-flags-PROG "CC" "$@"; }
# @FUNCTION: test-flags-CXX
# @USAGE: <flags>
# @DESCRIPTION:
# Returns shell true if <flags> are supported by the C++ compiler, else returns shell false.
test-flags-CXX() { test-flags-PROG "CXX" "$@"; }
# @FUNCTION: test-flags-F77
# @USAGE: <flags>
# @DESCRIPTION:
# Returns shell true if <flags> are supported by the Fortran 77 compiler, else returns shell false.
test-flags-F77() { test-flags-PROG "F77" "$@"; }
# @FUNCTION: test-flags-FC
# @USAGE: <flags>
# @DESCRIPTION:
# Returns shell true if <flags> are supported by the Fortran 90 compiler, else returns shell false.
test-flags-FC() { test-flags-PROG "FC" "$@"; }
# @FUNCTION: test-flags
# @USAGE: <flags>
# @DESCRIPTION:
# Short-hand that should hopefully work for both C and C++ compiler, but
# its really only present due to the append-flags() abomination.
test-flags() { test-flags-CC "$@"; }
# @FUNCTION: test_flag
# @DESCRIPTION:
# DEPRICIATED, use test-flags()
test_flag() {
ewarn "test_flag: deprecated, please use test-flags()!" >&2
test-flags-CC "$@"
}
# @FUNCTION: test_version_info
# @USAGE: <version>
# @DESCRIPTION:
# Returns shell true if the current C compiler version matches <version>, else returns shell false.
# Accepts shell globs.
test_version_info() {
if [[ $($(tc-getCC) --version 2>&1) == *$1* ]]; then
return 0
else
return 1
fi
}
# @FUNCTION: strip-unsupported-flags
# @DESCRIPTION:
# Strip {C,CXX,F,FC}FLAGS of any flags not supported by the active toolchain.
strip-unsupported-flags() {
export CFLAGS=$(test-flags-CC ${CFLAGS})
export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS})
export FFLAGS=$(test-flags-F77 ${FFLAGS})
export FCFLAGS=$(test-flags-FC ${FCFLAGS})
}
# @FUNCTION: get-flag
# @USAGE: <flag>
# @DESCRIPTION:
# Find and echo the value for a particular flag. Accepts shell globs.
get-flag() {
local f findflag="$1"
# this code looks a little flaky but seems to work for
# everything we want ...
# for example, if CFLAGS="-march=i686":
# `get-flag -march` == "-march=i686"
# `get-flag march` == "i686"
for f in ${CFLAGS} ${CXXFLAGS} ${FFLAGS} ${FCFLAGS} ; do
if [ "${f/${findflag}}" != "${f}" ] ; then
printf "%s\n" "${f/-${findflag}=}"
return 0
fi
done
return 1
}
# @FUNCTION: has_hardened
# @DESCRIPTION:
# DEPRECATED - use gcc-specs-relro or gcc-specs-now from toolchain-funcs
has_hardened() {
ewarn "has_hardened: deprecated, please use gcc-specs-{relro,now}()!" >&2
test_version_info Hardened && return 0
# The specs file wont exist unless gcc has GCC_SPECS support
[[ -f ${GCC_SPECS} && ${GCC_SPECS} != ${GCC_SPECS/hardened/} ]]
}
# @FUNCTION: has_pic
# @DESCRIPTION:
# DEPRECATED - use gcc-specs-pie from toolchain-funcs
# indicate whether PIC is set
has_pic() {
ewarn "has_pic: deprecated, please use gcc-specs-pie()!" >&2
[[ ${CFLAGS/-fPIC} != ${CFLAGS} || \
${CFLAGS/-fpic} != ${CFLAGS} ]] || \
gcc-specs-pie
}
# @FUNCTION: has_pie
# @DESCRIPTION:
# DEPRECATED - use gcc-specs-pie from toolchain-funcs
# indicate whether PIE is set
has_pie() {
ewarn "has_pie: deprecated, please use gcc-specs-pie()!" >&2
[[ ${CFLAGS/-fPIE} != ${CFLAGS} || \
${CFLAGS/-fpie} != ${CFLAGS} ]] || \
gcc-specs-pie
}
# @FUNCTION: has_ssp_all
# @DESCRIPTION:
# DEPRECATED - use gcc-specs-ssp from toolchain-funcs
# indicate whether code for SSP is being generated for all functions
has_ssp_all() {
ewarn "has_ssp_all: deprecated, please use gcc-specs-ssp()!" >&2
# note; this matches only -fstack-protector-all
[[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \
-n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \
gcc-specs-ssp-to-all
}
# @FUNCTION: has_ssp
# @DESCRIPTION:
# DEPRECATED - use gcc-specs-ssp from toolchain-funcs
# indicate whether code for SSP is being generated
has_ssp() {
ewarn "has_ssp: deprecated, please use gcc-specs-ssp()!" >&2
# note; this matches both -fstack-protector and -fstack-protector-all
[[ ${CFLAGS/-fstack-protector} != ${CFLAGS} || \
-n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP__) ]] || \
gcc-specs-ssp
}
# @FUNCTION: has_m64
# @DESCRIPTION:
# This doesn't test if the flag is accepted, it tests if the flag actually
# WORKS. Non-multilib gcc will take both -m32 and -m64. If the flag works
# return code is 0, else the return code is 1.
has_m64() {
# this doesnt test if the flag is accepted, it tests if the flag
# actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
# please dont replace this function with test_flag in some future
# clean-up!
local temp="$(emktemp)"
echo "int main() { return(0); }" > "${temp}".c
MY_CC=$(tc-getCC)
${MY_CC/ .*/} -m64 -o "$(emktemp)" "${temp}".c > /dev/null 2>&1
local ret=$?
rm -f "${temp}".c
[[ ${ret} != 1 ]] && return 0
return 1
}
# @FUNCTION: has_m32
# @DESCRIPTION:
# This doesn't test if the flag is accepted, it tests if the flag actually
# WORKS. Non-mulilib gcc will take both -m32 and -64. If the flag works return
# code is 0, else return code is 1.
has_m32() {
# this doesnt test if the flag is accepted, it tests if the flag
# actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
# please dont replace this function with test_flag in some future
# clean-up!
[ "$(tc-arch)" = "amd64" ] && has_multilib_profile && return 0
local temp=$(emktemp)
echo "int main() { return(0); }" > "${temp}".c
MY_CC=$(tc-getCC)
${MY_CC/ .*/} -m32 -o "$(emktemp)" "${temp}".c > /dev/null 2>&1
local ret=$?
rm -f "${temp}".c
[[ ${ret} != 1 ]] && return 0
return 1
}
# @FUNCTION: replace-sparc64-flags
# @DESCRIPTION:
# Sets mcpu to v8 and uses the original value as mtune if none specified.
replace-sparc64-flags() {
local SPARC64_CPUS="ultrasparc3 ultrasparc v9"
if [ "${CFLAGS/mtune}" != "${CFLAGS}" ]; then
for x in ${SPARC64_CPUS}; do
CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8}"
done
else
for x in ${SPARC64_CPUS}; do
CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}"
done
fi
if [ "${CXXFLAGS/mtune}" != "${CXXFLAGS}" ]; then
for x in ${SPARC64_CPUS}; do
CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8}"
done
else
for x in ${SPARC64_CPUS}; do
CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}"
done
fi
export CFLAGS CXXFLAGS
}
# @FUNCTION: append-ldflags
# @USAGE: <flags>
# @DESCRIPTION:
# Add extra <flags> to the current LDFLAGS.
append-ldflags() {
[[ -z $* ]] && return 0
local flag
for flag in "$@"; do
[[ ${flag} == -l* ]] && \
ewarn "Appending a library link instruction (${flag}); libraries to link to should not be passed through LDFLAGS"
done
export LDFLAGS="${LDFLAGS} $*"
return 0
}
# @FUNCTION: filter-ldflags
# @USAGE: <flags>
# @DESCRIPTION:
# Remove particular <flags> from LDFLAGS. Accepts shell globs.
filter-ldflags() {
_filter-var LDFLAGS "$@"
return 0
}
# @FUNCTION: raw-ldflags
# @USAGE: <flags>
# @DESCRIPTION:
# Turn C style ldflags (-Wl,-foo) into straight ldflags - the results
# are suitable for passing directly to 'ld'; note LDFLAGS is usually passed
# to gcc where it needs the '-Wl,'.
raw-ldflags() {
local x input="$@"
[[ -z ${input} ]] && input=${LDFLAGS}
set --
for x in ${input} ; do
x=${x#-Wl,}
set -- "$@" ${x//,/ }
done
echo "$@"
}
# @FUNCTION: bindnow-flags
# @RETURN: Returns the flags to enable "now" binding in the current selected linker.
# @DESCRIPTION:
# DEPRECATED - Gets the flags needed for "NOW" binding
bindnow-flags() {
eerror "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
die "Stop using bindnow-flags."
}
# @FUNCTION: no-as-needed
# @RETURN: Flag to disable asneeded behavior for use with append-ldflags.
no-as-needed() {
case $($(tc-getLD) -v 2>&1 </dev/null) in
*GNU*) # GNU ld
echo "-Wl,--no-as-needed" ;;
esac
}
# Some tests for when we screw with things and want to make
# sure we didn't break anything
#TESTS() {
# CFLAGS="-a -b -c=1"
# CXXFLAGS="-x -y -z=2"
# LDFLAGS="-l -m -n=3"
#
# die() { exit 1; }
# (is-flag 1 2 3) && die
# (is-ldflag 1 2 3) && die
#
# is-flagq -l && die
# is-ldflagq -a && die
# is-flagq -a || die
# is-flagq -x || die
# is-ldflagq -n=* || die
# is-ldflagq -n && die
#
# strip-unsupported-flags
# [[ ${CFLAGS} == "-c=1" ]] || die
# [[ ${CXXFLAGS} == "-y -z=2" ]] || die
#
# echo "All tests pass"
#}
#TESTS

File diff suppressed because it is too large Load diff

View file

@ -1,23 +0,0 @@
AUX auth_conf.sub 790 BLAKE2B 28ad6e3b494396c0bd42e7ac13de9e8e3cbd553f3e78e787925e0c08b6896e479da495b94b511e739cbe31fc3ab3e6948373b566db5c9aeb3cd46cb52109ba31 SHA512 c0799a44e0fabdd4eb33c9c4a009c7abed80d5b2ab773206b11d644e54bb79004c5741fc510df77fe9856bdff979a14f1cf9a58da19fb00aaae05c623da287b3
AUX exim-4.14-tail.patch 446 BLAKE2B 62e46f052c6d958246570c40ed67819f67c4a4ee74fbfe3c82c6f8494ef98ab65089845dd89ffc01516a0c861d9003ade5e4d67476cb34185d27b99cf233dd86 SHA512 a0365b15f0a48076f9660ebc424d48f68995ac21bbf77f407bdca5103ca65758d7f2241d0151eb5c78476557e240b24a95c23d3b12cfffc1b34ab6f89f2c2110
AUX exim-4.20-maildir.patch 478 BLAKE2B 60feb354143a35631c3a71e46410e069d67cb7eab6643e6b2d4f4cfc15b497b96bb8f69a02ec67c3a6294f4d3c1da9e0787ca996f140713a19ecbcacc8ce0d4d SHA512 2c6f68e3c162a51e62ce6e391db8e79733f11bba20cc8778737650158203b88f9a77b7bbbd2a32b2cf8ae50f039b794fb0996f198acec6a50b94cad6a111f432
AUX exim-4.69-r1.27021.patch 1447 BLAKE2B d1f40f68b056ae49cd78408d3dc54a1f4fb1584fec003c68645c8a7245499ef96c1bc3af8aac57d31ee10cb0d4ff2808a50bf35bb36f17df929b2c24abed90e2 SHA512 45a5b833c698da4690485716c7c45d762a9194d5ae41514028bbad548bbd44373cf7a3a3c6a1c4f635f3f50d1695ac7ead098bf8be15cd1f691c7cc6c7f8d715
AUX exim-4.74-radius-db-ENV-clash.patch 667 BLAKE2B 3cc03dd925333774c08484efbb5daadcebc819cc49283205960146f176d225c8952dacb891e1a1be13046bb68e6d6571a732dbbb7d78c6b1758d93f256e41509 SHA512 040bbdb2259df882569a428b7fef03f89c3685428654ac29e93360a4791bdabe66e52d33d14f0822461fac119295bd31aad5998f63d59d4af057bd26b310a568
AUX exim-4.76-crosscompile.patch 462 BLAKE2B de78322f93760cef0d5a768b8be6c723f00d5c7557da6189ffa6ee34215c41ebe8896a2457b2e6a704d05a1730eab09c8cc73e3ba3140954f9ac32423210b612 SHA512 d4fd4417c1ce727f139999c399795312cdbbb9735d0793d68f8e3150240bc53b31277cb26f9946ba549b34c661fc0a61147d376bda09aa6763cab55d80d62343
AUX exim-4.93-CVE-2020-12783.patch 2469 BLAKE2B b4a98d5d5c45756ea8da01cb18bae40b6d242076557e80cc79dfd2d3d21b96f9860c2a6b17433a849e631504b8669a281b1ae3d0a67f6d599b631df03e54a630 SHA512 5efc5fb8375cdd560d8efe414094751c875a3dd363c93d8228248440e3c269348d54e039c52d311113d2a62a8d0016d1ad0e44314350ea6a5e3c59a9d66af58a
AUX exim-4.93-as-needed-ldflags.patch 6013 BLAKE2B 2de473f089a36cabd5481020524dcb2efb7a5681b224608a8454aebc70e07f7776fe812f02fa5d81fb80b25bc2cc154924953d173d65664b1e576176a01191b9 SHA512 df6c18a7d092d9069dd6d4177154681197de86ab41dbd399055ad663cbd0c7da149f8bbcb7c888965851475ee2cf891dc934f1d5ad7a4ea3dc46a54ece582418
AUX exim-4.93-fno-common.patch 767 BLAKE2B cd66b56d88badd97c1d081c3458adf294352b9f34dc0faee820d75ed4b97be8a5f313c4ba46ea08d4c3ba4744badf3759393bea1455a3e7fc04d80939d5ec49e SHA512 5fc5cab9091296e0bc7665e9e08f5232decef4585c7504abab104a8a7cf1c69aee4f535f1e1214b94aeb856b8f5620c42608f35e7c7ff26667de88a8719bd301
AUX exim-4.93-localscan_dlopen.patch 9585 BLAKE2B 02b11e75c94d70a787973e89dc329fc006b263d4411ccfb177acf596fd3832cc471004394cf126a9299b62113dc25fcf61bff9bb63d39c19f60ca7203c732be3 SHA512 5de142c1da26cd60e9e05de25e7c7de1f338591b3d73ea9ff151dc446ca45a2361841a28776e9680e77183f2071a7cac68063d5f83e79257b7b4a4884e1e9110
AUX exim-4.93-radius.patch 2791 BLAKE2B 94edcc141e9ed4b8f669298fc9af5e2fdc2835488567917721c7061835e7d7980c3944cb21b2cdb46041be7e8f93d57fc4d26cda0aa9583b98a594ee6c11260a SHA512 8393bddb5f85879e6fb3e4a8272df8583d99600f5ef25abbcea429743e9e396248e47c2dabeba7c6178d2a4d21f82ae68cde92a50bcb9598370bd0b3d8bc220f
AUX exim-submission.socket 161 BLAKE2B 409a5a687897af369a6a2ff0c30564096cc6b308dbc5d0afb6742df44d2aa972e45bad9681d2cb72be9731b260d23fdadb80bae644e7b875af5e34e9c8b8b40f SHA512 4a233761793e3510e9efa5aad3a6098c41b757f13133a7ea825680f2b393aba8d7935f16bf1dd065dde884fe7ba45639a8d398333a7d9bf0a6b72f88c8f2a09d
AUX exim-submission_at.service 360 BLAKE2B 9ebcac1ab0f01a8264141843a4e711d77f634bdd910406bd466a0c197fdad8a9ff4bc31b9b28ef73c810aaff3e549eb60c0a2546507910dfc800da154eb1da00 SHA512 dc28698f15e8eaa4614ae81fc8cb76d92fed1110ce02f7a6ee8feace418dbb194711eb2d4dd444cf818628c11721e21d80b7b974879ab6ddd78cc717cce17c2f
AUX exim.confd 141 BLAKE2B bc200e6121544d17e7feb0e162b5f6a5157647c3323492218da1556a19f3a2febf89a698e157a6dc657540d2f46088a9b1e34700655c715fbeaf0c201bc4aa9f SHA512 cb5e4aa71d3f0b7945e9806064f6a3ab64cb894381654ead40c73a49ae2d1bbb3dc587919952a09b2c81b9fcf8784f73d59c12081cda96a5b7210442f5088998
AUX exim.logrotate 116 BLAKE2B c3689e95e31ccaaaca70e43ff8dbe3e69105da2266e701b57673fa90ee1cdf8c55be0fa2010ad9c10b2fba5443d6303584411bfe56198695995b5491efcfd8de SHA512 24bb8dcfadb1204c2ab0316d57de287b5092754731949390cfb3c88fa6827d45acfe1048cf9e26f615ca0449e8d780d0c98ea55ed61be9d1558755d3e53b9ec8
AUX exim.rc10 1135 BLAKE2B abc7247ee8171069f30f954d9e4275fa85f09f5488a372f9c4f7fd6cf16247dce6bd306d0a8631185cd1afb92ca8919301bf5f21aa3fcac5929a715b9abec510 SHA512 5c7cee6139145983c62df8f5ef6c401d34d2eb7eae3146c28045129ba40868ca4d3d10d4b7056887cf4d4d8a83271592f7fa0a527663f727fa8694b621eb5624
AUX exim.service 229 BLAKE2B 6d6396ef98b8e7c4fcfa28e24223bd58393387abedfb960284dfd1a297d1612deea6b77e2affeca8c5ff6f7db3eb32717893ed0dc1eaf3525e6969520e8589a3 SHA512 a071e9fb74b5fc2fdf0c73ad64ddfbc3954d8f7095d6a363dacf8c75d72a479fbf6821822ec5c8f3846d7687342e1bd447b97f91ca7b0582e5c98008aac30cca
AUX exim.socket 139 BLAKE2B bb8281a98fdac1b52031d5250fd1e658bf5a2c32e24b49ed0daa857d0d32285abf6db23c3d717992c43443ab4bcd97a19ec3811f182200a2d99a48ced6cfb6bc SHA512 db621116907ceb573e6f34581f47c91f751bff593054d7ddc32397b34c7f2405bec184bdb0589d2ac457fa3a61bcba072761e3a6293a99c9c764d2d9fd6069ae
AUX exim_at.service 140 BLAKE2B 8624f4a555e2acdc7aaf917952c4152ad00dc063a51076aefa1d023d47d5f7fe8b268f3308734f363ed9628cd8551ccac7fc369657e0fdf65507d2e6419f704c SHA512 11c8133ee15b3e5193c9b1c59aed66c81b6e045dd23310bede9fcde6c88905db5ef08afdb798b53b75a7465915ea1247e980edf95db07a7f9b7bb58ce95fbb5a
DIST exim-4.93.0.4.tar.xz 1804696 BLAKE2B 721336101104d9c71b3bb6f432e382c28ad17d80cdb50d04213989e65a719d906caf8eb95639bfaf7a1bfdd62c7000d9df14484953446ecfca901fd7c708514e SHA512 84951849b69399d6f187d2801760dc0cb9e61c88c7c88aaca4e07e48120199a6be94b2236d058ffeacb8d611dd84056b610d480353c301a3ad5799768dd39d96
DIST system_filter.exim.gz 3075 BLAKE2B d05e872b5cef377d29126cda03fc0a74c8777b2119b76ff43da6e8de808035eb9bfcb034a85d81824f135d484e864bfc0629fc1af2c228a7277d5ee7cf9cde79 SHA512 cb358d3ce2499a0bb5920d962a06f2af8486e55ec90c8c928bd8e3aefb279aa57f5f960d5adfcef68bd94110b405eaa144e9629cfe6014a529c79c544600bbf3
EBUILD exim-4.93.0.4-r2.ebuild 13860 BLAKE2B 2c9c6e46b73cad9842e489883aec9b7b920e327931de85731c72d2943e84e44819b15f55a34cbbe596364b32118f03bedbcce05b516aff99d448697f63386408 SHA512 4a56d5b762de7d2f0fe09fd60a99f88851225012c05340ba6ade1228e63c2ef95043db1ec71bf2d588812b91f6ae1eeb39accb25dc9f5b179c5a88dddcfdfdc2
MISC metadata.xml 2457 BLAKE2B c1dcbaedd069b41c4cfb190806b44014229d53cf6d6f72e04b99dc91f223567cb4f30100792aae72658780da0579fa26e6fb8a0266565bcc0c307996d59ac3ed SHA512 9044abccd15525c7676fc218b62d9b663bd155482894eced9c0cfc8a22e8cd7353009adc75a9f3de15b14f267e6ee6b4f4c91d8bd9260931c0b9de6bf48c762f

View file

@ -1,590 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit db-use toolchain-funcs multilib pam systemd
IUSE="arc +dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl dsn elibc_glibc exiscan-acl gnutls idn ipv6 ldap lmtp maildir mbx mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl selinux spf sqlite srs +ssl syslog tcpd +tpda X"
REQUIRED_USE="
arc? ( dkim spf )
dane? ( ssl !gnutls )
dmarc? ( dkim spf )
dkim? ( ssl !gnutls )
gnutls? ( ssl )
pkcs11? ( ssl )
spf? ( exiscan-acl )
srs? ( exiscan-acl )
"
# NOTE on USE="gnutls dane", gnutls[dane] is masked in base, unmasked
# for x86 and amd64 only, due to this, repoman won't allow depending on
# gnutls[dane] for all else. Because we cannot express USE=dane when
# USE=gnutls is in effect only in package.use.mask, the only option we
# have left is to a) ignore the dependency (but that results in bug
# #661164) or b) mask the usage of USE=dane with USE=gnutls. Both are
# incorrect, but b) is the only "correct" view from repoman.
SDIR=$([[ ${PV} == *_rc* ]] && echo /test
[[ ${PV} == *.*.*.* ]] && echo /fixes)
COMM_URI="https://downloads.exim.org/exim4${SDIR}"
DESCRIPTION="A highly configurable, drop-in replacement for sendmail"
SRC_URI="${COMM_URI}/${P//rc/RC}.tar.xz
mirror://gentoo/system_filter.exim.gz"
HOMEPAGE="https://www.exim.org/"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-solaris"
COMMON_DEPEND=">=sys-apps/sed-4.0.5
( >=sys-libs/db-3.2:= <sys-libs/db-6:= )
dev-libs/libpcre
idn? ( net-dns/libidn:= net-dns/libidn2:= )
perl? ( dev-lang/perl:= )
pam? ( sys-libs/pam )
tcpd? ( sys-apps/tcp-wrappers )
ssl? (
gnutls? (
net-libs/gnutls:0=[pkcs11?]
dev-libs/libtasn1
)
!gnutls? (
dev-libs/openssl:0=
)
)
ldap? ( >=net-nds/openldap-2.0.7 )
nis? (
elibc_glibc? (
net-libs/libtirpc
>=net-libs/libnsl-1:=
)
)
mysql? ( dev-db/mysql-connector-c:= )
postgres? ( dev-db/postgresql:= )
sasl? ( >=dev-libs/cyrus-sasl-2.1.26-r2 )
redis? ( dev-libs/hiredis )
spf? ( >=mail-filter/libspf2-1.2.5-r1 )
dmarc? ( mail-filter/opendmarc )
srs? ( mail-filter/libsrs_alt )
X? (
x11-libs/libX11
x11-libs/libXmu
x11-libs/libXt
x11-libs/libXaw
)
sqlite? ( dev-db/sqlite )
radius? ( net-dialup/freeradius-client )
virtual/libiconv
elibc_glibc? ( net-libs/libnsl )
"
# added X check for #57206
BDEPEND="virtual/pkgconfig"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}
!mail-mta/courier
!mail-mta/esmtp
!mail-mta/mini-qmail
!<mail-mta/msmtp-1.4.19-r1
!>=mail-mta/msmtp-1.4.19-r1[mta]
!mail-mta/netqmail
!mail-mta/nullmailer
!mail-mta/postfix
!mail-mta/qmail-ldap
!mail-mta/sendmail
!mail-mta/opensmtpd
!<mail-mta/ssmtp-2.64-r2
!>=mail-mta/ssmtp-2.64-r2[mta]
!net-mail/mailwrapper
>=net-mail/mailbase-0.00-r5
virtual/logger
dcc? ( mail-filter/dcc )
selinux? ( sec-policy/selinux-exim )
"
S=${WORKDIR}/${P//rc/RC}
src_prepare() {
# Legacy patches which need a respin for -p1
eapply -p0 "${FILESDIR}"/exim-4.14-tail.patch
eapply -p0 "${FILESDIR}"/exim-4.74-radius-db-ENV-clash.patch # 287426
eapply "${FILESDIR}"/exim-4.93-as-needed-ldflags.patch # 352265, 391279
eapply -p0 "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591
eapply "${FILESDIR}"/exim-4.69-r1.27021.patch
eapply "${FILESDIR}"/exim-4.93-localscan_dlopen.patch
eapply -p2 "${FILESDIR}"/exim-4.93-radius.patch # 720364
eapply "${FILESDIR}"/exim-4.93-CVE-2020-12783.patch # 722484
eapply "${FILESDIR}"/exim-4.93-fno-common.patch # 723430
if use maildir ; then
eapply "${FILESDIR}"/exim-4.20-maildir.patch
else
eapply -p0 "${FILESDIR}"/exim-4.80-spool-mail-group.patch # 438606
fi
eapply_user
# user Exim believes it should be
MAILUSER=mail
MAILGROUP=mail
if use prefix && [[ ${EUID} != 0 ]] ; then
MAILUSER=$(id -un)
MAILGROUP=$(id -gn)
fi
}
src_configure() {
# general config and paths
local aliases="${EPREFIX}/etc/mail/aliases"
sed -i \
-e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${aliases}'" \
src/configure.default || die
sed -i -e 's/^buildname=.*/buildname=exim-gentoo/' Makefile || die
if use elibc_musl; then
sed -i -e 's/^LIBS = -lnsl/LIBS =/g' OS/Makefile-Linux || die
fi
local conffile="${EPREFIX}/etc/exim/exim.conf"
sed -e "48i\CFLAGS=${CFLAGS}" \
-e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \
-e "s;EXIM_USER=;EXIM_USER=ref:${MAILUSER};" \
-e "s:CONFIGURE_FILE=.*$:CONFIGURE_FILE=${conffile}:" \
-e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \
-e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \
src/EDITME > Local/Makefile || die
# work on Local/Makefile from now on
cd Local
cat >> Makefile <<- EOC
INFO_DIRECTORY=${EPREFIX}/usr/share/info
PID_FILE_PATH=${EPREFIX}/run/exim.pid
SPOOL_DIRECTORY=${EPREFIX}/var/spool/exim
HAVE_ICONV=yes
EOC
# if we use libiconv, now is the time to tell so
if use !elibc_glibc && use !elibc_musl ; then
cat >> Makefile <<- EOC
EXTRALIBS_EXIM=-liconv
EOC
fi
# support for IPv6
if use ipv6; then
cat >> Makefile <<- EOC
HAVE_IPV6=YES
EOC
fi
# support i18n/IDNA
if use idn; then
cat >> Makefile <<- EOC
SUPPORT_I18N=yes
SUPPORT_I18N_2008=yes
EXTRALIBS_EXIM += -lidn -lidn2
EOC
fi
#
# mail storage formats
#
# mailstore is Exim's traditional storage format
cat >> Makefile <<- EOC
SUPPORT_MAILSTORE=yes
EOC
# mbox
if use mbx; then
cat >> Makefile <<- EOC
SUPPORT_MBX=yes
EOC
fi
# maildir
if use maildir; then
cat >> Makefile <<- EOC
SUPPORT_MAILDIR=yes
EOC
fi
#
# lookup methods
# use the "native" interfaces to the DBM and CDB libraries, support
# passwd and directory lookups by default
local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2"
cat >> Makefile <<- EOC
USE_DB=yes
LOOKUP_CDB=yes
LOOKUP_PASSWD=yes
LOOKUP_DSEARCH=yes
# keep include in CFLAGS because exim.h -> dbstuff.h -> db.h
CFLAGS += -I$(db_includedir ${DB_VERS})
DBMLIB = -l$(db_libname ${DB_VERS})
EOC
if ! use dnsdb; then
# DNSDB lookup is enabled by default
sed -i -e 's:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:' Makefile || die
fi
if use ldap; then
cat >> Makefile <<- EOC
LOOKUP_LDAP=yes
LDAP_LIB_TYPE=OPENLDAP2
LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/ldap
LOOKUP_LIBS += -lldap -llber
EOC
fi
if use mysql; then
cat >> Makefile <<- EOC
LOOKUP_MYSQL=yes
LOOKUP_INCLUDE += $(mysql_config --include)
LOOKUP_LIBS += $(mysql_config --libs)
EOC
fi
if use nis; then
cat >> Makefile <<- EOC
LOOKUP_NIS=yes
LOOKUP_NISPLUS=yes
EOC
if use elibc_glibc ; then
cat >> Makefile <<- EOC
LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/tirpc
LOOKUP_LIBS += -lnsl
EOC
fi
fi
if use postgres; then
cat >> Makefile <<- EOC
LOOKUP_PGSQL=yes
LOOKUP_INCLUDE += -I$(pg_config --includedir)
LOOKUP_LIBS += -L$(pg_config --libdir) -lpq
EOC
fi
if use sqlite; then
cat >> Makefile <<- EOC
LOOKUP_SQLITE=yes
LOOKUP_SQLITE_PC=sqlite3
EOC
fi
if use redis; then
cat >> Makefile <<- EOC
LOOKUP_REDIS=yes
LOOKUP_LIBS += -lhiredis
EOC
fi
# Exim monitor, enabled by default, controlled via X USE-flag,
# disable if not requested, bug #46778
if use X; then
cp ../exim_monitor/EDITME eximon.conf || die
cat >> Makefile <<- EOC
EXIM_MONITOR=eximon.bin
EOC
fi
#
# features
#
# content scanning support
if use exiscan-acl; then
cat >> Makefile <<- EOC
WITH_CONTENT_SCAN=yes
EOC
fi
# DomainKeys Identified Mail, RFC4871
if ! use dkim; then
# DKIM is enabled by default
cat >> Makefile <<- EOC
DISABLE_DKIM=yes
EOC
fi
# Per-Recipient-Data-Response
if ! use prdr; then
# PRDR is enabled by default
cat >> Makefile <<- EOC
DISABLE_PRDR=yes
EOC
fi
# Transport post-delivery actions
if use !tpda && use !dane; then
# EVENT is enabled by default
cat >> Makefile <<- EOC
DISABLE_EVENT=yes
EOC
fi
# log to syslog
if use syslog; then
local eximlog="${EPREFIX}/var/log/exim/exim_%s.log"
sed -i \
-e "s:LOG_FILE_PATH=${eximlog}:LOG_FILE_PATH=syslog:" \
Makefile || die
cat >> Makefile <<- EOC
LOG_FILE_PATH=syslog
EOC
else
cat >> Makefile <<- EOC
LOG_FILE_PATH=${EPREFIX}/var/log/exim/exim_%s.log
EOC
fi
# starttls support (ssl)
if use ssl; then
if use gnutls; then
echo "USE_GNUTLS=yes" >> Makefile
echo "USE_GNUTLS_PC=gnutls $(use dane && echo gnutls-dane)" \
>> Makefile
use pkcs11 || echo "AVOID_GNUTLS_PKCS11=yes" >> Makefile
else
echo "USE_OPENSSL=yes" >> Makefile
echo "USE_OPENSSL_PC=openssl" >> Makefile
fi
else
echo "DISABLE_TLS=yes" >> Makefile
fi
# TCP wrappers
if use tcpd; then
cat >> Makefile <<- EOC
USE_TCP_WRAPPERS=yes
EXTRALIBS_EXIM += -lwrap
EOC
fi
# Light Mail Transport Protocol
if use lmtp; then
cat >> Makefile <<- EOC
TRANSPORT_LMTP=yes
EOC
fi
# embedded Perl
if use perl; then
cat >> Makefile <<- EOC
EXIM_PERL=perl.o
EOC
fi
# dlfunc
if use dlfunc; then
cat >> Makefile <<- EOC
EXPAND_DLFUNC=yes
HAVE_LOCAL_SCAN=yes
DLOPEN_LOCAL_SCAN=yes
EOC
fi
# Proxy Protocol
if use proxy; then
cat >> Makefile <<- EOC
SUPPORT_PROXY=yes
EOC
fi
# DANE
if use !dane; then
# DANE is enabled by default
sed -i -e 's:^SUPPORT_DANE=yes:# SUPPORT_DANE=yes:' Makefile || die
fi
# DMARC
if use dmarc; then
cat >> Makefile <<- EOC
SUPPORT_DMARC=yes
EXTRALIBS_EXIM += -lopendmarc
EOC
fi
# Sender Policy Framework
if use spf; then
cat >> Makefile <<- EOC
SUPPORT_SPF=yes
EXTRALIBS_EXIM += -lspf2
EOC
fi
#
# experimental features
#
# Authenticated Receive Chain
if use arc; then
echo "EXPERIMENTAL_ARC=yes">> Makefile
fi
# Distributed Checksum Clearinghouse
if use dcc; then
echo "EXPERIMENTAL_DCC=yes">> Makefile
fi
# Sender Rewriting Scheme
if use srs; then
cat >> Makefile <<- EOC
EXPERIMENTAL_SRS=yes
EXTRALIBS_EXIM += -lsrs_alt
EOC
fi
# Delivery Sender Notifications extra information in fail message
if use dsn; then
cat >> Makefile <<- EOC
EXPERIMENTAL_DSN_INFO=yes
EOC
fi
#
# authentication (SMTP AUTH)
#
# standard bits
cat >> Makefile <<- EOC
AUTH_SPA=yes
AUTH_CRAM_MD5=yes
AUTH_PLAINTEXT=yes
EOC
# Cyrus SASL
if use sasl; then
cat >> Makefile <<- EOC
CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/run/saslauthd/mux
AUTH_CYRUS_SASL=yes
AUTH_LIBS += -lsasl2
EOC
fi
# Dovecot
if use dovecot-sasl; then
cat >> Makefile <<- EOC
AUTH_DOVECOT=yes
EOC
fi
# Pluggable Authentication Modules
if use pam; then
cat >> Makefile <<- EOC
SUPPORT_PAM=yes
AUTH_LIBS += -lpam
EOC
fi
# Radius
if use radius; then
cat >> Makefile <<- EOC
RADIUS_CONFIG_FILE=${EPREFIX}/etc/radiusclient/radiusclient.conf
RADIUS_LIB_TYPE=RADIUSCLIENTNEW
AUTH_LIBS += -lfreeradius-client
EOC
fi
}
src_compile() {
emake CC="$(tc-getCC)" HOSTCC="$(tc-getBUILD_CC)" \
AR="$(tc-getAR) cq" RANLIB="$(tc-getRANLIB)" FULLECHO=''
}
src_install() {
cd "${S}"/build-exim-gentoo || die
dosbin exim
if use X; then
dosbin eximon.bin
dosbin eximon
fi
fperms 4755 /usr/sbin/exim
dosym exim /usr/sbin/sendmail
dosym exim /usr/sbin/rsmtp
dosym exim /usr/sbin/rmail
dosym ../sbin/exim /usr/bin/mailq
dosym ../sbin/exim /usr/bin/newaliases
dosym ../sbin/sendmail /usr/lib/sendmail
for i in exicyclog exim_dbmbuild exim_dumpdb exim_fixdb exim_lock \
exim_tidydb exinext exiwhat exigrep eximstats exiqsumm exiqgrep \
convert4r3 convert4r4 exipick
do
dosbin $i
done
dodoc -r "${S}"/doc/.
doman "${S}"/doc/exim.8
use dsn && dodoc "${S}"/README.DSN
# conf files
insinto /etc/exim
newins "${S}"/src/configure.default exim.conf.dist
if use exiscan-acl; then
newins "${S}"/src/configure.default exim.conf.exiscan-acl
fi
doins "${WORKDIR}"/system_filter.exim
doins "${FILESDIR}"/auth_conf.sub
if use pam; then
pamd_mimic system-auth exim auth account
fi
# headers, #436406
if use dlfunc ; then
# fixup includes so they actually can be found when including
sed -i \
-e '/#include "\(config\|store\|mytypes\).h"/s:"\(.\+\)":<exim/\1>:' \
local_scan.h || die
insinto /usr/include/exim
doins {config,local_scan}.h ../src/{mytypes,store}.h
fi
insinto /etc/logrotate.d
newins "${FILESDIR}/exim.logrotate" exim
newinitd "${FILESDIR}"/exim.rc10 exim
newconfd "${FILESDIR}"/exim.confd exim
systemd_dounit \
"${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket}
systemd_newunit \
"${FILESDIR}"/exim_at.service 'exim@.service'
systemd_newunit \
"${FILESDIR}"/exim-submission_at.service 'exim-submission@.service'
diropts -m 0750 -o ${MAILUSER} -g ${MAILGROUP}
keepdir /var/log/${PN}
}
pkg_postinst() {
if [[ ! -f ${EROOT}/etc/exim/exim.conf ]] ; then
einfo "${EROOT}/etc/exim/system_filter.exim is a sample system_filter."
einfo "${EROOT}/etc/exim/auth_conf.sub contains the configuration sub"
einfo "for using smtp auth."
einfo "Please create ${EROOT}/etc/exim/exim.conf from"
einfo " ${EROOT}/etc/exim/exim.conf.dist."
fi
if use dmarc ; then
einfo "DMARC support requires ${EROOT}/etc/exim/opendmarc.tlds"
einfo "you can populate this file with the contents downloaded from"
einfo " https://publicsuffix.org/list/public_suffix_list.dat"
fi
if use dcc ; then
einfo "DCC support is experimental, you can find some limited"
einfo "documentation at the bottom of this prerelease message:"
einfo " http://article.gmane.org/gmane.mail.exim.devel/3579"
fi
use srs && einfo "SRS support is experimental"
use dsn && einfo "extra information in fail DSN message is experimental"
elog "The obsolete acl condition 'demime' is removed, the replacements"
elog "are the ACLs acl_smtp_mime and acl_not_smtp_mime"
}

View file

@ -1,25 +0,0 @@
######################################################################
# AUTHENTICATION CONFIGURATION #
######################################################################
# If you're using PAM to authenticate, lifes real simple.
# This plain directive works for nearly everything except windows MUA's the
# login directive will allow you to authenticate your Outlook 2000 and
# outlook express clients.
plain:
driver = plaintext
public_name = PLAIN
server_condition = "${if pam{$2:$3}{1}{0}}"
server_set_id = $2
login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${if pam{$1:${sg{$2}{:}{::}}}{1}{0}}"
server_set_id = $1
#
# FIXME
# Need to add authenticator for SPA!!

View file

@ -1,11 +0,0 @@
--- scripts/Configure-config.h.orig 2003-07-17 18:01:19.000000000 -0400
+++ scripts/Configure-config.h 2003-07-17 18:01:25.000000000 -0400
@@ -41,7 +41,7 @@
# Double-check that config.h is complete.
-if [ "`tail -1 config.h`" != "/* End of config.h */" ] ; then
+if [ "`tail -n 1 config.h`" != "/* End of config.h */" ] ; then
echo "*** config.h appears to be incomplete"
echo "*** unexpected failure in buildconfig program"
exit 1

View file

@ -1,14 +0,0 @@
diff -urN ./exim-4.20.orig/src/configure.default exim-4.20/src/configure.default
--- ./exim-4.20.orig/src/configure.default 2003-06-27 16:48:22.000000000 -0700
+++ exim-4.20/src/configure.default 2003-06-27 16:52:20.000000000 -0700
@@ -451,7 +451,9 @@
local_delivery:
driver = appendfile
- file = /var/mail/$local_part
+# file = /var/mail/$local_part
+ directory = /home/$local_part/.maildir
+ maildir_format
delivery_date_add
envelope_to_add
return_path_add

View file

@ -1,48 +0,0 @@
diff -urN exim-4.69.orig/src/configure.default exim-4.69/src/configure.default
--- exim-4.69.orig/src/configure.default 2008-05-05 10:17:44.000000000 +0100
+++ exim-4.69/src/configure.default 2008-05-05 10:18:26.000000000 +0100
@@ -592,6 +592,22 @@
pipe_transport = address_pipe
reply_transport = address_reply
+# This router runs procmail if users have a .procmailrc file
+procmail:
+ check_local_user
+ driver = accept
+ transport = procmail_pipe
+ require_files = ${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail
+ no_verify
+
+# This router runs maildrop if users have a .mailfilter file
+maildrop:
+ check_local_user
+ driver = accept
+ transport = maildrop_pipe
+ require_files = ${local_part}:+${home}:+${home}/.mailfilter:+/usr/bin/maildrop
+ no_verify
+
# This router matches local user mailboxes. If the router fails, the error
# message is "Unknown user".
@@ -676,6 +692,21 @@
address_reply:
driver = autoreply
+# This transport is used for procmail
+procmail_pipe:
+ driver = pipe
+ command = "/usr/bin/procmail -d ${local_part}"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+
+# This transport is used for courier-maildrop filtering (Maildir filter system)
+maildrop_pipe:
+ driver = pipe
+ command = "/usr/bin/maildrop -d ${local_part}"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
######################################################################

View file

@ -1,22 +0,0 @@
Nasty workaround for
http://bugs.gentoo.org/show_bug.cgi?id=287426
--- src/auths/call_radius.c
+++ src/auths/call_radius.c
@@ -10,6 +10,16 @@
/* This file was originally supplied by Ian Kirk. The libradius support came
from Alex Kiernan. */
+/* ugly hack to work around redefinition of ENV by radiusclient.h and
+ * db.h: define _DB_H_ so the db.h include thinks it's already included,
+ * we can get away with it like this, since this file doesn't use any db
+ * functions. */
+#ifndef _DB_H_
+#define _DB_H_ 1
+#define _DB_EXT_PROT_IN_ 1
+#define DB void
+#endif
+
#include "../exim.h"
/* This module contains functions that call the Radius authentication

View file

@ -1,15 +0,0 @@
https://bugs.gentoo.org/show_bug.cgi?id=266591
--- OS/Makefile-Base
+++ OS/Makefile-Base
@@ -114,8 +114,8 @@
# Targets for special-purpose configuration header builders
buildconfig: buildconfig.c
- @echo "$(CC) buildconfig.c"
- $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
+ @echo "$(HOSTCC) buildconfig.c"
+ $(FE)$(HOSTCC) $(HOSTCFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
# Target for the exicyclog utility script

View file

@ -1,83 +0,0 @@
auths/spa: fix for CVE-2020-12783
This is a combined patch of git commits:
57aa14b216432be381b6295c312065b2fd034f86
a04174dc2a84ae1008c23b6a7109e7fa3fb7b8b0
leaving out whitespace noise for a smaller patch
and made it apply to the 4.93 release
modified paths because Exim dists differ in layout from the git repo
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
Rework SPA fix to avoid overflows. Bug 2571
--- a/src/auths/auth-spa.c
+++ b/src/auths/auth-spa.c
@@ -405,7 +405,7 @@ int
/* base 64 to raw bytes in quasi-big-endian order, returning count of bytes */
{
int len = 0;
- register uschar digit1, digit2, digit3, digit4;
+ uschar digit1, digit2, digit3, digit4;
if (in[0] == '+' && in[1] == ' ')
in += 2;
--- a/src/auths/spa.c
+++ b/src/auths/spa.c
@@ -139,7 +139,8 @@ SPAAuthChallenge challenge;
SPAAuthResponse response;
SPAAuthResponse *responseptr = &response;
uschar msgbuf[2048];
-uschar *clearpass;
+uschar *clearpass, *s;
+unsigned off;
/* send a 334, MS Exchange style, and grab the client's request,
unless we already have it via an initial response. */
@@ -194,9 +195,19 @@ that causes failure if the size of msgbuf is exceeded. ****/
{
int i;
- char *p = ((char*)responseptr) + IVAL(&responseptr->uUser.offset,0);
+ char * p;
int len = SVAL(&responseptr->uUser.len,0)/2;
+ if ( (off = IVAL(&responseptr->uUser.offset,0)) >= sizeof(SPAAuthResponse)
+ || len >= sizeof(responseptr->buffer)/2
+ || (p = (CS responseptr) + off) + len*2 >= CS (responseptr+1)
+ )
+ {
+ DEBUG(D_auth)
+ debug_printf("auth_spa_server(): bad uUser spec in response\n");
+ return FAIL;
+ }
+
if (len + 1 >= sizeof(msgbuf)) return FAIL;
for (i = 0; i < len; ++i)
{
@@ -245,12 +256,16 @@ spa_smb_nt_encrypt(clearpass, challenge.challengeData, ntRespData);
/* compare NT hash (LM may not be available) */
-if (memcmp(ntRespData,
- ((unsigned char*)responseptr)+IVAL(&responseptr->ntResponse.offset,0),
- 24) == 0)
- /* success. we have a winner. */
- {
+off = IVAL(&responseptr->ntResponse.offset,0);
+if (off >= sizeof(SPAAuthResponse) - 24)
+ {
+ DEBUG(D_auth)
+ debug_printf("auth_spa_server(): bad ntRespData spec in response\n");
+ return FAIL;
+ }
+s = (US responseptr) + off;
+
+if (memcmp(ntRespData, s, 24) == 0)
return auth_check_serv_cond(ablock);
- }
/* Expand server_condition as an authorization check (PH) */

View file

@ -1,145 +0,0 @@
https://bugs.gentoo.org/show_bug.cgi?id=352265
Make sure LDFLAGS comes first, such that all libraries are considered,
and not discarded when --as-needed is in effect.
https://bugs.gentoo.org/show_bug.cgi?id=391279
Use LDFLAGS for all targets, not just the exim binary, such that
--as-needed works as well.
--- a/OS/Makefile-Base
+++ b/OS/Makefile-Base
@@ -496,12 +496,12 @@
buildrouters buildtransports \
$(OBJ_EXIM) version.o
@echo "$(LNCC) -o exim"
- $(FE)$(PURIFY) $(LNCC) -o exim $(LFLAGS) $(OBJ_EXIM) version.o \
+ $(FE)$(PURIFY) $(LNCC) -o exim $(LDFLAGS) $(OBJ_EXIM) version.o \
routers/routers.a transports/transports.a lookups/lookups.a \
auths/auths.a pdkim/pdkim.a \
$(LIBRESOLV) $(LIBS) $(LIBS_EXIM) $(IPV6_LIBS) $(EXTRALIBS) \
$(EXTRALIBS_EXIM) $(DBMLIB) $(LOOKUP_LIBS) $(AUTH_LIBS) \
- $(PERL_LIBS) $(TLS_LIBS) $(PCRE_LIBS) $(LDFLAGS)
+ $(PERL_LIBS) $(TLS_LIBS) $(PCRE_LIBS) $(LFLAGS)
@if [ x"$(STRIP_COMMAND)" != x"" ]; then \
echo $(STRIP_COMMAND) exim; \
$(STRIP_COMMAND) exim; \
@@ -517,8 +517,8 @@
exim_dumpdb: $(OBJ_DUMPDB)
@echo "$(LNCC) -o exim_dumpdb"
- $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dumpdb $(LFLAGS) $(OBJ_DUMPDB) \
- $(LIBS) $(EXTRALIBS) $(DBMLIB)
+ $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dumpdb $(LDFLAGS) $(OBJ_DUMPDB) \
+ $(LIBS) $(EXTRALIBS) $(DBMLIB) $(LFLAGS)
@if [ x"$(STRIP_COMMAND)" != x"" ]; then \
echo $(STRIP_COMMAND) exim_dumpdb; \
$(STRIP_COMMAND) exim_dumpdb; \
@@ -532,8 +532,8 @@
exim_fixdb: $(OBJ_FIXDB)
@echo "$(LNCC) -o exim_fixdb"
- $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_fixdb $(LFLAGS) $(OBJ_FIXDB) \
- $(LIBS) $(EXTRALIBS) $(DBMLIB)
+ $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_fixdb $(LDFLAGS) $(OBJ_FIXDB) \
+ $(LIBS) $(EXTRALIBS) $(DBMLIB) $(LFLAGS)
@if [ x"$(STRIP_COMMAND)" != x"" ]; then \
echo $(STRIP_COMMAND) exim_fixdb; \
$(STRIP_COMMAND) exim_fixdb; \
@@ -547,8 +547,8 @@
exim_tidydb: $(OBJ_TIDYDB)
@echo "$(LNCC) -o exim_tidydb"
- $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_tidydb $(LFLAGS) $(OBJ_TIDYDB) \
- $(LIBS) $(EXTRALIBS) $(DBMLIB)
+ $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_tidydb $(LDFLAGS) $(OBJ_TIDYDB) \
+ $(LIBS) $(EXTRALIBS) $(DBMLIB) $(LFLAGS)
@if [ x"$(STRIP_COMMAND)" != x"" ]; then \
echo $(STRIP_COMMAND) exim_tidydb; \
$(STRIP_COMMAND) exim_tidydb; \
@@ -560,8 +560,8 @@
exim_dbmbuild: exim_dbmbuild.o
@echo "$(LNCC) -o exim_dbmbuild"
- $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dbmbuild $(LFLAGS) exim_dbmbuild.o \
- $(LIBS) $(EXTRALIBS) $(DBMLIB)
+ $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dbmbuild $(LDFLAGS) exim_dbmbuild.o \
+ $(LIBS) $(EXTRALIBS) $(DBMLIB) $(LFLAGS)
@if [ x"$(STRIP_COMMAND)" != x"" ]; then \
echo $(STRIP_COMMAND) exim_dbmbuild; \
$(STRIP_COMMAND) exim_dbmbuild; \
@@ -575,8 +575,8 @@
@echo "$(CC) exim_lock.c"
$(FE)$(CC) -c $(CFLAGS) $(INCLUDE) exim_lock.c
@echo "$(LNCC) -o exim_lock"
- $(FE)$(LNCC) -o exim_lock $(LFLAGS) exim_lock.o \
- $(LIBS) $(EXTRALIBS)
+ $(FE)$(LNCC) -o exim_lock $(LDFLAGS) exim_lock.o \
+ $(LIBS) $(EXTRALIBS) $(LFLAGS)
@if [ x"$(STRIP_COMMAND)" != x"" ]; then \
echo $(STRIP_COMMAND) exim_lock; \
$(STRIP_COMMAND) exim_lock; \
@@ -612,9 +612,9 @@
$(FE)$(CC) -o em_version.o -c \
$(CFLAGS) $(XINCLUDE) -I. ../exim_monitor/em_version.c
@echo "$(LNCC) -o eximon.bin"
- $(FE)$(PURIFY) $(LNCC) -o eximon.bin em_version.o $(LFLAGS) $(XLFLAGS) \
+ $(FE)$(PURIFY) $(LNCC) -o eximon.bin em_version.o $(LDFLAGS) $(XLFLAGS) \
$(OBJ_MONBIN) -lXaw -lXmu -lXt -lXext -lX11 $(PCRE_LIBS) \
- $(LIBS) $(LIBS_EXIMON) $(EXTRALIBS) $(EXTRALIBS_EXIMON) -lc
+ $(LIBS) $(LIBS_EXIMON) $(EXTRALIBS) $(EXTRALIBS_EXIMON) -lc $(LFLAGS)
@if [ x"$(STRIP_COMMAND)" != x"" ]; then \
echo $(STRIP_COMMAND) eximon.bin; \
$(STRIP_COMMAND) eximon.bin; \
@@ -947,9 +947,9 @@
string.o tod.o version.o utf8.o
$(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE dbfn.c
$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY store.c
- $(LNCC) -o test_dbfn $(LFLAGS) dbfn.o \
+ $(LNCC) -o test_dbfn $(LDFLAGS) dbfn.o \
dummies.o sa-globals.o sa-os.o store.o string.o \
- tod.o version.o utf8.o $(LIBS) $(DBMLIB) $(LDFLAGS)
+ tod.o version.o utf8.o $(LIBS) $(DBMLIB) $(LFLAGS)
rm -f dbfn.o store.o
test_host: config.h child.c host.c dns.c dummies.c sa-globals.o os.o \
@@ -958,29 +958,29 @@
$(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST host.c
$(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dns.c
$(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dummies.c
- $(LNCC) -o test_host $(LFLAGS) \
+ $(LNCC) -o test_host $(LDFLAGS) \
host.o child.o dns.o dummies.o sa-globals.o os.o store.o string.o \
- tod.o tree.o $(LIBS) $(LIBRESOLV)
+ tod.o tree.o $(LIBS) $(LIBRESOLV) $(LFLAGS)
rm -f child.o dummies.o host.o dns.o
test_os: os.h os.c dummies.o sa-globals.o store.o string.o tod.o utf8.o
$(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE os.c
- $(LNCC) -o test_os $(LFLAGS) os.o dummies.o \
- sa-globals.o store.o string.o tod.o utf8.o $(LIBS) $(LDFLAGS)
+ $(LNCC) -o test_os $(LDFLAGS) os.o dummies.o \
+ sa-globals.o store.o string.o tod.o utf8.o $(LIBS) $(LFLAGS)
rm -f os.o
test_parse: config.h parse.c dummies.o sa-globals.o \
store.o string.o tod.o version.o utf8.o
$(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE parse.c
- $(LNCC) -o test_parse $(LFLAGS) parse.o \
+ $(LNCC) -o test_parse $(LDFLAGS) parse.o \
dummies.o sa-globals.o store.o string.o tod.o version.o \
- utf8.o $(LDFLAGS)
+ utf8.o $(LFLAGS)
rm -f parse.o
test_string: config.h string.c dummies.o sa-globals.o store.o tod.o utf8.o
$(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE string.c
- $(LNCC) -o test_string $(LFLAGS) -DSTAND_ALONE string.o \
- dummies.o sa-globals.o store.o tod.o utf8.o $(LIBS) $(LDFLAGS)
+ $(LNCC) -o test_string $(LDFLAGS) -DSTAND_ALONE string.o \
+ dummies.o sa-globals.o store.o tod.o utf8.o $(LIBS) $(LFLAGS)
rm -f string.o
# End

View file

@ -1,16 +0,0 @@
Fix -fno-common linking
Bug: https://bugs.gentoo.org/723430
Bug: https://bugs.exim.org/show_bug.cgi?id=2577
--- exim-4.93.0.4/src/globals.h
+++ exim-4.93.0.4/src/globals.h
@@ -342,7 +342,7 @@
extern BOOL allow_domain_literals; /* As it says */
extern BOOL allow_mx_to_ip; /* Allow MX records to -> ip address */
#ifdef EXPERIMENTAL_ARC
-struct arc_set *arc_received; /* highest ARC instance evaluation struct */
+extern struct arc_set *arc_received; /* highest ARC instance evaluation struct */
extern int arc_received_instance; /* highest ARC instance number in headers */
extern int arc_oldest_pass; /* lowest passing instance number in headers */
extern const uschar *arc_state; /* verification state */

View file

@ -1,269 +0,0 @@
diff -ur exim-4.92.orig/src/config.h.defaults exim-4.92/src/config.h.defaults
--- exim-4.92.orig/src/config.h.defaults 2019-01-30 14:59:52.000000000 +0100
+++ exim-4.92/src/config.h.defaults 2019-02-16 18:17:24.547216157 +0100
@@ -32,6 +32,8 @@
#define AUTH_VARS 3
+#define DLOPEN_LOCAL_SCAN
+
#define BIN_DIRECTORY
#define CONFIGURE_FILE
Only in exim-4.92/src: config.h.defaults.orig
diff -ur exim-4.92.orig/src/EDITME exim-4.92/src/EDITME
--- exim-4.92.orig/src/EDITME 2019-01-30 14:59:52.000000000 +0100
+++ exim-4.92/src/EDITME 2019-02-16 18:17:24.547216157 +0100
@@ -824,6 +824,24 @@
#------------------------------------------------------------------------------
+# On systems which support dynamic loading of shared libraries, Exim can
+# load a local_scan function specified in its config file instead of having
+# to be recompiled with the desired local_scan function. For a full
+# description of the API to this function, see the Exim specification.
+
+#DLOPEN_LOCAL_SCAN=yes
+
+# If you set DLOPEN_LOCAL_SCAN, then you need to include -rdynamic in the
+# linker flags. Without it, the loaded .so won't be able to access any
+# functions from exim.
+
+LFLAGS = -rdynamic
+ifeq ($(OSTYPE),Linux)
+LFLAGS += -ldl
+endif
+
+
+#------------------------------------------------------------------------------
# The default distribution of Exim contains only the plain text form of the
# documentation. Other forms are available separately. If you want to install
# the documentation in "info" format, first fetch the Texinfo documentation
Only in exim-4.92/src: EDITME.orig
diff -ur exim-4.92.orig/src/globals.c exim-4.92/src/globals.c
--- exim-4.92.orig/src/globals.c 2019-01-30 14:59:52.000000000 +0100
+++ exim-4.92/src/globals.c 2019-02-16 18:17:24.549216150 +0100
@@ -41,6 +41,10 @@
uschar *no_aliases = NULL;
+#ifdef DLOPEN_LOCAL_SCAN
+uschar *local_scan_path = NULL;
+#endif
+
/* For comments on these variables, see globals.h. I'm too idle to
duplicate them here... */
Only in exim-4.92/src: globals.c.orig
diff -ur exim-4.92.orig/src/globals.h exim-4.92/src/globals.h
--- exim-4.92.orig/src/globals.h 2019-01-30 14:59:52.000000000 +0100
+++ exim-4.92/src/globals.h 2019-02-16 18:17:24.549216150 +0100
@@ -152,6 +152,9 @@
extern int (*receive_ferror)(void);
extern BOOL (*receive_smtp_buffered)(void);
+#ifdef DLOPEN_LOCAL_SCAN
+extern uschar *local_scan_path; /* Path to local_scan() library */
+#endif
/* For clearing, saving, restoring address expansion variables. We have to have
the size of this vector set explicitly, because it is referenced from more than
Only in exim-4.92/src: globals.h.orig
diff -ur exim-4.92.orig/src/local_scan.c exim-4.92/src/local_scan.c
--- exim-4.92.orig/src/local_scan.c 2019-01-30 14:59:52.000000000 +0100
+++ exim-4.92/src/local_scan.c 2019-02-16 18:29:56.832732592 +0100
@@ -5,61 +5,133 @@
/* Copyright (c) University of Cambridge 1995 - 2009 */
/* See the file NOTICE for conditions of use and distribution. */
+#include "local_scan.h"
-/******************************************************************************
-This file contains a template local_scan() function that just returns ACCEPT.
-If you want to implement your own version, you should copy this file to, say
-Local/local_scan.c, and edit the copy. To use your version instead of the
-default, you must set
-
-HAVE_LOCAL_SCAN=yes
-LOCAL_SCAN_SOURCE=Local/local_scan.c
-
-in your Local/Makefile. This makes it easy to copy your version for use with
-subsequent Exim releases.
-
-For a full description of the API to this function, see the Exim specification.
-******************************************************************************/
-
-
-/* This is the only Exim header that you should include. The effect of
-including any other Exim header is not defined, and may change from release to
-release. Use only the documented interface! */
-
-#include "local_scan.h"
-
-
-/* This is a "do-nothing" version of a local_scan() function. The arguments
-are:
-
- fd The file descriptor of the open -D file, which contains the
- body of the message. The file is open for reading and
- writing, but modifying it is dangerous and not recommended.
-
- return_text A pointer to an unsigned char* variable which you can set in
- order to return a text string. It is initialized to NULL.
-
-The return values of this function are:
-
- LOCAL_SCAN_ACCEPT
- The message is to be accepted. The return_text argument is
- saved in $local_scan_data.
-
- LOCAL_SCAN_REJECT
- The message is to be rejected. The returned text is used
- in the rejection message.
-
- LOCAL_SCAN_TEMPREJECT
- This specifies a temporary rejection. The returned text
- is used in the rejection message.
-*/
+#ifdef DLOPEN_LOCAL_SCAN
+#include <stdlib.h>
+#include <dlfcn.h>
+static int (*local_scan_fn)(int fd, uschar **return_text) = NULL;
+static int load_local_scan_library(void);
+extern uschar *local_scan_path; /* Path to local_scan() library */
+#endif
int
local_scan(int fd, uschar **return_text)
{
fd = fd; /* Keep picky compilers happy */
return_text = return_text;
-return LOCAL_SCAN_ACCEPT;
+#ifdef DLOPEN_LOCAL_SCAN
+/* local_scan_path is defined AND not the empty string */
+if (local_scan_path && *local_scan_path)
+ {
+ if (!local_scan_fn)
+ {
+ if (!load_local_scan_library())
+ {
+ char *base_msg , *error_msg , *final_msg ;
+ int final_length = -1 ;
+
+ base_msg=US"Local configuration error - local_scan() library failure\n";
+ error_msg = dlerror() ;
+
+ final_length = strlen(base_msg) + strlen(error_msg) + 1 ;
+ final_msg = (char*)malloc( final_length*sizeof(char) ) ;
+ *final_msg = '\0' ;
+
+ strcat( final_msg , base_msg ) ;
+ strcat( final_msg , error_msg ) ;
+
+ *return_text = final_msg ;
+ return LOCAL_SCAN_TEMPREJECT;
+ }
+ }
+ return local_scan_fn(fd, return_text);
+ }
+else
+#endif
+ return LOCAL_SCAN_ACCEPT;
+}
+
+#ifdef DLOPEN_LOCAL_SCAN
+
+static int load_local_scan_library(void)
+{
+/* No point in keeping local_scan_lib since we'll never dlclose() anyway */
+void *local_scan_lib = NULL;
+int (*local_scan_version_fn)(void);
+int vers_maj;
+int vers_min;
+
+local_scan_lib = dlopen(local_scan_path, RTLD_NOW);
+if (!local_scan_lib)
+ {
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library open failed - "
+ "message temporarily rejected");
+ return FALSE;
+ }
+
+local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_major");
+if (!local_scan_version_fn)
+ {
+ dlclose(local_scan_lib);
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain "
+ "local_scan_version_major() function - message temporarily rejected");
+ return FALSE;
+ }
+
+/* The major number is increased when the ABI is changed in a non
+ backward compatible way. */
+vers_maj = local_scan_version_fn();
+
+local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_minor");
+if (!local_scan_version_fn)
+ {
+ dlclose(local_scan_lib);
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain "
+ "local_scan_version_minor() function - message temporarily rejected");
+ return FALSE;
+ }
+
+/* The minor number is increased each time a new feature is added (in a
+ way that doesn't break backward compatibility) -- Marc */
+vers_min = local_scan_version_fn();
+
+
+if (vers_maj != LOCAL_SCAN_ABI_VERSION_MAJOR)
+ {
+ dlclose(local_scan_lib);
+ local_scan_lib = NULL;
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible major"
+ "version number, you need to recompile your module for this version"
+ "of exim (The module was compiled for version %d.%d and this exim provides"
+ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR,
+ LOCAL_SCAN_ABI_VERSION_MINOR);
+ return FALSE;
+ }
+else if (vers_min > LOCAL_SCAN_ABI_VERSION_MINOR)
+ {
+ dlclose(local_scan_lib);
+ local_scan_lib = NULL;
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible minor"
+ "version number, you need to recompile your module for this version"
+ "of exim (The module was compiled for version %d.%d and this exim provides"
+ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR,
+ LOCAL_SCAN_ABI_VERSION_MINOR);
+ return FALSE;
+ }
+
+local_scan_fn = dlsym(local_scan_lib, "local_scan");
+if (!local_scan_fn)
+ {
+ dlclose(local_scan_lib);
+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain "
+ "local_scan() function - message temporarily rejected");
+ return FALSE;
+ }
+
+return TRUE;
}
+#endif /* DLOPEN_LOCAL_SCAN */
+
/* End of local_scan.c */
diff -ur exim-4.92.orig/src/readconf.c exim-4.92/src/readconf.c
--- exim-4.92.orig/src/readconf.c 2019-01-30 14:59:52.000000000 +0100
+++ exim-4.92/src/readconf.c 2019-02-16 18:18:46.013947455 +0100
@@ -199,6 +199,9 @@
{ "local_from_prefix", opt_stringptr, &local_from_prefix },
{ "local_from_suffix", opt_stringptr, &local_from_suffix },
{ "local_interfaces", opt_stringptr, &local_interfaces },
+#ifdef DLOPEN_LOCAL_SCAN
+ { "local_scan_path", opt_stringptr, &local_scan_path },
+#endif
#ifdef HAVE_LOCAL_SCAN
{ "local_scan_timeout", opt_time, &local_scan_timeout },
#endif

View file

@ -1,66 +0,0 @@
From 70b28b113e21d21a528876c3abe88ccb5f7cc77d Mon Sep 17 00:00:00 2001
From: Fabian Groffen <grobian@gentoo.org>
Date: Sat, 9 May 2020 11:35:12 +0200
Subject: [PATCH] call_radius: fix compilation due to incorrect usage of
string_sprintf
Since f3ebb786e451da973560f1c9d8cdb151d25108b5, string_sprintf cannot be
used without arguments any more, so use US directly.
While at it, also make newline usage consistent to not return a newline
in errptr, when it is debug-printed, a newline is added.
https://bugs.gentoo.org/720364
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
---
src/src/auths/call_radius.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/src/auths/call_radius.c b/src/src/auths/call_radius.c
index c3637436d..253fd75cd 100644
--- a/src/src/auths/call_radius.c
+++ b/src/src/auths/call_radius.c
@@ -115,16 +115,16 @@ if (rc_read_config(RADIUS_CONFIG_FILE) != 0)
*errptr = string_sprintf("RADIUS: can't open %s", RADIUS_CONFIG_FILE);
else if (rc_read_dictionary(rc_conf_str("dictionary")) != 0)
- *errptr = string_sprintf("RADIUS: can't read dictionary");
+ *errptr = US("RADIUS: can't read dictionary");
else if (rc_avpair_add(&send, PW_USER_NAME, user, 0) == NULL)
- *errptr = string_sprintf("RADIUS: add user name failed\n");
+ *errptr = US("RADIUS: add user name failed");
else if (rc_avpair_add(&send, PW_USER_PASSWORD, CS radius_args, 0) == NULL)
- *errptr = string_sprintf("RADIUS: add password failed\n");
+ *errptr = US("RADIUS: add password failed");
else if (rc_avpair_add(&send, PW_SERVICE_TYPE, &service, 0) == NULL)
- *errptr = string_sprintf("RADIUS: add service type failed\n");
+ *errptr = US("RADIUS: add service type failed");
#else /* RADIUS_LIB_RADIUSCLIENT unset => RADIUS_LIB_RADIUSCLIENT2 */
@@ -132,17 +132,17 @@ if ((h = rc_read_config(RADIUS_CONFIG_FILE)) == NULL)
*errptr = string_sprintf("RADIUS: can't open %s", RADIUS_CONFIG_FILE);
else if (rc_read_dictionary(h, rc_conf_str(h, "dictionary")) != 0)
- *errptr = string_sprintf("RADIUS: can't read dictionary");
+ *errptr = US("RADIUS: can't read dictionary");
else if (rc_avpair_add(h, &send, PW_USER_NAME, user, Ustrlen(user), 0) == NULL)
- *errptr = string_sprintf("RADIUS: add user name failed\n");
+ *errptr = US("RADIUS: add user name failed");
else if (rc_avpair_add(h, &send, PW_USER_PASSWORD, CS radius_args,
Ustrlen(radius_args), 0) == NULL)
- *errptr = string_sprintf("RADIUS: add password failed\n");
+ *errptr = US("RADIUS: add password failed");
else if (rc_avpair_add(h, &send, PW_SERVICE_TYPE, &service, 0, 0) == NULL)
- *errptr = string_sprintf("RADIUS: add service type failed\n");
+ *errptr = US("RADIUS: add service type failed");
#endif /* RADIUS_LIB_RADIUSCLIENT */

View file

@ -1,10 +0,0 @@
[Unit]
Description=Exim Mail Transfer Agent (message submission)
Conflicts=exim.service
[Socket]
ListenStream=587
Accept=yes
[Install]
WantedBy=sockets.target

View file

@ -1,11 +0,0 @@
# It doesn't make sense for this to be separate from exim@.service
# However, I couldn't think of a way to have two .socket files point
# to it ([Socket] Service= is rejected if Accept=yes is set).
[Unit]
Description=Exim Mail Daemon per-connection server (message submission)
[Service]
ExecStart=-/usr/bin/exim -bs
StandardInput=socket
StandardError=syslog

View file

@ -1,5 +0,0 @@
# Command-line options for running exim
EXIM_OPTS="-bd -q15m"
# Additional flags passed to exim_tidydb upon start (e.g. -t 7d)
TIDY_OPTS=""

View file

@ -1,9 +0,0 @@
/var/log/exim/exim*.log {
daily
missingok
rotate 28
compress
delaycompress
notifempty
create 640 mail mail
}

View file

@ -1,47 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
extra_started_commands="reload"
depend() {
need logger
use antivirus net
provide mta
}
tidy_dbs() {
local spooldir=$(/usr/sbin/exim -C /etc/exim/${SVCNAME}.conf -bP -n spool_directory)
local db
local ret=0
ebegin "Tidying hints databases in ${spooldir}/db"
for db in "${spooldir}"/db/* ; do
case "${db}" in
*".lockfile"|*"*") continue ;;
esac
/usr/sbin/exim_tidydb ${TIDY_OPTS} "${spooldir}" ${db##*/} > /dev/null
: $((ret += $?))
done
eend ${ret}
}
start() {
# if you use multiple instances, make sure you set spool_directory
# in the configfile
tidy_dbs
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/exim --pidfile /run/${SVCNAME}.pid -- -C /etc/exim/${SVCNAME}.conf ${EXIM_OPTS:--bd -q15m}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --pidfile /run/${SVCNAME}.pid --name exim
eend $?
}
reload() {
ebegin "Reloading ${SVCNAME}"
start-stop-daemon --signal HUP --pidfile /run/${SVCNAME}.pid --name exim
eend $?
}

View file

@ -1,12 +0,0 @@
[Unit]
Description=Exim Mail Transport Agent
After=network.target
[Service]
Environment=QUEUE=15m
ExecStart=/usr/sbin/exim -bdf -q${QUEUE}
ExecReload=/bin/kill -HUP $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View file

@ -1,10 +0,0 @@
[Unit]
Description=Exim Mail Transfer Agent
Conflicts=exim.service
[Socket]
ListenStream=25
Accept=yes
[Install]
WantedBy=sockets.target

View file

@ -1,7 +0,0 @@
[Unit]
Description=Exim Mail Daemon per-connection server
[Service]
ExecStart=-/usr/bin/exim -bs
StandardInput=socket
StandardError=syslog

View file

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>
</maintainer>
<longdescription>
Exim is a message transfer agent (MTA) developed at the University of
Cambridge for use on Unix systems connected to the Internet. It is
freely available under the terms of the GNU General Public Licence. In
style it is similar to Smail 3, but its facilities are more general.
There is a great deal of flexibility in the way mail can be routed, and
there are extensive facilities for checking incoming mail. Exim can be
installed in place of sendmail, although the configuration of exim is
quite different to that of sendmail.
</longdescription>
<use>
<flag name="arc">Adds support for Authenticated Receive Chain
(ARC)</flag>
<flag name="dcc">Adds support for Distributed Checksum Clearinghouse
(DCC)</flag>
<flag name="dane">Adds support for DNS-based Authentication of Named Entities</flag>
<flag name="dkim">Adds support for DomainKeys Identified Mail
(DKIM)</flag>
<flag name="dnsdb">Adds support for a DNS search for a record whose
domain name is the supplied query</flag>
<flag name="dovecot-sasl">Adds support for Dovecot's
authentication</flag>
<flag name="dlfunc">Install local_scan.h header to compile separate
dlfunc libraries</flag>
<flag name="dmarc">Adds support for DMARC</flag>
<flag name="dsn">Adds support for Delivery Status Notifications
(DSN)</flag>
<flag name="exiscan-acl">Patch providing support for content
scanning</flag>
<flag name="lmtp">Adds support for lmtp</flag>
<flag name="mbx">Adds support for UW's mbx format</flag>
<flag name="spf">Adds support for Sender Policy Framework</flag>
<flag name="srs">Adds support for Sender Rewriting Scheme</flag>
<flag name="proxy">Add support for being behind a proxy, such as HAProxy</flag>
<flag name="pkcs11">Require pkcs11 support in <pkg>net-libs/gnutls</pkg> with USE=gnutls</flag>
<flag name="redis">Adds support for querying <pkg>dev-db/redis</pkg></flag>
<flag name="prdr">Adds support for Per-Recipient Data Response</flag>
<flag name="tpda">Adds support for Transport Post-Delivery Actions</flag>
</use>
<upstream>
<bugs-to>http://bugs.exim.org/</bugs-to>
<!-- stupid DTD doesn't allow this
<vcs>http://git.exim.org/exim.git</vcs>
-->
</upstream>
</pkgmetadata>

View file

@ -1,5 +0,0 @@
AUX openwsman-2.6.5-libcurl-error-codes-update.patch 1162 BLAKE2B 59802194fee1ecb8786569c85f57fc9255456b43895a781dcac6a3cd903f106eadbf53f1de39b203dd9d61d6a1bde4dc2bc48cea28d7c704c08d71562d8503c8 SHA512 f887f52412d8bf1565cd6576340d6f81acad65c9977d56a7a9a9af6ba9950a025db0dffda0b767d2aa351ea7990f12dfeaa7d5f7b3c618982a8a766633caed5a
AUX openwsmand.confd 2 BLAKE2B a5cdc0d97724f51411f2f5ba99734c297507df295742618499a23296c99bac5d6cef25d497fb3afb76a3e67e4ac53d4b5bccfa55309d7b02ff5793bcf53dfec2 SHA512 a80f7cc2606ef6e5474e96b1e520c17ecf432f0da9a566bd157044130cfb548f10d929ffb5783008df78b6d07d07d109bffbad1998cb8309eccec7e4d3fc813a
AUX openwsmand.initd 263 BLAKE2B 246449862d8bf51dae573ff8bb4e4715284ba37de65be9cf226d001a081f825506256c3b1c1322ffa59b7df99466ce1fe35f164c993566023be7a1c7eed08d21 SHA512 bd20fc3815d02b0dd5a2c2336b5204550ef941e362f686ddb00f7f96d93bd2222dd4cb076f39efe2e85d3262356c548d0c9d7c1d566a04bba2c4a942126851d2
DIST openwsman-2.7.0.tar.gz 513225 BLAKE2B c6463358c8b665a1019b4a4be370ebd006fb31c3a17abf2bf5f699a33fa96795d272ac687bf69dafab769301c21fc10ddb4e71744f7456dc8d16dbcc81d65b75 SHA512 e61792eafd09e3608c736091d2742049086adaf5fffcda9391e4712ed1dedf3a533546a6af61ea6ce49d4cf4fb3649cb168f20260c4e975797395d6e565c6c37
EBUILD openwsman-2.7.0.ebuild 2579 BLAKE2B d0f67ad1764d44f2829aea66aba2a21a6a331c00120c44893048aa082d9890f01def72be1274799468e03c01105b1557396f04cfd2f7e4d3dedbb54490f73599 SHA512 63612d3c3e141d6af697f1d9479042937873c415f05ea082f34aaf713a4c0b087563b95ff1d2ec1b9f60fec9a50d4c7b6dc511a76049b29609a664b8b22c3da3

View file

@ -1,27 +0,0 @@
diff -up openwsman-2.6.5/src/lib/wsman-curl-client-transport.c.orig openwsman-2.6.5/src/lib/wsman-curl-client-transport.c
--- openwsman-2.6.5/src/lib/wsman-curl-client-transport.c.orig 2018-11-14 13:53:27.442138557 +0100
+++ openwsman-2.6.5/src/lib/wsman-curl-client-transport.c 2018-11-14 14:11:28.508714204 +0100
@@ -186,16 +186,23 @@ convert_to_last_error(CURLcode r)
return WS_LASTERR_SSL_CONNECT_ERROR;
case CURLE_BAD_FUNCTION_ARGUMENT:
return WS_LASTERR_CURL_BAD_FUNCTION_ARG;
+#if LIBCURL_VERSION_NUM < 0x073E00
case CURLE_SSL_PEER_CERTIFICATE:
return WS_LASTERR_SSL_PEER_CERTIFICATE;
+#endif
case CURLE_SSL_ENGINE_NOTFOUND:
return WS_LASTERR_SSL_ENGINE_NOTFOUND;
case CURLE_SSL_ENGINE_SETFAILED:
return WS_LASTERR_SSL_ENGINE_SETFAILED;
case CURLE_SSL_CERTPROBLEM:
return WS_LASTERR_SSL_CERTPROBLEM;
+#if LIBCURL_VERSION_NUM < 0x073E00
case CURLE_SSL_CACERT:
return WS_LASTERR_SSL_CACERT;
+#else
+ case CURLE_PEER_FAILED_VERIFICATION:
+ return WS_LASTERR_SSL_PEER_CERTIFICATE;
+#endif
#if LIBCURL_VERSION_NUM > 0x70C01
case CURLE_SSL_ENGINE_INITFAILED:
return WS_LASTERR_SSL_ENGINE_INITFAILED;

View file

@ -1 +0,0 @@
#

View file

@ -1,12 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
command=/usr/sbin/openwsmand
pidfile=/run/openwsmand.pid
command_args="${WSMAND_OPTS} -p ${pidfile}"
depend() {
use net
}

View file

@ -1,105 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_8 python3_9 python3_10 python3_11 )
inherit python-single-r1 cmake-utils ssl-cert java-pkg-opt-2
DESCRIPTION="Opensource Implementation of WS-Management Client"
HOMEPAGE="https://github.com/Openwsman"
SRC_URI="https://github.com/Openwsman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 x86"
RESTRICT="mirror"
BINDINGS_USE="java perl python ruby"
IUSE="+cim debug examples +eventing ipv6 pam +plugins ssl +server test ${BINDINGS_USE}"
REQUIRED_USE="
java? ( plugins )
perl? ( plugins )
python? ( plugins )
ruby? ( plugins )
"
JAVA_PKG_NV_DEPEND="virtual/jdk:1.8"
RDEPEND="
cim? ( dev-libs/sblim-sfcc )
ssl? ( dev-libs/openssl:0 )
pam? ( virtual/pam )
ruby? ( dev-lang/ruby:= )
perl? ( dev-lang/perl )
java? ( ${JAVA_PKG_NV_DEPEND} )
python? ( ${PYTHON_DEPS} )
net-misc/curl[idn]
dev-libs/libxml2[icu]
virtual/libcrypt
"
DEPEND="
${RDEPEND}
test? ( dev-util/cunit )
java? ( dev-lang/swig:0 )
perl? ( dev-lang/swig:0 )
python? ( dev-lang/swig:0 )
ruby? ( dev-lang/swig:0 )
"
PATCHES=(
)
CMAKE_MAKEFILE_GENERATOR=emake
# LIBC != glibc build fail - add block
src_prepare(){
#Ruby gem builder does not like Unicode
sed -e 's/Kämpf/Kaempf/' -i bindings/ruby/openwsman.gemspec.in
cmake-utils_src_prepare
default
}
src_configure() {
local bindings=NO
for f in $BINDINGS_USE; do
use $f && bindings=YES
done
local mycmakeargs=(
-DPACKAGE_ARCHITECTURE=${ARCH}
-DBUILD_BINDINGS=${bindings}
-DBUILD_CUNIT_TESTS=$(usex test)
-DBUILD_EXAMPLES=$(usex examples)
-DBUILD_JAVA=$(usex java)
-DBUILD_LIBCIM=$(usex cim)
-DBUILD_PERL=$(usex perl)
-DBUILD_PYTHON=$(usex python)
-DBUILD_RUBY=$(usex ruby)
-DBUILD_SWIG_PLUGIN=${bindings}
-DBUILD_TESTS=$(usex test)
-DDISABLE_PLUGINS="$(usex plugins)
-DDISABLE_SERVER="$(usex server)
-DENABLE_EVENTING_SUPPORT="$(usex eventing)
-DWSMAN_DEBUG_VERBOSE="$(usex debug)
-DENABLE_IPV6="$(usex ipv6)
-DUSE_PAM="$(usex pam)
)
use ruby && mycmakeargs+=( -DBUILD_RUBY_GEM=YES )
cmake-utils_src_configure
}
src_compile(){
cmake-utils_src_compile -j1 #Upstream doesn't know about target dependencies, sigh
}
src_install() {
cmake-utils_src_install
}
pkg_postinst() {
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/openwsman/servercert.pem \
&& ! -f "${ROOT}"/etc/ssl/postfix/serverkey.pem ]] ; then
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Local OpenWSman Server}"
install_cert /etc/openwsman/servercert
fi
}

View file

@ -1,3 +0,0 @@
AUX autotools.patch 1103 BLAKE2B 311c9dad47037741db1fb5b10646b4eb72fe46e417bd3f4cb3f66afefc543977859760df83a703c2f745dfa734c85ddc699181d584da3fae5e0aba3ec617feb9 SHA512 80f542650125aee7d374704ec7321ace1b3a29ef2d71751a6fa59b52b8e04e677fffeec35b4b461e4ef1b477bcb21a36339966ebbe692c07594c2d6e74795e9f
DIST wsmancli-2.6.0.tar.gz 42913 BLAKE2B 9482153e3e0efe0b31d88f58862e6f9b3a0162dcdaaf74500fb6663e1502485a0877808ba517d6660226bd68d2a9b8d68351544c74f3eaf9ebe3172ce8502543 SHA512 40f69dfefd5cfc9c1d137c5c58bd0e84e1bb460ecb6770e1c56b023477f7521769f04e041682686d267796477704c7465d437f6fdb4068268a51d1136d5c8a56
EBUILD wsmancli-2.6.0.ebuild 633 BLAKE2B b78cd1e7bda4895e08aea6058e7f1bc302a2c061d8da3f8e8d75272adf2905263f42df0145cae31c336de7d417bc1cbcaf8382c44f3ba6f1b981a68afed57421 SHA512 4c5f1b021813e3744292eb90dd52fac7d311bd7fb03ef4f5d5112679afeca48aeb4b901c4cd9c6c3b7a9671d6e2f9f1aac7284bda1493b50b70c4ccb66e277ea

View file

@ -1,49 +0,0 @@
--- wsmancli-2.6.0/configure.in.orig 2022-07-21 12:57:35.481177325 +0200
+++ wsmancli-2.6.0/configure.in 2022-07-21 13:03:17.834808466 +0200
@@ -1,17 +1,14 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(wsmancli, 2.6.0)
+AC_INIT([wsmancli], [2.6.0])
AC_CONFIG_SRCDIR(wsmancli.spec.in)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
-AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE
+AC_CONFIG_HEADERS(config.h)
AM_MAINTAINER_MODE
-AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CXX
-AM_PROG_CC_STDC
-AC_HEADER_STDC
-AM_PROG_LIBTOOL
+LT_INIT
WSMAN_PKG=$PACKAGE_NAME
AC_SUBST(WSMAN_PKG)
@@ -49,7 +46,7 @@
-Wunused -Werror"
fi
-AC_OUTPUT([
+AC_CONFIG_FILES([
wsmancli.spec
Makefile
src/Makefile
@@ -60,4 +57,4 @@
tests/cunit/Makefile
man/Makefile
])
-
+AC_OUTPUT
--- wsmancli-2.6.0/tests/cunit/Makefile.am.orig 2015-06-11 10:50:04.000000000 +0200
+++ wsmancli-2.6.0/tests/cunit/Makefile.am 2022-07-21 13:06:59.696086534 +0200
@@ -1,6 +1,6 @@
AM_CFLAGS = @CFLAGS@
-INCLUDES = \
+AM_CPPFLAGS = \
$(OPENWSMAN_CFLAGS)

View file

@ -1,35 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
WANT_AUTOCONF=2.5
inherit autotools
DESCRIPTION="Opensource Implementation of WS-Management - Command line utility"
HOMEPAGE="https://github.com/Openwsman"
SRC_URI="https://github.com/Openwsman/wsmancli/archive/v2.6.0.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="x86 amd64"
IUSE="static-libs"
CDEPEND="
net-misc/curl[idn]
sys-apps/openwsman
"
RDEPEND="${CDEPEND}"
DEPEND="${CDEPEND}"
PATCHES=(
"${FILESDIR}"/autotools.patch
)
src_prepare() {
default
mv configure.{in,ac} || die
./bootstrap
}

View file

@ -1,2 +0,0 @@
EBUILD imap-c-client-2.ebuild 319 BLAKE2B 1d3f4562c964bf869f9a0a5cb587a7a7814c05e7d15ba3aa3f362cd521734febc65a07e19d4bc4d86df81747a217dd7c4445f3c3d26cb6d2dd49cc4c70f68cde SHA512 247faa7eabb0f6fe3e8f499d3b0afa6fa64c89171f0ca8efbeb5461b31d368263afe66b1f6743ac2f25812ebcf732ef228642ffd9a787cfbbdefead9d66b9d8a
MISC metadata.xml 192 BLAKE2B fef49cb9e1dda8063c379e650d4897670410d2c0641f469b8a200d5e7ec8d3f505e692277d03b583790cb1340ece9c2e8f7e7c9ff5080d42a2e0ef3fc7138a44 SHA512 bece454b8da734c7a28ce25f8080b3fca56332e57cde854c50f0b884ba3836f1af7782a1ee9f63e6aeff4830e2bca71c5c466471fc82eee75339565aab6495d5

View file

@ -1,11 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Virtual for IMAP c-client"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="kerberos ssl"
RDEPEND="net-libs/c-client[kerberos=,ssl=]"

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<stabilize-allarches/>
</pkgmetadata>