2003-04-05 09:45:19 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.27 2003/04/05 14:45:19 espie Exp $
|
2002-03-04 11:13:04 -05:00
|
|
|
# $FreeBSD: Makefile,v 1.33 1999/02/27 03:09:57 andreas Exp $
|
2002-03-30 13:13:31 -05:00
|
|
|
|
2002-03-04 11:13:04 -05:00
|
|
|
COMMENT= C++ X11 GUI toolkit
|
|
|
|
COMMENT-examples= examples and tutorial for qt3
|
|
|
|
COMMENT-html= off-line html documentation for qt3
|
2002-03-30 13:13:31 -05:00
|
|
|
COMMENT-postgresql= PostgresSQL plugin for qt3
|
|
|
|
COMMENT-mysql= MySQL plugin for qt3
|
2003-01-06 01:22:52 -05:00
|
|
|
COMMENT-base= include and docs for qt3
|
2002-03-04 11:13:04 -05:00
|
|
|
|
2003-04-05 09:45:19 -05:00
|
|
|
VERSION= 1.2
|
2002-03-04 11:13:04 -05:00
|
|
|
DISTNAME= qt-x11-free-3.${VERSION}
|
|
|
|
CATEGORIES= x11
|
|
|
|
MASTER_SITES= ftp://ftp.troll.no/qt/source/
|
|
|
|
|
|
|
|
HOMEPAGE= http://www.trolltech.com/qt/
|
|
|
|
|
|
|
|
MAINTAINER= Marc Espie <espie@openbsd.org>
|
|
|
|
|
2002-10-26 07:45:52 -04:00
|
|
|
FLAVORS=mt
|
|
|
|
|
2002-08-21 09:52:39 -04:00
|
|
|
PSEUDO_FLAVORS= no_mysql no_postgresql
|
2002-03-04 11:13:04 -05:00
|
|
|
FLAVOR?=
|
|
|
|
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
|
|
|
|
#CXXFLAGS+= -g
|
|
|
|
|
2002-11-13 17:55:54 -05:00
|
|
|
MODULES= gcc3
|
|
|
|
MODGCC3_ARCHES= sparc64
|
|
|
|
MODGCC3_LANGS= C++
|
|
|
|
|
2002-03-04 11:13:04 -05:00
|
|
|
USE_X11= Yes
|
2002-07-17 17:43:36 -04:00
|
|
|
#USE_GMAKE= Yes
|
2002-03-04 11:13:04 -05:00
|
|
|
MAKE_ENV= QTDIR="${WRKDIST}" EXTRA_SAMPLES="${EXTRA_SAMPLES}" \
|
|
|
|
SYS_CXX="${CXX}" SYS_CXXFLAGS="${CXXFLAGS}" \
|
|
|
|
LD_LIBRARY_PATH="${WRKDIST}/lib"
|
|
|
|
|
|
|
|
# For qsettings to write its setup
|
2002-03-11 19:16:12 -05:00
|
|
|
PORTHOME="${WRKDIST}"
|
2002-03-04 11:13:04 -05:00
|
|
|
|
|
|
|
MAKE_FLAGS= DESIGNER_SUBDIR=dummy
|
|
|
|
CONFIGURE_STYLE= simple
|
|
|
|
CONFIGURE_ARGS= -qt-gif -system-libmng -system-libpng -system-libjpeg \
|
2002-10-26 07:45:52 -04:00
|
|
|
-system-zlib -sm -no-g++-exceptions \
|
2002-03-04 11:13:04 -05:00
|
|
|
-v -stl -xrender \
|
2002-03-30 13:13:31 -05:00
|
|
|
-no-sql-odbc \
|
2003-04-05 09:45:19 -05:00
|
|
|
-tablet \
|
|
|
|
-xinerama \
|
2002-05-27 10:49:30 -04:00
|
|
|
-I${LOCALBASE}/include/libpng \
|
2002-03-04 11:13:04 -05:00
|
|
|
-I${X11BASE}/include/freetype2 \
|
2002-03-05 07:40:52 -05:00
|
|
|
-I${LOCALBASE}/include \
|
2002-03-04 11:13:04 -05:00
|
|
|
-L${WRKSRC}/lib \
|
2002-03-05 07:40:52 -05:00
|
|
|
-L${LOCALBASE}/lib
|
2002-03-04 11:13:04 -05:00
|
|
|
|
2003-01-06 01:22:52 -05:00
|
|
|
MULTI_PACKAGES+=-base -html
|
|
|
|
|
2002-10-26 07:45:52 -04:00
|
|
|
.if ${FLAVOR:L:Mmt}
|
2003-04-05 09:45:19 -05:00
|
|
|
FULLPKGNAME= qt3-mt-${VERSION}
|
2002-10-26 07:45:52 -04:00
|
|
|
CONFIGURE_ARGS+=-thread
|
2003-04-05 09:45:19 -05:00
|
|
|
MULTI_PACKAGES+= -examples
|
2002-10-26 07:45:52 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=-no-thread
|
2003-04-05 09:45:19 -05:00
|
|
|
ALL_TARGET=sub-src sub-tools
|
2002-10-26 07:45:52 -04:00
|
|
|
.endif
|
|
|
|
|
2002-03-04 11:13:04 -05:00
|
|
|
# This is needed to find plugins
|
|
|
|
CONFIGURE_ARGS+= -prefix ${QT_LIBDIR}
|
2003-01-06 20:23:20 -05:00
|
|
|
CONFIGURE_ARGS+= -plugindir ${QT_PLUGINSDIR}
|
2002-03-04 11:13:04 -05:00
|
|
|
#CONFIGURE_ARGS+=-static -debug
|
|
|
|
#CONFIGURE_ARGS+=-debug
|
2002-07-17 17:43:36 -04:00
|
|
|
#CONFIGURE_ARGS+=-static
|
2002-03-04 11:13:04 -05:00
|
|
|
|
|
|
|
# For XFree 4
|
|
|
|
#CONFIGURE_ARGS+=-xft
|
2003-01-06 20:23:20 -05:00
|
|
|
CONFIGURE_ENV= QTDIR="${WRKSRC}"
|
2002-03-04 11:13:04 -05:00
|
|
|
|
|
|
|
SUBPACKAGE?=
|
|
|
|
|
|
|
|
LIB_DEPENDS=
|
|
|
|
BUILD_DEPENDS=::graphics/jpeg
|
|
|
|
|
2002-03-29 20:02:49 -05:00
|
|
|
e=
|
|
|
|
.if ${FLAVOR:L:Mno_mysql}
|
|
|
|
e:=$e,no_mysql
|
|
|
|
.endif
|
|
|
|
.if ${FLAVOR:L:Mno_postgresql}
|
|
|
|
e:=$e,no_postgresql
|
|
|
|
.endif
|
2003-01-06 01:22:52 -05:00
|
|
|
.if ${FLAVOR:L:Mmt}
|
|
|
|
e:=$e,mt
|
|
|
|
.endif
|
2002-03-29 20:02:49 -05:00
|
|
|
|
|
|
|
.if !empty(FLAVOR:L:Mno_mysql)
|
2002-03-04 11:13:04 -05:00
|
|
|
CONFIGURE_ARGS+=-no-sql-mysql
|
|
|
|
.else
|
|
|
|
MULTI_PACKAGES+= -mysql
|
|
|
|
. if !defined(PACKAGING) || ${SUBPACKAGE} == "-mysql"
|
|
|
|
LIB_DEPENDS+=mysqlclient::databases/mysql
|
|
|
|
. endif
|
|
|
|
CONFIGURE_ARGS+= -I${LOCALBASE}/include/mysql -L${LOCALBASE}/lib/mysql \
|
|
|
|
-plugin-sql-mysql
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# This one doesn't work
|
|
|
|
#LIB_DEPENDS+=iodbc::databases/iodbc
|
|
|
|
|
2002-03-29 20:02:49 -05:00
|
|
|
.if !empty(FLAVOR:L:Mno_postgresql)
|
2002-03-04 11:13:04 -05:00
|
|
|
CONFIGURE_ARGS+=-no-sql-psql
|
|
|
|
.else
|
|
|
|
MULTI_PACKAGES+= -postgresql
|
|
|
|
. if !defined(PACKAGING) || ${SUBPACKAGE} == "-postgresql"
|
|
|
|
LIB_DEPENDS+=pq::databases/postgresql
|
|
|
|
. endif
|
|
|
|
CONFIGURE_ARGS+= -I${LOCALBASE}/include/postgresql \
|
2002-12-18 00:19:45 -05:00
|
|
|
-I${LOCALBASE}/include/postgresql/server \
|
2002-03-27 07:36:35 -05:00
|
|
|
-L${LOCALBASE}/lib \
|
2002-03-04 11:13:04 -05:00
|
|
|
-I${LOCALBASE}/include -plugin-sql-psql
|
|
|
|
.endif
|
|
|
|
|
2003-01-06 01:22:52 -05:00
|
|
|
.if defined(PACKAGING) && ${SUBPACKAGE} != "-html" && ${SUBPACKAGE} != "-base"
|
|
|
|
RUN_DEPENDS+=::x11/qt3,-base
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(PACKAGING) || ${SUBPACKAGE} != "-html" && ${SUBPACKAGE} != "-base"
|
2002-03-04 11:13:04 -05:00
|
|
|
LIB_DEPENDS+= png.2::graphics/png \
|
|
|
|
mng.1::graphics/libmng
|
|
|
|
.endif
|
2003-01-06 01:22:52 -05:00
|
|
|
|
|
|
|
.if defined(PACKAGING) && ${SUBPACKAGE} != "-html" && ${SUBPACKAGE} != "" && ${SUBPACKAGE} != "-base"
|
|
|
|
LIB_DEPENDS+= qt${MT_SUFX}.3::x11/qt3$e
|
2002-03-04 11:13:04 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
QT_INCDIR= ${PREFIX}/include/X11/qt3
|
|
|
|
TRUEDIR= ${TRUEPREFIX}/lib/qt3
|
|
|
|
QT_LIBDIR= ${PREFIX}/lib/qt3
|
|
|
|
QT_MANDIR= ${QT_LIBDIR}/man
|
|
|
|
QT_EXAMPLES= ${QT_LIBDIR}/examples
|
|
|
|
QT_TUTORIAL= ${QT_LIBDIR}/tutorial
|
|
|
|
QT_DOC= ${PREFIX}/share/doc/qt3
|
2003-01-06 01:22:52 -05:00
|
|
|
QT_PLUGINSDIR= ${QT_LIBDIR}/plugins${MT_SUFX}
|
|
|
|
QT_BINDIR= ${QT_LIBDIR}/bin${MT_SUFX}
|
2002-03-04 11:13:04 -05:00
|
|
|
|
|
|
|
# for manpages in MESSAGE
|
|
|
|
SUBST_VARS= VERSION QT_LIBDIR QT_DOC
|
|
|
|
|
2002-07-17 17:43:36 -04:00
|
|
|
DOCS= FAQ LICENSE.GPL README README.QT \
|
2002-03-04 11:13:04 -05:00
|
|
|
changes-3*
|
|
|
|
|
2002-10-26 07:45:52 -04:00
|
|
|
VMEM_WARNING= Yes
|
2002-10-29 14:48:57 -05:00
|
|
|
NO_REGRESS= Yes
|
2002-10-26 07:45:52 -04:00
|
|
|
|
2002-12-30 21:09:51 -05:00
|
|
|
PROGRAMS3=designer findtr moc qt20fix qtrename140 uic
|
|
|
|
PROGRAMS=assistant linguist lrelease lupdate qm2ts qmake qtconfig
|
2002-10-26 07:45:52 -04:00
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mmt}
|
2003-01-06 01:22:52 -05:00
|
|
|
MT_SUFX=-mt
|
2003-04-05 09:45:19 -05:00
|
|
|
LIBRARIES=qt${MT_SUFX}.so.3.12 qui${MT_SUFX}.so.1.0
|
2003-01-06 01:22:52 -05:00
|
|
|
|
2002-03-04 11:13:04 -05:00
|
|
|
post-configure:
|
|
|
|
@cd ${WRKSRC} && cp -R examples examples-src
|
|
|
|
@find ${WRKSRC}/examples-src -name '*.orig' |xargs rm
|
|
|
|
@find ${WRKSRC}/examples-src -name '.moc' |xargs rm -r
|
|
|
|
@find ${WRKSRC}/examples-src -name '.obj' |xargs rm -r
|
|
|
|
@cd ${WRKSRC} && cp -R tutorial tutorial-src
|
|
|
|
@find ${WRKSRC}/tutorial-src -name '*.orig' |xargs rm
|
|
|
|
@find ${WRKSRC}/tutorial-src -name '.moc' |xargs rm -r
|
|
|
|
@find ${WRKSRC}/tutorial-src -name '.obj' |xargs rm -r
|
|
|
|
|
2003-01-06 01:22:52 -05:00
|
|
|
pre-install:
|
2002-03-04 11:13:04 -05:00
|
|
|
${INSTALL_DATA_DIR} ${QT_EXAMPLES}
|
|
|
|
${INSTALL_DATA_DIR} ${QT_TUTORIAL}
|
|
|
|
# examples
|
|
|
|
cp -R ${WRKSRC}/examples-src/* ${QT_EXAMPLES}
|
|
|
|
@cd ${WRKSRC}/examples; for i in *; do \
|
|
|
|
if [ -x $$i/$$i ]; then \
|
|
|
|
${INSTALL_PROGRAM} $$i/$$i ${QT_EXAMPLES}/$$i; \
|
|
|
|
fi; done
|
|
|
|
@if [ -x ${WRKSRC}/examples/overlay_x11/overlayrubber ]; then \
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/examples/overlay_x11/overlayrubber \
|
|
|
|
${QT_EXAMPLES}/overlay_x11/overlayrubber; \
|
|
|
|
fi
|
|
|
|
cp -R ${WRKSRC}/tutorial-src/* ${QT_TUTORIAL}
|
|
|
|
@cd ${WRKSRC}/tutorial; for i in *; do \
|
|
|
|
if [ -x $$i/$$i ]; then \
|
|
|
|
${INSTALL_PROGRAM} $$i/$$i ${QT_TUTORIAL}/$$i; \
|
|
|
|
fi; done
|
2003-04-05 09:45:19 -05:00
|
|
|
.else
|
|
|
|
MT_SUFX=
|
|
|
|
LIBRARIES=qt.so.3.11 editor.so.1.0 qui.so.1.0
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
-rm -rf ${WRKSRC}/examples
|
|
|
|
-rm -rf ${WRKSRC}/tutorial
|
|
|
|
|
2003-01-06 01:22:52 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${QT_INCDIR}
|
|
|
|
${INSTALL_MAN_DIR} ${QT_MANDIR}/man1
|
|
|
|
${INSTALL_MAN_DIR} ${QT_MANDIR}/man3
|
|
|
|
${INSTALL_DATA_DIR} ${QT_DOC}/html
|
|
|
|
# includes
|
|
|
|
@rm -f ${WRKSRC}/include/qt_{mac,windows}.h
|
2003-04-05 09:45:19 -05:00
|
|
|
@rm -f ${WRKSRC}/include/qmotif{,dialog,widget}.h
|
|
|
|
@rm -f ${WRKSRC}/include/qxtwidget.h
|
2003-01-06 01:22:52 -05:00
|
|
|
${INSTALL_DATA_DIR} ${QT_INCDIR}/private
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/include/*.h ${QT_INCDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/include/private/*.h ${QT_INCDIR}/private
|
|
|
|
${INSTALL_DATA_DIR} ${QT_BINDIR} ${QT_PLUGINSDIR}
|
2002-03-04 11:13:04 -05:00
|
|
|
# documentation
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/doc/man/man1/lrelease.1 ${QT_MANDIR}/man1
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/doc/man/man1/lupdate.1 ${QT_MANDIR}/man1
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/doc/man/man1/moc.1 ${QT_MANDIR}/man1/moc3.1
|
2002-12-29 11:13:28 -05:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/doc/man/man1/uic.1 ${QT_MANDIR}/man1/uic3.1
|
2002-03-04 11:13:04 -05:00
|
|
|
@for i in ${WRKSRC}/doc/man/man3/*; do \
|
|
|
|
j=$${i%qt}; \
|
|
|
|
sed -e 's,\.3qt,\.3,g' <$$i >$$j && \
|
|
|
|
${INSTALL_MAN} $$j ${QT_MANDIR}/man3; \
|
|
|
|
done
|
|
|
|
cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${QT_DOC}
|
|
|
|
cp -R ${WRKSRC}/doc/html/* ${QT_DOC}/html
|
2003-01-06 01:22:52 -05:00
|
|
|
cp -R ${WRKSRC}/mkspecs ${QT_LIBDIR}/mkspecs
|
|
|
|
# libraries
|
|
|
|
.for l in ${LIBRARIES}
|
|
|
|
@if [ -f ${WRKBUILD}/lib/lib${l:C/\.so\..*/.a/} ]; then \
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/lib/lib${l:C/\.so\..*/.a/} ${PREFIX}/lib/qt3; \
|
|
|
|
fi
|
|
|
|
@if [ -f ${WRKBUILD}/lib/lib$l ]; then \
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/lib/lib$l ${PREFIX}/lib/qt3; \
|
|
|
|
ln -sf qt3/lib$l ${PREFIX}/lib; \
|
|
|
|
fi
|
|
|
|
.endfor
|
|
|
|
.for p in ${PROGRAMS3}
|
|
|
|
${INSTALL_PROGRAM} ${WRKBUILD}/bin/$p ${QT_BINDIR}/$p
|
|
|
|
@ln -sf ${TRUEPREFIX}/lib/qt3/bin${MT_SUFX}/$p ${PREFIX}/bin/$p3${MT_SUFX}
|
|
|
|
.endfor
|
|
|
|
.for p in ${PROGRAMS}
|
|
|
|
${INSTALL_PROGRAM} ${WRKBUILD}/bin/$p ${QT_BINDIR}/$p
|
|
|
|
@ln -sf ${TRUEPREFIX}/lib/qt3/bin${MT_SUFX}/$p ${PREFIX}/bin/$p${MT_SUFX}
|
|
|
|
.endfor
|
2002-03-04 11:13:04 -05:00
|
|
|
# plugins
|
|
|
|
${INSTALL_DATA_DIR} ${QT_PLUGINSDIR}/imageformats \
|
|
|
|
${QT_PLUGINSDIR}/sqldrivers ${QT_PLUGINSDIR}/styles \
|
|
|
|
${QT_PLUGINSDIR}/designer
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/imageformats/libqjpeg.so \
|
|
|
|
${QT_PLUGINSDIR}/imageformats
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/imageformats/libqmng.so \
|
|
|
|
${QT_PLUGINSDIR}/imageformats
|
2003-01-06 01:22:52 -05:00
|
|
|
.if empty(FLAVOR:L:Mno_postgresql)
|
2002-03-04 11:13:04 -05:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/sqldrivers/libqsqlpsql.so \
|
|
|
|
${QT_PLUGINSDIR}/sqldrivers
|
2003-01-06 01:22:52 -05:00
|
|
|
.endif
|
|
|
|
.if empty(FLAVOR:L:Mno_mysql)
|
2002-03-04 11:13:04 -05:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/sqldrivers/libqsqlmysql.so \
|
|
|
|
${QT_PLUGINSDIR}/sqldrivers
|
2003-01-06 01:22:52 -05:00
|
|
|
.endif
|
2002-03-04 11:13:04 -05:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/designer/libwizards.so \
|
|
|
|
${QT_PLUGINSDIR}/designer
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/designer/libcppeditor.so \
|
|
|
|
${QT_PLUGINSDIR}/designer
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/designer/libdlgplugin.so \
|
|
|
|
${QT_PLUGINSDIR}/designer
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/plugins/designer/librcplugin.so \
|
|
|
|
${QT_PLUGINSDIR}/designer
|
2003-01-06 01:22:52 -05:00
|
|
|
|
2002-03-04 11:13:04 -05:00
|
|
|
|
2003-04-05 09:45:19 -05:00
|
|
|
PKGNAME= qt3-${VERSION}
|
2003-01-06 01:22:52 -05:00
|
|
|
PKGNAME-mysql= qt3-mysql-${VERSION}
|
2002-08-21 09:52:39 -04:00
|
|
|
PKGNAME-postgresql= qt3-postgresql-${VERSION}
|
2003-01-06 01:22:52 -05:00
|
|
|
PKGNAME-examples= qt3-examples-${VERSION}
|
2003-04-05 09:45:19 -05:00
|
|
|
FULLPKGNAME-base= qt3-base-${VERSION}
|
2003-01-06 01:22:52 -05:00
|
|
|
FULLPKGNAME-html= qt3-html-${VERSION}
|
2002-03-04 11:13:04 -05:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|