blob: 2190662a5bc6b9da7490bb911a648fe6e4824037 (
plain) (
blame)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# Created by: lofi@FreeBSD.org, mi@aldan.algebra.com
# $FreeBSD$
PORTNAME= qmake
DISTVERSION= ${QT4_VERSION}
CATEGORIES= devel
PKGNAMEPREFIX= qt4-
MAINTAINER= kde@FreeBSD.org
COMMENT= The build utility of the Qt project
USE_QT4= #empty
QT_NONSTANDARD= yes
QT_DIST= yes
REINPLACE_ARGS= -i ""
WRKSRC= ${WRKDIR}/${DISTNAME}/${PORTNAME}
MAKEFILE= ${FILESDIR}/Makefile.bsd
MAKE_ENV+= FILESDIR="${FILESDIR}"
TODAY_CMD= /bin/date +%Y-%m-%d
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'
post-patch:
@${REINPLACE_CMD} -e 's|-O2|${CXXFLAGS}|' \
-e 's|/usr/local|${LOCALBASE}|' \
-e 's|/usr/X11R6|${LOCALBASE}|' \
-e 's|release|release thread|' \
-e 's|uic|uic-qt4|' \
-e 's|moc|moc-qt4|' \
${WRKSRC}/../mkspecs/freebsd-*/qmake.conf
@${REINPLACE_CMD} -e 's|@QMAKE_QTOBJS@||g' ${WRKSRC}/Makefile.unix
# FIXME: This is ugly
@${RM} ${WRKSRC}/../mkspecs/features/unix/*.orig
@${RM} ${WRKSRC}/../mkspecs/freebsd-g++/*.orig
@${RM} ${WRKSRC}/../mkspecs/freebsd-g++46/*.orig
# Add mkspec for clang
@${CP} -PpR ${WRKSRC}/../mkspecs/freebsd-g++46 ${WRKSRC}/../mkspecs/freebsd-clang
@${REINPLACE_CMD} -e 's|g++-unix.conf|clang.conf|g' \
-e 's|freebsd-g++46|freebsd-clang|g' \
-e 's|gcc46|clang|g' \
-e 's|g++46|clang++|g' \
${WRKSRC}/../mkspecs/freebsd-clang/qmake.conf
# mkspec for devel/clang33
@${CP} -PpR ${WRKSRC}/../mkspecs/freebsd-g++46 ${WRKSRC}/../mkspecs/freebsd-clang++33
@${REINPLACE_CMD} -e 's|g++-unix.conf|clang.conf|g' \
-e 's|freebsd-g++46|freebsd-clang++33|g' \
-e 's|gcc46|clang33|g' \
-e 's|g++46|clang++33|g' \
${WRKSRC}/../mkspecs/freebsd-clang++33/qmake.conf
# Add mkspecs for the different GCC versions in the ports tree
.for v in 42 44 47 48 49
@${CP} -PpR ${WRKSRC}/../mkspecs/freebsd-g++46 ${WRKSRC}/../mkspecs/freebsd-g++${v}
@${REINPLACE_CMD} -e 's|46|${v}|g' \
${WRKSRC}/../mkspecs/freebsd-g++${v}/qmake.conf
.endfor
do-configure:
${SED} -e 's|/usr/local|${PREFIX}|g' \
-e "s|TODAY|$$(${TODAY_CMD})|g" \
< ${FILESDIR}/qconfig.cpp \
> ${WRKSRC:H}/src/corelib/global/qconfig.cpp
${ECHO} '/* empty */' > ${WRKSRC}/qconfig.h
${LN} ${WRKSRC}/qconfig.h ${WRKSRC}/../src/corelib/global/qconfig.h
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/qmake-qt4 ${STAGEDIR}${PREFIX}/bin
${MKDIR} ${STAGEDIR}${PREFIX}/share/qt4 && \
cd ${WRKSRC}/.. && ${COPYTREE_SHARE} mkspecs ${STAGEDIR}${PREFIX}/share/qt4
${LN} -sf ${PREFIX}/share/qt4/mkspecs/freebsd-${QMAKE_BASE_COMPILER} ${STAGEDIR}${PREFIX}/share/qt4/mkspecs/default
.include <bsd.port.mk>
|