aboutsummaryrefslogtreecommitdiff
path: root/converters
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2001-03-13 09:48:11 +0000
committerWill Andrews <will@FreeBSD.org>2001-03-13 09:48:11 +0000
commit3c4896e2d7107a450e841ccad3e69ed3104606fb (patch)
tree3bd08e3a131f5cf2295dd3ff0b8bffaaca24bb0f /converters
parent0d5771b19528fb5d0a440e2141b52f3c5de68373 (diff)
Notes
Diffstat (limited to 'converters')
-rw-r--r--converters/kdesupport2/Makefile31
1 files changed, 27 insertions, 4 deletions
diff --git a/converters/kdesupport2/Makefile b/converters/kdesupport2/Makefile
index 78094ac43756..2cbfda0eb7e6 100644
--- a/converters/kdesupport2/Makefile
+++ b/converters/kdesupport2/Makefile
@@ -22,13 +22,36 @@ USE_BZIP2= yes
USE_NEWGCC= yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
+
+.include <bsd.port.pre.mk>
+
+# Hack to make pthread support work correctly. Even if we have a
+# libqt2-mt, it may not be wise to build with it if we don't have
+# a threads stub for X.
+.if exists(${X11BASE}/lib/libqt2-mt.so)
+.if exists(${X11BASE}/lib/libXThrStub.so)
+QTNAME= "qt2-mt"
+.if ${OSVERSION} >= 500016
+PTHREAD_CFLAGS= ""
+PTHREAD_LIBS= "-lc_r"
+.else
+PTHREAD_CFLAGS= "-D_THREAD_SAFE"
+PTHREAD_LIBS= "-pthread"
+.endif
+.else
+QTNAME= "qt2"
+PTHREAD_CFLAGS= ""
+PTHREAD_LIBS= ""
+.endif
+.endif
+
CONFIGURE_ARGS+=--with-qt-includes=${X11BASE}/include/qt2 \
--with-qt-libraries=${X11BASE}/lib \
--with-extra-libs=${LOCALBASE}/lib \
--without-audiofile
-CONFIGURE_ENV+= LIBQT="-lqt2" MOC="${MOC}" LIBQTFILE="libqt2" \
- CPPFLAGS="-I${LOCALBASE}/include -D_GETOPT_H" \
- LIBS="-Wl,-export-dynamic -L${LOCALBASE}/lib -ljpeg -lstdc++ -lgcc"
+CONFIGURE_ENV+= LIBQT="-l${QTNAME}" MOC="${MOC}" LIBQTFILE="lib${QTNAME}" \
+ CPPFLAGS="-I${LOCALBASE}/include -D_GETOPT_H ${PTHREAD_CFLAGS}" \
+ LIBS="-Wl,-export-dynamic -L${LOCALBASE}/lib -ljpeg -lstdc++ -lgcc ${PTHREAD_LIBS}"
USE_GMAKE= yes
pre-configure:
@@ -36,4 +59,4 @@ pre-configure:
s@odbc libaps@odbc@g" ${WRKSRC}/configure
${PERL} -pi -e "s@-version-info 1:1@-version-info 3:0@g" ${WRKSRC}/mimelib/Makefile.in
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>