summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-06-18 12:32:57 +0000
committerAnthony G. Basile <blueness@gentoo.org>2015-06-18 12:32:57 +0000
commit2596bb14e8eb3f717d53c01a0ff01f0fd689ee45 (patch)
tree5e4838e3dd425cb5e4b1eb8a97ea2b5d490ca3f2 /sys-libs
parentStabilize remaining arches before clearing out old versions for bug #539226. (diff)
downloadhistorical-2596bb14e8eb3f717d53c01a0ff01f0fd689ee45.tar.gz
historical-2596bb14e8eb3f717d53c01a0ff01f0fd689ee45.tar.bz2
historical-2596bb14e8eb3f717d53c01a0ff01f0fd689ee45.zip
Remove all older versions susceptible to bug #539226.
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/uclibc/ChangeLog13
-rw-r--r--sys-libs/uclibc/Manifest58
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild372
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r10.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r11.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild348
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild348
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild348
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r2.ebuild372
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r3.ebuild377
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r4.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r5.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r6.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild340
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2.ebuild372
17 files changed, 26 insertions, 5302 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog
index c8fdb0349306..97a0ce82e2c2 100644
--- a/sys-libs/uclibc/ChangeLog
+++ b/sys-libs/uclibc/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-libs/uclibc
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.101 2015/06/18 12:29:11 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.102 2015/06/18 12:32:46 blueness Exp $
+
+ 18 Jun 2015; Anthony G. Basile <blueness@gentoo.org>
+ -uclibc-0.9.33.2-r1.ebuild, -uclibc-0.9.33.2-r10.ebuild,
+ -uclibc-0.9.33.2-r11.ebuild, -uclibc-0.9.33.2-r12.ebuild,
+ -uclibc-0.9.33.2-r13.ebuild, -uclibc-0.9.33.2-r14.ebuild,
+ -uclibc-0.9.33.2-r2.ebuild, -uclibc-0.9.33.2-r3.ebuild,
+ -uclibc-0.9.33.2-r4.ebuild, -uclibc-0.9.33.2-r5.ebuild,
+ -uclibc-0.9.33.2-r6.ebuild, -uclibc-0.9.33.2-r7.ebuild,
+ -uclibc-0.9.33.2-r8.ebuild, -uclibc-0.9.33.2-r9.ebuild,
+ -uclibc-0.9.33.2.ebuild:
+ Remove all older versions susceptible to bug #539226.
18 Jun 2015; Anthony G. Basile <blueness@gentoo.org>
uclibc-0.9.33.2-r15.ebuild:
diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest
index a9fcc09a0cd8..ef4b1669200f 100644
--- a/sys-libs/uclibc/Manifest
+++ b/sys-libs/uclibc/Manifest
@@ -1,57 +1,27 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-DIST uClibc-0.9.33.2-patches-1.tar.bz2 2351 SHA256 f85756b12ce5f20747f7900b30016bc4c391e0b6977cf6ecfe35891da0f851d8 SHA512 a3f49eb0732c96ab241bd7cbca281418760f78d19e98ccc94a9cf7a54428e12884e90f1240cd0368e9d2f1f74ea9f332a4987496395176503d667abfa59b221a WHIRLPOOL de7ce039d8710b32ae5a189b173e339abdf1636868f021fc26ce77e2db984864813072eb6f033de4d1b41d0df075d426a242299edad62a2ca02045cc587ded69
-DIST uClibc-0.9.33.2-patches-10.tar.bz2 23990 SHA256 d23cc4362c180c88bd16a7b8b53a1b88011e1a39d1371e3fb3cef915731ea0e8 SHA512 798acc60f7512ecc38aac72b29a12ca8f19531c64e5b4b576734f53ea5cbab9ec69d0f253fbb3fa6e721a5f6ea3a982f729af7112a44719a2aa1adda0defeef1 WHIRLPOOL 265218bfa42f5e24f8486d48be59e37185841aad7b7d5bd76859c394175b2361c6e428d2feaa695c5b1317fdcc10a2013029d327739017131aabca92274e89df
-DIST uClibc-0.9.33.2-patches-11.tar.bz2 24310 SHA256 f6d9728fea5f2a7290261816aa9823d469e7da8a706e87c169dd4a691e1a6dc2 SHA512 fcc9c14d37ae2ebc343344062ea71ecd732a7787dfe08556e16f60a66e856193d288bfc4958be71a5679b8edd1210984a53bcb4b4a5ebab88584ad6bdc1773c0 WHIRLPOOL ff1a4352428aabb6f77446797d823f212527d26dbd693817dcfac32faf489650d8d7367245afb946b7935f9e177c311b7e75b287411866e65c38d22b72216f2a
-DIST uClibc-0.9.33.2-patches-12.tar.bz2 27137 SHA256 3582de8f2df50dd70b639ed3be61d68bc6d79c1cf1d6e8528358fdc915bbe3ff SHA512 6b6ffafd2cd7f39636df0a73f223cb8045df1f2e1c5737007ff6161ed1247eb1a7ca8a1923f69551b2bbac16292939c8f8e6692ab9c6160f50a6533bf8b68637 WHIRLPOOL bd966ec003c99d47b74d671dcf13328cd01c58352ec13cfeb56e05f3b6b50cef893d6207e4096b5cfdf39c0ca143900a3ac4e5b0a72fb64a887fb6acc0b57ae6
-DIST uClibc-0.9.33.2-patches-13.tar.bz2 28146 SHA256 80c3e53927bd5c850b2b9ae7ba43e489b50cd7e7d05174074f22fc81eda448b6 SHA512 60d82b67dc3451593a6ab221087c5fea47fab2016821fd3011affa133f1dc84660f46d70821b678a018fb7329928147eaff9722de9157fb99d44893ab5a10319 WHIRLPOOL 820ae31c449347ef9e47916831ee77b2adb968ffb9ab6e6b1072eea9c05efed2ec5a2245ffd6df7abd1f66f5214f5388adf22f656c3405bdc29108c0b2a71451
-DIST uClibc-0.9.33.2-patches-14.tar.bz2 28773 SHA256 3d2adac6d27db2a6d9c0ed93eb19e97a1a2fa24835a6bfc102767cd6dea3971b SHA512 45fdbceedf0e80bb0adafad37d1d5ca3ff4315def576bb2570bc26abebcdb60125ee01fb69cdfe72353bac4a664e1e9c7af0671b84f48f546ac32dabbea49e3e WHIRLPOOL 899c5f4781eaa5291ff755221a3895dc4c563ac32ea48ab9bad8715373c91a06e23b9512d65fab093ce5d6e658727fcfa613393b40bccc5b1b5a93e1a42b1906
-DIST uClibc-0.9.33.2-patches-15.tar.bz2 31298 SHA256 a1f5b1c100bee1218d24fe27aa00ed9996588448b9ccd4df85ad365d1993d8a7 SHA512 79a1982506f198598a955533e6d7c738f87a3fa74225b2b6ab32bd636642e683d024ad0860d28fe2b42fe6b2c982f4172f950caa62f31761a19e4a49116d5d36 WHIRLPOOL 6272ccf3a1340dde0b754fec996ec2063b45250828f2bedb4ea6e59f8a30e009395ff794b99c46b887e9d71c1499fc1543fa60c1cc09b6169efc9e9161bd880c
-DIST uClibc-0.9.33.2-patches-16.tar.bz2 31666 SHA256 26b9261edd23879c1fa3ef4b77221fc808c56125de6943a55b125e066d38e960 SHA512 d95ae817dfaa04504635512150df726d3996bfee443d4ce93894f09c81bad0d2a0718fb6f58e52f354796e4a2f0dec1ff9f0adda3ae6453020586c01b612a0dc WHIRLPOOL 96440db3ffca2f2b9b48aeca40563d06f98068ca10e510fdfd596eae6bad493c03f3ad869a4153593e31beb1f746b237cf70d9b9c221ed1e1102e761cf08432a
DIST uClibc-0.9.33.2-patches-17.tar.bz2 32437 SHA256 4e846e5fa71815e37971d6bfc1ed1381a97189b38575a64ff9396f6a561d48e0 SHA512 6a6ad8aef862f742e60965c447e5abee2349886f01bf5e44111b2a6c21e59e4644195cf36e85b8ce0dabbf7b92dc2c36ae27f0b7a02b0f9f4278e46ec5fb5a76 WHIRLPOOL 02e1c35b57403dcf2beed599c37c8cb52dab36a8e4c87fb8e8cac9cc536640cb0bf47a3df2a939bae6a6d728035362ad0427f830ffd35c9db174a42e342a03d9
-DIST uClibc-0.9.33.2-patches-2.tar.bz2 2854 SHA256 a43192a582ad5428daaceec23aaf096ac037a723eb79724aa716f3850674fecd SHA512 f7ef2bc1a2498e2215828c52003a4ddc4ebe79dd43def367398fad7895c5e5ce9ae4ce68e51141193ef7d47d0727ed477c7b00fbb95b47cd6f251aacbd15048c WHIRLPOOL 80bd9de5b4c5eb671a462a094cd016d0931885ca4604a489017cc36ae5d960a5f08cb72185011d796d5bf9c4809ed2331416ca9b0dae00991ac1e998fc31f7c9
-DIST uClibc-0.9.33.2-patches-3.tar.bz2 4002 SHA256 2c06d1f80c8b7e5b0ef60571720273e2ccc55551a3dacc9ed5f7c04e9eda7018 SHA512 935dded858fbd4ce7317bdd1c097f26d8752bd241c12c9b1420e621bb80e59d8f74f84a8ae4df86bb07a03b2354e6c8ce4ba980aaa6d9be63c5e518da393db52 WHIRLPOOL d72989fbc7c700191b5703591bff4ff39ba6a3bb9c230cefb11c21cb2cd5f3f25bd52e8f6783bc651bd273d15146246491923bb1c357ce117da496910acefe6e
-DIST uClibc-0.9.33.2-patches-5.tar.bz2 10084 SHA256 9c9814360470b1ff3308a85fe8a61ce35eb57c288301b7244450b894f9627a29 SHA512 efd70db740d090d4791e4afc33db2a26df9151ca5be8bcd499ce65d33222af784cb11cbc1f6a4288cab5a4ad1b686488ce836bb62629a9c04f643d40706ac917 WHIRLPOOL b88c36d0eb3f3398a5e96d155cdd8d1b3f6c02ecba4d3f7b167f35c983cf6098e3795839f3f8e0564a91d364c6e2aa0408adcc4647af2143be51a892f2508b27
-DIST uClibc-0.9.33.2-patches-6.tar.bz2 19661 SHA256 81f090b8446c09614d01a2de0637ee21fd16b57f3b5740d6d2f9e02a6869cf27 SHA512 ae2be61ab469b27d9c9b8c3d457f67e24b261db45f511c4d330364aef5843fc0775bc3de61bb9e6e027fabaea7f5736ab4fef9aaddc4d4a777743768afbe0129 WHIRLPOOL a8cd8b066374a49483caa1ea4df1446145c6bafa4f85c00d9136f185dc2ab9f616abc0687c25559e34d6f33a5015f963303293223b1e9f0a7b5777d5b08a3030
-DIST uClibc-0.9.33.2-patches-7.tar.bz2 20917 SHA256 5509055465d580c92dee9ac62fe99228655f6b9b6b48d3a74fe88e9dfcde2377 SHA512 7284b021c5cfd2c08178f1e0ac0323dbad7d48cd9eddbafa6f0ef80d3e713fe2c26b75cbceccb5e44e17754e7d5509c69d9f1dbecbe74bb640ad34027f81d516 WHIRLPOOL 5a93c521c8faa7f067a4a4a8c951dad0decfddd4f005f0bd6a3ae7930ea0dee45385abb2153636e30625e4fa551529e3cdb31b8e818fdd1ae704e42f47460b4d
-DIST uClibc-0.9.33.2-patches-8.tar.bz2 20355 SHA256 22e199113574cd44f381c341173b5a9fb09525100f0a9c0c6799b3b5c9d2a3f2 SHA512 fd7648c13255077d8e7a81de4ca5e7c11b0fe15a0766839d877c3bb9022afaf703043019fa4fb84b666cb16f7b255c1aa919aec2b5799d55aa6d74e36c4ea2aa WHIRLPOOL d63b9ea705ce09d2b2e177ab7318830b5855bd7aed2169ba95add340b12ec54b847137647f0cf9206710ea629e3ce07d45ea9d67caaab4cea78a4d1aab6142dc
-DIST uClibc-0.9.33.2-patches-9.tar.bz2 23996 SHA256 01148f0dd60bb00ae11a5e83c419cddd82cf30e82e9ac71e267502010c1e7a04 SHA512 c7e267e9349f500e5ff040d2e2c4027d1e877eb8985108f8a604f9633a0a5d6a3e3cb35f77a3989f4701c44c3129abdbf01b3e0979e36bca87fce76f24e74192 WHIRLPOOL 0572f3e5f498985cad9dbba45206b7751317089e8ab63a7281dd7c9d7b8168e8beafc894ae64a0ab90a35db4e21ba98698fe94e14e341278b10f2ffcbd071183
DIST uClibc-0.9.33.2.tar.bz2 2834029 SHA256 988d2c777e0605fe253d12157f71ec68f25d1bb8428725d2b7460bf9977e1662 SHA512 1cf18fe5418e12ae12ce995d7455d465bc4737f225afc49512ec69858771e099bead7b18408b01c7e6f845dcc80c3b4f875332eeffdcc04ae4b48474fb29a8dd WHIRLPOOL e2ca16c179893a58228e701ddf8b5614cb6b3fe2eaa6e2a9b909a27f78a348723fa7ec99f7b437ce35d9ac0870e3e2ec4e4d46834ca6b3cbc3d8fa5306b57fb4
-EBUILD uclibc-0.9.33.2-r1.ebuild 10627 SHA256 2631b39e04967ecb766dbbfbd626fc513649169391e00c5adea8c6e29fc5ac71 SHA512 ddcef73b4ab3ac3a98984db4cbdebf1d405eec7e066f096dbe8be51e62c991f186ffd4f635b017eff2ae88a6f5fba404359d5846c3bfc27fe436b39204f604f2 WHIRLPOOL ecd11b6227301a46160f18598d2e88acbfb4e8b4a48244bcb875325ffdad86c50bd453910a1de1daef78cb51be5f2c5b90cd6e2051d4dab2fbc45a19ba13ed75
-EBUILD uclibc-0.9.33.2-r10.ebuild 9100 SHA256 d9564648089f1d036ce8ae68dde37775508434154b7a1e126575b42d923faf2f SHA512 16a292ea2eb3bc7d2d4f330867875fa37ae47ae578d65956e0cbd15a65cde46e8a0c26a8e9f74f3868a38412241ac51d9304cddca9e14f74d05093f6b967ca50 WHIRLPOOL 45a08efae909b9908b72481c681eda54b04f6ad9b81ef103399611d24e9073f76e3f64185312eacb0ee68b3d62fe55a2bbab5588e1576a1e8db6b859331d0c05
-EBUILD uclibc-0.9.33.2-r11.ebuild 9100 SHA256 ea01e2475aa182e273f2a1ae89e9d5341e9cbd46d9e53a838e2ea9a453c9e205 SHA512 9bb35349350474b9ad0bfe9ec5d25165bd999fa2b529636f3ad4e37c3555f3a37c35bec42e998fac63280e969a3d3ae7cc9c2c3506edfbc982a1429cc3591e8c WHIRLPOOL 5e5043628a130b672c0eda22cb1a83d736f00a8baf9ba7e4edeadebeddbc0d8cfb9e0965335830f5bc6ac4fd864554c8986abd1909d28aff9654148da3abc26a
-EBUILD uclibc-0.9.33.2-r12.ebuild 9220 SHA256 f53c8cf2bc0d24dc1aa58ce4bdddc4ac27bf5adec7bcd461de4a1590a0ff3aac SHA512 42720786b73899138fff05739f14967bb2ce10e18d7da1fc3bbf7ad545a2abe0b42d95d4327bb0ee0739a929adc845330c43fc34f0c668b28f689d55b95448e5 WHIRLPOOL 4ac94941349d1465d2ab7ae90efec271cc29c5f64175a34404c4ea04c9afc35a266bc9e50c7aa49a21e5a57318a472558d8212df5623bd8c749a0500181d05e2
-EBUILD uclibc-0.9.33.2-r13.ebuild 9215 SHA256 c4bf87a8395ba46ec7dce8f2a70afea87f60f0cad2988bed30ef37772dd7fc5b SHA512 78794913a076792023ded8350c4a02e8e5799c420e459cff928fa2f33cf738e38730795c10549620adf3a9700b21bfdf74d5f650a6d23fab48a1a4a553e776d4 WHIRLPOOL 8b4fe38062646bf38f895d0624b99863d65b0a33feae941e8fdabfb275b2a786553ee0c7b0eff223cecb17a666b44da6ca75b55e1f34ddbffde053dc25215c8f
-EBUILD uclibc-0.9.33.2-r14.ebuild 9216 SHA256 c469c011d9fe87236e68c0abcd6fdefee6230623988d04795e3195b7dc089e24 SHA512 12e70a0e8c1340cd259e6b5d4990716c67c10b6247ad3262165e5157a765630c63cf010b3ec9146cd3b8e0847afcf4d05a11cfc0357e8c75499d71b46f445d45 WHIRLPOOL 2c708c5e6404107bec0afbbf59ca7c989b1623de3145ebd1ac07cbc46dc28fa7f16fe28adfb4aa23cdeff3b5434b3287ab9ab32bc269e4c8670319323f5df6ac
EBUILD uclibc-0.9.33.2-r15.ebuild 9215 SHA256 311b7c21ee97accecd0c8d8b8756234d0e0c008414e7da29ad6504191375d455 SHA512 64f7b6c0fd055ed8e9099d285103b3f7896872972f54300abe32a9fbf798dc0a0843b561d7b9d1b667b37cb01a967c739de004c30909cdd09bf2b12b9ae6fab9 WHIRLPOOL f1bda2fedb69bcb02e1aebb4e2da2910caf4ce02f94baf1403886a67c08bf7a50610ffde4ab50d16ae49c45b90eb4f43b63afa6f63b50798c8256b5534adb742
-EBUILD uclibc-0.9.33.2-r2.ebuild 10620 SHA256 5be80388729ccb10a8607abb6e1baed4b4fd2482387c0264c93d0fa6f5a6e7bf SHA512 4d64d286dc578984f9a6dc04199c60fefd251347a45b60d1edd8dc26dd6100ca7ca0e23ba3a1167bf6ba5e83f3c13bd1ef45e2855517dbe9f862bd6aeda83271 WHIRLPOOL cb0daf866758f351cb469554f7b3524232a5e1f00d40c85c93b64c943bc4dea3e7343a115ab2db2c09f1deb07bc772e1e6f8a3aa38b734b3bc97012b164a200b
-EBUILD uclibc-0.9.33.2-r3.ebuild 10755 SHA256 77fde6f1254898e42f584e1f83468ed0631cd1a48c47f9eaeb36f61bf5d56e61 SHA512 d679233d6560b4f75df6726da2cf7f54302add8b5c1adbf285d08472001c3388084857551b6fe863755cc5a84d64046e87f08ffd648ae2339d747e83c76a847b WHIRLPOOL 54c0444b9012b0b3bacc0b78129b77aefcd217f346fc905d507c442aa60d5bf8317a206359cc447e6a9d2fa6de5116996c1c3936c51ecc281dd39e9803eaac31
-EBUILD uclibc-0.9.33.2-r4.ebuild 9098 SHA256 0cee928603eef29dd0bdff08828a2111c30fa702751e1d27abd23260cde5bb99 SHA512 9500ac28f449b1d2cab17c39837b60cbe6c8724aa09f4de25930ab7bc007d58f24f0810b2f272890dc7af9a82de60303045f0895d75f5ada2667f21220b7a39c WHIRLPOOL f73243b4aa6842383faaad1d6e2e789d9bd9aef18ed0f0c899b4c0ee61e0366db3939241f908730f5f69900a3a81cfffb22a460229ae68959d55f965b839ef3e
-EBUILD uclibc-0.9.33.2-r5.ebuild 9105 SHA256 7f6c801c6faa90d780a505f348220a589fd62323ea3be07212a5cb0de5aeedab SHA512 38c837c64e6db64433234f65b8694168d03ebf4a1d9ef7ba7302d6ef8e9a3282336a8bf2e21e78337cddc66f96d05e09d47c3f862a87ca84b58bdd38ceb5cd92 WHIRLPOOL 418c21883c94498373799aa91c79f955df1eb10d01af8ccf0f5b61d290cd8e3bda6ebd86b0aa50b8e13e2bde75baa3e77ecc86990541a709231f7ea6ba72695f
-EBUILD uclibc-0.9.33.2-r6.ebuild 9098 SHA256 41b76406a51438bcc0c196d2670a7a09b2e256a18f78a7b95ae27f97428cd9d2 SHA512 34000e9f42d470d1fa39e49fe6f857729766b5f744acd9497514c938362bb91b85dcef2c2f2f878fa0a8f10573f4477a87da2f056ccee09327684b6b3f0dbc0f WHIRLPOOL 72991e1fb66ff6f0709ca1a081b6cc64d63755a142d831e9edf8383dde7e0db324acf28e53fd18ab43431c05547a144da349204ad0e4ea54663bf513668ce470
-EBUILD uclibc-0.9.33.2-r7.ebuild 9105 SHA256 19844cbd8a5f1d55b9ca06eff40ce030da0fda10dc518262bc6d2df5b42b0e5e SHA512 95f308c2941950d1935f75658b278702ecb2381ef753cd87c8c54a53e452b8a3048d5fd93ead7f4812f6fc29f9bfe8dd228a1c3a9061a12915d6a9c84a621813 WHIRLPOOL bba1ef74465e62c3c4efcd884dbe08180ab7350734a63130dd4d45590641babb3c420ad093df26f8c8895636716ddad7d611d54e400a0fe484434a0561b1fb25
-EBUILD uclibc-0.9.33.2-r8.ebuild 9099 SHA256 d4e90fd3690197168f1f3f4b690f16c1c3e593d529a5774e07948766d634ad34 SHA512 dfe5711d246a5baa0ee85448df0aecfd686f2c59b4b53006820d714d30a5ecf24ed78f6f430358f1cf4477cbc71b130ef8c9b2880cb573c784c78357b29b670d WHIRLPOOL 6c6944e620109f54572116e70fda49e510a04de30ed0236a49972d96bbe59e354a6f6f1edf298ef65cdcf7c9612ce78b8d727299f76e7b32d7ccf17cc044dc18
-EBUILD uclibc-0.9.33.2-r9.ebuild 9106 SHA256 ba5eb437f915ad4d375dc42ad1645aec93a304ec40da86694ba195667729988b SHA512 f981243a50e96a9860540beebf4fe5c602758b66844f70870d5b1e30477e56e54324a92cc1362f6f336734b983a117d15fa36e05f558048efde3f036cc4e659a WHIRLPOOL 34fd480e90d8d780d8ec78e52ae59c385dc27a3d5172fb15e37c3c50b742d22a5ac9d8650eb5e0a77d23f843f9016a53dff5024ca11e1efbb3cffde774c423fb
-EBUILD uclibc-0.9.33.2.ebuild 10619 SHA256 03a88e82c07024fb617f7d8ab0d6845d7f89eb5652023f08b2ce7679cca6d247 SHA512 b200a9c5ecd5990d97eb98bcf07471809db308d7f3a5232d82fc97be94bb18296def134156a071b5793d14b63b5e404c7e9f678731008c478e656a9e9b305d0b WHIRLPOOL a0ff9747895a0da632e910558cb0492d47c6050152ab41e43dc749a48a2e1fd73459f829d695fba2dc811302ad88eb4e4e3c2df720edd6aa30e03a3aba1ff52d
EBUILD uclibc-0.9.33.9999.ebuild 9236 SHA256 41c8f7296cea43ac2d5947ca4d88ab0b3acf01dac3501346f152a6f2eef99561 SHA512 ff68dc29988c52dec63853289ea83811cf010f77f237576594bd189849a7db3c481f21adc2bc6898359125fd4a1f3e0b42f1c66e119ddd76d336d107818f5017 WHIRLPOOL 83d6e87e443da1639969c8d48d928b668f83339813454d036e755a22905e88f65215c85fbbd20de73ad6fa5f25f6c0f5b3f97ea936cbd70b267a9d379a1ff47b
EBUILD uclibc-9999.ebuild 9210 SHA256 5fc9ef9a0efa4e8cd394619fa7c3c68c759d70d1651210c0e4772cd5b9c5a74a SHA512 ef111b5fb58864b37957b0112965d56f97557e4141d2b9b9cde59346bd6053126ec5cdfce405ca5f6e74b154c66cfd6bb4aa0f4b62dc56841ee77884df183d66 WHIRLPOOL a8866c794c7bb6980cea9f6d98a21599f45290b69126de5bfe2d2b3f058be0c302363941db035131f0b872823e650d9e30486d0486f94f64bb836353eb155fba
-MISC ChangeLog 26133 SHA256 e12915974ad22ec6942f10b4c62b8d666ed6e5a78bfeb985727489e5a97779c1 SHA512 9cb35ab6dfb335579f4acae4312ba9402a0773b1f7be31c3c4c83c3d1a4020f4d4f105624adee262c4900dfad7c22e4b22a65c854d963c8a2a9bfd4186554047 WHIRLPOOL 0b798475b3b5cc4613eb7beefc585f5a3f5d0fdd2d9b02a9599b6769e156ed6bf2ec7994beda3d18167f6e9cfeb0eea2ab51c263ee2c5c85829f135a5c2380aa
+MISC ChangeLog 26683 SHA256 6b656269e94f48642cec9f9cbab26b0a166d56582209d069432da6ed371547d7 SHA512 349e93c6d23a86070b5fceda6c236d96ab0d25e94a167e9c86a343177914310078633612479946b307e8046f8e96d305dfa92f4537a5ee1a90ef9dfbfffd3d60 WHIRLPOOL 884bd471874c41751c0444192596a060b06c59a218ffc481e3ee2e925d42dd6a120d02a8861e593ab63c3605340513492dbab4efaec388d65e8c8736c0c513df
MISC metadata.xml 1292 SHA256 b4bdcfd7ab17ae024dcd8c22acab27dd02fbb6232fad9f9f2e266bed316b726e SHA512 c6f18ed33a662a22c8ea24342ab604cbf63009360f6f7ca25560f64876fa5fc81b21f6791fb0f3b7e9205171577334b00e8d81d05953dfd3b02e7304f504424e WHIRLPOOL 29c8024561257c0f36af0a107d891358039ae4631f3218527b30b490abe8cb409e91112945c4ff371cecbf43978b0946d64d873a5a914d025093b4e407ac5687
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJVgroPAAoJEJOE+m71LUu6j9sQAJZY3tCiAakJyDM13oDjIAoS
-y65rULPsb7QjOI7XZEtbz4Mync4NAmRg82usWThSz+7Vr3+Nlc0Oum3iNJaCioh3
-2VJ2fqcnUK7M32cR/K6bww5HQ0Sm8/RyxHgeVgboOg76CXdoBcgRXLak8dF91Eq4
-pvhbukPifT/gqLOiQiH4i1Lb6jH4INdWsw+A4a2RLbFZcukKrRVTRwCiIqnCvSVo
-/gLjrp5GqRdPO+ixEiudPwItMFbts9KwP7QBvkl5txAAUlFTBsIj9zxh9LY77J3/
-+cunYRYQMmqPAmdxrzru8FivcFoQO21xH/yOKD1JV1pv6f8ra6N6yLLA2oriwwD0
-BE74Ty9YwDwrHgZP+xk8Zg15kQwttiit6XTtOw5xoT1q7xRMB7h6iTKd/3pQcdAA
-hedA6/9i1Xtr0fbQRFN0kJI44ZRp2rqDW6SH8KXWSmXdoIlOaUBIMRkNQR2N9I3X
-gN4GviEV74hIF6pJCkDS89xfifSHxF34WeF8M6xVktC7WxCp7CbgVzBUdtAYrW9D
-To4qfIWWXcxidoQXUTjSfjQCPMEUQ3zFkWI+h5F/poYRdcOzkD9HwCd+hX/VGC21
-ZkJKVONeJEmpN90VnWvqcyXpxvhD87SacLlYoOIlwObu6wCwpg2axBCh+5n9WTj9
-ZgHyoRI3tZzoWsu9dPfa
-=0CIf
+iQIcBAEBCAAGBQJVgrriAAoJEJOE+m71LUu6ZA0QAIZ2vLIwjysq4IWNlacbyX31
+OwxAoHftgqOev0mCbXvJ4B869W3sylacDkepCeaTwrbs8h0DUj9rT+QgNUeauRnq
+8ybImZYJyirfyX4pNFfnxOZZRbeU6XrxSu4l5cwKJOdb9hZgeav6ZNeJTepB5tkZ
+mUjl0POqqT1JmKrWtfM8wG4EDaDFFAZbxS2jPqgTrUwVZXSNYl1ZJdepcY5IrNsO
+eQBUBADARUOLk6HSLyKE5udK+F8KF5Ax3n2Ic6oxP90fotsaotC1SJ2gMJPk9EcG
++Zg3DBKN9QttowoGrL7HwXmNf3A53ra69VBMAlDAkQ9Au6DC6YJQZYw9bBoiqpc5
+YE3WN04JSA0maoaTUhnMjfj9+OfZpxmH8InMVy56cz52rqxXuiBlhXNk3vxIz2VV
+D8P0vPF26ORPxmBUfS/0h1Ui6xFtBUvAZ1ICjs4mTywIxPgMeDPsjWTMB/am94X8
+Pbl5pEXZ91qCrbyLSOJF8gfWSPrTk9wCzm+yEjeocUlOqZ8kcIz7VV8Bwhrgel92
+FJs1tYbgohMjm4UrGcaNbaf0qNQrjqUNVTers8hxG6TqPvvwV1ee2McIQHdgV/XE
+lI8ulEUyUMCIKA7CamLSR+AgwwV4Ff0HgoCPSwa6eFepS2texLMm0P16tACHQHnI
+gSyr/4oKtwQfV9y5iVXA
+=tvyB
-----END PGP SIGNATURE-----
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild
deleted file mode 100644
index c2f28f420f57..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild
+++ /dev/null
@@ -1,372 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild,v 1.2 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="2"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-# XXX: We should kill these off.
-CPU_ALPHA=""
-CPU_AMD64=""
-CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT},_CORTEX_{M3,M1}}"
-CPU_IA64=""
-CPU_M68K=""
-CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32{,R2},64}} MIPS_{N64,O32,N32}_ABI"
-CPU_PPC=""
-CPU_SH="SH{2,2A,3,4,5}"
-CPU_SPARC="SPARC_V{7,8,9,9B}"
-CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH"
-IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}"
-
-check_cpu_opts() {
- local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])"
- [[ -z ${!cpu_var} ]] && return 0
-
- if [[ -z ${UCLIBC_CPU} ]] ; then
- ewarn "You really should consider setting UCLIBC_CPU"
- ewarn "Otherwise, the build will be generic (read: slow)."
- ewarn "Available CPU options:"
- UCLIBC_CPU=$(eval echo ${!cpu_var})
- echo ${UCLIBC_CPU}
- case ${CTARGET} in
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- *) export UCLIBC_CPU=${UCLIBC_CPU%% *};;
- esac
- else
- local cpu found=0
- for cpu in $(eval echo ${!cpu_var}) ; do
- [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break
- done
- if [[ ${found} -eq 0 ]] ; then
- ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported"
- ewarn "Valid choices:"
- eval echo ${!cpu_var}
- die "pick a supported cpu type"
- fi
- fi
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target config_target
- case $(tc-arch) in
- alpha) target="alpha"; config_target="no cpu-specific options";;
- amd64) target="x86_64"; config_target="no cpu-specific options";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32"; config_target="no cpu-specific options";;
- ia64) target="ia64"; config_target="no cpu-specific options";;
- m68k) target="m68k"; config_target="no cpu-specific options";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc"; config_target="no cpu-specific options";;
- sh) target="sh"; config_target="SH4";;
- sparc) target="sparc"; config_target="no cpu-specific options";;
- x86) target="i386"; config_target="GENERIC_386";;
- *) die "$(tc-arch) lists no defaults :/";;
- esac
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target}
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r10.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r10.ebuild
deleted file mode 100644
index cf9c6322af23..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r10.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r10.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="12"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm m68k ~mips ppc sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r11.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r11.ebuild
deleted file mode 100644
index e3d434e2cf24..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r11.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r11.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="13"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm m68k ~mips ppc sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild
deleted file mode 100644
index 2424c2a805f8..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="14"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-
- if use nptl ; then
- case ${CTARGET} in
- i386*)
- die "Your target has no support for NPTL"
- ;;
- esac
- fi
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild
deleted file mode 100644
index c90da230acdd..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="15"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-
- if use nptl ; then
- case ${CTARGET} in
- i386*)
- die "Your target has no support for NPTL"
- ;;
- esac
- fi
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild
deleted file mode 100644
index 68f4e951d3f7..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="16"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm ~m68k ~mips ppc ~sh ~sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-
- if use nptl ; then
- case ${CTARGET} in
- i386*)
- die "Your target has no support for NPTL"
- ;;
- esac
- fi
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r2.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r2.ebuild
deleted file mode 100644
index 0d6fd6a37f26..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r2.ebuild
+++ /dev/null
@@ -1,372 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r2.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="3"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm m68k ~mips ppc sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-# XXX: We should kill these off.
-CPU_ALPHA=""
-CPU_AMD64=""
-CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT},_CORTEX_{M3,M1}}"
-CPU_IA64=""
-CPU_M68K=""
-CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32{,R2},64}} MIPS_{N64,O32,N32}_ABI"
-CPU_PPC=""
-CPU_SH="SH{2,2A,3,4,5}"
-CPU_SPARC="SPARC_V{7,8,9,9B}"
-CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH"
-IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}"
-
-check_cpu_opts() {
- local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])"
- [[ -z ${!cpu_var} ]] && return 0
-
- if [[ -z ${UCLIBC_CPU} ]] ; then
- ewarn "You really should consider setting UCLIBC_CPU"
- ewarn "Otherwise, the build will be generic (read: slow)."
- ewarn "Available CPU options:"
- UCLIBC_CPU=$(eval echo ${!cpu_var})
- echo ${UCLIBC_CPU}
- case ${CTARGET} in
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- *) export UCLIBC_CPU=${UCLIBC_CPU%% *};;
- esac
- else
- local cpu found=0
- for cpu in $(eval echo ${!cpu_var}) ; do
- [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break
- done
- if [[ ${found} -eq 0 ]] ; then
- ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported"
- ewarn "Valid choices:"
- eval echo ${!cpu_var}
- die "pick a supported cpu type"
- fi
- fi
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target config_target
- case $(tc-arch) in
- alpha) target="alpha"; config_target="no cpu-specific options";;
- amd64) target="x86_64"; config_target="no cpu-specific options";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32"; config_target="no cpu-specific options";;
- ia64) target="ia64"; config_target="no cpu-specific options";;
- m68k) target="m68k"; config_target="no cpu-specific options";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc"; config_target="no cpu-specific options";;
- sh) target="sh"; config_target="SH4";;
- sparc) target="sparc"; config_target="no cpu-specific options";;
- x86) target="i386"; config_target="GENERIC_386";;
- *) die "$(tc-arch) lists no defaults :/";;
- esac
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target}
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r3.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r3.ebuild
deleted file mode 100644
index ce9f5eb5e7e8..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r3.ebuild
+++ /dev/null
@@ -1,377 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r3.ebuild,v 1.6 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="5"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm m68k ~mips ppc sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-# XXX: We should kill these off.
-CPU_ALPHA=""
-CPU_AMD64=""
-CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT},_CORTEX_{M3,M1}}"
-CPU_IA64=""
-CPU_M68K=""
-CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32{,R2},64}} MIPS_{N64,O32,N32}_ABI"
-CPU_PPC=""
-CPU_SH="SH{2,2A,3,4,5}"
-CPU_SPARC="SPARC_V{7,8,9,9B}"
-CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH"
-IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}"
-
-check_cpu_opts() {
- local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])"
- [[ -z ${!cpu_var} ]] && return 0
-
- if [[ -z ${UCLIBC_CPU} ]] ; then
- ewarn "You really should consider setting UCLIBC_CPU"
- ewarn "Otherwise, the build will be generic (read: slow)."
- ewarn "Available CPU options:"
- UCLIBC_CPU=$(eval echo ${!cpu_var})
- echo ${UCLIBC_CPU}
- case ${CTARGET} in
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- *) export UCLIBC_CPU=${UCLIBC_CPU%% *};;
- esac
- else
- local cpu found=0
- for cpu in $(eval echo ${!cpu_var}) ; do
- [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break
- done
- if [[ ${found} -eq 0 ]] ; then
- ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported"
- ewarn "Valid choices:"
- eval echo ${!cpu_var}
- die "pick a supported cpu type"
- fi
- fi
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target config_target
- case $(tc-arch) in
- alpha) target="alpha"; config_target="no cpu-specific options";;
- amd64) target="x86_64"; config_target="no cpu-specific options";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32"; config_target="no cpu-specific options";;
- bfin) target="bfin"; config_target="no cpu-specific options";;
- ia64) target="ia64"; config_target="no cpu-specific options";;
- m68k) target="m68k"; config_target="no cpu-specific options";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc"; config_target="no cpu-specific options";;
- sh) target="sh"; config_target="SH4";;
- sparc) target="sparc"; config_target="no cpu-specific options";;
- x86) target="i386"; config_target="GENERIC_386";;
- *) die "$(tc-arch) lists no defaults :/";;
- esac
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target}
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r4.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r4.ebuild
deleted file mode 100644
index bd3ed97926e4..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r4.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r4.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="6"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm m68k ~mips ppc sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r5.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r5.ebuild
deleted file mode 100644
index f7d4c093051d..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r5.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r5.ebuild,v 1.2 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="7"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r6.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r6.ebuild
deleted file mode 100644
index 835cc44a2a09..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r6.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r6.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="8"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm m68k ~mips ppc sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild
deleted file mode 100644
index 8655ca8143e2..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild,v 1.2 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="9"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild
deleted file mode 100644
index cabe8a79637e..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild,v 1.3 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="10"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm m68k ~mips ppc sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild
deleted file mode 100644
index 016aa2c0187d..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild,v 1.2 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="11"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} = ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-check_cpu_opts() {
- case ${CTARGET} in
- # Need to handle $ABI here w/mips.
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- # XXX: Should figure out how to handle sparc.
- esac
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- epatch_user
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target=$(tc-arch) config_target
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="486";;
- esac
- if [[ -n ${config_target} ]] ; then
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target} || die
- fi
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2.ebuild
deleted file mode 100644
index f23aefe67351..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.33.2.ebuild
+++ /dev/null
@@ -1,372 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2.ebuild,v 1.5 2015/02/27 08:05:56 vapier Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.busybox.net/uClibc"
- inherit git-2
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-MY_P=uClibc-${PV}
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER="1"
- SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
- ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
- KEYWORDS="-* amd64 arm ~m68k ~mips ppc ~sh sparc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-S=${WORKDIR}/${MY_P}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-}
-
-# XXX: We should kill these off.
-CPU_ALPHA=""
-CPU_AMD64=""
-CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT},_CORTEX_{M3,M1}}"
-CPU_IA64=""
-CPU_M68K=""
-CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32{,R2},64}} MIPS_{N64,O32,N32}_ABI"
-CPU_PPC=""
-CPU_SH="SH{2,2A,3,4,5}"
-CPU_SPARC="SPARC_V{7,8,9,9B}"
-CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH"
-IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}"
-
-check_cpu_opts() {
- local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])"
- [[ -z ${!cpu_var} ]] && return 0
-
- if [[ -z ${UCLIBC_CPU} ]] ; then
- ewarn "You really should consider setting UCLIBC_CPU"
- ewarn "Otherwise, the build will be generic (read: slow)."
- ewarn "Available CPU options:"
- UCLIBC_CPU=$(eval echo ${!cpu_var})
- echo ${UCLIBC_CPU}
- case ${CTARGET} in
- mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
- sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
- i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
- *) export UCLIBC_CPU=${UCLIBC_CPU%% *};;
- esac
- else
- local cpu found=0
- for cpu in $(eval echo ${!cpu_var}) ; do
- [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break
- done
- if [[ ${found} -eq 0 ]] ; then
- ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported"
- ewarn "Valid choices:"
- eval echo ${!cpu_var}
- die "pick a supported cpu type"
- fi
- fi
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-src_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-src_config() {
- restore_config .config
- if [ -f .config ]; then
- src_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=${target} defconfig >/dev/null || die
-
- local defs_{y,n} defs
-
- defs=(
- DO{DEBUG_PT,ASSERTS}
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_PROFILING
- )
- kconfig_q_opt n "${defs[@]}"
- kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- if [[ ${CTARGET} == arm* ]] ; then
- kconfig_q_opt n CONFIG_ARM_OABI
- kconfig_q_opt y CONFIG_ARM_EABI
- fi
-
- defs=(
- MALLOC_GLIBC_COMPAT
- DO_C99_MATH
- UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
- UCLIBC_HAS_FENV
- UCLIBC_HAS_{N,}FTW
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMPX
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- PTHREADS_DEBUG_SUPPORT
- )
- kconfig_q_opt y "${defs[@]}"
- kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
- kconfig_q_opt n UCLIBC_HAS_LOCALE
- kconfig_q_opt n HAS_NO_THREADS
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
- kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
- kconfig_q_opt !nptl LINUXTHREADS_OLD
- kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
- kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
- kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
-
- # we need to do it independently of hardened to get ssp.c built into libc
- kconfig_q_opt y UCLIBC_HAS_SSP
- kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
- kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
- kconfig_q_opt n PROPOLICE_BLOCK_ABRT
- kconfig_q_opt y PROPOLICE_BLOCK_SEGV
-
- # arm/mips do not emit PT_GNU_STACK, but if we enable this here
- # it will be emitted as RWE, ppc has to be checked, x86 needs it
- # this option should be used independently of hardened
- if has $(tc-arch) x86 || has $(tc-arch) ppc ; then
- kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
- else
- kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
- fi
- kconfig_q_opt y UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt !ssp SSP_QUICK_CANARY
- kconfig_q_opt ssp UCLIBC_BUILD_SSP
-
- local def
- for def in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:g" .config
- done
- src_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
- -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
- -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
- -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
- .config || die
-
- src_oldconfig
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- if [[ -n ${PATCH_VER} ]] ; then
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
- fi
-
- check_cpu_opts
-
- echo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "CPU: ${UCLIBC_CPU:-default}"
- einfo "ENDIAN: $(uclibc_endian)"
- echo
-
- ########## CPU SELECTION ##########
-
- local target config_target
- case $(tc-arch) in
- alpha) target="alpha"; config_target="no cpu-specific options";;
- amd64) target="x86_64"; config_target="no cpu-specific options";;
- arm) target="arm"; config_target="GENERIC_ARM";;
- avr) target="avr32"; config_target="no cpu-specific options";;
- ia64) target="ia64"; config_target="no cpu-specific options";;
- m68k) target="m68k"; config_target="no cpu-specific options";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc"; config_target="no cpu-specific options";;
- sh) target="sh"; config_target="SH4";;
- sparc) target="sparc"; config_target="no cpu-specific options";;
- x86) target="i386"; config_target="GENERIC_386";;
- *) die "$(tc-arch) lists no defaults :/";;
- esac
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target}
- sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
-
- src_config
-
- if use iconv ; then
- # Run after make clean, otherwise files removed
- find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
- if [[ ! -f /etc/locale.gen ]] ; then
- # See ./extra/locale/LOCALES for examples
- die "Please create an appropriate /etc/locale.gen for locale support"
- fi
- echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
- cat /etc/locale.gen >> ./extra/locale/locales.txt
- fi
-}
-
-src_compile() {
- emake headers || die
- just_headers && return 0
-
- emake || die
- if is_crosscompile ; then
- emake -C utils hostutils || die
- else
- emake utils || die
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check || die
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target} || die
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
- newbin utils/ldd.host ${CTARGET}-ldd || die
- fi
- return 0
- fi
-
- emake DESTDIR="${D}" install_utils || die
- dobin extra/scripts/getent
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}