# Maintainer: Natanael Copa _abiver=0.9.32 pkgname=libc$_abiver _gitver= pkgver=0.9.32_rc3 _ver=${pkgver/_/-} pkgrel=15 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" arch="all" options= makedepends="linux-headers" subpackages="uclibc-dev:dev uclibc-utils:utils libthread_db" depends_dev="linux-headers=>2.6.32" replaces=uclibc options="!strip" triggers= _snapurl="http://git.uclibc.org/uClibc/snapshot/master.tar.bz2" _snapfile="$pkgname-$pkgver.tar.bz2" source="http://uclibc.org/downloads/uClibc-${_ver}.tar.bz2 compat-stack-guard.patch uclibc-resolv-cname-fix.diff 0001-libm-x86_64-implement-fesetround.patch 0001-ldso-limited-support-for-ORIGIN-in-rpath.patch 0002-stdlib-fix-arc4random-return-type-to-u_int32_t.patch 0003-ldso-support-RTLD_NOLOAD.patch 0001-libdl-rudimentary-locking-for-dlopen-dlsym-dlclose.patch 0001-malloc-standard-synchronize-on-fork.patch 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch 0001-utils-ldd-Check-for-returned-pointer-from-strrchr-no.patch 0001-posix_fadvise64-fix-x86-implementation.patch 0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch 0001-getaddrinfo-allow-numeric-service-without-any-hints.patch uclibc-generic-backtrace.patch uclibc-ubacktrace-asneeded-fix.patch uclibcconfig.x86 uclibcconfig.x86_64 uclibcconfig.i486 uclibcconfig.arm uclibcconfig.powerpc sha512-crypt.patch 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 silentoldconfig make -j1 pregen KERNEL_HEADERS="$SYSROOT"/usr/include \ CROSS="$CROSS" || return 1 make all KERNEL_HEADERS="$SYSROOT/usr/include" CROSS="$CROSS" || return 1 make utils CROSS="$CROSS" || return 1 } package() { cd "$_builddir" make 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" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/ } utils() { pkgdesc="uClibc utility programs" replaces="uclibc $pkgname" triggers="uclibc-utils.trigger:/lib /usr/lib" 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" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libthread_db* "$subpkgdir"/lib/ } md5sums="e7f420aa2fb28e7021d02c043acba71b uClibc-0.9.32-rc3.tar.bz2 a9bfb77ea7dc5fb9abf4d4b19201c614 compat-stack-guard.patch 5d6e3e382b66f59cfd7242a4fe453f98 uclibc-resolv-cname-fix.diff e0c901502602f7e9e002d910d0f32ab9 0001-libm-x86_64-implement-fesetround.patch bc164e262c5feab55c800780704fa71c 0001-ldso-limited-support-for-ORIGIN-in-rpath.patch b4fb68ad3d0e8331b1b40c30eb21dfdc 0002-stdlib-fix-arc4random-return-type-to-u_int32_t.patch 6147efd2eee5af5e734896823c2d1a3d 0003-ldso-support-RTLD_NOLOAD.patch 3e151ae3d3613dff9296d166aca3a800 0001-libdl-rudimentary-locking-for-dlopen-dlsym-dlclose.patch 30f27fe51fdc4d121166ad2af18dfb8d 0001-malloc-standard-synchronize-on-fork.patch 2ab8c375fe1cd406319b4c5ef538da2b 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch 12f6297249755d3996918485bbd6031d 0001-utils-ldd-Check-for-returned-pointer-from-strrchr-no.patch 100d026c2d7cf7fc5906229448c791d4 0001-posix_fadvise64-fix-x86-implementation.patch 2548d9f470c9a5b2c117ec3d6f35c105 0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch 9e1ffc8dae55f4489c770f284734804f 0001-getaddrinfo-allow-numeric-service-without-any-hints.patch 871956085df0bf90f4054e294a3770ce uclibc-generic-backtrace.patch 814ae23243116cf61690218b9b6019f6 uclibc-ubacktrace-asneeded-fix.patch 35ef159d3c56ad67f520ab033e0f6930 uclibcconfig.x86 a0b00fb82825f91671b76b1d8f979944 uclibcconfig.x86_64 35ef159d3c56ad67f520ab033e0f6930 uclibcconfig.i486 9c4708d6d5868c2a24f46959eb0be1c7 uclibcconfig.arm f37b8efb311aadf2084dbd25f8b09b07 uclibcconfig.powerpc 7bf1af84106de9e05160ed6d4853c54f sha512-crypt.patch f3be4f2bc54d7561d252937e10abf0d2 uclibc-utils.trigger"