freebsd-ports/devel/qt4-qmake/Makefile
Tobias C. Berner b1a1d38bf9 Replace bsd.qt.mk by Uses/qt.mk and Uses/qt-dist.mk
From now on, ports that depend on Qt4 will have to set
	USES=		qt:4
	USE_QT=		foo bar
ports depending on Qt5 will use
	USES=		qt:5
	USE_QT=		foo bar

PR:		229225
Exp-run by:	antoine
Reviewed by:	mat
Approved by:	portmgr (antoine)
Differential Revision:	→https://reviews.freebsd.org/D15540
2018-06-28 17:39:53 +00:00

82 lines
2.4 KiB
Makefile

# Created by: lofi@FreeBSD.org, mi@aldan.algebra.com
# $FreeBSD$
PORTNAME= qmake
DISTVERSION= ${QT4_VERSION}
PORTREVISION= 2
CATEGORIES= devel
PKGNAMEPREFIX= qt4-
MAINTAINER= kde@FreeBSD.org
COMMENT= Qt Makefile generator
USES= qt-dist:4
USE_QT= # empty
REINPLACE_ARGS= -i ""
WRKSRC_SUBDIR= ${PORTNAME}
MAKEFILE= ${FILESDIR}/Makefile.bsd
MAKE_ENV+= FILESDIR="${FILESDIR}" \
QMAKE_COMPILER="${QMAKE_COMPILER}" \
QMAKE="${QMAKE}" \
QT_BINDIR_REL="${QT_BINDIR_REL}" \
QT_MKSPECDIR_REL="${QT_MKSPECDIR_REL}"
TODAY_CMD= /bin/date +%Y-%m-%d
SUB_FILES= qconfig.cpp
SUB_LIST= TODAY="$$(${TODAY_CMD})" \
${PLIST_SUB:NPREFIX=*}
EXTRACT_AFTER_ARGS= \
'${DISTNAME}/mkspecs' \
'${DISTNAME}/include/*/*' \
'${DISTNAME}/src/*/*.h' \
'${DISTNAME}/qmake' \
'${DISTNAME}/src/corelib/tools' \
'${DISTNAME}/src/corelib/io' \
'${DISTNAME}/src/corelib/global' \
'${DISTNAME}/src/corelib/plugin' \
'${DISTNAME}/src/corelib/kernel' \
'${DISTNAME}/src/corelib/codecs' \
'${DISTNAME}/src/corelib/xml' \
'${DISTNAME}/src/3rdparty/md4' \
'${DISTNAME}/src/3rdparty/md5' \
'${DISTNAME}/src/3rdparty/sha1' \
'${DISTNAME}/tools/shared/symbian' \
'${DISTNAME}/tools/shared/windows'
EXTRA_PATCHES= # empty
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
-e 's|release|release thread|' \
-e 's|uic|${UIC:T}|' \
-e 's|moc|${MOC:T}|' \
${WRKSRC:H}/mkspecs/common/freebsd.conf
@${REINPLACE_CMD} -e 's|@QMAKE_QTOBJS@||g' ${WRKSRC}/Makefile.unix
@${REINPLACE_CMD} -e 's|unix.conf|freebsd.conf|' \
${WRKSRC:H}/mkspecs/freebsd-icc/qmake.conf
@${RM} -R ${WRKSRC:H}/mkspecs/freebsd-g++46
# Add mkspec for clang
@${CP} -a ${WRKSRC:H}/mkspecs/freebsd-g++ \
${WRKSRC:H}/mkspecs/freebsd-clang
@${REINPLACE_CMD} -e 's|g++|clang|g' \
-e '/gcc-base-unix.conf/d' \
${WRKSRC:H}/mkspecs/freebsd-clang/qmake.conf
@${RM} ${WRKSRC:H}/mkspecs/*/*.orig
do-configure: apply-slist
${MV} ${WRKDIR}/qconfig.cpp \
${WRKSRC:H}/src/corelib/global/qconfig.cpp
${ECHO} '/* empty */' > ${WRKSRC}/qconfig.h
${LN} ${WRKSRC}/qconfig.h ${WRKSRC:H}/src/corelib/global/qconfig.h
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${QT_BINDIR_REL}
${INSTALL_PROGRAM} ${WRKSRC}/${QMAKE:T} ${STAGEDIR}${PREFIX}/${QT_BINDIR_REL}
${MKDIR} ${STAGEDIR}${PREFIX}/${QT_MKSPECDIR_REL:H} && \
cd ${WRKSRC}/.. && ${COPYTREE_SHARE} mkspecs ${STAGEDIR}${PREFIX}/${QT_MKSPECDIR_REL:H}
${LN} -sf freebsd-${QMAKE_COMPILER} ${STAGEDIR}${PREFIX}/share/qt4/mkspecs/default
.include <bsd.port.mk>