diff options
author | bapt <bapt@FreeBSD.org> | 2016-08-01 00:12:38 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-08-01 00:12:38 +0800 |
commit | 24283b716b99f2f66c8811b60a37c06c35348780 (patch) | |
tree | 9e053e88d784bcfbff0ccd4f47436981ccb9e14b /devel | |
parent | 2bd182c69c0b9faad93f432fa13ca9097b2971c6 (diff) | |
download | freebsd-ports-graphics-24283b716b99f2f66c8811b60a37c06c35348780.tar.gz freebsd-ports-graphics-24283b716b99f2f66c8811b60a37c06c35348780.tar.zst freebsd-ports-graphics-24283b716b99f2f66c8811b60a37c06c35348780.zip |
Fix build with clang, dprintf(3), getline(3)
Grab patch from upstream to fix build with clang
Grab patch from gentoo to fix build with dprintf
Make the build respect MAKE_ENV
Pass _WITH_GETLINE and _WITH_DPRINTF to ensure using the version from libc
Make the build respect CFLAGS
Diffstat (limited to 'devel')
-rw-r--r-- | devel/kBuild/Makefile | 8 | ||||
-rw-r--r-- | devel/kBuild/files/patch-src_ash_output.c | 18 | ||||
-rw-r--r-- | devel/kBuild/files/patch-src_ash_output.h | 13 | ||||
-rw-r--r-- | devel/kBuild/files/patch-src_kmk_kmkbuiltin.h | 15 | ||||
-rw-r--r-- | devel/kBuild/files/patch-src_kmk_kmkbuiltin_test.c | 15 | ||||
-rw-r--r-- | devel/kBuild/files/patch-src_sed_lib_getline.c | 11 |
6 files changed, 77 insertions, 3 deletions
diff --git a/devel/kBuild/Makefile b/devel/kBuild/Makefile index 2575d57759e..fcfd3c3c272 100644 --- a/devel/kBuild/Makefile +++ b/devel/kBuild/Makefile @@ -3,7 +3,7 @@ PORTNAME= kBuild DISTVERSION= ${KBUILD_VERSION} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MASTER_SITES= ftp://ftp.netlabs.org/pub/kbuild/ \ http://tmp.chruetertee.ch/ \ @@ -18,6 +18,7 @@ BROKEN_powerpc64= Does not build BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex USES= autoreconf:build gmake makeinfo +CFLAGS+= -D_WITH_GETLINE=1 -D_WITH_DPRINTF=1 CONFLICTS_INSTALL= kBuild-devel-[0-9]* @@ -25,11 +26,12 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} KBUILD_VERSION= 0.1.9998 KBUILD_ARCH= ${MACHINE_ARCH:S/i386/x86/:S/x86_64/amd64/:S/powerpc/ppc32/} -KBUILD_ENV= ACLOCAL=${ACLOCAL} \ +KBUILD_ENV= ${MAKE_ENV} +KBUILD_ENV+= ACLOCAL=${ACLOCAL} \ AUTOMAKE=${AUTOMAKE} \ AUTORECONF=${AUTORECONF} \ AUTOPOINT=true -USE_GCC= any +#USE_GCC= any KBUILD_TARGET= ${OPSYS:tl} KBUILD_BINS= kDepIDB kDepPre kObjCache kmk kmk_append kmk_ash kmk_cat \ diff --git a/devel/kBuild/files/patch-src_ash_output.c b/devel/kBuild/files/patch-src_ash_output.c new file mode 100644 index 00000000000..3bc643f1bc3 --- /dev/null +++ b/devel/kBuild/files/patch-src_ash_output.c @@ -0,0 +1,18 @@ +--- src/ash/output.c.orig 2012-07-17 22:30:18 UTC ++++ src/ash/output.c +@@ -230,6 +230,7 @@ out1fmt(const char *fmt, ...) + va_end(ap); + } + ++#if 0 + void + dprintf(const char *fmt, ...) + { +@@ -240,6 +241,7 @@ dprintf(const char *fmt, ...) + va_end(ap); + flushout(out2); + } ++#endif + + void + fmtstr(char *outbuf, size_t length, const char *fmt, ...) diff --git a/devel/kBuild/files/patch-src_ash_output.h b/devel/kBuild/files/patch-src_ash_output.h new file mode 100644 index 00000000000..9d64a389547 --- /dev/null +++ b/devel/kBuild/files/patch-src_ash_output.h @@ -0,0 +1,13 @@ +--- src/ash/output.h.orig 2012-07-17 22:30:18 UTC ++++ src/ash/output.h +@@ -65,8 +65,10 @@ void outfmt(struct output *, const char + __attribute__((__format__(__printf__,2,3))); + void out1fmt(const char *, ...) + __attribute__((__format__(__printf__,1,2))); ++#if 0 + void dprintf(const char *, ...) + __attribute__((__format__(__printf__,1,2))); ++#endif + void fmtstr(char *, size_t, const char *, ...) + __attribute__((__format__(__printf__,3,4))); + void doformat(struct output *, const char *, va_list); diff --git a/devel/kBuild/files/patch-src_kmk_kmkbuiltin.h b/devel/kBuild/files/patch-src_kmk_kmkbuiltin.h new file mode 100644 index 00000000000..b8419308ec3 --- /dev/null +++ b/devel/kBuild/files/patch-src_kmk_kmkbuiltin.h @@ -0,0 +1,15 @@ +--- src/kmk/kmkbuiltin.h.orig 2012-07-17 22:30:15 UTC ++++ src/kmk/kmkbuiltin.h +@@ -50,7 +50,11 @@ extern int kmk_builtin_printf(int argc, + extern int kmk_builtin_rm(int argc, char **argv, char **envp); + extern int kmk_builtin_rmdir(int argc, char **argv, char **envp); + extern int kmk_builtin_sleep(int argc, char **argv, char **envp); +-extern int kmk_builtin_test(int argc, char **argv, char **envp, char ***ppapszArgvSpawn); ++extern int kmk_builtin_test(int argc, char **argv, char **envp ++#ifndef kmk_builtin_test ++ , char ***ppapszArgvSpawn ++#endif ++ ); + extern int kmk_builtin_kDepIDB(int argc, char **argv, char **envp); + extern int kmk_builtin_kDepObj(int argc, char **argv, char **envp); + diff --git a/devel/kBuild/files/patch-src_kmk_kmkbuiltin_test.c b/devel/kBuild/files/patch-src_kmk_kmkbuiltin_test.c new file mode 100644 index 00000000000..bd3a31101fb --- /dev/null +++ b/devel/kBuild/files/patch-src_kmk_kmkbuiltin_test.c @@ -0,0 +1,15 @@ +--- src/kmk/kmkbuiltin/test.c.orig 2012-07-17 22:30:16 UTC ++++ src/kmk/kmkbuiltin/test.c +@@ -201,7 +201,11 @@ extern void *xmalloc(unsigned int sz) + } + #endif + +-int kmk_builtin_test(int argc, char **argv, char **envp, char ***ppapszArgvSpawn) ++int kmk_builtin_test(int argc, char **argv, char **envp ++#ifndef kmk_builtin_test ++ , char ***ppapszArgvSpawn ++#endif ++ ) + { + int res; + char **argv_spawn; diff --git a/devel/kBuild/files/patch-src_sed_lib_getline.c b/devel/kBuild/files/patch-src_sed_lib_getline.c new file mode 100644 index 00000000000..fd6ac1d8499 --- /dev/null +++ b/devel/kBuild/files/patch-src_sed_lib_getline.c @@ -0,0 +1,11 @@ +--- src/sed/lib/getline.c.orig 2012-07-17 22:30:18 UTC ++++ src/sed/lib/getline.c +@@ -31,7 +31,7 @@ + null terminator), or -1 on error or EOF. */ + + size_t +-getline (lineptr, n, stream) ++get_line (lineptr, n, stream) + char **lineptr; + size_t *n; + FILE *stream; |