openbsd-ports/x11/qt4/Makefile

239 lines
6.3 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.45 2007/12/11 08:00:06 jakemsr Exp $
COMMENT-main= C++ X11 GUI toolkit
COMMENT-examples= examples for qt4
COMMENT-html= off-line html documentation for qt4
COMMENT-postgresql= PostgresSQL plugin for qt4
COMMENT-mysql= MySQL plugin for qt4
COMMENT-sqlite2= sqlite2 plugin for qt4
COMMENT-sqlite= sqlite plugin for qt4
2007-03-31 19:10:18 -04:00
PKGNAME= qt4-${VERSION}
2006-06-04 05:37:43 -04:00
PKGNAME-mysql= qt4-mysql-${VERSION}
PKGNAME-postgresql= qt4-postgresql-${VERSION}
2007-10-25 05:30:22 -04:00
PKGNAME-examples= qt4-examples-${VERSION}p0
PKGNAME-sqlite2= qt4-sqlite2-${VERSION}
PKGNAME-sqlite= qt4-sqlite-${VERSION}
PKGNAME-main= qt4-${VERSION}p1
2007-10-25 05:30:22 -04:00
FULLPKGNAME-html= qt4-html-${VERSION}p0
2007-05-22 05:09:32 -04:00
SHARED_LIBS= Qt3Support 8.0 \
QtCore 7.0 \
QtDesigner 7.0 \
QtDesignerComponents 7.0 \
QtGui 8.0 \
QtNetwork 7.0 \
QtOpenGL 7.0 \
QtSql 7.0 \
QtXml 7.0 \
QtSvg 7.0 \
QtTest 7.0 \
QtAssistantClient 3.0 \
QtDBus 1.0 \
QtScript 0.0
2007-10-22 11:36:59 -04:00
VERSION= 4.3.2
DISTNAME= qt-x11-opensource-src-${VERSION}
2006-10-08 17:43:50 -04:00
CATEGORIES= x11
2007-05-22 05:09:32 -04:00
MASTER_SITES= ftp://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/source/ \
ftp://ftp.ntua.gr/pub/X11/Qt/qt/source/ \
2006-04-06 05:35:46 -04:00
ftp://ftp.tu-chemnitz.de/pub/Qt/qt/source/ \
http://ftp.silug.org/pub/qt/source/ \
ftp://ftp.troll.no/qt/source/
HOMEPAGE= http://www.trolltech.com/qt/
MAINTAINER= Marc Espie <espie@openbsd.org>
FLAVORS= debug
PSEUDO_FLAVORS= no_examples
FLAVOR?=
# GPL, plus more exceptions to link with other free licences.
# or QPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
USE_X11= Yes
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
PORTHOME= ${WRKDIST}
CONFIGURE_STYLE= simple
2007-05-22 05:09:32 -04:00
SEPARATE_BUILD= simple
CONFIGURE_ARGS= -qt-gif -system-libpng -system-libjpeg -system-zlib \
2006-10-08 17:43:50 -04:00
-sm -no-g++-exceptions -system-sqlite \
-v -stl -xrender -fast \
-no-sql-odbc \
-tablet \
-xinerama \
-cups \
-confirm-license \
-I${LOCALBASE}/include/libpng \
-I${X11BASE}/include/freetype2 \
-I${LOCALBASE}/include \
2007-05-22 05:09:32 -04:00
-L${WRKBUILD}/lib \
-L${LOCALBASE}/lib
.if ${FLAVOR:L:Mdebug}
CONFIGURE_ARGS+=-debug
.else
CONFIGURE_ARGS+=-release
.endif
2005-07-05 13:44:46 -04:00
CONFIGURE_ARGS+= -prefix ${QT_BASEDIR}
CONFIGURE_ARGS+= -libdir ${QT_BASEDIR}
CONFIGURE_ARGS+= -bindir ${QT_BINDIR}
CONFIGURE_ARGS+= -headerdir ${QT_INCDIR}
CONFIGURE_ARGS+= -docdir ${QT_DOC}
2005-07-05 13:44:46 -04:00
CONFIGURE_ARGS+= -plugindir ${QT_PLUGINSDIR}
CONFIGURE_ARGS+= -datadir ${QT_BASEDIR}
CONFIGURE_ARGS+= -sysconfdir ${SYSCONFDIR}
2005-07-05 13:44:46 -04:00
CONFIGURE_ARGS+= -examplesdir ${QT_BASEDIR}/examples
CONFIGURE_ARGS+= -demosdir ${QT_BASEDIR}/demos
2006-11-21 14:25:47 -05:00
CONFIGURE_ARGS+= -I${LOCALBASE}/include/mysql -L${LOCALBASE}/lib/mysql \
-plugin-sql-mysql
CONFIGURE_ARGS+= -I${LOCALBASE}/include/postgresql \
-I${LOCALBASE}/include/postgresql/server \
-L${LOCALBASE}/lib \
-I${LOCALBASE}/include -plugin-sql-psql
CONFIGURE_ENV= LOCALBASE=${LOCALBASE} QTDIR="${WRKSRC}"
BUILD_DEPENDS+=::print/cups
2006-11-21 14:25:47 -05:00
BUILD_DEPENDS+=::databases/postgresql,-server
2006-11-21 14:25:47 -05:00
MULTI_PACKAGES=-main -html -mysql -postgresql -sqlite2 -sqlite
.if ${FLAVOR:L:Mno_examples}
ALL_TARGET=sub-src-all-ordered sub-tools-all-ordered
INSTALL_TARGET=sub-src-install_subtargets-ordered \
sub-tools-install_subtargets-ordered install_htmldocs \
install_translations install_qmake install_mkspecs
.else
MULTI_PACKAGES+=-examples
PROGRAMS+= qtdemo pixeltool
.endif
2007-03-17 13:58:16 -04:00
LIB_DEPENDS= glib-2.0,gthread-2.0::devel/glib2
2006-11-21 14:25:47 -05:00
WANTLIB= iconv intl
2006-11-21 14:25:47 -05:00
commonWANTLIB= ICE Xrender c GLU SM freetype pthread Xrandr Xinerama \
stdc++ Xcursor Xext GL Xi m X11.>=10 z fontconfig \
2007-05-22 05:09:32 -04:00
Xfixes ssl crypto
2006-11-21 14:25:47 -05:00
commonLIB_DEPENDS= png.>=2::graphics/png \
dbus-1::x11/dbus
2006-11-21 14:25:47 -05:00
sqlWANTLIB= m z
2006-11-25 13:35:45 -05:00
sqlLIB_DEPENDS= QtCore.>=4,QtSql::${BUILD_PKGPATH}
2006-11-21 14:25:47 -05:00
LIB_DEPENDS-main= ${LIB_DEPENDS} ${commonLIB_DEPENDS} \
jpeg::graphics/jpeg \
mng::graphics/libmng
WANTLIB-main= ${WANTLIB} ${commonWANTLIB} \
2007-05-22 05:09:32 -04:00
lcms tiff
2006-11-21 14:25:47 -05:00
LIB_DEPENDS-mysql= ${LIB_DEPENDS} ${sqlLIB_DEPENDS} \
mysqlclient_r::databases/mysql
WANTLIB-mysql= ${WANTLIB} ${sqlWANTLIB} \
crypto ssl pthread
2006-11-21 14:25:47 -05:00
LIB_DEPENDS-postgresql= ${LIB_DEPENDS} ${sqlLIB_DEPENDS} \
pq.>=2:postgresql-client-*:databases/postgresql
WANTLIB-postgresql= ${WANTLIB} ${sqlWANTLIB}
2006-10-08 17:43:50 -04:00
2006-11-21 14:25:47 -05:00
LIB_DEPENDS-sqlite2= ${LIB_DEPENDS} ${sqlLIB_DEPENDS} \
sqlite::databases/sqlite
WANTLIB-sqlite2= ${WANTLIB} ${sqlWANTLIB}
LIB_DEPENDS-sqlite= ${LIB_DEPENDS} ${sqlLIB_DEPENDS} \
sqlite3::databases/sqlite3
WANTLIB-sqlite= ${WANTLIB} ${sqlWANTLIB}
LIB_DEPENDS-examples= ${LIB_DEPENDS} ${commonLIB_DEPENDS} \
2007-05-22 05:09:32 -04:00
QtDesigner,QtCore.>=4,QtGui,QtNetwork,QtOpenGL,QtSql,QtXml,QtSvg,QtTest,Qt3Support,QtAssistantClient,QtDBus,QtScript::${BUILD_PKGPATH}
2006-11-21 14:25:47 -05:00
WANTLIB-examples= ${WANTLIB} ${commonWANTLIB}
LIB_DEPENDS-html=
WANTLIB-html=
PKG_ARCH-html= *
2006-10-08 17:43:50 -04:00
2005-07-05 13:44:46 -04:00
QT_BASEDIR= ${PREFIX}/lib/qt4
QT_INCDIR= ${PREFIX}/include/X11/qt4
2005-07-05 13:44:46 -04:00
QT_EXAMPLES= ${QT_BASEDIR}/examples
QT_DOC= ${PREFIX}/share/doc/qt4
2005-07-05 13:44:46 -04:00
QT_PLUGINSDIR= ${QT_BASEDIR}/plugins
QT_BINDIR= ${QT_BASEDIR}/bin
2007-05-22 05:09:32 -04:00
QT_PKGCFGDIR= ${QT_BASEDIR}/pkgconfig
2006-10-08 17:43:50 -04:00
DOCS= OPENSOURCE-NOTICE.TXT README
VMEM_WARNING= Yes
NO_REGRESS= Yes
PROGRAMS4=assistant designer findtr linguist lrelease lupdate moc qmake \
qtconfig uic uic3
2006-12-29 18:22:51 -05:00
PROGRAMS+= rcc qt3to4 syncqt qdbus
QMAKE=${WRKBUILD}/bin/qmake
2006-10-08 17:43:50 -04:00
MAKE_FLAGS+= INSTALL_PROGRAM='${INSTALL_PROGRAM}' \
INSTALL_FILE='${INSTALL_DATA}'
.for l v in $(SHARED_LIBS)
MAKE_FLAGS+=LIB$l_VERSION=$v
.endfor
FAKE_FLAGS=$(MAKE_FLAGS) INSTALL_ROOT=${WRKINST}
post-patch:
perl -pi -e "s#!!CUPS_LIBS!!#`cups-config --libs`#" \
${WRKSRC}/config.tests/unix/cups/cups.pro
post-install:
# extra doc
cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${QT_DOC}
# programs
${INSTALL_PROGRAM_DIR} ${QT_BINDIR}
2007-05-22 05:09:32 -04:00
${INSTALL_PROGRAM} ${WRKSRC}/bin/{findtr,syncqt} ${QT_BINDIR}
.for p in ${PROGRAMS4}
@ln -sf ${TRUEPREFIX}/lib/qt4/bin/$p ${PREFIX}/bin/$p4
.endfor
@ln -sf assistant ${PREFIX}/lib/qt4/bin/assistant4
.for p in ${PROGRAMS}
@ln -sf ${TRUEPREFIX}/lib/qt4/bin/$p ${PREFIX}/bin/$p
.endfor
# fix pkgconfig stuff
@for i in ${QT_PKGCFGDIR}/*.pc; do \
perl -pi.bak -e 's,-L${WRKBUILD}/lib,,g;' $$i; \
rm $$i.bak; \
done
# this helps qdbuscpp2xml
2007-06-10 17:23:10 -04:00
cd ${QT_BINDIR} && ln -sf moc moc4
.for l v in ${SHARED_LIBS}
ln -sf qt4/lib$l.so.$v ${PREFIX}/lib
.endfor
# cleanup
cd ${PREFIX}/lib/qt4 && ln -sf ../../include/X11/qt4 include
USE_GMAKE=Yes
2006-11-21 14:25:47 -05:00
.include <bsd.port.mk>