# Maintainer: Natanael Copa _abiver=0.9.32 pkgname=libc$_abiver _gitver=1009151331 pkgver=${_abiver}_alpha0_git$_gitver pkgrel=2 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" options= subpackages="uclibc-dev:dev uclibc-utils:utils" depends_dev="linux-headers=>2.6.32" replaces=uclibc if [ -n "$DEBUG" ]; then options="!strip" fi _snapurl="http://git.uclibc.org/uClibc/snapshot/master.tar.bz2" _snapfile="$pkgname-$pkgver.tar.bz2" source="http://build.alpinelinux.org:8010/distfiles/$_snapfile compat-stack-guard.patch uclibc-libm-pic.patch 0001-create-DEVEL_PREFIX-MULTILIB_DIR-dir-rather-than-DEV.patch 0001-config-parser-do-not-assume-that-realloc-return-same.patch 0002-getservice-getservent_r-must-return-ERANGE-when-buff.patch 0003-config-parser-always-initialize-line-pointer.patch bufsize.patch uclibcconfig.x86 uclibcconfig.i486 " # uclibc-resolv-tls.patch # 0001-config-parser-fix-memory-corruption.patch # 0001-nptl-fix-calling-convention-for-__pthread_mutex_cond.patch # ld-tls.patch _config="$srcdir"/uclibcconfig.${ARCH:-x86} _builddir="$srcdir"/master 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 # provided by linux-headers rm -f "$pkgdir"/usr/include/scsi/scsi.h } dev() { default_dev replaces=uclibc mkdir "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/ } utils() { pkgdesc="uClibc utility programs" replaces=uclibc mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/sbin mv "$pkgdir"/sbin/* "$subpkgdir"/sbin/ mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ } md5sums="966c830f294a8ab5069cc03a61e1b2ed libc0.9.32-0.9.32_alpha0_git1009151331.tar.bz2 4d408f72142ce55a0754948cc9cfe447 compat-stack-guard.patch 2f9739a980be24a842c57516155c7885 uclibc-libm-pic.patch 9dd8192227f54d6d3ccb49dc54137ff3 0001-create-DEVEL_PREFIX-MULTILIB_DIR-dir-rather-than-DEV.patch ba6e0370d1fc19e5903696de412507ef 0001-config-parser-do-not-assume-that-realloc-return-same.patch 19d923997f9625ce6f16d8128bbcba65 0002-getservice-getservent_r-must-return-ERANGE-when-buff.patch 99b817778f4ef3a1b194740ea08990b4 0003-config-parser-always-initialize-line-pointer.patch cf97d904c42c5fd165650472100b18a7 bufsize.patch cffecb42bdec2da7cac718fa66cacbbe uclibcconfig.x86 cffecb42bdec2da7cac718fa66cacbbe uclibcconfig.i486"