aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2010-08-15 06:37:29 +0800
committerarved <arved@FreeBSD.org>2010-08-15 06:37:29 +0800
commit21d24447e57f4671807e82fc750f3b717f7c568f (patch)
treea600c47ac1717d80c20e7bac57cc19a9e3e70ba8
parenta74dd3743c6e02e2f234916d83e5f2e0eaef85d4 (diff)
downloadfreebsd-ports-gnome-21d24447e57f4671807e82fc750f3b717f7c568f.tar.gz
freebsd-ports-gnome-21d24447e57f4671807e82fc750f3b717f7c568f.tar.zst
freebsd-ports-gnome-21d24447e57f4671807e82fc750f3b717f7c568f.zip
Second attempt to unbreak this port,
instead of guessing the correct FreeBSD version values write a configure macro to detect it.
-rw-r--r--audio/terminatorx/Makefile9
-rw-r--r--audio/terminatorx/files/patch-configure20
-rw-r--r--audio/terminatorx/files/patch-configure.in53
-rw-r--r--audio/terminatorx/files/patch-src::tX_dialog.cc14
4 files changed, 69 insertions, 27 deletions
diff --git a/audio/terminatorx/Makefile b/audio/terminatorx/Makefile
index 8bf0f0b53cc6..044b6189b590 100644
--- a/audio/terminatorx/Makefile
+++ b/audio/terminatorx/Makefile
@@ -21,14 +21,13 @@ LIB_DEPENDS= audiofile.0:${PORTSDIR}/audio/libaudiofile \
lrdf.2:${PORTSDIR}/textproc/liblrdf \
jack.0:${PORTSDIR}/audio/jack
-BROKEN= does not compile
-
USE_BZIP2= yes
INSTALLS_OMF= yes
-USE_XORG= x11 xext xi xxf86dga
+USE_XORG= x11 xext xi xxf86dga ice sm
USE_GNOME= gnomehack gnomeprefix gnometarget gtk20 libxml2
USE_GMAKE= yes
GNU_CONFIGURE= yes
+USE_AUTOTOOLS= autoconf:262 autoheader:262
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
CONFIGURE_ARGS= --disable-alsa \
@@ -75,10 +74,6 @@ post-patch:
's|malloc\.h|stdlib.h|g'
@${GREP} -lR "%%LOCALBASE%%" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
's|%%LOCALBASE%%|${LOCALBASE}|g'
-.if ${OSVERSION} <= 800501
- ${REINPLACE_CMD} -e "s,only(struct dirent,only(const struct dirent," \
- ${WRKSRC}/src/tX_dialog.cc
-.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/terminatorX ${PREFIX}/bin
diff --git a/audio/terminatorx/files/patch-configure b/audio/terminatorx/files/patch-configure
deleted file mode 100644
index 67c50cb4ee23..000000000000
--- a/audio/terminatorx/files/patch-configure
+++ /dev/null
@@ -1,20 +0,0 @@
---- configure.orig Wed Nov 3 23:41:09 2004
-+++ configure Thu Nov 4 13:35:03 2004
-@@ -8456,6 +8456,8 @@
- echo "${ECHO_T}Found GNOME - installing terminatorX.desktop." >&6
- OPTION_GNOME="yes"
- else
-+ GNOMEpresent_TRUE='#'
-+ GNOMEpresent_FALSE=
- echo "$as_me:$LINENO: result: GNOME not found." >&5
- echo "${ECHO_T}GNOME not found." >&6
- fi
-@@ -8594,7 +8596,7 @@
-
-
- if test "$prefix" != "NONE"; then
-- xml_man="\\\"$datadir/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml\\\""
-+ xml_man="\\\"$datadir/help/terminatorX/C/terminatorX.xml\\\""
- else
- xml_man="\\\"/usr/local/share/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml\\\""
- fi
diff --git a/audio/terminatorx/files/patch-configure.in b/audio/terminatorx/files/patch-configure.in
new file mode 100644
index 000000000000..4fc362b786ea
--- /dev/null
+++ b/audio/terminatorx/files/patch-configure.in
@@ -0,0 +1,53 @@
+--- configure.in.orig 2010-08-14 21:50:15.000000000 +0200
++++ configure.in 2010-08-14 21:53:26.000000000 +0200
+@@ -118,6 +118,32 @@
+ AC_MSG_ERROR([** failed to detect pthreads implementation **])
+ fi
+
++AC_CHECK_FUNC(scandir,
++ if test "x$uname" = xSunOS -o "x$uname" = xQNX; then
++ AC_MSG_WARN(Not using $uname scandir emulation function.)
++ else
++ AC_DEFINE(HAVE_SCANDIR, 1, [Has scandir])
++ fi)
++
++dnl Do we have the POSIX compatible scandir() prototype?
++AC_CACHE_CHECK([whether we have the POSIX compatible scandir() prototype],
++ ac_cv_cxx_scandir_posix,[
++ AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ AC_TRY_COMPILE([
++ #include <dirent.h>
++ int func (const char *d, dirent ***list, void *sort) {
++ int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
++ }
++ ],[
++ ], ac_cv_cxx_scandir_posix=yes, ac_cv_cxx_scandir_posix=no)
++ AC_LANG_RESTORE
++ ])
++
++if test "$ac_cv_cxx_scandir_posix" = yes; then
++ AC_DEFINE(HAVE_SCANDIR_POSIX, 1, [scandir conforms to POSIX])
++fi
++
+ dnl GTK+ search. Enable FileChooser for gtk+>=2.4
+
+ AM_PATH_GTK_2_0(, [
+@@ -490,6 +516,8 @@
+ AC_MSG_RESULT([Found GNOME - installing terminatorX.desktop.])
+ OPTION_GNOME="yes"
+ else
++ GNOMEpresent_TRUE='#'
++ GNOMEpresent_FALSE=
+ AC_MSG_RESULT([GNOME not found.])
+ fi
+ AM_CONDITIONAL(GNOMEpresent, test "$gnomepresent" = yes)
+@@ -544,7 +572,7 @@
+ AC_SUBST(XML_CFLAGS)
+
+ if test "$prefix" != "NONE"; then
+- xml_man="\\\"$datadir/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml\\\""
++ xml_man="\\\"$datadir/help/terminatorX/C/terminatorX.xml\\\""
+ else
+ xml_man="\\\"/usr/local/share/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml\\\""
+ fi
diff --git a/audio/terminatorx/files/patch-src::tX_dialog.cc b/audio/terminatorx/files/patch-src::tX_dialog.cc
new file mode 100644
index 000000000000..a69700179d6b
--- /dev/null
+++ b/audio/terminatorx/files/patch-src::tX_dialog.cc
@@ -0,0 +1,14 @@
+--- src/tX_dialog.cc.orig 2004-02-06 19:28:21.000000000 +0100
++++ src/tX_dialog.cc 2010-08-14 22:00:50.000000000 +0200
+@@ -252,7 +252,11 @@
+ #ifdef USE_OSS
+ static GList *oss_devices=NULL;
+
++#ifdef HAVE_SCANDIR_POSIX
+ int oss_select_dsp_only(const struct dirent *entry){
++#else
++int oss_select_dsp_only(struct dirent *entry){
++#endif
+ return (strstr(entry->d_name, "dsp")!=0);
+ }
+