aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/sge60
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2011-10-15 00:55:50 +0800
committerbrooks <brooks@FreeBSD.org>2011-10-15 00:55:50 +0800
commit093d32913eaf064b174ea5e7418fa023f734a20e (patch)
tree8d0e6e869dc17578cbd64d7dccfe6568df848b7c /sysutils/sge60
parent8fad5aa92112b93209258f9efe0c8a9f14c16dde (diff)
downloadfreebsd-ports-gnome-093d32913eaf064b174ea5e7418fa023f734a20e.tar.gz
freebsd-ports-gnome-093d32913eaf064b174ea5e7418fa023f734a20e.tar.zst
freebsd-ports-gnome-093d32913eaf064b174ea5e7418fa023f734a20e.zip
Fix build on 9.x systems with utmpx.h.
Diffstat (limited to 'sysutils/sge60')
-rw-r--r--sysutils/sge60/Makefile12
-rw-r--r--sysutils/sge60/files/patch-3rdparty_qtcsh_tc.who.c14
-rw-r--r--sysutils/sge60/files/qtcsh-config.h.diff12
3 files changed, 34 insertions, 4 deletions
diff --git a/sysutils/sge60/Makefile b/sysutils/sge60/Makefile
index 419c0bb8007d..cf4bde3e8ce7 100644
--- a/sysutils/sge60/Makefile
+++ b/sysutils/sge60/Makefile
@@ -85,10 +85,6 @@ EXCEPTFILES= arc_depend_irix.asc arc_depend_solaris.asc man testsuite
.include <bsd.port.pre.mk>
-.if ${OSVERSION} > 900007
-BROKEN= fails to build with new utmpx
-.endif
-
.if defined(WITH_BDB)
LIB_DEPENDS= db-4.2:${PORTSDIR}/databases/db42
PLIST_SUB+= BDB_SPOOL=
@@ -136,6 +132,14 @@ post-patch:
-e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
${WRKSRC}/aimk \
${WRKSRC}/dist/pvm/src/aimk
+.if ${OSVERSION} > 900007
+ @test \! -d ${WRKSRC}/3rdparty/qtcsh/${SGE_BUILD_ARCH} || \
+ (cd ${WRKSRC}/3rdparty/qtcsh/${SGE_BUILD_ARCH} && \
+ patch -p0 < ${FILESDIR}/qtcsh-config.h.diff)
+ @test -d ${WRKSRC}/3rdparty/qtcsh/${SGE_BUILD_ARCH} || \
+ (cd ${WRKSRC}/3rdparty/qtcsh/FREEBSD_I386 && \
+ patch -p0 < ${FILESDIR}/qtcsh-config.h.diff)
+.endif
@test -d ${WRKSRC}/3rdparty/qtcsh/${SGE_BUILD_ARCH} || \
(${CP} -r ${WRKSRC}/3rdparty/qtcsh/FREEBSD_I386 \
${WRKSRC}/3rdparty/qtcsh/${SGE_BUILD_ARCH} && \
diff --git a/sysutils/sge60/files/patch-3rdparty_qtcsh_tc.who.c b/sysutils/sge60/files/patch-3rdparty_qtcsh_tc.who.c
new file mode 100644
index 000000000000..6b97b9694975
--- /dev/null
+++ b/sysutils/sge60/files/patch-3rdparty_qtcsh_tc.who.c
@@ -0,0 +1,14 @@
+
+$FreeBSD: /tmp/pcvs/ports/sysutils/sge60/files/patch-3rdparty_qtcsh_tc.who.c,v 1.1 2011-10-14 16:55:50 brooks Exp $
+
+--- 3rdparty/qtcsh/tc.who.c.orig
++++ 3rdparty/qtcsh/tc.who.c
+@@ -56,7 +56,7 @@
+ # define _PATH_UTMP UTMPX_FILE
+ # endif /* _PATH_UTMP */
+ # define utmp utmpx
+-# ifndef INTERIX
++# if !defined(INTERIX) && !defined(FREEBSD)
+ # define ut_time ut_xtime
+ # else
+ # define ut_time ut_tv.tv_sec
diff --git a/sysutils/sge60/files/qtcsh-config.h.diff b/sysutils/sge60/files/qtcsh-config.h.diff
new file mode 100644
index 000000000000..d84417389c19
--- /dev/null
+++ b/sysutils/sge60/files/qtcsh-config.h.diff
@@ -0,0 +1,12 @@
+--- config.h.orig 2003-03-08 02:27:15.000000000 +0000
++++ config.h 2011-09-23 16:15:11.000000000 +0000
+@@ -147,5 +147,9 @@
+ # define NLS_CATALOGS
+ #endif
+
++#define HAVEUTMPX
++#define UTMPX_FILE "/var/run/utx.active"
++#define ut_name ut_user
++
+ #endif /* _h_config */
+ /* config.h.in. Generated automatically from configure.in by autoheader. */