blob: 0d0cb1215ab8f155f2c1f46d1e6dceaac9658f68 (
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_abiver=0.9.32
pkgname=libc$_abiver
_gitver=
pkgver=0.9.32.1
_ver=${pkgver/_/-}
pkgrel=0
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="uclibc-utils.trigger=/lib:/usr/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.bz2
0001-Compatible-stack-protector-for-non-Thread-Local-stor.patch
0002-resolv-res_query-for-CNAMEs.patch
0003-resolv-fix-memory-leak.patch
0004-resolv-fix-resolver-to-return-TRY_AGAIN-on-timeout.patch
0005-libm-x86_64-implement-some-fenv-functions.patch
0006-ldso-limited-support-for-ORIGIN-in-rpath.patch
0007-stdlib-fix-arc4random-return-type-to-u_int32_t.patch
0008-ldso-support-RTLD_NOLOAD.patch
0009-libdl-rudimentary-locking-for-dlopen-dlsym-dlclose.patch
0010-malloc-standard-synchronize-on-fork.patch
0011-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch
0013-libc-x86-fix-stack-unwinding-and-backtrace-informati.patch
0014-libm-add-cabsf-and-cabsl-functions.patch
0015-libm-implement-generic-cexp-cexpf-and-cexpl.patch
0016-libubacktrace-use-.so.-ABI_VERSION.patch
0017-Fix-__libc_epoll_pwait-compile-failure-on-x86.patch
0018-libcrypt-do-not-cast-away-const-of-key-salt.patch
0019-libcrypt-make-crypt-itself-more-modular.patch
0020-libcrypt-add-support-for-SHA512-CRYPT-password-hashi.patch
0021-libcrypt-add-support-for-SHA256-CRYPT-password-hashi.patch
0022-Add-eventfd-support.patch
0023-crypt-build-fix.-define-ARRAY_SIZE-macro.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 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 fts-dev"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/
}
utils() {
pkgdesc="uClibc utility programs"
replaces="uclibc $pkgname"
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="ade6e441242be5cdd735fec97954a54a uClibc-0.9.32.1.tar.bz2
11c206cd4be86514dd9abd811429ad06 0001-Compatible-stack-protector-for-non-Thread-Local-stor.patch
b905f5f0f27348cc91019275dcff51cb 0002-resolv-res_query-for-CNAMEs.patch
208f6ea0a97f2940319456d32549bfc5 0003-resolv-fix-memory-leak.patch
0f082e4b209bb83feb57a4a7dd8c2eb6 0004-resolv-fix-resolver-to-return-TRY_AGAIN-on-timeout.patch
8573d00e91395779c50af23c6aeb6fc5 0005-libm-x86_64-implement-some-fenv-functions.patch
31da620ecb3894fa6d76ef624cd264bb 0006-ldso-limited-support-for-ORIGIN-in-rpath.patch
afafe88bca1ffc1d4eb49de813c39c5b 0007-stdlib-fix-arc4random-return-type-to-u_int32_t.patch
779dbc9f04ad0c005ec4ea6b6ffff8ff 0008-ldso-support-RTLD_NOLOAD.patch
f0fc6dbeb1467812085b60a49654a955 0009-libdl-rudimentary-locking-for-dlopen-dlsym-dlclose.patch
a1c5871c3b799cce8d1dfcf8ca0f3743 0010-malloc-standard-synchronize-on-fork.patch
b2c09cdfc3116c6236dbe96697241a59 0011-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch
78cdafafc99007da8cbdf8d2f841ea47 0013-libc-x86-fix-stack-unwinding-and-backtrace-informati.patch
63af22efb20d9dfd3cb10bc9900f1615 0014-libm-add-cabsf-and-cabsl-functions.patch
7158d0ae15ca742cc1577b47735751df 0015-libm-implement-generic-cexp-cexpf-and-cexpl.patch
ecca599d286ff18afa7f64ab614e88ff 0016-libubacktrace-use-.so.-ABI_VERSION.patch
430b286df16f21cc4b46b6f1894cd834 0017-Fix-__libc_epoll_pwait-compile-failure-on-x86.patch
57562e6688dcbcf708d574de81debf7e 0018-libcrypt-do-not-cast-away-const-of-key-salt.patch
028d8279da6c44457a8a8de4e1e6de36 0019-libcrypt-make-crypt-itself-more-modular.patch
ebf59b00af0a0c44a5992403255a6582 0020-libcrypt-add-support-for-SHA512-CRYPT-password-hashi.patch
2744db828eb9a0e8a1e01b2ca9d083a5 0021-libcrypt-add-support-for-SHA256-CRYPT-password-hashi.patch
e5bb17073c83dcdb972bf22657ca4cc7 0022-Add-eventfd-support.patch
efafd82e78291171392d4706b80a2fb3 0023-crypt-build-fix.-define-ARRAY_SIZE-macro.patch
0e40006f3c284a27313e0d54f91452e2 uclibcconfig.x86
f6aee6bcbc43dcbfcaaba7be244ad368 uclibcconfig.x86_64
0e40006f3c284a27313e0d54f91452e2 uclibcconfig.i486
8ae78c9ab4bd7b1223c29c335c76a8c5 uclibcconfig.arm
70fcde1955810a2369c023b293bae5c5 uclibcconfig.powerpc
f3be4f2bc54d7561d252937e10abf0d2 uclibc-utils.trigger"
|