diff options
author | kamil <kamil@pkgsrc.org> | 2016-07-08 09:42:53 +0000 |
---|---|---|
committer | kamil <kamil@pkgsrc.org> | 2016-07-08 09:42:53 +0000 |
commit | 86e22193e271b95012750e2afd2be75ebe903ef1 (patch) | |
tree | 9a7a3ee4e3062d10913e158484a242f2a4b7c67f /devel | |
parent | 61945fe4d197867dcb5c559e75b347e9e9c91af9 (diff) | |
download | pkgsrc-86e22193e271b95012750e2afd2be75ebe903ef1.tar.gz |
Import kBuild svn r. 2814 (0.1.9998-8) as devel/kbuild ver. 0.1.9998.8.2814.25
kBuild is a makefile framework for writing simple makefiles for complex tasks.
Due to infrequent releases repackage the latest version from upstream SVN via
Fedora Source RPM package.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/kbuild/DESCR | 1 | ||||
-rw-r--r-- | devel/kbuild/Makefile | 65 | ||||
-rw-r--r-- | devel/kbuild/PLIST | 141 | ||||
-rw-r--r-- | devel/kbuild/distinfo | 16 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-Config.kmk | 20 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-kBuild_header.kmk | 35 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_kash_Makefile.kmk | 21 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_kmk_Makefile.kmk | 33 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_kmk_kmkbuiltin_install.c | 21 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c | 18 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c | 16 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_lib_md5.c | 15 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_sed_Makefile.kmk | 22 | ||||
-rw-r--r-- | devel/kbuild/patches/patch-src_sed_lib_utils.c | 15 |
14 files changed, 439 insertions, 0 deletions
diff --git a/devel/kbuild/DESCR b/devel/kbuild/DESCR new file mode 100644 index 00000000000..e42b9bf5e02 --- /dev/null +++ b/devel/kbuild/DESCR @@ -0,0 +1 @@ +kBuild is a makefile framework for writing simple makefiles for complex tasks. diff --git a/devel/kbuild/Makefile b/devel/kbuild/Makefile new file mode 100644 index 00000000000..2da42a776e5 --- /dev/null +++ b/devel/kbuild/Makefile @@ -0,0 +1,65 @@ +# $NetBSD: Makefile,v 1.1 2016/07/08 09:42:53 kamil Exp $ +# + +KBUILDNAME= kBuild +KBUILDVERMAJ= 0.1.9998 +KBUILDVERMIN= 8 +KBUILDVERSVN= 2814 +KBUILDVERFDR= 25 + +DISTNAME= ${KBUILDNAME}-${KBUILDVERMAJ}-${KBUILDVERMIN}.r${KBUILDVERSVN}.fc${KBUILDVERFDR} +PKGNAME= ${KBUILDNAME:tl}-${KBUILDVERMAJ}.${KBUILDVERMIN}.${KBUILDVERSVN}.${KBUILDVERFDR} +CATEGORIES= devel +MASTER_SITES= http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/source/tree/Packages/k/ +EXTRACT_SUFX= .src.rpm + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://trac.netlabs.org/kbuild/wiki/WikiStart +COMMENT= Framework for writing simple makefiles for complex tasks +# but also various other licenses in 3rd party code +LICENSE= gnu-gpl-v3 + +WRKSRC= ${WRKDIR}/${KBUILDNAME} + +MAKE_JOBS_SAFE= no + +USE_TOOLS+= pax lex gmake autoconf autoreconf automake autopoint + +KBUILD_VERSION_PATCH= ${KBUILDVERMAJ:E} + +INSTALL_ENV+= KBUILD_VERBOSE=2 + +MAKE_ENV+= KBUILD_LIB_SEARCH_PATHS="/lib /usr/lib ${X11BASE}/lib ${PREFIX}/lib" + +post-extract: + ${RUN} cd ${WRKDIR} && ${EXTRACTOR} ${KBUILDNAME}-r${KBUILDVERSVN}.tar.gz + ${RUN} ${CP} ${FILESDIR}/strtofflags.c ${WRKSRC}/src/kmk/strtofflags.c + +pre-build: +# Remove prebuilt files + ${RUN} cd ${WRKSRC} && rm -rf kBuild/bin/* + +do-build: + ${RUN} cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ./kBuild/env.sh \ + --full ${GMAKE} -f bootstrap.gmk \ + KBUILD_VERBOSE=2 \ + KBUILD_VERSION_PATCH=${KBUILD_VERSION_PATCH} && \ + ${SETENV} ${MAKE_ENV} ./kBuild/env.sh kmk \ + NIX_INSTALL_DIR=${PREFIX} \ + BUILD_TYPE=release \ + MY_INST_MODE=${NONBINMODE} \ + MY_INST_BIN_MODE=${BINMODE} \ + rebuild + +do-install: + ${RUN} cd ${WRKSRC} && \ + ${SETENV} ${INSTALL_ENV} ./kBuild/env.sh kmk \ + NIX_INSTALL_DIR=${PREFIX} \ + BUILD_TYPE=release \ + MY_INST_MODE=${NONBINMODE} \ + MY_INST_BIN_MODE=${BINMODE} \ + PATH_INS=${DESTDIR} \ + install + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/kbuild/PLIST b/devel/kbuild/PLIST new file mode 100644 index 00000000000..c099f0f7907 --- /dev/null +++ b/devel/kbuild/PLIST @@ -0,0 +1,141 @@ +@comment $NetBSD: PLIST,v 1.1 2016/07/08 09:42:53 kamil Exp $ +bin/kDepIDB +bin/kDepObj +bin/kDepPre +bin/kObjCache +bin/kmk +bin/kmk_append +bin/kmk_ash +bin/kmk_cat +bin/kmk_chmod +bin/kmk_cmp +bin/kmk_cp +bin/kmk_echo +bin/kmk_expr +bin/kmk_gmake +bin/kmk_install +bin/kmk_ln +bin/kmk_md5sum +bin/kmk_mkdir +bin/kmk_mv +bin/kmk_printf +bin/kmk_redirect +bin/kmk_rm +bin/kmk_rmdir +bin/kmk_sed +bin/kmk_sleep +bin/kmk_test +bin/kmk_time +share/doc/kBuild-0.1.9998/QuickReference-kBuild.txt +share/doc/kBuild-0.1.9998/QuickReference-kmk.html +share/doc/kBuild-0.1.9998/QuickReference-kmk.txt +share/kBuild/footer-inherit-uses-tools.kmk +share/kBuild/footer-misc.kmk +share/kBuild/footer-pass1.kmk +share/kBuild/footer-pass2-compiling-targets.kmk +share/kBuild/footer-pass2-fetches.kmk +share/kBuild/footer-pass2-installs.kmk +share/kBuild/footer-pass2-patches.kmk +share/kBuild/footer-passes.kmk +share/kBuild/footer.kmk +share/kBuild/header.kmk +share/kBuild/msgstyles/brief.kmk +share/kBuild/msgstyles/brief2.kmk +share/kBuild/rules.kmk +share/kBuild/sdks/DXSDK.kmk +share/kBuild/sdks/DXSDKAMD64.kmk +share/kBuild/sdks/DXSDKX86.kmk +share/kBuild/sdks/LIBSDL.kmk +share/kBuild/sdks/MACOSX104.kmk +share/kBuild/sdks/MACOSX104INCS.kmk +share/kBuild/sdks/MACOSX105.kmk +share/kBuild/sdks/MACOSX105INCS.kmk +share/kBuild/sdks/NT4DDK.kmk +share/kBuild/sdks/OS2DDKBASE32.kmk +share/kBuild/sdks/ReorderCompilerIncs.kmk +share/kBuild/sdks/W2K3DDK.kmk +share/kBuild/sdks/W2K3DDKAMD64.kmk +share/kBuild/sdks/W2K3DDKX86.kmk +share/kBuild/sdks/W32API.kmk +share/kBuild/sdks/WIN32SDK.kmk +share/kBuild/sdks/WIN32SDK2002.kmk +share/kBuild/sdks/WIN64SDK.kmk +share/kBuild/sdks/WINDDK.kmk +share/kBuild/sdks/WINDDK71.kmk +share/kBuild/sdks/WINDDK71WLH.kmk +share/kBuild/sdks/WINDDK71WNET.kmk +share/kBuild/sdks/WINDDK71WXP.kmk +share/kBuild/sdks/WINDDK80.kmk +share/kBuild/sdks/WINDDK80W8.kmk +share/kBuild/sdks/WINDDKW2K.kmk +share/kBuild/sdks/WINDDKWLH.kmk +share/kBuild/sdks/WINDDKWNET.kmk +share/kBuild/sdks/WINDDKWXP.kmk +share/kBuild/sdks/WINPSDK.kmk +share/kBuild/sdks/WINPSDK71.kmk +share/kBuild/sdks/WINPSDK71INCS.kmk +share/kBuild/sdks/WINPSDKINCS.kmk +share/kBuild/subfooter.kmk +share/kBuild/subheader.kmk +share/kBuild/templates/DUMMY.kmk +share/kBuild/tools/ALP.kmk +share/kBuild/tools/BISON.kmk +share/kBuild/tools/FLEX.kmk +share/kBuild/tools/GCC.kmk +share/kBuild/tools/GCC3.kmk +share/kBuild/tools/GCC32.kmk +share/kBuild/tools/GCC3OMF.kmk +share/kBuild/tools/GCC3PLAIN.kmk +share/kBuild/tools/GCC42MACHO.kmk +share/kBuild/tools/GCC4MACHO.kmk +share/kBuild/tools/GCC64.kmk +share/kBuild/tools/GXX.kmk +share/kBuild/tools/GXX3.kmk +share/kBuild/tools/GXX32.kmk +share/kBuild/tools/GXX3OMF.kmk +share/kBuild/tools/GXX3PLAIN.kmk +share/kBuild/tools/GXX42MACHO.kmk +share/kBuild/tools/GXX4MACHO.kmk +share/kBuild/tools/GXX64.kmk +share/kBuild/tools/JWASM.kmk +share/kBuild/tools/LLVMGCC42MACHO.kmk +share/kBuild/tools/LLVMGXX42MACHO.kmk +share/kBuild/tools/MASM510.kmk +share/kBuild/tools/MASM600.kmk +share/kBuild/tools/MASM610.kmk +share/kBuild/tools/MASM6PLUS.kmk +share/kBuild/tools/MASM710.kmk +share/kBuild/tools/MINGW32.kmk +share/kBuild/tools/MINGWW64.kmk +share/kBuild/tools/MSLINK510.kmk +share/kBuild/tools/NASM.kmk +share/kBuild/tools/OPENWATCOM-16.kmk +share/kBuild/tools/OPENWATCOM-WL.kmk +share/kBuild/tools/OPENWATCOM.kmk +share/kBuild/tools/StandardDTrace.kmk +share/kBuild/tools/TAR.kmk +share/kBuild/tools/TARBZ2.kmk +share/kBuild/tools/TARGZ.kmk +share/kBuild/tools/VAC308.kmk +share/kBuild/tools/VCC100.kmk +share/kBuild/tools/VCC100AMD64.kmk +share/kBuild/tools/VCC100X86.kmk +share/kBuild/tools/VCC70.kmk +share/kBuild/tools/VCC80.kmk +share/kBuild/tools/VCC80AMD64.kmk +share/kBuild/tools/VCC80X86.kmk +share/kBuild/tools/WATCOMC11C-16.kmk +share/kBuild/tools/WATCOMC11C-WL.kmk +share/kBuild/tools/WATCOMC11C.kmk +share/kBuild/tools/WGET.kmk +share/kBuild/tools/XGCCAMD64LINUX.kmk +share/kBuild/tools/YACC.kmk +share/kBuild/tools/YASM.kmk +share/kBuild/tools/ZIP.kmk +share/kBuild/units/dtrace.kmk +share/kBuild/units/lex.kmk +share/kBuild/units/qt3.kmk +share/kBuild/units/qt4.kmk +share/kBuild/units/qt5.kmk +share/kBuild/units/yacc.kmk +share/kBuild/up.kmk diff --git a/devel/kbuild/distinfo b/devel/kbuild/distinfo new file mode 100644 index 00000000000..423b5bcc058 --- /dev/null +++ b/devel/kbuild/distinfo @@ -0,0 +1,16 @@ +$NetBSD: distinfo,v 1.1 2016/07/08 09:42:53 kamil Exp $ + +SHA1 (kBuild-0.1.9998-8.r2814.fc25.src.rpm) = e30482f4475673cf8824ac787f469b60aedf1263 +RMD160 (kBuild-0.1.9998-8.r2814.fc25.src.rpm) = 84b3cd3e4ee904c3ba5b2a95cd98aa3e4311902d +SHA512 (kBuild-0.1.9998-8.r2814.fc25.src.rpm) = 103a6d35385348fdb63d5acc4662c6d6ef3a7cca42bfb6bb087445fdcc121e6bbbaca507b3313d83296c293116ebc478b1bce017023c4f438305e816ec443a6c +Size (kBuild-0.1.9998-8.r2814.fc25.src.rpm) = 16094144 bytes +SHA1 (patch-Config.kmk) = 87ef3f8419c39728b2a6eee51bb7d03dfdf7e8e9 +SHA1 (patch-kBuild_header.kmk) = 412b1bf3730c19072be494a9970acbda6c7e5d4f +SHA1 (patch-src_kash_Makefile.kmk) = b2f1b4f47b5c1b51ebfa35f9e5efc75ec95ff642 +SHA1 (patch-src_kmk_Makefile.kmk) = 52730e797fa169775050b62ad4fdfa1562f8340b +SHA1 (patch-src_kmk_kmkbuiltin_install.c) = 6a31de5ae58b7f92a8a3c13d8e6b89322d4c3c86 +SHA1 (patch-src_kmk_kmkbuiltin_osdep.c) = 1e450735063dd5bc1d9e4f8370c90720040d22d5 +SHA1 (patch-src_kmk_kmkbuiltin_rm.c) = 16196926da997aa5aeba5d2bd73407f334cd44a4 +SHA1 (patch-src_lib_md5.c) = f14e8fdd4d51e25fda8a876c09f31d11f32ffa6f +SHA1 (patch-src_sed_Makefile.kmk) = eaebdbb2ce06d09f77b350bdaceb6161d9357575 +SHA1 (patch-src_sed_lib_utils.c) = 98df0a267680a4eb45fb93e4d699a234f5d8ec25 diff --git a/devel/kbuild/patches/patch-Config.kmk b/devel/kbuild/patches/patch-Config.kmk new file mode 100644 index 00000000000..7627c9c1d3b --- /dev/null +++ b/devel/kbuild/patches/patch-Config.kmk @@ -0,0 +1,20 @@ +$NetBSD: patch-Config.kmk,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- Config.kmk.orig 2016-04-29 00:52:38.000000000 +0000 ++++ Config.kmk +@@ -361,7 +361,7 @@ endif + TEMPLATE_BIN-THREADED = Threaded command line binary + TEMPLATE_BIN-THREADED_EXTENDS = BIN + TEMPLATE_BIN-THREADED_EXTENDS_BY = appending +-if1of ($(KBUILD_TARGET), dragonfly freebsd linux openbsd) ++if1of ($(KBUILD_TARGET), dragonfly freebsd linux openbsd netbsd) + TEMPLATE_BIN-THREADED_LIBS = pthread + endif + +@@ -377,4 +377,3 @@ TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TO + + LIB_KDEP = $(PATH_OBJ)/kDep/$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBPREF)kDep$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBSUFF) + LIB_KUTIL = $(PATH_OBJ)/kUtil/$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBPREF)kUtil$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBSUFF) +- diff --git a/devel/kbuild/patches/patch-kBuild_header.kmk b/devel/kbuild/patches/patch-kBuild_header.kmk new file mode 100644 index 00000000000..66c266a0d36 --- /dev/null +++ b/devel/kbuild/patches/patch-kBuild_header.kmk @@ -0,0 +1,35 @@ +$NetBSD: patch-kBuild_header.kmk,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- kBuild/header.kmk.orig 2016-04-29 00:52:38.000000000 +0000 ++++ kBuild/header.kmk +@@ -610,10 +610,11 @@ SUFF_OBJ := .o + SUFF_LIB := .a + SUFF_DLL := .so + SUFF_EXE := +- if1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd) ## @todo check netbsd and openbsd. ++ if1of ($(KBUILD_TARGET), dragonfly freebsd linux) + SUFF_SYS := .ko ++else ifeq ($(KBUILD_TARGET),netbsd) + else +-SUFF_SYS := ++SUFF_SYS := .kmod + endif + SUFF_RES := + endif +@@ -1337,8 +1338,7 @@ else + KBUILD_LIB_SEARCH_SUBS := + KBUILD_LIB_SEARCH_ROOTS := + endif +-KBUILD_LIB_SEARCH_PATHS := $(foreach root, $(KBUILD_LIB_SEARCH_ROOTS), $(addprefix $(root),$(KBUILD_LIB_SEARCH_SUBS))) +- ++KBUILD_LIB_SEARCH_PATHS ?= $(foreach root, $(KBUILD_LIB_SEARCH_ROOTS), $(addprefix $(root),$(KBUILD_LIB_SEARCH_SUBS))) + + # + # This is how we find the closest config.kmk. +@@ -1617,4 +1617,3 @@ endif + # end-of-file-content + __header_kmk__ := 1 + endif # !__header_kmk__ +- diff --git a/devel/kbuild/patches/patch-src_kash_Makefile.kmk b/devel/kbuild/patches/patch-src_kash_Makefile.kmk new file mode 100644 index 00000000000..f07c2ceb5d7 --- /dev/null +++ b/devel/kbuild/patches/patch-src_kash_Makefile.kmk @@ -0,0 +1,21 @@ +$NetBSD: patch-src_kash_Makefile.kmk,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- src/kash/Makefile.kmk.orig 2015-06-21 21:21:24.000000000 +0000 ++++ src/kash/Makefile.kmk +@@ -54,6 +54,8 @@ kash_DEFS.freebsd = \ + HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME + kash_DEFS.openbsd = \ + HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME ++kash_DEFS.netbsd = \ ++ HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME + kash_INCS = $(kash_0_OUTDIR) . # (the last is because of error.h) + kash_ASFLAGS.win = -g cv8 + kash_ASFLAGS.win.x86 = -f win32 +@@ -223,5 +225,3 @@ endif + include $(PATH_SUB_CURRENT)/tests/Makefile.kmk + + include $(FILE_KBUILD_SUB_FOOTER) +- +- diff --git a/devel/kbuild/patches/patch-src_kmk_Makefile.kmk b/devel/kbuild/patches/patch-src_kmk_Makefile.kmk new file mode 100644 index 00000000000..0625362b986 --- /dev/null +++ b/devel/kbuild/patches/patch-src_kmk_Makefile.kmk @@ -0,0 +1,33 @@ +$NetBSD: patch-src_kmk_Makefile.kmk,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- src/kmk/Makefile.kmk.orig 2015-12-22 14:58:34.000000000 +0000 ++++ src/kmk/Makefile.kmk +@@ -107,6 +107,10 @@ kmkmissing_SOURCES.dragonfly = \ + kmkmissing_SOURCES.freebsd = \ + glob/fnmatch.c + ++kmkmissing_SOURCES.netbsd = \ ++ glob/fnmatch.c \ ++ strtofflags.c ++ + kmkmissing_SOURCES.haiku = \ + kmkbuiltin/haikufakes.c \ + glob/fnmatch.c +@@ -245,6 +249,9 @@ kmk_SOURCES = \ + kbuild-object.c + + kmk_DEFS.freebsd.x86 = CONFIG_WITHOUT_THREADS ++kmk_DEFS.netbsd.x86 = CONFIG_WITHOUT_THREADS ++ ++kmk_LIBS.netbsd = pthread + + #kmk_LIBS.solaris = malloc + #kmk_DEFS.solaris += HAVE_MALLINFO +@@ -645,5 +652,3 @@ test_all: \ + test_2ndtargetexp \ + test_30_continued_on_failure \ + test_lazy_deps_vars +- +- diff --git a/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_install.c b/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_install.c new file mode 100644 index 00000000000..82e45c5485b --- /dev/null +++ b/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_install.c @@ -0,0 +1,21 @@ +$NetBSD: patch-src_kmk_kmkbuiltin_install.c,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- src/kmk/kmkbuiltin/install.c.orig 2015-06-21 21:21:29.000000000 +0000 ++++ src/kmk/kmkbuiltin/install.c +@@ -87,6 +87,9 @@ __FBSDID("$FreeBSD: src/usr.bin/xinstall + #ifdef __HAIKU__ + # include "haikufakes.h" + #endif ++#ifdef __NetBSD__ ++# include "strtofflags.c" ++#endif + #include "kmkbuiltin.h" + + +@@ -1118,4 +1121,3 @@ last_slash(const char *path) + return strrchr(path, '/'); + #endif + } +- diff --git a/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c b/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c new file mode 100644 index 00000000000..2481905dd23 --- /dev/null +++ b/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c @@ -0,0 +1,18 @@ +$NetBSD: patch-src_kmk_kmkbuiltin_osdep.c,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- src/kmk/kmkbuiltin/osdep.c.orig 2015-06-21 21:21:29.000000000 +0000 ++++ src/kmk/kmkbuiltin/osdep.c +@@ -41,8 +41,10 @@ + #elif defined(__OpenBSD__) + # include "openbsd.c" + ++#elif defined(__NetBSD__) ++# include "strtofflags.c" ++ + #elif defined(__HAIKU__) + # include "haikufakes.c" + + #endif +- diff --git a/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c b/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c new file mode 100644 index 00000000000..3ce97f78b80 --- /dev/null +++ b/devel/kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c @@ -0,0 +1,16 @@ +$NetBSD: patch-src_kmk_kmkbuiltin_rm.c,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- src/kmk/kmkbuiltin/rm.c.orig 2015-06-21 21:21:29.000000000 +0000 ++++ src/kmk/kmkbuiltin/rm.c +@@ -66,6 +66,9 @@ static char sccsid[] = "@(#)rm.c 8.5 (Be + #ifdef __HAIKU__ + # include "haikufakes.h" + #endif ++#ifdef __NetBSD__ ++# include "strtofflags.c" ++#endif + #ifdef KBUILD_OS_WINDOWS + # ifdef _MSC_VER + # include "mscfakes.h" diff --git a/devel/kbuild/patches/patch-src_lib_md5.c b/devel/kbuild/patches/patch-src_lib_md5.c new file mode 100644 index 00000000000..854cb22e358 --- /dev/null +++ b/devel/kbuild/patches/patch-src_lib_md5.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_lib_md5.c,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Fix memset(3) call. + +--- src/lib/md5.c.orig 2015-06-21 21:21:25.000000000 +0000 ++++ src/lib/md5.c +@@ -144,7 +144,7 @@ void MD5Final(unsigned char digest[16], + MD5Transform(ctx->buf, (uint32 *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + memcpy(digest, ctx->buf, 16); +- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ + } + + diff --git a/devel/kbuild/patches/patch-src_sed_Makefile.kmk b/devel/kbuild/patches/patch-src_sed_Makefile.kmk new file mode 100644 index 00000000000..6de9808190e --- /dev/null +++ b/devel/kbuild/patches/patch-src_sed_Makefile.kmk @@ -0,0 +1,22 @@ +$NetBSD: patch-src_sed_Makefile.kmk,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add NetBSD support. + +--- src/sed/Makefile.kmk.orig 2015-06-21 21:21:27.000000000 +0000 ++++ src/sed/Makefile.kmk +@@ -69,6 +69,10 @@ kmk_sed_SOURCES.freebsd = \ + lib/strverscmp.c \ + lib/obstack.c \ + lib/getline.c ++kmk_sed_SOURCES.netbsd = \ ++ lib/strverscmp.c \ ++ lib/obstack.c \ ++ lib/getline.c + kmk_sed_SOURCES.haiku = \ + lib/strverscmp.c \ + lib/obstack.c +@@ -105,4 +109,3 @@ $(kmk_sed_0_OUTDIR)/config.h: $(kmk_sed_ + # + $(kmk_sed_0_OUTDIR)/regex.h: $(kmk_sed_DEFPATH)/lib/regex_.h | $(call DIRDEP,$(kmk_sed_0_OUTDIR)) + $(CP) -f $^ $@ +- diff --git a/devel/kbuild/patches/patch-src_sed_lib_utils.c b/devel/kbuild/patches/patch-src_sed_lib_utils.c new file mode 100644 index 00000000000..4efd27ee809 --- /dev/null +++ b/devel/kbuild/patches/patch-src_sed_lib_utils.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_sed_lib_utils.c,v 1.1 2016/07/08 09:42:54 kamil Exp $ + +Add missing include. + +--- src/sed/lib/utils.c.orig 2015-06-21 21:21:26.000000000 +0000 ++++ src/sed/lib/utils.c +@@ -35,6 +35,8 @@ + # include <stdlib.h> + #endif /* HAVE_STDLIB_H */ + ++#include <unistd.h> ++ + #include "utils.h" + + const char *myname; |