diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-26 11:10:07 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-26 11:10:07 +0200 |
commit | a39e19f96447a409ae6f6c1c63d3c16feb1a3991 (patch) | |
tree | 148fdebc95bfd8788f91996703d2094c1b8df4da /testing/kbuild | |
parent | c5240dc4d2a5efc26b94c943d87848e51ba2794b (diff) | |
download | aports-a39e19f96447a409ae6f6c1c63d3c16feb1a3991.tar.bz2 aports-a39e19f96447a409ae6f6c1c63d3c16feb1a3991.tar.xz |
unmaintained/[multiple] move back packages to testing
move back packages that are depends of other packages in testing
Diffstat (limited to 'testing/kbuild')
-rw-r--r-- | testing/kbuild/0001-define-ALLPERMS-is-missing.patch | 43 | ||||
-rw-r--r-- | testing/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch | 357 | ||||
-rw-r--r-- | testing/kbuild/APKBUILD | 102 | ||||
-rw-r--r-- | testing/kbuild/allperms.patch | 30 | ||||
-rw-r--r-- | testing/kbuild/getloadavg.patch | 32 | ||||
-rw-r--r-- | testing/kbuild/glob.patch | 19 | ||||
-rw-r--r-- | testing/kbuild/kbuild-0.1.9998_pre20110817-gcc-4.7.patch | 12 | ||||
-rw-r--r-- | testing/kbuild/kobjcache.patch | 10 | ||||
-rw-r--r-- | testing/kbuild/lchmod.patch | 27 | ||||
-rw-r--r-- | testing/kbuild/obstack.patch | 42 | ||||
-rw-r--r-- | testing/kbuild/strlcpy.patch | 13 | ||||
-rw-r--r-- | testing/kbuild/sys-types.patch | 14 | ||||
-rw-r--r-- | testing/kbuild/sys_siglist.patch | 28 | ||||
-rw-r--r-- | testing/kbuild/uclibc.patch | 22 | ||||
-rw-r--r-- | testing/kbuild/underlinking.patch | 13 |
15 files changed, 764 insertions, 0 deletions
diff --git a/testing/kbuild/0001-define-ALLPERMS-is-missing.patch b/testing/kbuild/0001-define-ALLPERMS-is-missing.patch new file mode 100644 index 0000000000..ffe1b757e5 --- /dev/null +++ b/testing/kbuild/0001-define-ALLPERMS-is-missing.patch @@ -0,0 +1,43 @@ +From ad40844b8d4ccd3fec48fd1db3d165926d247398 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 2 Jan 2014 08:55:33 +0000 +Subject: [PATCH] define ALLPERMS is missing + +--- + src/kmk/kmkbuiltin/chmod.c | 4 ++++ + src/kmk/kmkbuiltin/install.c | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c +index 792a286..8edce38 100644 +--- a/src/kmk/kmkbuiltin/chmod.c ++++ b/src/kmk/kmkbuiltin/chmod.c +@@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94"; + #include "getopt.h" + #include "kmkbuiltin.h" + ++#ifndef ALLPERMS ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ ++#endif ++ + extern void * bsd_setmode(const char *p); + extern mode_t bsd_getmode(const void *bbox, mode_t omode); + extern void bsd_strmode(mode_t mode, char *p); +diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c +index 13bec72..08d8ffe 100644 +--- a/src/kmk/kmkbuiltin/install.c ++++ b/src/kmk/kmkbuiltin/install.c +@@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode); + # define IS_SLASH(ch) ((ch) == '/') + #endif + ++#ifndef ALLPERMS ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ ++#endif ++ + static gid_t gid; + static uid_t uid; + static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given; +-- +1.8.5.2 + diff --git a/testing/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch b/testing/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch new file mode 100644 index 0000000000..d78f949e71 --- /dev/null +++ b/testing/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch @@ -0,0 +1,357 @@ +From 920e0a4d6654509464c832543bf607c3ed8fca0c Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 2 Jan 2014 10:40:57 +0000 +Subject: [PATCH] testing/kbuild: upgrade to 0.1.9998_pre20131130 and fix build + on musl + +--- + .../kbuild/0001-define-ALLPERMS-is-missing.patch | 43 ++++++++++++++++++++ + testing/kbuild/APKBUILD | 46 ++++++++++++++++++---- + testing/kbuild/allperms.patch | 30 ++++++++++++++ + testing/kbuild/glob.patch | 19 +++++++++ + testing/kbuild/kbuild-0.1.5_p2-qa.patch | 26 ------------ + testing/kbuild/kobjcache.patch | 10 +++++ + testing/kbuild/obstack.patch | 42 ++++++++++++++++++++ + testing/kbuild/strlcpy.patch | 15 +------ + testing/kbuild/sys-types.patch | 14 +++++++ + 9 files changed, 198 insertions(+), 47 deletions(-) + create mode 100644 testing/kbuild/0001-define-ALLPERMS-is-missing.patch + create mode 100644 testing/kbuild/allperms.patch + create mode 100644 testing/kbuild/glob.patch + delete mode 100644 testing/kbuild/kbuild-0.1.5_p2-qa.patch + create mode 100644 testing/kbuild/kobjcache.patch + create mode 100644 testing/kbuild/obstack.patch + create mode 100644 testing/kbuild/sys-types.patch + +diff --git a/testing/kbuild/0001-define-ALLPERMS-is-missing.patch b/testing/kbuild/0001-define-ALLPERMS-is-missing.patch +new file mode 100644 +index 0000000..ffe1b75 +--- /dev/null ++++ b/testing/kbuild/0001-define-ALLPERMS-is-missing.patch +@@ -0,0 +1,43 @@ ++From ad40844b8d4ccd3fec48fd1db3d165926d247398 Mon Sep 17 00:00:00 2001 ++From: Natanael Copa <ncopa@alpinelinux.org> ++Date: Thu, 2 Jan 2014 08:55:33 +0000 ++Subject: [PATCH] define ALLPERMS is missing ++ ++--- ++ src/kmk/kmkbuiltin/chmod.c | 4 ++++ ++ src/kmk/kmkbuiltin/install.c | 4 ++++ ++ 2 files changed, 8 insertions(+) ++ ++diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c ++index 792a286..8edce38 100644 ++--- a/src/kmk/kmkbuiltin/chmod.c +++++ b/src/kmk/kmkbuiltin/chmod.c ++@@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94"; ++ #include "getopt.h" ++ #include "kmkbuiltin.h" ++ +++#ifndef ALLPERMS +++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ +++#endif +++ ++ extern void * bsd_setmode(const char *p); ++ extern mode_t bsd_getmode(const void *bbox, mode_t omode); ++ extern void bsd_strmode(mode_t mode, char *p); ++diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c ++index 13bec72..08d8ffe 100644 ++--- a/src/kmk/kmkbuiltin/install.c +++++ b/src/kmk/kmkbuiltin/install.c ++@@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode); ++ # define IS_SLASH(ch) ((ch) == '/') ++ #endif ++ +++#ifndef ALLPERMS +++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ +++#endif +++ ++ static gid_t gid; ++ static uid_t uid; ++ static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given; ++-- ++1.8.5.2 ++ +diff --git a/testing/kbuild/APKBUILD b/testing/kbuild/APKBUILD +index ac1fc45..ed6e80f 100644 +--- a/testing/kbuild/APKBUILD ++++ b/testing/kbuild/APKBUILD +@@ -1,7 +1,7 @@ + # Contributor: Natanael Copa <ncopa@alpinelinux.org> + # Maintainer: Natanael Copa <ncopa@alpinelinux.org> + pkgname=kbuild +-pkgver=0.1.9998_pre20120806 ++pkgver=0.1.9998_pre20131130 + _ver=${pkgver/_/-} + pkgrel=1 + pkgdesc="A makefile framework for writing simple makefiles for complex tasks" +@@ -14,13 +14,17 @@ makedepends="autoconf automake flex bison" + install="" + subpackages="$pkgname-doc" + source="http://dev.gentoo.org/~polynomial-c/kBuild-${_ver}-src.tar.xz +- kbuild-0.1.5_p2-qa.patch + lchmod.patch + strlcpy.patch + underlinking.patch + sys_siglist.patch + kbuild-0.1.9998_pre20110817-gcc-4.7.patch +- uclibc.patch" ++ 0001-define-ALLPERMS-is-missing.patch ++ sys-types.patch ++ uclibc.patch ++ kobjcache.patch ++ obstack.patch ++ glob.patch" + + _builddir="$srcdir"/kBuild-$_ver + prepare() { +@@ -60,11 +64,39 @@ package() { + || return 1 + } + +-md5sums="520d65bd2356c26d1b9bbb25fd7d70ce kBuild-0.1.9998-pre20120806-src.tar.xz +-79d4d445b28f0c50f2a7a8ca12bbed4b kbuild-0.1.5_p2-qa.patch ++md5sums="a9fad7d9c26dba44c2c1ad3d93d49372 kBuild-0.1.9998-pre20131130-src.tar.xz + b3dd26cc185c96658d9b554eef2f811c lchmod.patch +-90cae3b53b4ec6fc5f1c336922083df0 strlcpy.patch ++9b101e058900afb9986689076a214d54 strlcpy.patch + ca09174d7c885fdea1e3c2dc580d80b3 underlinking.patch + 52c3450a3e2645f57871b0141c465776 sys_siglist.patch + 2fdb2fb96c48371b2a15785926c9144b kbuild-0.1.9998_pre20110817-gcc-4.7.patch +-b3c2d0e6902f1285c09d81f74e573c4f uclibc.patch" ++4fda881d60b2c80502ad4321d18161a4 0001-define-ALLPERMS-is-missing.patch ++a4ad5a3bf960394856b9fafecfe921d4 sys-types.patch ++b3c2d0e6902f1285c09d81f74e573c4f uclibc.patch ++e92680df9641e25dd4a58e6a2733dbea kobjcache.patch ++4d8f14019970a974b6fde15fd4b991d9 obstack.patch ++b0c55468f3d4c0800687d16c37bf111f glob.patch" ++sha256sums="def0a44cc0a91b6aa8a80f73ace0cfc315f298ba3e0d3d81fe52834091b68586 kBuild-0.1.9998-pre20131130-src.tar.xz ++79909f11e631757140c5095af1347c9f48c065f25cdd875c555477529ca6a693 lchmod.patch ++132305af7aa1cc94f4920ffe97775efcb6f0495f165035051298984d9f5ca4c0 strlcpy.patch ++1c99c0579af3d9cf4148b7b61d98b92ff86eaec441b6630754007ae3c3b5a2cc underlinking.patch ++8adb0ffa45a0b49737bbde54b54405a7708a2281d608d8f713437fce77e11d07 sys_siglist.patch ++420caeee42dca3fa9a474faa3ae6e34a884d26792ab3b6567a3b9ecf678a90e7 kbuild-0.1.9998_pre20110817-gcc-4.7.patch ++c308a64bddc997826ee83dc8f165ad5072368cb2c837a97308e69238a0390d7e 0001-define-ALLPERMS-is-missing.patch ++21ec6669485f97e0af37f3120bea2f688ed96df9c59a89cf1043645464db7a46 sys-types.patch ++1f581e0cf8fefae174c8aeb1b279e956fc7712146bf4a58451f0b318795309e9 uclibc.patch ++1f9788d65c597346f64cd2513875ed65d4ac199ce879dc313ce2970f40013f77 kobjcache.patch ++7093e35ca03c4b82961157225c5509c42b9996128b31b5ec32154a72c154848e obstack.patch ++e13e0f02132824e07b3895666ab1952672a85a246e68e854d714dd8acdc0d445 glob.patch" ++sha512sums="66f418c0e052389d2b5cfc4d46bc8598ceaeded369151047e455e921bef494ec42099cdc368d24b572eacd809bb7c124d07e0fab54788af01664b72f571fb047 kBuild-0.1.9998-pre20131130-src.tar.xz ++3ab991b13a122e82125392d01e27ad8c06f2b5f5e0c5bb2fa024fdcf16a65f5f460c14222d84d50b31a2ad4040c89871ee2a47f885eca329c15bb9abb3f8f5df lchmod.patch ++fbab0dc51f4e2d14b020a6b63820a26eeee884ac9cfd5b59a6afc6243ffb7679c775ed8529f6161917bf3cc5e2a651c959706cdc404a4a79c1b29cc9f3a614a5 strlcpy.patch ++839c12659ae81e99c0c2f35f045ef8651c2d30ddb391ae76995ded6df19f4ca5ae728da96c16b7aab08cdf447030de645455751122a390755e0ff46c03cb23d6 underlinking.patch ++2e0cb32b6e296d92c4c092f798e83eee1fe49753826426fd957f9977149b64487547f71bde64b654a3f3a0511dfa9ac1c533ad0cd469c7bdd7e0acdfa3c2e3ac sys_siglist.patch ++7a0618e9dbd18ba10f1afd9c2a47f6efb136143a86008d2562eb2ff704f289b7150bbc10f2e3c57341b485252366ff46d49bd70c24cadba45f09496333ceaa76 kbuild-0.1.9998_pre20110817-gcc-4.7.patch ++4bdcae4362ff0ac6b401c65120f54e395a41b98d4bdea796a1e85405c3444853b94626c2be6d9d703ffd904fb89ea0a14d1e847a67eb56d81faf48246220e166 0001-define-ALLPERMS-is-missing.patch ++58ae3ec4a1535fddd4af67803c081c9ca4cd66244ea2a7ddfbf59eb5b849421377116376d893d5e643a15413b902463affa51153afeb2d2217bac135122b66a5 sys-types.patch ++41d568b05af4d9f650e736cafc4fd4285cc592726de1ee3f599b26cf2277a9436477ff512b99c2dbe1abc3d21cb9d4f24a0568aa71418e2114e294171cc008f0 uclibc.patch ++7afcc78589ee66c60dd7a73819b4776531a4fc0f73c8a8824f4b53967f7c903095206455d2b113288ad4cf337e67c0dc82cd679b994096c5d9270f83d55689ad kobjcache.patch ++dae18964bb4c7f46e277b147bae53cabb03d5bbd6199ec5a8deeaf6a6d12804b281ea6debf7eda44fee3bff12d6097d7b46385617a446e2a2a7570d83d03eb8e obstack.patch ++f843176d1ed988965947f0243b31b02431c3467249576fbac64cb561d7d64da71bdcadbd4eb4d36ed5f4483c1ac146c57f7f1f60bdbabaea2c0cd2dc80ed0446 glob.patch" +diff --git a/testing/kbuild/allperms.patch b/testing/kbuild/allperms.patch +new file mode 100644 +index 0000000..2e8bfbf +--- /dev/null ++++ b/testing/kbuild/allperms.patch +@@ -0,0 +1,30 @@ ++diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c ++index 792a286..8edce38 100644 ++--- a/src/kmk/kmkbuiltin/chmod.c +++++ b/src/kmk/kmkbuiltin/chmod.c ++@@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94"; ++ #include "getopt.h" ++ #include "kmkbuiltin.h" ++ +++#ifndef ALLPERMS +++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ +++#endif +++ ++ extern void * bsd_setmode(const char *p); ++ extern mode_t bsd_getmode(const void *bbox, mode_t omode); ++ extern void bsd_strmode(mode_t mode, char *p); ++diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c ++index 13bec72..08d8ffe 100644 ++--- a/src/kmk/kmkbuiltin/install.c +++++ b/src/kmk/kmkbuiltin/install.c ++@@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode); ++ # define IS_SLASH(ch) ((ch) == '/') ++ #endif ++ +++#ifndef ALLPERMS +++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ +++#endif +++ ++ static gid_t gid; ++ static uid_t uid; ++ static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given; +diff --git a/testing/kbuild/glob.patch b/testing/kbuild/glob.patch +new file mode 100644 +index 0000000..b17f012 +--- /dev/null ++++ b/testing/kbuild/glob.patch +@@ -0,0 +1,19 @@ ++--- ./src/kmk/Makefile.kmk.orig +++++ ./src/kmk/Makefile.kmk ++@@ -60,6 +60,7 @@ ++ TEMPLATE_BIN-KMK_INCS.haiku = glob ++ TEMPLATE_BIN-KMK_INCS.openbsd = glob ++ TEMPLATE_BIN-KMK_INCS.solaris = glob +++TEMPLATE_BIN-KMK_INCS.linux = glob ++ TEMPLATE_BIN-KMK_LIBS = $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) ++ ifdef ELECTRIC_HEAP # for electric heap (see electric.c) - windows only. ++ ifeq ($(KBUILD_TARGET),win) ++@@ -108,7 +109,7 @@ ++ glob/fnmatch.c ++ ++ kmkmissing_SOURCES.linux += \ ++- kmkbuiltin/strlcpy.c +++ glob/glob.c ++ ++ kmkmissing_SOURCES.openbsd = \ ++ kmkbuiltin/openbsd.c \ +diff --git a/testing/kbuild/kbuild-0.1.5_p2-qa.patch b/testing/kbuild/kbuild-0.1.5_p2-qa.patch +deleted file mode 100644 +index 706c3a7..0000000 +--- a/testing/kbuild/kbuild-0.1.5_p2-qa.patch ++++ /dev/null +@@ -1,26 +0,0 @@ +-* warning: implicit declaration of function ‘unlink’ +-* warning: too few arguments for format +---- a/src/sed/lib/utils.c +-+++ b/src/sed/lib/utils.c +-@@ -35,6 +35,10 @@ +- # include <stdlib.h> +- #endif /* HAVE_STDLIB_H */ +- +-+#ifdef HAVE_UNISTD_H +-+# include <unistd.h> +-+#endif /* HAVE_UNISTD_H */ +-+ +- #include "utils.h" +- +- const char *myname; +---- a/src/kmk/kmkbuiltin/printf.c +-+++ b/src/kmk/kmkbuiltin/printf.c +-@@ -206,7 +206,7 @@ +- +- (void)funcname; +- if (rc != 0) +-- fatal (NILF, _("$(%s): failure rc=%d\n"), rc); +-+ fatal (NILF, _("$(%s): failure rc=%d\n"), funcname, rc); +- return o; +- } +- #endif +diff --git a/testing/kbuild/kobjcache.patch b/testing/kbuild/kobjcache.patch +new file mode 100644 +index 0000000..4fb4e02 +--- /dev/null ++++ b/testing/kbuild/kobjcache.patch +@@ -0,0 +1,10 @@ ++--- ./src/kObjCache/kObjCache.c.orig +++++ ./src/kObjCache/kObjCache.c ++@@ -38,6 +38,7 @@ ++ #include <errno.h> ++ #include <assert.h> ++ #include <sys/stat.h> +++#include <sys/file.h> ++ #include <fcntl.h> ++ #include <limits.h> ++ #include <ctype.h> +diff --git a/testing/kbuild/obstack.patch b/testing/kbuild/obstack.patch +new file mode 100644 +index 0000000..8301a42 +--- /dev/null ++++ b/testing/kbuild/obstack.patch +@@ -0,0 +1,42 @@ ++--- ./src/sed/Makefile.kmk.orig +++++ ./src/sed/Makefile.kmk ++@@ -56,36 +56,30 @@ ++ sed/mbcs.c \ ++ lib/getopt1.c \ ++ lib/getopt.c \ +++ lib/obstack.c \ ++ lib/utils.c ++ kmk_sed_SOURCES.darwin = \ ++ lib/strverscmp.c \ ++- lib/obstack.c \ ++ lib/getline.c ++ kmk_sed_SOURCES.dragonfly = \ ++ lib/strverscmp.c \ ++- lib/obstack.c \ ++ lib/getline.c ++ kmk_sed_SOURCES.freebsd = \ ++ lib/strverscmp.c \ ++- lib/obstack.c \ ++ lib/getline.c ++ kmk_sed_SOURCES.haiku = \ ++- lib/strverscmp.c \ ++- lib/obstack.c +++ lib/strverscmp.c ++ kmk_sed_SOURCES.openbsd = \ ++ lib/strverscmp.c \ ++- lib/obstack.c \ ++ lib/getline.c ++ kmk_sed_SOURCES.solaris = \ ++- lib/strverscmp.c \ ++- lib/obstack.c +++ lib/strverscmp.c ++ ifdef KBUILD_SOLARIS_10 ++ kmk_sed_SOURCES.solaris += \ ++ lib/getline.c ++ endif ++ kmk_sed_SOURCES.win = \ ++ lib/strverscmp.c \ ++- lib/obstack.c \ ++ lib/mkstemp.c \ ++ lib/getline.c \ ++ ../lib/startuphacks-win.c +diff --git a/testing/kbuild/strlcpy.patch b/testing/kbuild/strlcpy.patch +index 42b25bd..d0b3a04 100644 +--- a/testing/kbuild/strlcpy.patch ++++ b/testing/kbuild/strlcpy.patch +@@ -7,20 +7,7 @@ index 44b76ab..85fec01 100644 + #include "kbuild_protection.h" + + -#if defined(_MSC_VER) || defined(__gnu_linux__) || defined(__linux__) +-+#if defined(_MSC_VER) || defined(__gnu_linux__) || defined(__linux__) && !defined(__UCLIBC__) +++#if defined(_MSC_VER) || defined(__gnu_linux__) && !defined(__UCLIBC__) + extern char *strlcpy(char *, const char *, size_t); + #endif + +-diff --git a/src/kmk/Makefile.kmk b/src/kmk/Makefile.kmk +-index 12b9697..db1deb2 100644 +---- a/src/kmk/Makefile.kmk +-+++ b/src/kmk/Makefile.kmk +-@@ -101,7 +101,7 @@ kmkmissing_SOURCES.freebsd = \ +- glob/fnmatch.c +- +- kmkmissing_SOURCES.linux += \ +-- kmkbuiltin/strlcpy.c +-+ getloadavg.c +- +- kmkmissing_SOURCES.solaris = \ +- kmkbuiltin/strlcpy.c \ +diff --git a/testing/kbuild/sys-types.patch b/testing/kbuild/sys-types.patch +new file mode 100644 +index 0000000..dccb48a +--- /dev/null ++++ b/testing/kbuild/sys-types.patch +@@ -0,0 +1,14 @@ ++diff --git a/src/kmk/kmkbuiltin/ftsfake.h b/src/kmk/kmkbuiltin/ftsfake.h ++index 2518d30..5410256 100644 ++--- a/src/kmk/kmkbuiltin/ftsfake.h +++++ b/src/kmk/kmkbuiltin/ftsfake.h ++@@ -38,6 +38,9 @@ ++ # include "kmkbuiltin/mscfakes.h" ++ #endif ++ +++/* for u_int */ +++#include <sys/types.h> +++ ++ typedef struct { ++ struct _ftsent *fts_cur; /* current node */ ++ struct _ftsent *fts_child; /* linked list of children */ +-- +1.8.5.2 + diff --git a/testing/kbuild/APKBUILD b/testing/kbuild/APKBUILD new file mode 100644 index 0000000000..ead0e9af57 --- /dev/null +++ b/testing/kbuild/APKBUILD @@ -0,0 +1,102 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=kbuild +pkgver=0.1.9998_pre20131130 +_ver=${pkgver/_/-} +pkgrel=1 +pkgdesc="A makefile framework for writing simple makefiles for complex tasks" +url="http://svn.netlabs.org/kbuild/wiki" +arch="x86 x86_64" +license="GPL3" +depends="" +depends_dev="" +makedepends="autoconf automake flex bison" +install="" +subpackages="$pkgname-doc" +source="http://dev.gentoo.org/~polynomial-c/kBuild-${_ver}-src.tar.xz + lchmod.patch + strlcpy.patch + underlinking.patch + sys_siglist.patch + kbuild-0.1.9998_pre20110817-gcc-4.7.patch + 0001-define-ALLPERMS-is-missing.patch + sys-types.patch + uclibc.patch + kobjcache.patch + obstack.patch + glob.patch" + +_builddir="$srcdir"/kBuild-$_ver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + cd "$_builddir"/src/kmk + aclocal -I config && autoheader && autoconf && automake --add-missing \ + || return 1 + cd "$_builddir"/src/sed + aclocal -I config && autoheader && autoconf && automake --add-missing \ + || return 1 + + # 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 \ + || return 1 +} + +package() { + cd "$_builddir" + kBuild/env.sh kmk NIX_INSTALL_DIR=/usr PATH_INS="$pkgdir" install \ + || return 1 +} + +md5sums="a9fad7d9c26dba44c2c1ad3d93d49372 kBuild-0.1.9998-pre20131130-src.tar.xz +b3dd26cc185c96658d9b554eef2f811c lchmod.patch +9b101e058900afb9986689076a214d54 strlcpy.patch +ca09174d7c885fdea1e3c2dc580d80b3 underlinking.patch +52c3450a3e2645f57871b0141c465776 sys_siglist.patch +2fdb2fb96c48371b2a15785926c9144b kbuild-0.1.9998_pre20110817-gcc-4.7.patch +4fda881d60b2c80502ad4321d18161a4 0001-define-ALLPERMS-is-missing.patch +a4ad5a3bf960394856b9fafecfe921d4 sys-types.patch +b3c2d0e6902f1285c09d81f74e573c4f uclibc.patch +e92680df9641e25dd4a58e6a2733dbea kobjcache.patch +4d8f14019970a974b6fde15fd4b991d9 obstack.patch +db70c6fd949946029a6c95c0f7d565db glob.patch" +sha256sums="def0a44cc0a91b6aa8a80f73ace0cfc315f298ba3e0d3d81fe52834091b68586 kBuild-0.1.9998-pre20131130-src.tar.xz +79909f11e631757140c5095af1347c9f48c065f25cdd875c555477529ca6a693 lchmod.patch +132305af7aa1cc94f4920ffe97775efcb6f0495f165035051298984d9f5ca4c0 strlcpy.patch +1c99c0579af3d9cf4148b7b61d98b92ff86eaec441b6630754007ae3c3b5a2cc underlinking.patch +8adb0ffa45a0b49737bbde54b54405a7708a2281d608d8f713437fce77e11d07 sys_siglist.patch +420caeee42dca3fa9a474faa3ae6e34a884d26792ab3b6567a3b9ecf678a90e7 kbuild-0.1.9998_pre20110817-gcc-4.7.patch +c308a64bddc997826ee83dc8f165ad5072368cb2c837a97308e69238a0390d7e 0001-define-ALLPERMS-is-missing.patch +21ec6669485f97e0af37f3120bea2f688ed96df9c59a89cf1043645464db7a46 sys-types.patch +1f581e0cf8fefae174c8aeb1b279e956fc7712146bf4a58451f0b318795309e9 uclibc.patch +1f9788d65c597346f64cd2513875ed65d4ac199ce879dc313ce2970f40013f77 kobjcache.patch +7093e35ca03c4b82961157225c5509c42b9996128b31b5ec32154a72c154848e obstack.patch +93a1cd4ebfdd22179299bc9f029a1e7800ff842a5775555c4fe1a1f322f910c0 glob.patch" +sha512sums="66f418c0e052389d2b5cfc4d46bc8598ceaeded369151047e455e921bef494ec42099cdc368d24b572eacd809bb7c124d07e0fab54788af01664b72f571fb047 kBuild-0.1.9998-pre20131130-src.tar.xz +3ab991b13a122e82125392d01e27ad8c06f2b5f5e0c5bb2fa024fdcf16a65f5f460c14222d84d50b31a2ad4040c89871ee2a47f885eca329c15bb9abb3f8f5df lchmod.patch +fbab0dc51f4e2d14b020a6b63820a26eeee884ac9cfd5b59a6afc6243ffb7679c775ed8529f6161917bf3cc5e2a651c959706cdc404a4a79c1b29cc9f3a614a5 strlcpy.patch +839c12659ae81e99c0c2f35f045ef8651c2d30ddb391ae76995ded6df19f4ca5ae728da96c16b7aab08cdf447030de645455751122a390755e0ff46c03cb23d6 underlinking.patch +2e0cb32b6e296d92c4c092f798e83eee1fe49753826426fd957f9977149b64487547f71bde64b654a3f3a0511dfa9ac1c533ad0cd469c7bdd7e0acdfa3c2e3ac sys_siglist.patch +7a0618e9dbd18ba10f1afd9c2a47f6efb136143a86008d2562eb2ff704f289b7150bbc10f2e3c57341b485252366ff46d49bd70c24cadba45f09496333ceaa76 kbuild-0.1.9998_pre20110817-gcc-4.7.patch +4bdcae4362ff0ac6b401c65120f54e395a41b98d4bdea796a1e85405c3444853b94626c2be6d9d703ffd904fb89ea0a14d1e847a67eb56d81faf48246220e166 0001-define-ALLPERMS-is-missing.patch +58ae3ec4a1535fddd4af67803c081c9ca4cd66244ea2a7ddfbf59eb5b849421377116376d893d5e643a15413b902463affa51153afeb2d2217bac135122b66a5 sys-types.patch +41d568b05af4d9f650e736cafc4fd4285cc592726de1ee3f599b26cf2277a9436477ff512b99c2dbe1abc3d21cb9d4f24a0568aa71418e2114e294171cc008f0 uclibc.patch +7afcc78589ee66c60dd7a73819b4776531a4fc0f73c8a8824f4b53967f7c903095206455d2b113288ad4cf337e67c0dc82cd679b994096c5d9270f83d55689ad kobjcache.patch +dae18964bb4c7f46e277b147bae53cabb03d5bbd6199ec5a8deeaf6a6d12804b281ea6debf7eda44fee3bff12d6097d7b46385617a446e2a2a7570d83d03eb8e obstack.patch +006a65b7c4fe968ea44362804888a0214ff696a2ce9dfbb3e3c9bd5a595bd91b018919e35bc0a2f587677f7606acab57c6f7531bdf7f122fc08c8c99b04fddab glob.patch" diff --git a/testing/kbuild/allperms.patch b/testing/kbuild/allperms.patch new file mode 100644 index 0000000000..2e8bfbfb45 --- /dev/null +++ b/testing/kbuild/allperms.patch @@ -0,0 +1,30 @@ +diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c +index 792a286..8edce38 100644 +--- a/src/kmk/kmkbuiltin/chmod.c ++++ b/src/kmk/kmkbuiltin/chmod.c +@@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94"; + #include "getopt.h" + #include "kmkbuiltin.h" + ++#ifndef ALLPERMS ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ ++#endif ++ + extern void * bsd_setmode(const char *p); + extern mode_t bsd_getmode(const void *bbox, mode_t omode); + extern void bsd_strmode(mode_t mode, char *p); +diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c +index 13bec72..08d8ffe 100644 +--- a/src/kmk/kmkbuiltin/install.c ++++ b/src/kmk/kmkbuiltin/install.c +@@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode); + # define IS_SLASH(ch) ((ch) == '/') + #endif + ++#ifndef ALLPERMS ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ ++#endif ++ + static gid_t gid; + static uid_t uid; + static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given; diff --git a/testing/kbuild/getloadavg.patch b/testing/kbuild/getloadavg.patch new file mode 100644 index 0000000000..e145ed0e5a --- /dev/null +++ b/testing/kbuild/getloadavg.patch @@ -0,0 +1,32 @@ +diff --git a/src/kmk/job.c b/src/kmk/job.c +index 6d14300..16731fc 100644 +--- a/src/kmk/job.c ++++ b/src/kmk/job.c +@@ -240,6 +240,27 @@ unsigned long job_counter = 0; + + unsigned int jobserver_tokens = 0; + ++#ifdef __UCLIBC__ ++int getloadavg(double list[], int nelem) ++{ ++ FILE *LOADAVG; ++ double avg[3] = { 0.0, 0.0, 0.0 }; ++ int i, res = -1; ++ ++ if ((LOADAVG = fopen("/proc/loadavg", "r"))) { ++ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]); ++ res = 0; ++ fclose(LOADAVG); ++ } ++ ++ for (i = 0; (i < nelem) && (i < 3); i++) { ++ list[i] = avg[i]; ++ } ++ ++ return res; ++} ++#endif ++ + #ifdef WINDOWS32 + /* + * The macro which references this function is defined in make.h. diff --git a/testing/kbuild/glob.patch b/testing/kbuild/glob.patch new file mode 100644 index 0000000000..57b4dafadc --- /dev/null +++ b/testing/kbuild/glob.patch @@ -0,0 +1,19 @@ +--- ./src/kmk/Makefile.kmk.orig ++++ ./src/kmk/Makefile.kmk +@@ -60,6 +60,7 @@ + TEMPLATE_BIN-KMK_INCS.haiku = glob + TEMPLATE_BIN-KMK_INCS.openbsd = glob + TEMPLATE_BIN-KMK_INCS.solaris = glob ++TEMPLATE_BIN-KMK_INCS.linux = glob + TEMPLATE_BIN-KMK_LIBS = $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) + ifdef ELECTRIC_HEAP # for electric heap (see electric.c) - windows only. + ifeq ($(KBUILD_TARGET),win) +@@ -108,7 +109,7 @@ + glob/fnmatch.c + + kmkmissing_SOURCES.linux += \ +- kmkbuiltin/strlcpy.c ++ glob/glob.c getloadavg.c + + kmkmissing_SOURCES.openbsd = \ + kmkbuiltin/openbsd.c \ diff --git a/testing/kbuild/kbuild-0.1.9998_pre20110817-gcc-4.7.patch b/testing/kbuild/kbuild-0.1.9998_pre20110817-gcc-4.7.patch new file mode 100644 index 0000000000..435b3f57fb --- /dev/null +++ b/testing/kbuild/kbuild-0.1.9998_pre20110817-gcc-4.7.patch @@ -0,0 +1,12 @@ +diff -urN kBuild-0.1.9998-pre20110817-orig/src/sed/lib/regex_internal.c kBuild-0.1.9998-pre20110817/src/sed/lib/regex_internal.c +--- kBuild-0.1.9998-pre20110817-orig/src/sed/lib/regex_internal.c 2011-08-17 14:28:42.000000000 -0700 ++++ kBuild-0.1.9998-pre20110817/src/sed/lib/regex_internal.c 2012-06-16 13:55:05.341176965 -0700 +@@ -781,7 +781,7 @@ + } + + static unsigned char +-internal_function __attribute ((pure)) ++internal_function + re_string_fetch_byte_case (re_string_t *pstr) + { + if (BE (!pstr->mbs_allocated, 1)) diff --git a/testing/kbuild/kobjcache.patch b/testing/kbuild/kobjcache.patch new file mode 100644 index 0000000000..4fb4e02550 --- /dev/null +++ b/testing/kbuild/kobjcache.patch @@ -0,0 +1,10 @@ +--- ./src/kObjCache/kObjCache.c.orig ++++ ./src/kObjCache/kObjCache.c +@@ -38,6 +38,7 @@ + #include <errno.h> + #include <assert.h> + #include <sys/stat.h> ++#include <sys/file.h> + #include <fcntl.h> + #include <limits.h> + #include <ctype.h> diff --git a/testing/kbuild/lchmod.patch b/testing/kbuild/lchmod.patch new file mode 100644 index 0000000000..de111867d4 --- /dev/null +++ b/testing/kbuild/lchmod.patch @@ -0,0 +1,27 @@ +--- ./src/kmk/kmkbuiltin/chmod.c.orig ++++ ./src/kmk/kmkbuiltin/chmod.c +@@ -177,9 +177,9 @@ + } else + fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; + +- if (hflag) ++/* if (hflag) + change_mode = lchmod; +- else ++ else */ + change_mode = chmod; + + mode = *argv; +diff --git a/src/kmk/kmkbuiltin/cp_utils.c b/src/kmk/kmkbuiltin/cp_utils.c +index 1773815..a1ff924 100644 +--- a/src/kmk/kmkbuiltin/cp_utils.c ++++ b/src/kmk/kmkbuiltin/cp_utils.c +@@ -359,7 +359,7 @@ setfile(struct stat *fs, int fd) + + if (!gotstat || fs->st_mode != ts.st_mode) + if (fdval ? fchmod(fd, fs->st_mode) : +- (islink ? lchmod(to.p_path, fs->st_mode) : ++ (islink ? chmod(to.p_path, fs->st_mode) : + chmod(to.p_path, fs->st_mode))) { + warn("chmod: %s", to.p_path); + rval = 1; diff --git a/testing/kbuild/obstack.patch b/testing/kbuild/obstack.patch new file mode 100644 index 0000000000..8301a427b0 --- /dev/null +++ b/testing/kbuild/obstack.patch @@ -0,0 +1,42 @@ +--- ./src/sed/Makefile.kmk.orig ++++ ./src/sed/Makefile.kmk +@@ -56,36 +56,30 @@ + sed/mbcs.c \ + lib/getopt1.c \ + lib/getopt.c \ ++ lib/obstack.c \ + lib/utils.c + kmk_sed_SOURCES.darwin = \ + lib/strverscmp.c \ +- lib/obstack.c \ + lib/getline.c + kmk_sed_SOURCES.dragonfly = \ + lib/strverscmp.c \ +- lib/obstack.c \ + lib/getline.c + kmk_sed_SOURCES.freebsd = \ + lib/strverscmp.c \ +- lib/obstack.c \ + lib/getline.c + kmk_sed_SOURCES.haiku = \ +- lib/strverscmp.c \ +- lib/obstack.c ++ lib/strverscmp.c + kmk_sed_SOURCES.openbsd = \ + lib/strverscmp.c \ +- lib/obstack.c \ + lib/getline.c + kmk_sed_SOURCES.solaris = \ +- lib/strverscmp.c \ +- lib/obstack.c ++ lib/strverscmp.c + ifdef KBUILD_SOLARIS_10 + kmk_sed_SOURCES.solaris += \ + lib/getline.c + endif + kmk_sed_SOURCES.win = \ + lib/strverscmp.c \ +- lib/obstack.c \ + lib/mkstemp.c \ + lib/getline.c \ + ../lib/startuphacks-win.c diff --git a/testing/kbuild/strlcpy.patch b/testing/kbuild/strlcpy.patch new file mode 100644 index 0000000000..d0b3a0471d --- /dev/null +++ b/testing/kbuild/strlcpy.patch @@ -0,0 +1,13 @@ +diff --git a/src/kmk/kmkbuiltin/cp.c b/src/kmk/kmkbuiltin/cp.c +index 44b76ab..85fec01 100644 +--- a/src/kmk/kmkbuiltin/cp.c ++++ b/src/kmk/kmkbuiltin/cp.c +@@ -81,7 +81,7 @@ __FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.50 2004/04/06 20:06:44 markm Exp $"); + #include "kmkbuiltin.h" + #include "kbuild_protection.h" + +-#if defined(_MSC_VER) || defined(__gnu_linux__) || defined(__linux__) ++#if defined(_MSC_VER) || defined(__gnu_linux__) && !defined(__UCLIBC__) + extern char *strlcpy(char *, const char *, size_t); + #endif + diff --git a/testing/kbuild/sys-types.patch b/testing/kbuild/sys-types.patch new file mode 100644 index 0000000000..dccb48a23e --- /dev/null +++ b/testing/kbuild/sys-types.patch @@ -0,0 +1,14 @@ +diff --git a/src/kmk/kmkbuiltin/ftsfake.h b/src/kmk/kmkbuiltin/ftsfake.h +index 2518d30..5410256 100644 +--- a/src/kmk/kmkbuiltin/ftsfake.h ++++ b/src/kmk/kmkbuiltin/ftsfake.h +@@ -38,6 +38,9 @@ + # include "kmkbuiltin/mscfakes.h" + #endif + ++/* for u_int */ ++#include <sys/types.h> ++ + typedef struct { + struct _ftsent *fts_cur; /* current node */ + struct _ftsent *fts_child; /* linked list of children */ diff --git a/testing/kbuild/sys_siglist.patch b/testing/kbuild/sys_siglist.patch new file mode 100644 index 0000000000..140b8a0169 --- /dev/null +++ b/testing/kbuild/sys_siglist.patch @@ -0,0 +1,28 @@ +diff --git a/src/ash/jobs.c b/src/ash/jobs.c +index 146326a..cbf0c3e 100644 +--- a/src/ash/jobs.c ++++ b/src/ash/jobs.c +@@ -463,8 +463,8 @@ showjob(struct output *out, struct job *jp, int mode) + #endif + st = WTERMSIG(ps->status); + st &= 0x7f; +- if (st < NSIG && sys_siglist[st]) +- scopyn(sys_siglist[st], s + col, 32); ++ if (st < NSIG && strsignal(st)) ++ scopyn(strsignal(st), s + col, 32); + else + fmtstr(s + col, 16, "Signal %d", st); + if (WCOREDUMP(ps->status)) { +--- ./src/kash/jobs.c.orig ++++ ./src/kash/jobs.c +@@ -396,8 +396,8 @@ + #endif + st = WTERMSIG(ps->status); + st &= 0x7f; +- if (st < NSIG && sys_siglist[st]) +- scopyn(sys_siglist[st], s + col, 32); ++ if (st < NSIG && strsignal(st)) ++ scopyn(strsignal(st), s + col, 32); + else + fmtstr(s + col, 16, "Signal %d", st); + if (WCOREDUMP(ps->status)) { diff --git a/testing/kbuild/uclibc.patch b/testing/kbuild/uclibc.patch new file mode 100644 index 0000000000..f837ca3c78 --- /dev/null +++ b/testing/kbuild/uclibc.patch @@ -0,0 +1,22 @@ +--- ./src/lib/k/kDefs.h.orig ++++ ./src/lib/k/kDefs.h +@@ -82,7 +82,7 @@ + # define K_OS K_OS_FREEBSD + # elif defined(__HAIKU__) + # define K_OS K_OS_HAIKU +-# elif defined(__gnu_linux__) ++# elif defined(__linux__) + # define K_OS K_OS_LINUX + # elif defined(__NetBSD__) /*??*/ + # define K_OS K_OS_NETBSD +--- ./src/kmk/kmkbuiltin/fts.c.orig ++++ ./src/kmk/kmkbuiltin/fts.c +@@ -75,7 +75,7 @@ + #endif + + #if ! HAVE_NBTOOL_CONFIG_H +-# if !defined(__sun__) && !defined(__gnu_linux__) && !defined(__HAIKU__) ++# if !defined(__sun__) && !defined(__linux__) && !defined(__HAIKU__) + # define HAVE_STRUCT_DIRENT_D_NAMLEN 1 + # endif + #endif diff --git a/testing/kbuild/underlinking.patch b/testing/kbuild/underlinking.patch new file mode 100644 index 0000000000..e72c3c1f69 --- /dev/null +++ b/testing/kbuild/underlinking.patch @@ -0,0 +1,13 @@ +diff --git a/src/kmk/Makefile.kmk b/src/kmk/Makefile.kmk +index db1deb2..00981b8 100644 +--- a/src/kmk/Makefile.kmk ++++ b/src/kmk/Makefile.kmk +@@ -215,6 +215,8 @@ kmk_SOURCES = \ + vpath.c \ + remote-stub.c + ++kmk_LIBS.linux = pthread ++ + #kmk_LIBS.solaris = malloc + #kmk_DEFS.solaris += HAVE_MALLINFO + |