From b4c1a2aa2a0fba24487f98ed973477bcb9fc480b Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 23 Sep 2011 16:24:56 +0000 Subject: Fix build of qtcsh on with utmpx.h in 9.0. --- sysutils/sge62/Makefile | 8 ++++++-- sysutils/sge62/files/patch-3rdparty_qtcsh_tc.who.c | 14 ++++++++++++++ sysutils/sge62/files/qtcsh-config.h.diff | 12 ++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 sysutils/sge62/files/patch-3rdparty_qtcsh_tc.who.c create mode 100644 sysutils/sge62/files/qtcsh-config.h.diff (limited to 'sysutils') diff --git a/sysutils/sge62/Makefile b/sysutils/sge62/Makefile index 6253cfb634cc..bfe14795266d 100644 --- a/sysutils/sge62/Makefile +++ b/sysutils/sge62/Makefile @@ -88,8 +88,6 @@ EXCEPTFILES= arc_depend_irix.asc arc_depend_solaris.asc man testsuite .if ${ARCH} == "sparc64" BROKEN= Does not configure on sparc64 -.elif ${OSVERSION} > 900007 -BROKEN= fails to build with new utmpx .endif .if defined(WITH_BDB) @@ -125,6 +123,12 @@ post-patch: -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \ ${WRKSRC}/aimk \ ${WRKSRC}/dist/pvm/src/aimk + @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) @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/sge62/files/patch-3rdparty_qtcsh_tc.who.c b/sysutils/sge62/files/patch-3rdparty_qtcsh_tc.who.c new file mode 100644 index 000000000000..3326fdfe7af3 --- /dev/null +++ b/sysutils/sge62/files/patch-3rdparty_qtcsh_tc.who.c @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- 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/sge62/files/qtcsh-config.h.diff b/sysutils/sge62/files/qtcsh-config.h.diff new file mode 100644 index 000000000000..d84417389c19 --- /dev/null +++ b/sysutils/sge62/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. */ -- cgit v1.2.3