blob: 1a986545e926d8fac7d33705bd001a0acf5f1f83 (
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
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=kbuild
pkgver=0.1.9998.3149
_ver=${pkgver/_/-}
pkgrel=0
pkgdesc="A makefile framework for writing simple makefiles for complex tasks"
url="http://svn.netlabs.org/kbuild/wiki"
arch="x86 x86_64 aarch64"
license="GPL-3.0"
depends=""
depends_dev=""
makedepends="autoconf automake flex bison"
install=""
subpackages="$pkgname-doc"
source="https://dev.gentoo.org/~polynomial-c/kbuild-${_ver}-src.tar.xz
lchmod.patch
underlinking.patch
sys_siglist.patch
0001-define-ALLPERMS-is-missing.patch
sys-types.patch
kobjcache.patch
obstack.patch
os-linux.patch
"
builddir="$srcdir"/kbuild-$_ver
prepare() {
update_config_guess
update_config_sub
default_prepare
local i
cd "$builddir"
# Add a file with the svn revision this package was pulled from
printf '%s\n' "KBUILD_SVN_REV := ${pkgver##*.}" > SvnInfo.kmk
# bootstrapping breaks because of missing po/Makefile.in.in (r3149)
sed '/^AC_CONFIG_FILES/s@ po/Makefile\.in@@' \
-i src/kmk/configure.ac
cd "$builddir"/src/kmk
aclocal -I config && autoheader && autoconf && automake --add-missing
cd "$builddir"/src/sed
aclocal -I config && autoheader && autoconf && automake --add-missing
# the bootstrap process will create a symlink to the system shell,
# which happens to be (/bin/sh) a symlink to /bin/busybox
# and busybox will get confused since there are no applet named
# kmk_ash.
echo '#!/bin/sh' >"$srcdir"/sh
echo 'exec /bin/busybox sh "$@"' >> "$srcdir"/sh
chmod +x "$srcdir"/sh
sed -i -e "s:/bin/sh:$srcdir/sh:" "$builddir"/bootstrap.gmk
}
build() {
cd "$builddir"
kBuild/env.sh --full make -f bootstrap.gmk AUTORECONF=true
}
package() {
cd "$builddir"
kBuild/env.sh kmk NIX_INSTALL_DIR=/usr PATH_INS="$pkgdir" install
}
sha512sums="74808e6279c01739170535655edbbffb73809f60b18c7ee63a110af7af651628789b9e5d253821f5685f8e8c072890c4669493e64886f53587b810ea0f67826c kbuild-0.1.9998.3149-src.tar.xz
3ab991b13a122e82125392d01e27ad8c06f2b5f5e0c5bb2fa024fdcf16a65f5f460c14222d84d50b31a2ad4040c89871ee2a47f885eca329c15bb9abb3f8f5df lchmod.patch
839c12659ae81e99c0c2f35f045ef8651c2d30ddb391ae76995ded6df19f4ca5ae728da96c16b7aab08cdf447030de645455751122a390755e0ff46c03cb23d6 underlinking.patch
a2c765d16d8b6c4c24c68d1f2754c7b7fa99b83e5456994df54a2d3ac41104fc3ad307434a0b8d94114aa667b07d9b7478e160a75267414b3daa436ea05e208a sys_siglist.patch
4bdcae4362ff0ac6b401c65120f54e395a41b98d4bdea796a1e85405c3444853b94626c2be6d9d703ffd904fb89ea0a14d1e847a67eb56d81faf48246220e166 0001-define-ALLPERMS-is-missing.patch
58ae3ec4a1535fddd4af67803c081c9ca4cd66244ea2a7ddfbf59eb5b849421377116376d893d5e643a15413b902463affa51153afeb2d2217bac135122b66a5 sys-types.patch
7afcc78589ee66c60dd7a73819b4776531a4fc0f73c8a8824f4b53967f7c903095206455d2b113288ad4cf337e67c0dc82cd679b994096c5d9270f83d55689ad kobjcache.patch
9f7a2baa250baf8da686d52d16cacae3648e70b044c812bfb3e33100675a1de010b86cf2bdd39d86b957c5ccd16790c443918d0f0a66dfd5b5d7209b667a255b obstack.patch
042dee4ff7720708bee55982c876ce48645f856c902481317dad9abacc405aede40b9c4f7078bf0fe3a8fa85c788de029e7bbc6b1c5ad668a842265f6a9a873e os-linux.patch"
|