2009-10-23 17:47:09 +02:00
|
|
|
# $NetBSD: Makefile.common,v 1.17 2009/10/23 15:47:09 tnn Exp $
|
2008-06-12 14:50:18 +02:00
|
|
|
# used by x11/qt4-libs/Makefile
|
2009-07-22 11:41:07 +02:00
|
|
|
# used by x11/qt4-docs/Makefile
|
2006-02-20 13:07:12 +01:00
|
|
|
|
|
|
|
DISTNAME= qt-x11-opensource-src-${QTVERSION}
|
|
|
|
CATEGORIES= x11
|
2009-07-10 21:30:15 +02:00
|
|
|
MASTER_SITES= http://get.qtsoftware.com/qt/source/ \
|
|
|
|
ftp://ftp.qtsoftware.com/qt/source/
|
2009-10-11 11:14:52 +02:00
|
|
|
#EXTRACT_SUFX= .tar.bz2
|
2006-02-20 13:07:12 +01:00
|
|
|
|
|
|
|
.include "../../x11/qt4/Makefile.common"
|
|
|
|
|
|
|
|
DISTINFO_FILE= ${.CURDIR}/../../x11/qt4-libs/distinfo
|
|
|
|
FILESDIR= ${.CURDIR}/../../x11/qt4-libs/files
|
|
|
|
PATCHDIR= ${.CURDIR}/../../x11/qt4-libs/patches
|
|
|
|
|
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
USE_LANGUAGES= c c++
|
|
|
|
USE_LIBTOOL= yes
|
|
|
|
USE_TOOLS+= gmake
|
|
|
|
|
|
|
|
QTPREFIX= ${PREFIX}/qt4
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= -prefix "${QTPREFIX}" -shared -sm
|
|
|
|
CONFIGURE_ARGS+= -release
|
|
|
|
CONFIGURE_ARGS+= -system-libjpeg
|
|
|
|
CONFIGURE_ARGS+= -system-libmng
|
|
|
|
CONFIGURE_ARGS+= -system-libpng
|
|
|
|
CONFIGURE_ARGS+= -system-zlib
|
|
|
|
CONFIGURE_ARGS+= -qt-gif # qt4 does not write compressed GIFs
|
|
|
|
CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-Wl*:S/-Wl,//}
|
2008-12-16 14:46:59 +01:00
|
|
|
CONFIGURE_ARGS+= -arch ${MACHINE_ARCH}
|
2008-07-24 14:55:20 +02:00
|
|
|
# current WebKit fails for missing pthread_getattr_np() in
|
|
|
|
# src/3rdparty/webkit/JavaScriptCore/kjs/collector.cpp
|
|
|
|
#CONFIGURE_ARGS+= -no-webkit
|
2006-02-20 13:07:12 +01:00
|
|
|
CONFIGURE_ARGS.SunOS+= -no-xrender
|
|
|
|
OPSYSVARS+= CONFIGURE_ARGS
|
|
|
|
CONFIGURE_ARGS+= < ${FILESDIR}/license-acceptance
|
|
|
|
|
|
|
|
LIBQT?= -lQtCore -lQtGui
|
|
|
|
|
|
|
|
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
|
2008-10-26 15:02:33 +01:00
|
|
|
MAKE_ENV+= QTDIR=${WRKSRC}
|
2006-02-20 13:07:12 +01:00
|
|
|
|
|
|
|
# avoid creating a .qt directory in the users home directory
|
2008-10-26 15:02:33 +01:00
|
|
|
SCRIPTS_ENV+= HOME=${WRKDIR}
|
2006-02-20 13:07:12 +01:00
|
|
|
|
|
|
|
.include "../../mk/compiler.mk"
|
|
|
|
|
|
|
|
.if !empty(CC_VERSION:Mgcc*)
|
|
|
|
CONFIGURE_ARGS+= -no-g++-exceptions
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
. if !empty(CC_VERSION:Mgcc*)
|
2008-01-31 18:37:25 +01:00
|
|
|
. if ${ABI:U} == "64"
|
2008-01-28 11:13:55 +01:00
|
|
|
CONFIGURE_ARGS+= -platform solaris-g++-64
|
|
|
|
. else
|
2006-02-20 13:07:12 +01:00
|
|
|
CONFIGURE_ARGS+= -platform solaris-g++
|
2008-01-28 11:13:55 +01:00
|
|
|
. endif
|
2006-02-20 13:07:12 +01:00
|
|
|
. else
|
2008-01-31 18:37:25 +01:00
|
|
|
. if ${ABI:U} == "64"
|
2008-01-28 11:13:55 +01:00
|
|
|
CONFIGURE_ARGS+= -platform solaris-cc-64
|
|
|
|
. else
|
2006-02-20 13:07:12 +01:00
|
|
|
CONFIGURE_ARGS+= -platform solaris-cc
|
2008-01-28 11:13:55 +01:00
|
|
|
. endif
|
2006-02-20 13:07:12 +01:00
|
|
|
. endif
|
|
|
|
SYS_LIBS= -lresolv -lsocket -lnsl -lrt
|
|
|
|
.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
|
|
|
|
SYS_LIBS= -lbind -ldb -ldl
|
|
|
|
.elif ${OPSYS} == "DragonFly"
|
|
|
|
CONFIGURE_ARGS+= -platform freebsd-g++
|
|
|
|
.elif ${OPSYS} == "Darwin"
|
|
|
|
QMAKE_RANLIB= ${RANLIB}
|
|
|
|
. if exists(/usr/lib/libresolv.dylib)
|
|
|
|
LDFLAGS+= -lresolv
|
|
|
|
. endif
|
2009-10-23 17:47:09 +02:00
|
|
|
.elif ${OPSYS} == "Linux"
|
|
|
|
LDFLAGS+= -ldl
|
2006-02-20 13:07:12 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
QMAKE_RANLIB?= ${TRUE}
|
|
|
|
|
2007-01-15 20:16:36 +01:00
|
|
|
.if ${X11_TYPE} != "native"
|
|
|
|
.include "../../x11/libXinerama/buildlink3.mk"
|
|
|
|
.elif !exists(${X11BASE}/lib/libXinerama.so) && \
|
2006-03-01 22:10:55 +01:00
|
|
|
!exists(${X11BASE}/lib/libXinerama.dylib)
|
2006-02-20 13:07:12 +01:00
|
|
|
CONFIGURE_ARGS+= -no-xinerama
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include "options.mk"
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
.if !empty(CC_VERSION:Mgcc-2.8*)
|
|
|
|
CXXFLAGS+= -DQ_INLINE_TEMPLATES=inline
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
2007-03-18 18:34:41 +01:00
|
|
|
sed -e 's:@LOCALBASE@:${LOCALBASE:Q}:g' \
|
|
|
|
-e 's:@X11BASE@:${X11BASE:Q}:g' \
|
|
|
|
-e 's:@X11PREFIX@:${X11PREFIX:Q}:g' \
|
|
|
|
-e 's:@LIBTOOL@:${LIBTOOL:Q}:g' \
|
|
|
|
-e 's:@CC@:${CC:Q}:g' \
|
|
|
|
-e 's:@CXX@:${CXX:Q}:g' \
|
|
|
|
-e 's:@LDFLAGS@:${LDFLAGS:Q}:g' \
|
|
|
|
-e 's:@CFLAGS@:${CFLAGS:Q}:g' \
|
|
|
|
-e 's:@CXXFLAGS@:${CXXFLAGS:Q}:g' \
|
|
|
|
-e 's:@SYS_LIBS@:${SYS_LIBS:Q}:g' \
|
|
|
|
-e 's:@LEX@:${LEX:Q}:g' \
|
|
|
|
-e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \
|
|
|
|
-e 's:@AR@:${AR:Q}:g' \
|
|
|
|
-e 's:@MKDIR@:${MKDIR:Q}:g' \
|
|
|
|
-e 's:@LIBQT@:${LIBQT:Q}:g' \
|
|
|
|
-e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS:Q}:g' \
|
|
|
|
-e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \
|
|
|
|
-e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG:Q}:g' \
|
|
|
|
-e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \
|
2006-02-20 13:07:12 +01:00
|
|
|
${FILESDIR}/qmake.conf > ${WRKSRC}/qmake.conf
|
|
|
|
for dir in ${WRKSRC}/mkspecs/*; do \
|
2007-03-18 18:34:41 +01:00
|
|
|
cp ${WRKSRC}/qmake.conf $${dir}; \
|
|
|
|
rm -f $${dir}/*.orig; \
|
2006-02-20 13:07:12 +01:00
|
|
|
done
|