1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-31 21:57:12 +00:00
freebsd-ports/x11-toolkits/qt31/Makefile
Will Andrews a29b482458 Update QT2 to 2.2.4: Re-add USE_MESA, remove antialiasing patch, remove
default -j2 (but keep MAKE_JOBS var), restore old perl REs as soon as I'd
learned how to do multiple ones, remove QPL license file from packaging,
sync with newest KOI8-U/R stuff (not tested).  The biggest bonus:  split
QT Designer into its own port, and make the qt22/qt-designer pair a member
of the master-slave ports legion, hopefully to reduce redundancy as much
as possible.  This should also save roughly 20 minutes of compile time on
a dual PIII-600 for those that don't need or want QT Designer.  UIC is,
however, still installed/compiled by the default Qt 2.2.4 (as it _is_
required for other things e.g. KDE2).

USE_MESA may break KDE2.  Hopefully, now that the port does install both
the threaded and non-threaded versions of QT, it won't.  But until the
next release of KDE2, I'm not gonna bother testing to see.

USE_MESA repeatedly requested by:	sobomax
2001-02-04 04:43:14 +00:00

129 lines
3.8 KiB
Makefile

# New ports collection makefile for: qt22
# Date created: 17 Jul 1999
# Whom: imura@kml.cs.titech.ac.jp
#
# $FreeBSD$
#
PORTNAME?= qt
PORTVERSION?= 2.2.4
CATEGORIES?= x11-toolkits
MASTER_SITES= ftp://ftp.trolltech.com/qt/source/
DISTNAME= qt-x11-${PORTVERSION}
MAINTAINER= will@FreeBSD.org
LIB_DEPENDS= mng.0:${PORTSDIR}/graphics/libmng \
png.4:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg
YES?= /usr/bin/yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_MESA= yes
USE_GMAKE= yes
USE_X_PREFIX= yes
USE_NEWGCC= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= -system-zlib -system-libpng -system-jpeg -sm -gif \
-system-libmng -thread \
-I${LOCALBASE}/include -L${LOCALBASE}/lib
CONFIGURE_ENV= ${YES} yes | QTDIR=${WRKSRC}
.if defined(MAKE_JOBS)
MAKE_ARGS+= MAKE="${GMAKE} -j${MAKE_JOBS}"
.endif
MAKE_ENV?= QTDIR=${WRKSRC} LD_LIBRARY_PATH=${WRKSRC}/lib
CONFIG= ${WRKSRC}/configs/freebsd-g++-${STATIC}
.if !defined(NOPORTDOCS)
.if (${PORTNAME} == "qt")
.include "${.CURDIR}/files/manpages"
.endif
.endif
.if defined(WANT_STATIC)
STATIC=static
CONFIGURE_ARGS+=-static
.else
STATIC=shared
INSTALLS_SHLIB=yes
.endif
pre-fetch:
.if exists(${X11BASE}/lib/libqt2.so.3)
.if !defined(WANT_STATIC)
@${ECHO} "An older version of QT2 is installed. To avoid clobbering"
@${ECHO} "that installation, deinstall it and then install this port."
@${ECHO} "Note that this port contains beta-quality source code and"
@${ECHO} "must be used only wherever absolutely needed, such as for"
@${ECHO} "KDE 2.0 and later."
@${FALSE}
.endif
.endif
pre-configure:
${PERL} -pi -e "s,gcc,${CC},g; s,g\+\+,${CXX},g; \
s,/usr/X11R6,${X11BASE},g; \
s,-pipe -O2,${CXXFLAGS} -frerun-cse-after-loop,g" ${CONFIG}
${PERL} -pi -e "s,VER_MAJ = 2,VER_MAJ = 4,g; \
s,TARGET = qt,TARGET = qt2,g" ${WRKSRC}/src/Makefile.in
${PERL} -pi -e "s@TARGET\t= moc@TARGET = moc2@g" ${WRKSRC}/src/moc/Makefile.in
${PERL} -pi -e "s,rm -f bin/moc,rm -f bin/moc2,g; \
s,cp src/moc/moc bin/moc,cp src/moc/moc2 bin/moc2,g; \
s,symlinks src-moc src-mt sub-src sub-tools sub-tutorial sub-examples,symlinks src-moc src-mt sub-src sub-tools,g" \
${WRKSRC}/Makefile
post-configure:
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} symlinks)
# XXX: This target looks like crap now.
do-install:
.if (${PORTNAME} == "qt")
${MKDIR} ${PREFIX}/include/qt2
.for BIN in moc2 uic
${INSTALL_PROGRAM} ${WRKSRC}/bin/${BIN} ${PREFIX}/bin
.endfor
.for SCRIPT in findtr qt20fix qtrename140
${INSTALL_SCRIPT} ${WRKSRC}/bin/${SCRIPT} ${PREFIX}/bin
.endfor
${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include/qt2
.if !defined(WANT_STATIC)
.for LIB in qt2 qt2-mt
${INSTALL_PROGRAM} ${WRKSRC}/lib/lib${LIB}.so.4 ${PREFIX}/lib
${LN} -sf ${PREFIX}/lib/lib${LIB}.so.4 ${PREFIX}/lib/lib${LIB}.so
.endfor
${INSTALL_PROGRAM} ${WRKSRC}/lib/libqutil.so.1 ${PREFIX}/lib
${LN} -sf ${PREFIX}/lib/libqutil.so.1 ${PREFIX}/lib/libqutil.so
.else
.for LIB in qt2 qutil
${INSTALL_DATA} ${WRKSRC}/lib/lib${LIB}.a ${PREFIX}/lib
.endfor
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/qt2/html
.for FILE in ANNOUNCE FAQ PORTING README README.QT
${INSTALL_DATA} ${WRKSRC}/${FILE} ${PREFIX}/share/doc/qt2
.endfor
.for SUFFIX in g1n html png
(for FILE in ${WRKSRC}/doc/html/*.${SUFFIX}; do \
${INSTALL_DATA} $$FILE ${PREFIX}/share/doc/qt2/html; done)
.endfor
.for FILE in index titleindex propertyindex whatsthis
${INSTALL_DATA} ${WRKSRC}/doc/html/${FILE} ${PREFIX}/share/doc/qt2/html
.endfor
${INSTALL_MAN} ${WRKSRC}/doc/man/man3/q* ${PREFIX}/man/man3
.endif
.endif
.if defined(WANT_STATIC)
.if (${PORTNAME} == "qt")
post-install:
${CP} ${TMPPLIST} ${TMPPLIST}.new
${SED} -e "s/libqt2\/.so/libqt2\.a/" -e "s/.*libqt2\.a\.\d\n//" \
-e "s/libqutil\.so/libqutil.a/" -e "s/.*libqutil\.a\.\d\n//" \
${TMPPLIST}.new > ${TMPPLIST}
.endif
.endif
.include <bsd.port.mk>