aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/coreutils
diff options
context:
space:
mode:
authorkoitsu <koitsu@FreeBSD.org>2008-08-28 20:06:21 +0800
committerkoitsu <koitsu@FreeBSD.org>2008-08-28 20:06:21 +0800
commit50083cb310720ee3a70538e28e92170e05c89262 (patch)
treeab0827a98c7d5daa956e39efdbfa289a4157a226 /sysutils/coreutils
parentbc0f9463708470321df21c3c127650f066ee8760 (diff)
downloadfreebsd-ports-gnome-50083cb310720ee3a70538e28e92170e05c89262.tar.gz
freebsd-ports-gnome-50083cb310720ee3a70538e28e92170e05c89262.tar.zst
freebsd-ports-gnome-50083cb310720ee3a70538e28e92170e05c89262.zip
Fix-up for 8.0-CURRENT. src/stty.c fails to compile due to TAB1 and TAB2
termios bits being undefined. They've been moved to sys/ioctl_compat.h which requires _KERNEL be defined. Somewhat of an ugly hack; possible alternative would be to remove use of TAB1 and TAB2 in src/stty.c altogether. Reported by: jsa @ EFnet
Diffstat (limited to 'sysutils/coreutils')
-rw-r--r--sysutils/coreutils/Makefile8
-rw-r--r--sysutils/coreutils/files/extra-patch-stty.c16
2 files changed, 23 insertions, 1 deletions
diff --git a/sysutils/coreutils/Makefile b/sysutils/coreutils/Makefile
index 5d1bd0397d40..dbee798a8611 100644
--- a/sysutils/coreutils/Makefile
+++ b/sysutils/coreutils/Makefile
@@ -50,6 +50,12 @@ MAN1= gbasename.1 gcat.1 gchgrp.1 gchmod.1 gchown.1 gchroot.1 gcksum.1 \
gwc.1 gwho.1 gwhoami.1 gyes.1 gbase64.1 gsha224sum.1 gsha256sum.1 \
gsha384sum.1 gsha512sum.1 gshuf.1
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 800000
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-stty.c
+.endif
+
post-patch:
.if !defined(WITH_SUID)
@${REINPLACE_CMD} -e "s/u\+s/u\+w/g" ${WRKSRC}/src/Makefile.in
@@ -61,4 +67,4 @@ post-build:
regression-test: build
(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} check)
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/sysutils/coreutils/files/extra-patch-stty.c b/sysutils/coreutils/files/extra-patch-stty.c
new file mode 100644
index 000000000000..8734e33e9665
--- /dev/null
+++ b/sysutils/coreutils/files/extra-patch-stty.c
@@ -0,0 +1,16 @@
+--- src/stty.c.orig 2007-03-18 14:36:43.000000000 -0700
++++ src/stty.c 2008-08-28 04:43:28.000000000 -0700
+@@ -45,6 +45,13 @@
+ #endif
+ #ifdef HAVE_SYS_IOCTL_H
+ # include <sys/ioctl.h>
++/*
++ * XXX - Workaround for missing TAB1 and TAB2 bits on 8.0-CURRENT;
++ * available in src/ioctl_compat.h, only when _KERNEL is defined.
++ */
++# define _KERNEL
++# include <sys/ioctl_compat.h>
++# undef _KERNEL
+ #endif
+
+ #ifdef WINSIZE_IN_PTEM