summaryrefslogtreecommitdiffstats
path: root/freebsd/dependencies/tqmake/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/dependencies/tqmake/Makefile')
-rw-r--r--freebsd/dependencies/tqmake/Makefile75
1 files changed, 75 insertions, 0 deletions
diff --git a/freebsd/dependencies/tqmake/Makefile b/freebsd/dependencies/tqmake/Makefile
new file mode 100644
index 000000000..ab721201e
--- /dev/null
+++ b/freebsd/dependencies/tqmake/Makefile
@@ -0,0 +1,75 @@
+# Created by: slavek.banko@axis.cz
+# $FreeBSD$
+#
+# TDE port map: dependencies/tqmake
+
+PORTSDIR?=/usr/ports
+.include <${PORTSDIR}/Mk/bsd.trinity.mk>
+
+PORTNAME= tqmake
+COMMENT= The build utility of the TQt from Trinity
+TDE_PREVERSION=
+MASTER_SITE_SUBDIR= t/tqt-x11-free
+DISTNAME= tqt-x11-free_${TDE_VERSION}${TDE_PREVERSION:C/(~(pre|r|s)[0-9]*).*/\1/1}
+DISTSRC= tqt3-trinity-${TDE_VERSION}${TDE_PREVERSION}
+PORTREVISION= 0
+CATEGORIES= devel
+DIST_SUBDIR= TDE/dependencies
+PREFIX= ${LOCALBASE}
+
+
+# For TQt3 is used FreeBSD make
+# Remove gmake from USES
+USES=
+
+WRKSRC= ${WRKDIR}/${DISTNAME}/qmake
+MAKEFILE= ${FILESDIR}/Makefile.bsd
+MAKE_ENV+= FILESDIR="${FILESDIR}"
+REINPLACE_ARGS= -i ""
+
+EXTRACT_AFTER_ARGS+= \
+ '${EXTRACT_BASE}mkspecs' \
+ '${EXTRACT_BASE}src/*/*.h' \
+ '${EXTRACT_BASE}qmake' \
+ '${EXTRACT_BASE}src/tools'
+
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+EXTRACT_AFTER_ARGS+='${EXTRACT_BASE}doc/html/qmake*'
+DOCSDIR= ${PREFIX}/share/doc/tqt3
+PLIST_SUB+= DOCSDIR="${DOCSDIR}"
+.endif
+
+post-patch:
+ @${RM} -fr ${WRKSRC}/examples ${WRKSRC}/tutorial
+ @${REINPLACE_CMD} -e 's|-O2|${CXXFLAGS}|' \
+ -e 's|/usr/local|${LOCALBASE}|' \
+ -e 's|/usr/X11R6|${LOCALBASE}|' \
+ -e 's|$$(TQTDIR)/bin|${PREFIX}/bin|g' \
+ -e 's|$$(TQTDIR)/include|${PREFIX}/include/tqt3|g' \
+ -e 's|$$(TQTDIR)/lib|${PREFIX}/lib|g' \
+ -e 's|$$(TQTDIR)|${PREFIX}/share/tqt3|' \
+ ${WRKSRC}/../mkspecs/freebsd-clang/qmake.conf
+ ${LN} -s freebsd-clang ${WRKSRC}/../mkspecs/default
+ @${REINPLACE_CMD} -e 's|@QMAKE_QTOBJS@||g' ${WRKSRC}/Makefile.unix
+
+do-configure:
+ ${SED} -e 's|/usr/local|${PREFIX}|g' \
+ < ${FILESDIR}/qconfig.cpp \
+ > ${WRKSRC:H}/src/tools/qconfig.cpp
+ ${ECHO} '/* empty */' > ${WRKSRC}/ntqconfig.h
+ ${LN} ${WRKSRC}/ntqconfig.h ${WRKSRC}/ntqmodules.h
+ ${LN} -s . ${WRKDIR}/${DISTNAME}/src/tools/private
+
+post-install:
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${CP} -Rp ${WRKSRC:H}/doc/html ${STAGEDIR}${DOCSDIR}
+.endif
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/tqt3/bin
+ ${LN} -s ../../../bin/tqmake ${STAGEDIR}${PREFIX}/share/tqt3/bin/
+
+.include <bsd.port.mk>