freebsd-ports/devel/py-qt4-test/Makefile
Raphael Kubo da Costa 4a2d1042cd Add explicit dependency on qt4-gui.
This is similar to r356888, in that PyQt's configure.py builds py-qt4-test
with QtGui's libraries (even though, contrary to qt4-sql, it is not used at
configuration time). Using QtGui defines QT_GUI_LIB, which makes the QtTest
headers pull in QtGui ones. QtGui comes for free indirectly when the API
option is set, but the build fails otherwise:

  c++ -c -O2 -pipe -fno-strict-aliasing -fPIC -O2 -Wall -W -pthread -D_THREAD_SAFE -DNDEBUG -DQT_NO_DEBUG -DQT_TEST_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/local/include/python2.7 -I/usr/local/share/qt4/mkspecs/default -I/usr/local/include/qt4/QtTest -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4 -I/usr/local/include -o sipQtTestQTest.o sipQtTestQTest.cpp
  In file included from /wrkdirs/usr/ports/devel/py-qt4-test/work/PyQt-x11-gpl-4.10.3/sip/QtTest/qtestkeyboard.sip:31:
  /usr/local/include/qt4/QtTest/qtestkeyboard.h:56:10: fatal error: 'QtGui/qapplication.h' file not found

PR:		183706
MFH:		2014Q2
2014-06-07 09:39:34 +00:00

62 lines
1.6 KiB
Makefile

# Created by: Danny Pansters <danny@ricin.com>
# $FreeBSD$
PORTNAME= test
PORTVERSION= ${PYQT4_VERSION}
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITES_PYQT4}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}qt4-
DISTNAME= ${PYQT4_DISTNAME}
MAINTAINER= kde@FreeBSD.org
COMMENT= Python bindings for the Qt4 toolkit, QtTest module
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION}:${PORTSDIR}/devel/py-sip
RUN_DEPENDS= ${PKGNAMEPREFIX}gui>=${PYQT4_VERSION}:${PORTSDIR}/x11-toolkits/py-qt4-gui
DISTINFO_FILE= ${PYQT4_DISTINFO_FILE}
HAS_CONFIGURE= yes
USE_PYTHON= yes
USE_QT4= moc_build gui qtestlib qmake_build
OPTIONS_DEFINE= API
OPTIONS_DEFAULT=API
API_DESC= Install QtTest API for QScintilla2
PATCHDIR= ${.CURDIR}/../py-qt4-core/files
OPTIONSFILE?= ${PORT_DBDIR}/py-qt4-${PORTNAME}/options
SIPDIR= ${PREFIX}/share/py-sip
QSCIDIR= ${PREFIX}/share/qt4/qsci
ARGS= -b ${PREFIX}/bin \
-d ${PYTHONPREFIX_SITELIBDIR} \
-p ${PREFIX}/${QT_PLUGINDIR_REL} \
-q ${QMAKE} \
--confirm-license \
--sipdir ${SIPDIR} \
--enable QtTest \
CC="${CC}" CXX="${CXX}" LINK="${CXX}" LINK_SHLIB="${CXX}" \
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
.include "${.CURDIR}/../py-qt4/bsd.pyqt.mk"
.include <bsd.port.options.mk>
.if empty(PORT_OPTIONS:MAPI)
ARGS+= --no-qsci-api
PLIST_SUB+= API="@comment "
.else
LIB_DEPENDS+= qscintilla2:${PORTSDIR}/devel/qscintilla2
ARGS+= --qsci-api --qsci-api-destdir=${QSCIDIR}
PLIST_SUB+= API=""
.endif
.if defined(WITH_DEBUG)
ARGS+= --debug --trace
.endif
do-configure:
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
${PYTHON_CMD} configure.py ${ARGS}
.include <bsd.port.mk>