pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Import kbuild-0.1.9998.8.2814.25 as wip/kbuild.
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Jul 6 02:25:11 2016 +0200
Changeset: 9f7c30243e7bccf55df9317c90940a5b5e7d9cc6
Added Files:
kbuild/DESCR
kbuild/Makefile
kbuild/PLIST
kbuild/distinfo
kbuild/files/strtofflags.c
kbuild/patches/patch-Config.kmk
kbuild/patches/patch-kBuild_header.kmk
kbuild/patches/patch-src_kash_Makefile.kmk
kbuild/patches/patch-src_kmk_Makefile.kmk
kbuild/patches/patch-src_kmk_kmkbuiltin_install.c
kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c
kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c
kbuild/patches/patch-src_lib_md5.c
kbuild/patches/patch-src_sed_Makefile.kmk
kbuild/patches/patch-src_sed_lib_utils.c
Log Message:
Import kbuild-0.1.9998.8.2814.25 as wip/kbuild.
kBuild is a makefile framework for writing simple makefiles for complex tasks.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9f7c30243e7bccf55df9317c90940a5b5e7d9cc6
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
kbuild/DESCR | 1 +
kbuild/Makefile | 65 +++++++
kbuild/PLIST | 141 ++++++++++++++++
kbuild/distinfo | 16 ++
kbuild/files/strtofflags.c | 196 ++++++++++++++++++++++
kbuild/patches/patch-Config.kmk | 18 ++
kbuild/patches/patch-kBuild_header.kmk | 33 ++++
kbuild/patches/patch-src_kash_Makefile.kmk | 19 +++
kbuild/patches/patch-src_kmk_Makefile.kmk | 31 ++++
kbuild/patches/patch-src_kmk_kmkbuiltin_install.c | 19 +++
kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c | 16 ++
kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c | 14 ++
kbuild/patches/patch-src_lib_md5.c | 13 ++
kbuild/patches/patch-src_sed_Makefile.kmk | 20 +++
kbuild/patches/patch-src_sed_lib_utils.c | 13 ++
15 files changed, 615 insertions(+)
diffs:
diff --git a/kbuild/DESCR b/kbuild/DESCR
new file mode 100644
index 0000000..e42b9bf
--- /dev/null
+++ b/kbuild/DESCR
@@ -0,0 +1 @@
+kBuild is a makefile framework for writing simple makefiles for complex tasks.
diff --git a/kbuild/Makefile b/kbuild/Makefile
new file mode 100644
index 0000000..1f91c55
--- /dev/null
+++ b/kbuild/Makefile
@@ -0,0 +1,65 @@
+# $NetBSD: Makefile,v 1.5 2013/02/01 22:22:16 thomasklausner 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@localhost
+HOMEPAGE= ftp://ftp.netlabs.org/pub/kbuild/
+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
+
+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/kbuild/PLIST b/kbuild/PLIST
new file mode 100644
index 0000000..3a30eec
--- /dev/null
+++ b/kbuild/PLIST
@@ -0,0 +1,141 @@
+@comment $NetBSD$
+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/kbuild/distinfo b/kbuild/distinfo
new file mode 100644
index 0000000..7c49a8c
--- /dev/null
+++ b/kbuild/distinfo
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.5 2011/02/17 13:14:51 tnn2 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) = d1b10312f4571d2d07f181d6df0f1aeb043b6b7e
+SHA1 (patch-kBuild_header.kmk) = b56f42d282877d6bdfc59e8e47033234159c9017
+SHA1 (patch-src_kash_Makefile.kmk) = 3ad329257cb8897b93ef301d9da68ea9c8b8e0ff
+SHA1 (patch-src_kmk_Makefile.kmk) = d5f19634de28444d806a7730969346874604118c
+SHA1 (patch-src_kmk_kmkbuiltin_install.c) = c31233aa414cd340f8e9dc6e96352213f4883652
+SHA1 (patch-src_kmk_kmkbuiltin_osdep.c) = a0f4e6f22d1d35cb9016621480325ccdea05c897
+SHA1 (patch-src_kmk_kmkbuiltin_rm.c) = e81d0f2a53b8608c8c9baece4421425e4f84fdfa
+SHA1 (patch-src_lib_md5.c) = aeef0866d2e3470df8f517f42a3a42a61659d5af
+SHA1 (patch-src_sed_Makefile.kmk) = f62c885b89bc5deef6dc95997c8a8395acaca1fa
+SHA1 (patch-src_sed_lib_utils.c) = 9e36987c11889a542281978cfab63289fd5e4c72
diff --git a/kbuild/files/strtofflags.c b/kbuild/files/strtofflags.c
new file mode 100644
index 0000000..0d72083
--- /dev/null
+++ b/kbuild/files/strtofflags.c
@@ -0,0 +1,196 @@
+/*
+ * From http://ftp.netbsd.org/pub/NetBSD/misc/alc/libc/strtofflags.c
+ */
+
+/* $NetBSD: strtofflags.c,v 1.1 2014/08/21 10:18:18 thomasklausner Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stat_flags.c 8.1 (Berkeley) 5/31/93
+ * $FreeBSD: src/lib/libc/gen/strtofflags.c,v 1.18.2.1 2000/06/28 01:52:24 joe Exp $
+ * $DragonFly: src/lib/libc/gen/strtofflags.c,v 1.5 2008/06/02 20:17:07 dillon Exp $
+ */
+#include <sys/cdefs.h>
+#ifndef lint
+__RCSID("$NetBSD: strtofflags.c,v 1.1 2014/08/21 10:18:18 thomasklausner Exp $");
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static struct {
+ char *name;
+ u_long flag;
+ int invert;
+} mapping[] = {
+ /* shorter names per flag first, all prefixed by "no" */
+#ifdef SF_APPEND
+ { "nosappnd", SF_APPEND, 0 },
+ { "nosappend", SF_APPEND, 0 },
+#endif
+#ifdef SF_ARCHIVED
+ { "noarch", SF_ARCHIVED, 0 },
+ { "noarchived", SF_ARCHIVED, 0 },
+#endif
+#ifdef SF_IMMUTABLE
+ { "noschg", SF_IMMUTABLE, 0 },
+ { "noschange", SF_IMMUTABLE, 0 },
+ { "nosimmutable", SF_IMMUTABLE, 0 },
+#endif
+#ifdef SF_NOHISTORY
+ { "noshistory", SF_NOHISTORY, 1 },
+#endif
+#ifdef SF_NOUNLINK
+ { "nosunlnk", SF_NOUNLINK, 1 },
+ { "nosunlink", SF_NOUNLINK, 1 },
+#endif
+#ifdef UF_APPEND
+ { "nouappnd", UF_APPEND, 0 },
+ { "nouappend", UF_APPEND, 0 },
+#endif
+#ifdef UF_IMMUTABLE
+ { "nouchg", UF_IMMUTABLE, 0 },
+ { "nouchange", UF_IMMUTABLE, 0 },
+ { "nouimmutable", UF_IMMUTABLE, 0 },
+#endif
+#ifdef UF_NODUMP
+ { "nodump", UF_NODUMP, 1 },
+#endif
+#ifdef UF_OPAQUE
+ { "noopaque", UF_OPAQUE, 0 },
+#endif
+#ifdef UF_NOHISTORY
+ { "nouhistory", UF_NOHISTORY, 1 },
+ { "nohistory", UF_NOHISTORY, 1 },
+#endif
+#ifdef UF_NOUNLINK
+ { "nouunlnk", UF_NOUNLINK, 1 },
+ { "nouunlink", UF_NOUNLINK, 1 },
+#endif
+};
+
+#define MAXFLAGLEN 12
+#define NMAPPING __arraycount(mapping)
+
+/*
+ * fflagstostr --
+ * Convert file flags to a comma-separated string. If no flags
+ * are set, return the empty string.
+ */
+static inline char *
+fflagstostr(u_long flags)
+{
+ char *string;
+ char *sp, *dp;
+ u_long setflags;
+ int i;
+
+ string = malloc(NMAPPING * (MAXFLAGLEN + 1));
+ if (string == NULL)
+ goto out;
+
+ setflags = flags;
+ dp = string;
+ for (i = 0; i < NMAPPING; i++) {
+ if ((setflags & mapping[i].flag) == 0)
+ continue;
+
+ if (dp > string)
+ *dp++ = ',';
+
+ sp = mapping[i].name;
+ if (mapping[i].invert)
+ sp += 2;
+
+ while (*sp != '\0')
+ *dp++ = *sp++;
+
+ setflags &= ~mapping[i].flag;
+ }
+ *dp = '\0';
+
+out:
+ return string;
+}
+
+/*
+ * strtofflags --
+ * Take string of arguments and return file flags. Return 0 on
+ * success, 1 on failure. On failure, stringp is set to point
+ * to the offending token.
+ */
+static inline int
+strtofflags(char **stringp, u_long *setp, u_long *clrp)
+{
+ u_long setf, clrf;
+ char *string, *p;
+ int i;
+
+ setf = 0;
+ clrf = 0;
+
+ string = *stringp;
+
+ while ((p = strsep(&string, "\t ,")) != NULL) {
+ int p_off = 0;
+
+ *stringp = p;
+ if (*p == '\0')
+ continue;
+
+ if (strcmp(p, "no") == 0)
+ p_off = 2;
+
+ for (i = 0; i < NMAPPING; i++) {
+ if (strcmp(p, mapping[i].name + p_off) != 0)
+ continue;
+
+ if (mapping[i].invert)
+ clrf |= mapping[i].flag;
+ else
+ setf |= mapping[i].flag;
+ }
+
+ if (i == NMAPPING)
+ return 1;
+ }
+
+ if (setp != NULL)
+ *setp = setf;
+
+ if (clrp != NULL)
+ *clrp = clrf;
+
+ return 0;
+}
diff --git a/kbuild/patches/patch-Config.kmk b/kbuild/patches/patch-Config.kmk
new file mode 100644
index 0000000..23370aa
--- /dev/null
+++ b/kbuild/patches/patch-Config.kmk
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-kBuild_header.kmk b/kbuild/patches/patch-kBuild_header.kmk
new file mode 100644
index 0000000..35ba23e
--- /dev/null
+++ b/kbuild/patches/patch-kBuild_header.kmk
@@ -0,0 +1,33 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-src_kash_Makefile.kmk b/kbuild/patches/patch-src_kash_Makefile.kmk
new file mode 100644
index 0000000..c088df7
--- /dev/null
+++ b/kbuild/patches/patch-src_kash_Makefile.kmk
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-src_kmk_Makefile.kmk b/kbuild/patches/patch-src_kmk_Makefile.kmk
new file mode 100644
index 0000000..6bdb88e
--- /dev/null
+++ b/kbuild/patches/patch-src_kmk_Makefile.kmk
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- 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.freebsd = \
++ 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/kbuild/patches/patch-src_kmk_kmkbuiltin_install.c b/kbuild/patches/patch-src_kmk_kmkbuiltin_install.c
new file mode 100644
index 0000000..4faccf1
--- /dev/null
+++ b/kbuild/patches/patch-src_kmk_kmkbuiltin_install.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c b/kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c
new file mode 100644
index 0000000..e6f4c6c
--- /dev/null
+++ b/kbuild/patches/patch-src_kmk_kmkbuiltin_osdep.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c b/kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c
new file mode 100644
index 0000000..5be8065
--- /dev/null
+++ b/kbuild/patches/patch-src_kmk_kmkbuiltin_rm.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-src_lib_md5.c b/kbuild/patches/patch-src_lib_md5.c
new file mode 100644
index 0000000..e5f6208
--- /dev/null
+++ b/kbuild/patches/patch-src_lib_md5.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-src_sed_Makefile.kmk b/kbuild/patches/patch-src_sed_Makefile.kmk
new file mode 100644
index 0000000..1c55478
--- /dev/null
+++ b/kbuild/patches/patch-src_sed_Makefile.kmk
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- 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/kbuild/patches/patch-src_sed_lib_utils.c b/kbuild/patches/patch-src_sed_lib_utils.c
new file mode 100644
index 0000000..392496a
--- /dev/null
+++ b/kbuild/patches/patch-src_sed_lib_utils.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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;
Home |
Main Index |
Thread Index |
Old Index