blob: edf35cbb09319cf8caaa446cc95b0ce1f32d9c8a (
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# $NetBSD: Makefile.common,v 1.21 2010/07/04 06:00:14 adam Exp $
# used by x11/qt4-docs/Makefile
# used by x11/qt4-libs/Makefile
# used by x11/qt4-mng/Makefile
# used by x11/qt4-mysql/Makefile
# used by x11/qt4-pgsql/Makefile
# used by x11/qt4-qdbus/Makefile
# used by x11/qt4-sqlite3/Makefile
# used by x11/qt4-tiff/Makefile
DISTNAME= qt-everywhere-opensource-src-${QTVERSION}
CATEGORIES= x11
MASTER_SITES= ftp://ftp.qt.nokia.com/qt/source/
#EXTRACT_SUFX= .tar.bz2
.include "../../x11/qt4/Makefile.common"
DISTINFO_FILE= ${.CURDIR}/../../x11/qt4-libs/distinfo
FILESDIR= ${.CURDIR}/../../x11/qt4-libs/files
PATCHDIR= ${.CURDIR}/../../x11/qt4-libs/patches
HAS_CONFIGURE= yes
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= gmake
QTPREFIX= ${PREFIX}/qt4
#CONFIGURE_ARGS+= -arch ${MACHINE_ARCH}
CONFIGURE_ARGS+= -optimized-qmake
CONFIGURE_ARGS+= -prefix "${QTPREFIX}"
CONFIGURE_ARGS+= -qt-gif # qt4 does not write compressed GIFs
CONFIGURE_ARGS.SunOS+= -no-xrender
CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-Wl*:S/-Wl,//}
OPSYSVARS+= CONFIGURE_ARGS
CONFIGURE_ARGS+= < ${FILESDIR}/license-acceptance
LIBQT?= -lQtCore -lQtGui
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
MAKE_ENV+= QTDIR=${WRKSRC}
# avoid creating a .qt directory in the users home directory
SCRIPTS_ENV+= HOME=${WRKDIR}
.include "../../mk/compiler.mk"
.if ${OPSYS} == "SunOS"
. if !empty(CC_VERSION:Mgcc*)
. if ${ABI:U} == "64"
CONFIGURE_ARGS+= -platform solaris-g++-64
. else
CONFIGURE_ARGS+= -platform solaris-g++
. endif
. else
. if ${ABI:U} == "64"
CONFIGURE_ARGS+= -platform solaris-cc-64
. else
CONFIGURE_ARGS+= -platform solaris-cc
. endif
. endif
SYS_LIBS= -lresolv -lsocket -lnsl -lrt
.elif ${OPSYS} == "Interix"
CONFIGURE_ARGS+= -platform interix-g++
CFLAGS+= -I/usr/local/include/bind
LDFLAGS+= -L/usr/local/lib/bind -lbind
BUILDLINK_PASSTHRU_DIRS+=/usr/local/include/bind /usr/local/lib/bind
SYS_LIBS= -lbind -ldb -ldl
.elif ${OPSYS} == "DragonFly"
CONFIGURE_ARGS+= -platform freebsd-g++
.elif ${OPSYS} == "Darwin"
#CONFIGURE_ARGS+= -cocoa
QMAKE_RANLIB= ${RANLIB}
. if exists(/usr/lib/libresolv.dylib)
LDFLAGS+= -lresolv
. endif
.elif ${OPSYS} == "Linux"
LDFLAGS+= -ldl
.endif
QMAKE_RANLIB?= ${TRUE}
.if ${X11_TYPE} != "native"
.include "../../x11/libXinerama/buildlink3.mk"
.elif !exists(${X11BASE}/lib/libXinerama.so) && \
!exists(${X11BASE}/lib/libXinerama.dylib)
CONFIGURE_ARGS+= -no-xinerama
.endif
.include "options.mk"
# Reverse the change to how templates are handled made between 3.0.4
# and 3.0.5 for older toolchains. Removing inline for newer toolchains
# produces smaller code. Removing inline for older toolchains prod-
# uces buggy code.
.if !empty(CC_VERSION:Mgcc-2.8*)
CXXFLAGS+= -DQ_INLINE_TEMPLATES=inline
.endif
pre-configure:
sed -e 's:@LOCALBASE@:${LOCALBASE:Q}:g' \
-e 's:@X11BASE@:${X11BASE:Q}:g' \
-e 's:@X11PREFIX@:${X11PREFIX:Q}:g' \
-e 's:@LIBTOOL@:${LIBTOOL:Q}:g' \
-e 's:@CC@:${CC:Q}:g' \
-e 's:@CXX@:${CXX:Q}:g' \
-e 's:@LDFLAGS@:${LDFLAGS:Q}:g' \
-e 's:@CFLAGS@:${CFLAGS:Q}:g' \
-e 's:@CXXFLAGS@:${CXXFLAGS:Q}:g' \
-e 's:@SYS_LIBS@:${SYS_LIBS:Q}:g' \
-e 's:@LEX@:${LEX:Q}:g' \
-e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \
-e 's:@AR@:${AR:Q}:g' \
-e 's:@MKDIR@:${MKDIR:Q}:g' \
-e 's:@LIBQT@:${LIBQT:Q}:g' \
-e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS:Q}:g' \
-e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \
-e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG:Q}:g' \
-e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \
${FILESDIR}/qmake.conf > ${WRKSRC}/qmake.conf
for dir in ${WRKSRC}/mkspecs/*; do \
cp ${WRKSRC}/qmake.conf $${dir}; \
rm -f $${dir}/*.orig; \
done
|