USE_CUPS. Patch similar to that described by Bob Bernstein and Jeremy C. Reed in tech-pkg@. Fixes PR 26261 from Ian Zagorskih.
104 lines
2.7 KiB
Text
104 lines
2.7 KiB
Text
# $NetBSD: Makefile.common,v 1.32 2004/07/13 13:14:41 markd Exp $
|
|
#
|
|
DISTNAME= qt-x11-free-${QTVERSION}
|
|
CATEGORIES= x11
|
|
MASTER_SITES= ftp://ftp.trolltech.com/qt/source/ \
|
|
ftp://ftp.bero.org/pub/qt/source/
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
.include "../qt3/Makefile.common"
|
|
|
|
DISTINFO_FILE= ${.CURDIR}/../../x11/qt3-libs/distinfo
|
|
FILESDIR= ${.CURDIR}/../../x11/qt3-libs/files
|
|
PATCHDIR= ${.CURDIR}/../../x11/qt3-libs/patches
|
|
|
|
HAS_CONFIGURE= yes
|
|
USE_X11= yes
|
|
USE_GNU_TOOLS+= make
|
|
USE_LANGUAGES= c c++
|
|
USE_LIBTOOL= yes
|
|
|
|
USE_GNU_TOOLS+= awk
|
|
|
|
QTPREFIX= ${PREFIX}/qt3
|
|
|
|
CONFIGURE_ARGS+= -prefix ${QTPREFIX}
|
|
CONFIGURE_ARGS+= -shared -sm -thread -no-stl \
|
|
-system-zlib -system-libpng \
|
|
-system-libmng -system-libjpeg \
|
|
${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-Wl*:S/-Wl,//}
|
|
CONFIGURE_ARGS+= -qt-gif # qt3 does not write compressed GIFs
|
|
|
|
CONFIGURE_ARGS+= < ${FILESDIR}/license-acceptance
|
|
|
|
LIBQT?= -lqt-mt
|
|
|
|
MAKE_ENV+= QTPREFIX=${QTPREFIX}
|
|
MAKE_ENV+= QTDIR="${WRKSRC}"
|
|
|
|
# avoid creating a .qt directory in the users home
|
|
# directory
|
|
SCRIPTS_ENV+= HOME="${WRKDIR}"
|
|
|
|
.include "../../mk/compiler.mk"
|
|
|
|
.if !empty(CC_VERSION:Mgcc*)
|
|
CONFIGURE_ARGS+= -no-g++-exceptions
|
|
.endif
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
CONFIGURE_SCRIPT= ${SH} ./configure
|
|
. if !empty(CC_VERSION:Mgcc*)
|
|
CONFIGURE_ARGS+= -platform solaris-g++
|
|
. else
|
|
CONFIGURE_ARGS+= -platform solaris-cc
|
|
. endif
|
|
SYS_LIBS= -lresolv -lsocket -lnsl -lrt
|
|
.endif
|
|
|
|
.if !exists(${X11BASE}/lib/libXinerama.so)
|
|
CONFIGURE_ARGS+= -no-xinerama
|
|
.endif
|
|
|
|
.if defined(USE_CUPS) && !empty(USE_CUPS:M[yY][eE][sS])
|
|
. include "../../print/cups/buildlink3.mk"
|
|
CONFIGURE_ARGS+= -cups
|
|
.else
|
|
CONFIGURE_ARGS+= -no-cups
|
|
.endif
|
|
BUILD_DEFS+= USE_CUPS
|
|
|
|
#
|
|
# 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
|
|
|
|
post-patch:
|
|
${SED} \
|
|
-e 's:@LOCALBASE@:${LOCALBASE}:g' \
|
|
-e 's:@X11BASE@:${X11BASE}:g' \
|
|
-e 's:@X11PREFIX@:${X11PREFIX}:g' \
|
|
-e 's:@LIBTOOL@:${LIBTOOL}:g' \
|
|
-e 's:@CC@:${CC}:g' \
|
|
-e 's:@CXX@:${CXX}:g' \
|
|
-e 's:@LDFLAGS@:${LDFLAGS}:g' \
|
|
-e 's:@CFLAGS@:${CFLAGS}:g' \
|
|
-e 's:@CXXFLAGS@:${CXXFLAGS}:g' \
|
|
-e 's:@SYS_LIBS@:${SYS_LIBS}:g' \
|
|
-e 's:@LEX@:${LEX}:g' \
|
|
-e 's:@YACC@:${YACC}:g' \
|
|
-e 's:@AR@:${AR}:g' \
|
|
-e 's:@LIBQT@:${LIBQT}:g' \
|
|
-e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS}:g' \
|
|
-e 's:@_COMPILER_LD_FLAG@:${_COMPILER_LD_FLAG}:g' \
|
|
-e 's:@_OPSYS_RPATH_NAME@:${_OPSYS_RPATH_NAME}:g' \
|
|
${FILESDIR}/qmake.conf > ${WRKSRC}/qmake.conf
|
|
for dir in ${WRKSRC}/mkspecs/*; do \
|
|
${CP} ${WRKSRC}/qmake.conf $${dir}; \
|
|
done
|