summaryrefslogtreecommitdiffstats
path: root/freebsd/dependencies/tqmake/Makefile
blob: 5a4800e493772ddbb0798438cfe8a95c73749a27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Created by: slavek.banko@axis.cz
# $FreeBSD$

.include <../../trinity.port.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|$$(QTDIR)/bin|${PREFIX}/bin|g' \
		-e 's|$$(QTDIR)/include|${PREFIX}/include/tqt3|g' \
		-e 's|$$(QTDIR)/lib|${PREFIX}/lib|g' \
		-e 's|$$(QTDIR)|${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>