diff options
author | arved <arved@FreeBSD.org> | 2011-01-14 17:59:17 +0800 |
---|---|---|
committer | arved <arved@FreeBSD.org> | 2011-01-14 17:59:17 +0800 |
commit | 90acbb2f996fce59de3d05e60617227fffef5559 (patch) | |
tree | da8f0e0e7eb1799b6e96b0be263f175602f74ef4 /sysutils | |
parent | 75c1ff9724c6c6c5cdcb0cfaa4c7ea9d3a548db3 (diff) | |
download | freebsd-ports-gnome-90acbb2f996fce59de3d05e60617227fffef5559.tar.gz freebsd-ports-gnome-90acbb2f996fce59de3d05e60617227fffef5559.tar.zst freebsd-ports-gnome-90acbb2f996fce59de3d05e60617227fffef5559.zip |
[1]Unbreak on 8.0 by renaming conflicting function dprintf to bb_dprintf
[2]Add memrchr() function for FreeBSD 7.x
PR: 152456
Submitted by: maintainer[1], Ivan Dimitrov[2]
Feature safe: yes
Unbreak on amd64 while here.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/busybox/Makefile | 8 | ||||
-rw-r--r-- | sysutils/busybox/files/patch-editors-vi.c | 34 | ||||
-rw-r--r-- | sysutils/busybox/files/patch-include-platform.h | 17 |
3 files changed, 54 insertions, 5 deletions
diff --git a/sysutils/busybox/Makefile b/sysutils/busybox/Makefile index 8fcb74c6b736..a7c34cbc7170 100644 --- a/sysutils/busybox/Makefile +++ b/sysutils/busybox/Makefile @@ -21,11 +21,9 @@ PLIST_FILES= bin/busybox .include <bsd.port.pre.mk> -.if ${ARCH} == "amd64" -BROKEN= does not compile -.elif ${OSVERSION} >= 800000 -BROKEN= does not compile -.endif +post-patch: + @${FIND} ${WRKSRC} -name '*.[ch]' | ${XARGS} \ + ${REINPLACE_CMD} -e 's/ dprintf(/ bb_dprintf(/g' do-configure: ${CP} ${FILESDIR}/data-.config ${WRKSRC}/.config diff --git a/sysutils/busybox/files/patch-editors-vi.c b/sysutils/busybox/files/patch-editors-vi.c new file mode 100644 index 000000000000..13d688c0cec1 --- /dev/null +++ b/sysutils/busybox/files/patch-editors-vi.c @@ -0,0 +1,34 @@ +--- editors/vi.c.orig 2008-11-09 17:28:21.000000000 +0000 ++++ editors/vi.c 2010-12-15 20:27:20.000000000 +0000 +@@ -383,6 +383,31 @@ + static int crashme = 0; + #endif + ++/* Test for existance of memrchr() */ ++ ++#include <sys/param.h> ++#if (__FreeBSD_version < 603103) || (__FreeBSD_version < 700109 && __FreeBSD_version >= 700000) || (__FreeBSD_version < 800034 && __FreeBSD_version >=800000) ++static void * ++memrchr(const void *buf, int c, size_t num) ++{ ++ unsigned char *pMem = (unsigned char *) buf; ++ ++ for (;;) { ++ if (num-- == 0) { ++ return NULL; ++ } ++ ++ if (*pMem-- == (unsigned char) c) { ++ break; ++ } ++ ++ } ++ ++ return (void *) (pMem + 1); ++ ++} ++#endif ++ + + static void write1(const char *out) + { diff --git a/sysutils/busybox/files/patch-include-platform.h b/sysutils/busybox/files/patch-include-platform.h new file mode 100644 index 000000000000..8f64523b1213 --- /dev/null +++ b/sysutils/busybox/files/patch-include-platform.h @@ -0,0 +1,17 @@ +--- include/platform.h.orig 2011-01-14 10:33:51.000000000 +0100 ++++ include/platform.h 2011-01-14 10:37:09.000000000 +0100 +@@ -224,12 +224,14 @@ + typedef long intmax_t; + typedef unsigned long uintmax_t; + #else ++#if !defined(__FreeBSD__) + __extension__ + typedef long long intmax_t; + __extension__ + typedef unsigned long long uintmax_t; + #endif + #endif ++#endif + + /* Size-saving "small" ints (arch-dependent) */ + #if defined(i386) || defined(__x86_64__) || defined(__mips__) || defined(__cris__) |