# Maintainer: Natanael Copa _abiver=0.9.32 pkgname=libc$_abiver _gitver= pkgver=0.9.33.2 _ver=${pkgver/_/-} pkgrel=18 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" arch="all" options= makedepends="linux-headers" # libc subpackage must be last subpackages="uclibc-dev:dev uclibc-utils:utils libthread_db libpthread libc" depends_dev="linux-headers=>2.6.32" replaces=uclibc depends="libpthread libc" options="!strip" triggers="uclibc-utils.trigger=/lib:/usr/lib" ldpath="/lib" _snapurl="http://git.uclibc.org/uClibc/snapshot/master.tar.bz2" _snapfile="$pkgname-$pkgver.tar.bz2" # patches are tracked in http://git.alpinelinux.org/cgit/uClibc-alpine/ # branch 0.9.32-alpine source="http://uclibc.org/downloads/uClibc-${_ver}.tar.xz 0001-Compatible-stack-protector-for-non-Thread-Local-stor.patch 0002-resolv-res_query-for-CNAMEs.patch 0003-resolv-fix-resolver-to-return-TRY_AGAIN-on-timeout.patch 0004-libm-x86_64-implement-some-fenv-functions.patch 0005-stdlib-fix-arc4random-return-type-to-u_int32_t.patch 0006-malloc-standard-synchronize-on-fork.patch 0007-libc-x86-fix-stack-unwinding-and-backtrace-informati.patch 0008-ldso-limited-support-for-ORIGIN-in-rpath.patch eventfd.patch uClibc-0.9.33-avahi.patch librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal-in-helper-thread.patch 0001-add-posix_madvise.c.patch posix_fallocate.patch posix_fallocate-fix.patch 0001-cancel.h-add-generic-file-to-ease-cancellation-suppo.patch 0002-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch 0003-pread-pwrite-drop-fallback-funcs.patch 0004-add-cancellation-to-generic-pread_write.patch 0005-pread_write.c-make-all-archs-use-common-code.patch 0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch 0009-sys-quota.h-sync-with-glibc.patch 0001-libc-sysdeps-get-make-set-swap-context-for-i386.patch 0002-libc-sysdeps-add-get-make-set-swap-context-for-x86_6.patch uclibc-dlclose-fix.patch uclibc-rtld_next-fix.patch 560-res_init_asterisk.patch 0001-libm-x86_64-implement-fegetround.patch libdl.patch uclibcconfig.x86 uclibcconfig.x86_64 uclibcconfig.i486 uclibcconfig.arm uclibcconfig.powerpc uclibc-utils.trigger " _config="$srcdir"/uclibcconfig.${CARCH} _builddir="$srcdir"/uClibc-${_ver} snapshot() { local _date=$(date +%y%m%d%H%M) _gitver=$_date pkgver=${_abiver}_alpha0_git$_gitver _snapfile="$pkgname-$pkgver.tar.bz2" rm -f "$SRCDEST"/$_snapfile msg "snapfile=$_snapfile" wget -O "$SRCDEST"/$_snapfile $_snapurl pkgrel=0 sed -i -e "s/^_gitver=.*/_gitver=$_gitver/" \ -e "s/^pkgrel=.*/pkgrel=$pkgrel/" \ APKBUILD checksum } prepare() { local i cd "$_builddir" # patches goes here for i in $source; do case $i in *.patch|*.diff) msg "Applying $i..." patch -p1 -i "$srcdir"/$i || return 1 ;; esac done # set abi version and remove unsupported warnings c flag sed -i -e "s/^ABI_VERSION.*/ABI_VERSION := $_abiver/" \ -e "s/-Wold-style-declaration//g" \ Rules.mak } build() { local _kh= cd "$_builddir" if [ -n "$SYSROOT" ]; then _kh=KERNEL_HEADERS="$SYSROOT/include" fi cp "$_config" .config if [ -n "$DEBUG" ]; then sed -i -e 's/# DODEBUG is not set/DODEBUG=y/' \ -e 's/DOSTRIP=y/# DOSTRIP is not set/' \ .config fi make V=2 silentoldconfig make -j1 V=2 pregen KERNEL_HEADERS="$SYSROOT"/usr/include \ CROSS="$CROSS" || return 1 make all V=2 KERNEL_HEADERS="$SYSROOT/usr/include" CROSS="$CROSS" || return 1 make utils V=2 CROSS="$CROSS" || return 1 } package() { cd "$_builddir" make V=2 DESTDIR="$pkgdir" KERNEL_HEADERS="$SYSROOT/usr/include" \ CROSS="$CROSS" install install_utils install -Dm755 extra/scripts/getent "$pkgdir"/usr/bin/getent } dev() { default_dev replaces="uclibc linux-headers fts-dev" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/ } utils() { pkgdesc="uClibc utility programs" replaces="uclibc $pkgname" depends= mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/sbin mv "$pkgdir"/sbin/* "$subpkgdir"/sbin/ mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ } libthread_db() { pkgdesc="uClibc thread debugging library" depends= mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libthread_db* "$subpkgdir"/lib/ } libpthread() { pkgdesc="uClibc threading and realtime libraries" replaces="libc0.9.32" depends= mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libpthread* \ "$pkgdir"/lib/librt* \ "$subpkgdir"/lib/ } libc() { pkgdesc="uClibc standard C libraries" replaces="libc0.9.32" depends= mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/* "$subpkgdir"/lib/ } md5sums="73e6fe215648d02246f4d195b25fb17e uClibc-0.9.33.2.tar.xz d4c8fb190eb4327453ed924159ca432e 0001-Compatible-stack-protector-for-non-Thread-Local-stor.patch f9c9de09da5eade2fb9dff8f9f8b3fc9 0002-resolv-res_query-for-CNAMEs.patch 96e5deaa662695a56571f47c7ac2fc94 0003-resolv-fix-resolver-to-return-TRY_AGAIN-on-timeout.patch e726ab363c0f8aed8dc31b8c54495b5d 0004-libm-x86_64-implement-some-fenv-functions.patch d8e62f8016274fc8605e6f77d4def79e 0005-stdlib-fix-arc4random-return-type-to-u_int32_t.patch 235ca36ca8c10878d63d68ba61f76634 0006-malloc-standard-synchronize-on-fork.patch d9611de57fb72b74c0b9e243b8e9165b 0007-libc-x86-fix-stack-unwinding-and-backtrace-informati.patch 12cf5330b092ee7e00d14909737abc70 0008-ldso-limited-support-for-ORIGIN-in-rpath.patch a86eb40e8aca531a1cfee5faff3c53d4 eventfd.patch d91fcb785ae14632a4ea8fa03ba0236f uClibc-0.9.33-avahi.patch b99adbb951c35aec0a09930e12efab86 librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal-in-helper-thread.patch f88dac5fe54a1bffce7d1ff4b53a755c 0001-add-posix_madvise.c.patch ddc2778790a0f3537828c2c3dbcdb042 posix_fallocate.patch a93a0e50e73bb6e8d8abf6e4340378b6 posix_fallocate-fix.patch 085d98078455ad0f0c2d63c6fa9ea67c 0001-cancel.h-add-generic-file-to-ease-cancellation-suppo.patch 583a8b6d4a29abe0b6ac449a1694b079 0002-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch f059f5e437ed4fe1b6973dd08972e583 0003-pread-pwrite-drop-fallback-funcs.patch 1983ddd723a96432aba74b1132bd6e29 0004-add-cancellation-to-generic-pread_write.patch 32544dc16cc1b4845484535bf758a4b1 0005-pread_write.c-make-all-archs-use-common-code.patch 73037bc978897e20ae2fc531759443eb 0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch f41ab6cf22545d2e629d4c7107ac6f85 0009-sys-quota.h-sync-with-glibc.patch e5aceb82bf4ffd5328113af5380fcdb6 0001-libc-sysdeps-get-make-set-swap-context-for-i386.patch da043a65003ac29ca8b96f416e7752ee 0002-libc-sysdeps-add-get-make-set-swap-context-for-x86_6.patch 8374c98e769e603af4adad12e01cf358 uclibc-dlclose-fix.patch ffe7564afe846026a278dd8c0251ace9 uclibc-rtld_next-fix.patch 1c4199349874608161575f047c32be02 560-res_init_asterisk.patch 2e27c00c1af216eb5fb3aef81d7ba515 0001-libm-x86_64-implement-fegetround.patch 747efb42244760ad3ae72a42b18ec8c3 libdl.patch ce8a33a31f5a53031fbad8b1d1b66d44 uclibcconfig.x86 e861a17baa541accf4d4d39a98d74c32 uclibcconfig.x86_64 ce8a33a31f5a53031fbad8b1d1b66d44 uclibcconfig.i486 3f1e788cfa922c5a39d22a509bf49b60 uclibcconfig.arm 820d5176004ccfa2baa3607ba576360f uclibcconfig.powerpc f3be4f2bc54d7561d252937e10abf0d2 uclibc-utils.trigger" sha256sums="62333167b79afb0b25a843513288c67b59547acf653e8fbe62ee64e71ebd1587 uClibc-0.9.33.2.tar.xz 90139f7b7d847a5b852baff49d84abc2f7c641f0bb98fda6159d8813498fc161 0001-Compatible-stack-protector-for-non-Thread-Local-stor.patch 4652accf749109dc5e8a74e2b54a5f45e19f748128b6811f41341e42181254a0 0002-resolv-res_query-for-CNAMEs.patch 4646f2db4002f1e4f536dbf936eeeead9791004dd8fd58b3dcb9900fc0a0596b 0003-resolv-fix-resolver-to-return-TRY_AGAIN-on-timeout.patch d023eaa61b00779ad2eb2a5793ec3d4320d3c8f9b9c2f15ab38ebc1d006acbaa 0004-libm-x86_64-implement-some-fenv-functions.patch c7cc520e03af2dda59e7d843a52c532db446def521890d20af428cd4337140d2 0005-stdlib-fix-arc4random-return-type-to-u_int32_t.patch 6a17db227de4e70297d1c5f2b6be8d01182bdfbf05ba971f022304b3bfa38938 0006-malloc-standard-synchronize-on-fork.patch 1ead4bfcf9c7d8eca7b111173d4ad462bf7a065ecda1aa707408fff251000cf7 0007-libc-x86-fix-stack-unwinding-and-backtrace-informati.patch 7b6f5400a6fd6ef7638aab021bef9c6584e934fedd6b4e48c7899913b8841853 0008-ldso-limited-support-for-ORIGIN-in-rpath.patch f3c9c1ae0a97c89b3b2f9f29249c947d103cd2decbac2d84b36808d06cd8c545 eventfd.patch 4a71e1907e52cd99d00c9071485326539578ec6ef800de169cef57cf75b68205 uClibc-0.9.33-avahi.patch c9f7fd61c8be8f428b932de4420d9f28d81c6dedea33ceed991df59d732da6f7 librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal-in-helper-thread.patch 397bc0813e9cdf92c791fa159d1fb7111100564d82beeffeb9561393925bd6ad 0001-add-posix_madvise.c.patch 3ae0cd12f1bc5b9aa9ea03ce3784cc0dfbe8a26ed065f58fd9e6ed80a322af30 posix_fallocate.patch ac5ca8708958886a0cd1419eb09f68e2684d4d3a9ddce01462d44e42081f4f8d posix_fallocate-fix.patch fe4b84cd3dc8f2853c42ab7fc91d8bd4d28be89cc4f09a7855ef69423757919c 0001-cancel.h-add-generic-file-to-ease-cancellation-suppo.patch 2b0984e687d59b2391c36b6078413509224b317f2771a7036f2226ce05f0c578 0002-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch ba5b0cb1c42bb221a38cc3b22e150a08e64952716d24a4af3b61036b23d60bfd 0003-pread-pwrite-drop-fallback-funcs.patch 66de0d92329c846728cae2bfa14f05209a1feb170394d1c537065abc52d7310b 0004-add-cancellation-to-generic-pread_write.patch 46a53a40657c3403fe485ebb6e6c61733c0e6f708af80ceabc2e5d4b26d83a57 0005-pread_write.c-make-all-archs-use-common-code.patch 54868bc052a588e685a068e1a030535f7b8be0297350f528c554baaee66519d1 0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch 233c022a00c6e0ff704e0403e2ce0aedcc972cc2642da671ad2a19f12de96139 0009-sys-quota.h-sync-with-glibc.patch 58761be1f06a2c860e04716233a0ff2cf4fdf92b82bcc2664f06a33601b971fd 0001-libc-sysdeps-get-make-set-swap-context-for-i386.patch 1a77571281c3eb817001a32bcf7ee140a2713276ce06e146723ec16229acb46b 0002-libc-sysdeps-add-get-make-set-swap-context-for-x86_6.patch 08bfb952464d1b3876d88f38929e8c98c074e40579685733e21612442ed0472e uclibc-dlclose-fix.patch 16ace72a805b39a623364cfd1e884e6d9f19bb85f650a03712e4104533f5186f uclibc-rtld_next-fix.patch d7f11efbce5c4ef27849e7a3cd370be86540c635effd51d5374194b65c7c7e83 560-res_init_asterisk.patch b4cd24a506f4f286144080b3e95a2999efb4ec58e759255e82e09a1d7c353549 0001-libm-x86_64-implement-fegetround.patch b284cf0f0f19897272ca0c8e10c7aa05a837807efcaad2b44e4f1a2c2fb1bbe4 libdl.patch 7f613b473adbbf38701125f3d298d11f91e102e5cda17eec8133e8463bdc10c9 uclibcconfig.x86 bec76f2c67c0c632b24bb8c3db01396cc56f208a8c5ca16543fd5e71050d8c88 uclibcconfig.x86_64 7f613b473adbbf38701125f3d298d11f91e102e5cda17eec8133e8463bdc10c9 uclibcconfig.i486 84b3954fb1b2f27a22517a2cd70744ba535dec689e1df2cb064c3feb0e396f9a uclibcconfig.arm baf4491a141010b2aa9f92ab7203154a73d4ca96a7ea0a3e72c5bc920d241783 uclibcconfig.powerpc 04a6db65443a95e7977e25210024ce3fe8472888d16e8fb476ba91db0d92efb1 uclibc-utils.trigger" sha512sums="5884c3ed1c0f3dd32fbcc4336fbfe4636439322ed944130c48d6272d894f2f806ce9917c87250b4e04c41fa19b6633b777e0a8548792d10571413464483b8326 uClibc-0.9.33.2.tar.xz 4618dc3feca6e1f897b43bc8ed4713153e9f2e6fd601ff079d617f149b83bf30a4ed48ea10390f646bf238bfe767c0b905c8586182036dcee969ec37ad954eff 0001-Compatible-stack-protector-for-non-Thread-Local-stor.patch e0d1f913fac9f7ac6cf60c32ef40c3c2acebedc2a97c70b1c6c1438f0ad34eb299c5bfa188c88902135080eeecee26ae7aee74282382f82edc510afc04c82680 0002-resolv-res_query-for-CNAMEs.patch f35d413433ae8cc1886875849de7e10f5b669d3404268029e45680a670642bbf2577ee216f94096a20365274c628729debe0556bf546746167c7bb7fcf4809c0 0003-resolv-fix-resolver-to-return-TRY_AGAIN-on-timeout.patch 0367ea74354698d2447a411ecf16d9f808f448dd9103c8b13311b43fb34314cdd0b78c7fb09fb782b01ed1e1c3bb598cf876e04e2b680de2680b263e0210a10f 0004-libm-x86_64-implement-some-fenv-functions.patch 1af8de988bb80702ca8f1b4823970e37553aeadba569da35d53d38bd4f4b7c5774abe312240a01fb4842f70d4ebb3720dbc41e426bfe397341e7f3e76a0e7495 0005-stdlib-fix-arc4random-return-type-to-u_int32_t.patch 93f3a6a4fa6c176086512fe48884102c18ccc466641af53918f6fe5e1bf663bfec9323b6fd3a8d86e0c46fa81129ccf22dd99a68fdf05627f01c22ece7677781 0006-malloc-standard-synchronize-on-fork.patch 69ff91658924779e9181e12dad4103670288818e4f8b5b2e3e7a03c8c1afc9b79f76234f38b9153996b319e9e2e5cc5a6706a968e548433d829bb8abc2eb52be 0007-libc-x86-fix-stack-unwinding-and-backtrace-informati.patch 81e161b5444d6ccb88cf291b1fc1495d1b611e00525568ccb20057e17159b96c2d01f589092ff1e31eaa0764634a002fc86e66389af90d203e8bb43bf3857b1c 0008-ldso-limited-support-for-ORIGIN-in-rpath.patch 5d891ff426c3fcf52edbf77d2826a6dcc01e6e9bb0d6a3acc41fd217835717aa35f4f4f5063712ef8880c993f271f35565651626adf0387bf207b48b2a1113b2 eventfd.patch 3abae39129220a477b230d16da75e36e974c3e97abac918a69c79b52f4fa2ffc7b6df9e305590fa1c30dd8cf0a4588cd0b02e78c8f0b025c971cacea10bf76f3 uClibc-0.9.33-avahi.patch 19bc46aacdaaf617d3efa76cd9885dd3df14ccd22b5eb3d5435b8c4ed0101e4b2dd537fc47a6beee593323d67e41ccba79170873c4e5367323a18f4e4230cd91 librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal-in-helper-thread.patch c4c71f522ffa6792019ea8e62004b611947abce07548e1d35ca5b87ee1cafe213cac1748201ea4423c543fb2d34c317a17089f572bb6d6e02c6f91c9472b6aa9 0001-add-posix_madvise.c.patch 4b77d0763b86a0d60be850cdc8713e15e6d8be30da841d9cfd8cfbffb0164cc92ab0c08939164a5668a1700c0c8a46f32d394b975d3da7214110ac06b89fdf27 posix_fallocate.patch aff90e54dce9849bc8d8ceffad2165177681aa9a3b844f8e7808f0a83d88d8219db4fc15262e778bc86795c1fbfdee446098ec8af7fa98de4a862f1a6d7a708d posix_fallocate-fix.patch 806a73a5fca445f85efec49e05aee4509b9b5ff117ba8963ca05650269a7e0f9f796bb1d528833239fa65123c1e2acb676d661d5a83ce75ca28ba7bc0821b3d3 0001-cancel.h-add-generic-file-to-ease-cancellation-suppo.patch 4d4a6add5000dc9b28ef812ef48e9c3023d39cdb0a3cec8df6bebc5986a4a6bd4132b4a5510f21478f3654a677c5ae41bfb40ce47189cbd3a8dbfec50bf3288a 0002-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch 95e103b20fcf9ee0bfea4f255671d50b0c802468177907017a7a42d30c5528c4d2c1da555d2219711a9d47c33df641b601f04f5674628111d40d28eecc41bd58 0003-pread-pwrite-drop-fallback-funcs.patch f5ef0feac6b036062d2c6c346a12e71850c183233678979008aa70d5fb4da9adc7ae561ba42cb299cf96923c70575017d24b099d3fd8c0505def68cb84511bfd 0004-add-cancellation-to-generic-pread_write.patch 6eceeebd8914e03866057f643ffd9f175cbfb1dd46f93c5d220dcf4ca1ad3e9d0271961243314936e8c155586df4d3d6ad2fd5e4775a36458453c58f3ff6b26d 0005-pread_write.c-make-all-archs-use-common-code.patch 86eb00a7c824bc9de8e5164d252c40f9cc44abe4bec640c5f8df7372dbc9b9a4079f4cb6929f22e24194d280f48df20f0e04d854080ad7be42693cf9cf8b0c65 0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch 7a4f5dd295479e44daa937a53262be15ed578d7a01df2964d881adf43af48fa18a843390a0e60648998bafc85bd487b07f4d4251c7b64a5b6e11d447aa7811bd 0009-sys-quota.h-sync-with-glibc.patch 71c9ba1fe1a593fa9afd6d89be1d041e10f1a0814854a8f866e1b8481b2b50c8f7eb9105d59e95c5585b4b6f7f6bed3b4a4e65f4ee574e94b1d01e68e35111cf 0001-libc-sysdeps-get-make-set-swap-context-for-i386.patch 245a820d8781bca990d92e4f2614f7c136d59ab4f97c645e376bc0dcde3525e938086bfef8d4eff4811cdb0c34094a12e899f0b0533d2036e188680fe0eae2ac 0002-libc-sysdeps-add-get-make-set-swap-context-for-x86_6.patch f6de454c16a56c5978b9e840440baf4b17cd92c30191407fd371a88a5764ea3f119a5b639ca9aab57fc3e08ab5f94eefdcca4e84bd63a71788cb8ee50531af0c uclibc-dlclose-fix.patch 8068fb6f40c370f3fd6cf05f39c0d8f54adb442faf279fa14a7f7d0e14a49f9220aacae9617460ccea71824e2f1272faf5bf1dab12ffeeb42129869c8b61c30d uclibc-rtld_next-fix.patch 3d06e204dcca1f570356c42b9a3265448217668db7df4c9641dccd14190d7578df8be1fc1a6d7824544736348bd54f816d10b49b860b9c390d109803f3ea5b6a 560-res_init_asterisk.patch 72e1aa3bb6b97c86d2539c370d47da5aa6b9ef80f1514229bf6acb366f91b87b55207c904f228cce6156cba8b10cf1318d00a69f677e498235ac69f10bf5c240 0001-libm-x86_64-implement-fegetround.patch 5e03d0a81145e572463642dd90aefe700979df7e5be9e2d3b029a7ff21f5b79064f97676c069cd287e6319b9c9a28ab5703bcc547f901e2d90cb09f85ca74ac6 libdl.patch ab04402abefad1f239d27d9638c1d8d76bc6a8edd77bbb8ed5a4b1445dbc44d709bb1b5214fc9a37a2208c2b6e92dd0a147eddea5d0b2e1ca3ec227432fe86eb uclibcconfig.x86 063899afb5f3c20e5dae1b613aa8963408b66ef21228df2500366163aeda71ca4163cbef8c3e53f389ba4a85b8eec5991667cdb31576141ce2ccbc1dc3d33cab uclibcconfig.x86_64 ab04402abefad1f239d27d9638c1d8d76bc6a8edd77bbb8ed5a4b1445dbc44d709bb1b5214fc9a37a2208c2b6e92dd0a147eddea5d0b2e1ca3ec227432fe86eb uclibcconfig.i486 80527db34a47a5f9cd830df87bfdb2ac3766c67f2e7aec9d6574385fb8b5100e45454afe921be27b6dd3b04ea71e7859f590810ec2678d3098c31538bdbf001c uclibcconfig.arm 43592243780bfb5b1c97b6be04708cb0a878ba2311667286a6c41a88773081e14d6c927ca119a0dfd3b4dd9e28bae0e423c5e9d56d4927dbe504966cfdf55b76 uclibcconfig.powerpc 468f122e0be5ad76e5c5914013de6971cbace846ecfb2a2b906ce52f175cad13a2641567f65d5be88d4d9781f442fa5531da041ced3b0410bdfcf31f72ae20de uclibc-utils.trigger"