2009-07-11 11:11:13 +02:00
|
|
|
# $NetBSD: Makefile.common,v 1.71 2009/07/11 09:11:13 rillig Exp $
|
|
|
|
# used by x11/qt3-docs/Makefile
|
2006-02-18 00:24:17 +01:00
|
|
|
|
|
|
|
DISTNAME= qt-x11-free-${QTVERSION}
|
|
|
|
CATEGORIES= x11
|
|
|
|
MASTER_SITES= ftp://ftp.trolltech.com/qt/source/ \
|
2007-03-19 13:30:46 +01:00
|
|
|
ftp://ftp.bero.org/pub/qt/source/ \
|
|
|
|
http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/
|
2006-02-18 00:24:17 +01:00
|
|
|
EXTRACT_SUFX= .tar.bz2
|
2002-01-07 09:07:57 +01:00
|
|
|
|
2005-11-01 21:18:36 +01:00
|
|
|
.include "../../x11/qt3/Makefile.common"
|
2002-01-07 09:07:57 +01:00
|
|
|
|
2002-09-20 11:15:26 +02:00
|
|
|
DISTINFO_FILE= ${.CURDIR}/../../x11/qt3-libs/distinfo
|
|
|
|
FILESDIR= ${.CURDIR}/../../x11/qt3-libs/files
|
|
|
|
PATCHDIR= ${.CURDIR}/../../x11/qt3-libs/patches
|
|
|
|
|
2002-01-07 09:07:57 +01:00
|
|
|
HAS_CONFIGURE= yes
|
2005-05-23 00:06:28 +02:00
|
|
|
USE_TOOLS+= gmake
|
2004-02-02 14:02:49 +01:00
|
|
|
USE_LANGUAGES= c c++
|
2002-01-07 09:07:57 +01:00
|
|
|
USE_LIBTOOL= yes
|
2003-03-11 14:02:06 +01:00
|
|
|
|
|
|
|
QTPREFIX= ${PREFIX}/qt3
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= -prefix ${QTPREFIX}
|
2006-02-18 00:24:17 +01:00
|
|
|
CONFIGURE_ARGS+= -shared -sm -thread \
|
2002-01-07 09:07:57 +01:00
|
|
|
-system-zlib -system-libpng \
|
2004-03-30 23:50:19 +02:00
|
|
|
-system-libmng -system-libjpeg \
|
2007-12-17 19:21:31 +01:00
|
|
|
${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-Wl*:S/-Wl,//:S/-dylib_file//:C/.*\.dylib\:.*\.dylib//}
|
2002-01-07 09:07:57 +01:00
|
|
|
CONFIGURE_ARGS+= -qt-gif # qt3 does not write compressed GIFs
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= < ${FILESDIR}/license-acceptance
|
|
|
|
|
2003-02-18 20:16:53 +01:00
|
|
|
LIBQT?= -lqt-mt
|
2002-01-07 09:07:57 +01:00
|
|
|
|
2005-12-05 21:49:47 +01:00
|
|
|
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
|
2007-02-22 20:26:05 +01:00
|
|
|
MAKE_ENV+= QTDIR=${WRKSRC:Q}
|
2002-01-07 09:07:57 +01:00
|
|
|
|
2002-08-28 10:33:07 +02:00
|
|
|
# avoid creating a .qt directory in the users home
|
|
|
|
# directory
|
|
|
|
SCRIPTS_ENV+= HOME="${WRKDIR}"
|
|
|
|
|
2004-02-18 14:33:40 +01:00
|
|
|
.include "../../mk/compiler.mk"
|
2002-09-20 11:15:26 +02:00
|
|
|
|
2003-09-28 07:27:06 +02:00
|
|
|
.if !empty(CC_VERSION:Mgcc*)
|
|
|
|
CONFIGURE_ARGS+= -no-g++-exceptions
|
|
|
|
.endif
|
|
|
|
|
2002-09-20 11:15:26 +02:00
|
|
|
.if ${OPSYS} == "SunOS"
|
2003-09-28 03:34:40 +02:00
|
|
|
. if !empty(CC_VERSION:Mgcc*)
|
2002-09-20 11:15:26 +02:00
|
|
|
CONFIGURE_ARGS+= -platform solaris-g++
|
2003-09-28 03:34:40 +02:00
|
|
|
. else
|
|
|
|
CONFIGURE_ARGS+= -platform solaris-cc
|
|
|
|
. endif
|
2004-01-11 13:27:41 +01:00
|
|
|
SYS_LIBS= -lresolv -lsocket -lnsl -lrt
|
2008-02-16 23:41:31 +01:00
|
|
|
.elif ${OPSYS} == "HPUX"
|
|
|
|
. if !empty(CC_VERSION:Mgcc*)
|
|
|
|
CONFIGURE_ARGS+= -platform hpux-g++
|
|
|
|
. else
|
|
|
|
CONFIGURE_ARGS+= -platform hpux-acc
|
|
|
|
. endif
|
2004-10-13 04:08:43 +02:00
|
|
|
.elif ${OPSYS} == "Interix"
|
|
|
|
CONFIGURE_ARGS+= -platform interix-g++
|
|
|
|
CFLAGS+= -I/usr/local/include/bind
|
|
|
|
LDFLAGS+= -L/usr/local/lib/bind -lbind
|
|
|
|
BUILDLINK_PASSTHRU_DIRS+=/usr/local/include/bind /usr/local/lib/bind
|
2004-10-13 17:15:52 +02:00
|
|
|
SYS_LIBS= -lbind -ldb -ldl
|
2005-05-17 17:34:46 +02:00
|
|
|
.elif ${OPSYS} == "DragonFly"
|
|
|
|
CONFIGURE_ARGS+= -platform freebsd-g++
|
2005-07-01 03:10:06 +02:00
|
|
|
.elif ${OPSYS} == "Darwin"
|
|
|
|
QMAKE_RANLIB= ${RANLIB}
|
|
|
|
. if exists(/usr/lib/libresolv.dylib)
|
|
|
|
LDFLAGS+= -lresolv
|
|
|
|
. endif
|
2002-09-20 11:15:26 +02:00
|
|
|
.endif
|
|
|
|
|
2006-07-26 15:30:24 +02:00
|
|
|
CONFIGURE_ARGS+= -verbose
|
|
|
|
|
2005-07-01 03:10:06 +02:00
|
|
|
QMAKE_RANLIB?= ${TRUE}
|
|
|
|
|
2007-06-15 19:30:43 +02:00
|
|
|
.if ${X11_TYPE} != "native"
|
2007-01-10 11:16:01 +01:00
|
|
|
.include "../../x11/libXinerama/buildlink3.mk"
|
|
|
|
.elif !exists(${X11BASE}/lib/libXinerama.so) && \
|
2006-02-25 04:55:57 +01:00
|
|
|
!exists(${X11BASE}/lib/libXinerama.dylib)
|
2003-03-11 14:02:06 +01:00
|
|
|
CONFIGURE_ARGS+= -no-xinerama
|
|
|
|
.endif
|
2002-05-29 21:09:55 +02:00
|
|
|
|
2005-06-01 21:30:29 +02:00
|
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.qt3
|
2005-11-17 05:33:20 +01:00
|
|
|
PKG_SUPPORTED_OPTIONS= cups debug
|
2007-10-15 13:59:49 +02:00
|
|
|
PKG_SUPPORTED_OPTIONS+= inet6
|
2005-06-01 21:30:29 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.options.mk"
|
|
|
|
|
2007-10-15 13:59:49 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Minet6)
|
|
|
|
CONFIGURE_ARGS+= -ipv6
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= -no-ipv6
|
|
|
|
.endif
|
|
|
|
|
2005-06-01 21:30:29 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Mcups)
|
2004-07-13 15:14:41 +02:00
|
|
|
. include "../../print/cups/buildlink3.mk"
|
2004-08-11 16:18:12 +02:00
|
|
|
CONFIGURE_ARGS+= -cups
|
2004-07-13 15:14:41 +02:00
|
|
|
.else
|
2004-08-11 16:18:12 +02:00
|
|
|
CONFIGURE_ARGS+= -no-cups
|
2004-07-13 15:14:41 +02:00
|
|
|
.endif
|
|
|
|
|
2005-11-17 05:33:20 +01:00
|
|
|
.if !empty(PKG_OPTIONS:Mdebug)
|
|
|
|
CC+= -ggdb
|
|
|
|
CXX+= -ggdb
|
|
|
|
CONFIGURE_ARGS+= --debug
|
|
|
|
INSTALL_UNSTRIPPED= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
2002-09-20 11:15:26 +02:00
|
|
|
#
|
|
|
|
# Reverse the change to how templates are handled made between 3.0.4
|
|
|
|
# and 3.0.5 for older toolchains. Removing inline for newer toolchains
|
|
|
|
# produces smaller code. Removing inline for older toolchains prod-
|
|
|
|
# uces buggy code.
|
2003-05-06 19:40:18 +02:00
|
|
|
#
|
2002-01-07 09:07:57 +01:00
|
|
|
|
2003-09-28 03:34:40 +02:00
|
|
|
.if !empty(CC_VERSION:Mgcc-2.8*)
|
2002-09-20 11:15:26 +02:00
|
|
|
CXXFLAGS+= -DQ_INLINE_TEMPLATES=inline
|
2002-01-07 09:07:57 +01:00
|
|
|
.endif
|
|
|
|
|
2005-06-22 23:14:45 +02:00
|
|
|
pre-configure:
|
2002-01-07 09:07:57 +01:00
|
|
|
${SED} \
|
2002-08-25 20:38:05 +02:00
|
|
|
-e 's:@LOCALBASE@:${LOCALBASE}:g' \
|
|
|
|
-e 's:@X11BASE@:${X11BASE}:g' \
|
|
|
|
-e 's:@X11PREFIX@:${X11PREFIX}:g' \
|
2004-02-08 05:03:14 +01:00
|
|
|
-e 's:@LIBTOOL@:${LIBTOOL}:g' \
|
|
|
|
-e 's:@CC@:${CC}:g' \
|
|
|
|
-e 's:@CXX@:${CXX}:g' \
|
2007-12-17 19:21:31 +01:00
|
|
|
-e 's:@LDFLAGS@:${LDFLAGS:S/:/\\:/g}:g' \
|
2002-01-07 09:07:57 +01:00
|
|
|
-e 's:@CFLAGS@:${CFLAGS}:g' \
|
|
|
|
-e 's:@CXXFLAGS@:${CXXFLAGS}:g' \
|
2002-10-01 15:25:35 +02:00
|
|
|
-e 's:@SYS_LIBS@:${SYS_LIBS}:g' \
|
2002-01-07 09:07:57 +01:00
|
|
|
-e 's:@LEX@:${LEX}:g' \
|
2005-07-18 04:33:27 +02:00
|
|
|
-e 's:@YACC@:${TOOLS_CMDLINE_YACC}:g' \
|
2003-03-18 09:36:22 +01:00
|
|
|
-e 's:@AR@:${AR}:g' \
|
2004-10-19 15:27:48 +02:00
|
|
|
-e 's:@MKDIR@:${MKDIR}:g' \
|
2003-02-18 20:16:53 +01:00
|
|
|
-e 's:@LIBQT@:${LIBQT}:g' \
|
2003-10-05 12:07:09 +02:00
|
|
|
-e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS}:g' \
|
2004-11-12 07:39:19 +01:00
|
|
|
-e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS}:g' \
|
2004-08-27 20:44:11 +02:00
|
|
|
-e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \
|
2005-07-01 03:10:06 +02:00
|
|
|
-e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB}:g' \
|
2002-01-07 09:07:57 +01:00
|
|
|
${FILESDIR}/qmake.conf > ${WRKSRC}/qmake.conf
|
|
|
|
for dir in ${WRKSRC}/mkspecs/*; do \
|
|
|
|
${CP} ${WRKSRC}/qmake.conf $${dir}; \
|
2004-10-30 15:28:40 +02:00
|
|
|
${RM} -f $${dir}/*.orig; \
|
2002-01-07 09:07:57 +01:00
|
|
|
done
|