blob: c7deaca38a958280362e3744ac52b6c0f4752685 (
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
# $NetBSD: Makefile.common,v 1.9 2014/01/28 08:46:14 ryoon Exp $
# used by x11/qt5-dbus/Makefile
# used by x11/qt5-mysql/Makefile
# used by x11/qt5-odbc/Makefile
# used by x11/qt5-psql/Makefile
# used by x11/qt5-qtbase/Makefile
# used by x11/qt5-qtdeclarative/Makefile
# used by x11/qt5-qtdoc/Makefile
# used by x11/qt5-qtgraphicaleffects/Makefile
# used by x11/qt5-qtimageformats/Makefile
# used by x11/qt5-qtlocation/Makefile
# used by x11/qt5-qtmultimedia/Makefile
# used by x11/qt5-qtquick1/Makefile
# used by x11/qt5-qtquickcontrols/Makefile
# used by x11/qt5-qtscript/Makefile
# used by x11/qt5-qtsensors/Makefile
# used by x11/qt5-qtserialport/Makefile
# used by x11/qt5-qtsvg/Makefile
# used by x11/qt5-qttools/Makefile
# used by x11/qt5-qttranslations/Makefile
# used by x11/qt5-qtwebkit/Makefile
# used by x11/qt5-qtx11extras/Makefile
# used by x11/qt5-qtxmlpatterns/Makefile
# used by x11/qt5-sqlite3/Makefile
DISTNAME= qt-everywhere-opensource-src-${QTDISTVER}
CATEGORIES= x11
MASTER_SITES= http://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/
EXTRACT_SUFX= .tar.xz
EXTRACT_USING= bsdtar
.include "../../x11/qt5/Makefile.common"
.include "options.mk"
DISTINFO_FILE= ${.CURDIR}/../../x11/qt5-qtbase/distinfo
FILESDIR= ${.CURDIR}/../../x11/qt5-qtbase/files
PATCHDIR= ${.CURDIR}/../../x11/qt5-qtbase/patches
.if defined(MAKE_JOBS)
.if !defined(MAKE_JOBS_SAFE) || empty(MAKE_JOBS_SAFE:M[nN][oO])
CONFIGURE_ENV+= MAKE_FLAGS=-j${MAKE_JOBS:Q}
.endif
.endif
.include "../../mk/dlopen.buildlink3.mk"
BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:M*}
HAS_CONFIGURE= yes
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= gmake perl:build pkg-config
CONFIG_SHELL= ${PERL5}
REPLACE_PERL+= qtbase/bin/syncqt.pl
REPLACE_PERL+= qtwebkit/Source/WebKit2/Scripts/generate-forwarding-headers.pl
# wcstof(3) etc. is used in C++ code.
CFLAGS.NetBSD+= -D_NETBSD_SOURCE
# for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined.
BUILDLINK_TRANSFORM+= rm:-Wundef
CONFIGURE_ARGS+= -optimized-qmake
CONFIGURE_ARGS+= -prefix "${QTPREFIX}"
CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-l*}
CONFIGURE_ARGS+= -opensource -confirm-license
CONFIGURE_ARGS+= -accessibility
CONFIGURE_ARGS+= -fontconfig
CONFIGURE_ARGS+= -iconv
CONFIGURE_ARGS+= -icu
CONFIGURE_ARGS+= -openssl-linked
CONFIGURE_ARGS+= -nomake examples
CONFIGURE_ARGS+= -nomake tests
CONFIGURE_ARGS+= -no-pch
CONFIGURE_ARGS+= -no-strip
CONFIGURE_ARGS+= -system-libjpeg
CONFIGURE_ARGS+= -system-libpng
CONFIGURE_ARGS+= -system-sqlite
CONFIGURE_ARGS+= -system-pcre
CONFIGURE_ARGS+= -system-zlib
CONFIGURE_ARGS+= -no-dbus
CONFIGURE_ARGS+= -no-sql-mysql
CONFIGURE_ARGS+= -no-sql-psql
CONFIGURE_ARGS+= -no-sql-sqlite
OPSYSVARS+= CONFIGURE_ARGS
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} != "SunOS"
CONFIGURE_ARGS+= -reduce-relocations
.endif
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
QMAKE_CONF= qmake.conf
# 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
BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections
.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"
. if !empty(PKGSRC_COMPILER:Mclang)
CONFIGURE_ARGS+= -platform macx-llvm
. else
CONFIGURE_ARGS+= -platform macx-g++
. endif
CONFIGURE_ARGS+= -no-dwarf2
CONFIGURE_ARGS+= -no-framework
. if exists(/usr/lib/libresolv.dylib)
LDFLAGS+= -lresolv
. endif
.elif ${OPSYS} == "Linux"
LDFLAGS+= -ldl
.endif
remove-3rdparty-libs:
.for i in freetype libjpeg libpng zlib xcb
cd ${WRKSRC}/qtbase/src/3rdparty && \
${RM} -fr ${i}
.endfor
set-qmake-conf:
${SED} -e 's:@LOCALBASE@:${LOCALBASE}:g' \
-e 's:@X11BASE@:${X11BASE}:g' \
-e 's:@X11PREFIX@:${X11PREFIX}: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}:g' \
-e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \
-e 's:@AR@:${AR:Q}:g' \
-e 's:@MKDIR@:${MKDIR}: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}:g' \
-e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \
${FILESDIR}/${QMAKE_CONF} > ${WRKSRC}/qmake.conf
for dir in ${WRKSRC}/qtbase/mkspecs/*; do \
cp ${WRKSRC}/qmake.conf $${dir}; \
rm -f $${dir}/*.orig; \
done
no-qmake-build:
cd ${WRKSRC} && \
${PATCH} < ${FILESDIR}/patch-qtbase_configure.no-qmake
${LN} -sf ${QTPREFIX}/bin/moc ${WRKSRC}/qtbase/bin/moc
${LN} -sf ${QTPREFIX}/bin/qmake ${WRKSRC}/qtbase/bin/qmake
${LN} -sf ${QTPREFIX}/bin/rcc ${WRKSRC}/qtbase/bin/rcc
${LN} -sf ${QTPREFIX}/bin/uic ${WRKSRC}/qtbase/bin/uic
.if empty(PKGPATH:Mx11/qt5-qtbase)
pre-configure: remove-3rdparty-libs set-qmake-conf no-qmake-build
.else
pre-configure: remove-3rdparty-libs set-qmake-conf
.endif
.if empty(PKGPATH:Mx11/qt5-qtbase) && empty(PKGPATH:Mx11/qt5-sqlite3) \
&& empty(PKGPATH:Mx11/qt5-mysql) && empty(PKGPATH:Mx11/qt5-psql) \
&& empty(PKGPATH:Mx11/qt5-odbc)
post-configure:
cd ${WRKSRC}/${BUILD_DIRS} && \
${PKGSRC_SETENV} ${_CONFIGURE_SCRIPT_ENV} ${QTPREFIX}/bin/qmake -o Makefile
.endif
.include "../../devel/zlib/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/icu/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
|