summaryrefslogtreecommitdiffstats
path: root/main/uclibc/APKBUILD
blob: 40d9ca2d948fb9ee79b7de8d796ffbc3014957e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uclibc
pkgver=0.9.30.2
pkgrel=1
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
_mynamever=uClibc-$pkgver

subpackages="$pkgname-dev"
depends_dev="linux-headers=>2.6.32"

source="http://uclibc.org/downloads/$_mynamever.tar.bz2
	$pkgname-0.9.30.1-resolv.patch
	uclibc-0.9.30.1-pthread_getattr_np.patch
	0001-Add-dn_skipname-from-OpenBSD.patch
	0001-ldd-segfault-fix.patch

	0001-avr32-add-varargs-handling-of-prctl-syscall.patch
	0002-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch
	0003-rpc-fix-typo-in-version-mismatch-msg.patch
	0004-fix-make-install_-host-utils.patch
	0005-host-utils-depend-on-headers.patch
	0006-fstatat-fix-up-behavior-on-32-64-bit-hosts.patch
	0007-Unbreak-build-for-sparc-on-some-config-s.patch
	0008-malloc-fix-race-condition-and-other-bugs-in-the-no-m.patch
	0009-libm-enable-log2f-and-exp2f.patch

	pthread-new-aliasing-fix.diff
	uclibc-resolv-cname-fix.diff
	uclibc-i386-floating-stacks.diff
	uclibc-fork-hidden.diff
	uclibc-fork-hook.diff
	uclibcconfig.x86
	"

_config="$srcdir"/uclibcconfig.${ARCH:-x86}


prepare() {
	local i gcc_major
	cd "$srcdir/$_mynamever/"
	# patches goes here
	for i in ../*.patch ../*.diff; do
		msg "Applying $i..."
		patch -p1 < $i || return 1
	done
}

build() {
	cd "$srcdir/$_mynamever/"
	cp "$_config" .config
	make silentoldconfig
	# this is a hack to get uclibc-i386-floating-stacks.diff working
	touch libc/sysdeps/linux/i386/sysdep.h
	make || return 1
}

package() {
	cd "$srcdir/$_mynamever/"
	make install DESTDIR="$pkgdir" install_utils
	install -Dm755 extra/scripts/getent "$pkgdir"/usr/bin/getent
	# provided by linux-headers
	rm -f "$pkgdir"/usr/include/scsi/scsi.h
}

md5sums="e759ec855500082ac3e671dd6cacfdb0  uClibc-0.9.30.2.tar.bz2
ea91460617601b6e084ead66bc3948f5  uclibc-0.9.30.1-resolv.patch
cf80c0d44a41e02f389be427ee615d61  uclibc-0.9.30.1-pthread_getattr_np.patch
c9e3df01e854db4b1118266acd9bcfbd  0001-Add-dn_skipname-from-OpenBSD.patch
4079b20c763727863bc53408e4988434  0001-ldd-segfault-fix.patch
fe69ee3a487605b40cd7e6edadedbc45  0001-avr32-add-varargs-handling-of-prctl-syscall.patch
045d4e110e512493fbc2040fd6a6d5c4  0002-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch
e23edaf402ae29650205b3337b2f9ec2  0003-rpc-fix-typo-in-version-mismatch-msg.patch
afbeb89d1fd086cec5cfbc10cc011b7a  0004-fix-make-install_-host-utils.patch
41796dd355bc56526991410647d854f4  0005-host-utils-depend-on-headers.patch
c78e19855a8a83f07855fe82ceaf9d21  0006-fstatat-fix-up-behavior-on-32-64-bit-hosts.patch
d20abc16e2ce8579f77e42271008ff07  0007-Unbreak-build-for-sparc-on-some-config-s.patch
2438e999b21cfaf823139df05d06dd33  0008-malloc-fix-race-condition-and-other-bugs-in-the-no-m.patch
0b2ed68cbd2e4bb2941155bdb1f0f9b0  0009-libm-enable-log2f-and-exp2f.patch
969187e1da84d0a0a5957b392a3d5a2b  pthread-new-aliasing-fix.diff
bbb8475963e791f596c34c81ef5583d7  uclibc-resolv-cname-fix.diff
ccf15714e089306c09d74a1a5c3cc670  uclibc-i386-floating-stacks.diff
220260c979eca4558827d0e7ec8aa8b6  uclibc-fork-hidden.diff
55bb709f5efd937df323f0d39a202cfd  uclibc-fork-hook.diff
36b28777f4c49af39268920fbade41b1  uclibcconfig.x86"