ports/devel/qt4/Makefile.sqldrivers
Raphael Kubo da Costa bb736d2290 qt4 sqldrivers: Switch to a proper qmake build, use Makefile.sqldrivers.
We've recently started receiving pkg-fallout emails because qt4-mysql-plugin
is failing to build in HEAD. It turns out we were using some custom-made
Makefile.bsd files to drive the builds, and they did not always register all
dependencies between the files correctly.

Fix it by switching to a proper qmake build that uses the .pro files shipped
with Qt4 itself: they can be used without running the `configure' script
almost as if they were not part of the Qt distribution itself. By doing this
we can stop having our own Makefiles and also stop setting a lot of
variables in the port Makefiles.

While here, consolidate most of the variable setting into a single
Makefile.sqldrivers in devel/qt4 (like we already do for devel/qt5) so that
each of the qt4-*-plugin ports only need to set a few values such as the
plugin name and additional USES or includes that might be necessary.

Bump PORTREVISION because we now include the debug versions of the plugins
in PLIST_FILES when the ports are built with WITH_DEBUG=yes (they were
already shipped before, but not registered in the plists).
2016-03-10 14:11:16 +00:00

27 lines
717 B
Text

# $FreeBSD$
PORTNAME= ${DB:tl}
DISTVERSION= ${QT4_VERSION}
CATEGORIES= databases
PKGNAMEPREFIX= qt4-
PKGNAMESUFFIX= -plugin
MAINTAINER= kde@FreeBSD.org
EXTRA_PATCHES= # empty
USE_QT4= corelib sql moc_build qmake_build
QT_DIST= yes
USES+= qmake:outsource
CXXFLAGS+= -I${WRKSRC}/include # For private QtSql headers.
EXTRACT_AFTER_ARGS= ${DISTNAME}/include/QtSql \
${DISTNAME}/src/corelib ${DISTNAME}/src/plugins \
${DISTNAME}/src/qt_targets.pri ${DISTNAME}/src/sql
QMAKE_SOURCE_PATH= ${WRKSRC}/src/plugins/sqldrivers/${DB}/${DB}.pro
PLIST_FILES= ${QT_PLUGINDIR_REL}/sqldrivers/libqsql${DB:tl:C/^sql//}.so \
%%DEBUG%%${QT_PLUGINDIR_REL}/sqldrivers/libq${DB:tl:C/^sql//}.so.debug
.include <bsd.port.mk>