| @@ -1,179 +1,179 @@ | | | @@ -1,179 +1,179 @@ |
1 | # $NetBSD: Makefile.common,v 1.47 2018/01/25 13:31:51 jperkin Exp $ | | 1 | # $NetBSD: Makefile.common,v 1.48 2019/09/19 20:26:53 nros Exp $ |
2 | # used by x11/qt4-docs/Makefile | | 2 | # used by x11/qt4-docs/Makefile |
3 | # used by x11/qt4-libs/Makefile | | 3 | # used by x11/qt4-libs/Makefile |
4 | # used by x11/qt4-mng/Makefile | | 4 | # used by x11/qt4-mng/Makefile |
5 | # used by x11/qt4-mysql/Makefile | | 5 | # used by x11/qt4-mysql/Makefile |
6 | # used by x11/qt4-pgsql/Makefile | | 6 | # used by x11/qt4-pgsql/Makefile |
7 | # used by x11/qt4-qdbus/Makefile | | 7 | # used by x11/qt4-qdbus/Makefile |
8 | # used by x11/qt4-sqlite3/Makefile | | 8 | # used by x11/qt4-sqlite3/Makefile |
9 | # used by x11/qt4-tiff/Makefile | | 9 | # used by x11/qt4-tiff/Makefile |
10 | | | 10 | |
11 | DISTNAME= qt-everywhere-opensource-src-${QTVERSION} | | 11 | DISTNAME= qt-everywhere-opensource-src-${QTVERSION} |
12 | CATEGORIES= x11 | | 12 | CATEGORIES= x11 |
13 | MASTER_SITES= http://download.qt-project.org/official_releases/qt/${QTVERSION:R}/${QTVERSION}/ | | 13 | MASTER_SITES= http://download.qt.io/archive/qt/${QTVERSION:R}/${QTVERSION}/ |
14 | EXTRACT_USING= bsdtar | | 14 | EXTRACT_USING= bsdtar |
15 | | | 15 | |
16 | .include "../../x11/qt4/Makefile.common" | | 16 | .include "../../x11/qt4/Makefile.common" |
17 | | | 17 | |
18 | DISTINFO_FILE= ${.CURDIR}/../../x11/qt4-libs/distinfo | | 18 | DISTINFO_FILE= ${.CURDIR}/../../x11/qt4-libs/distinfo |
19 | FILESDIR= ${.CURDIR}/../../x11/qt4-libs/files | | 19 | FILESDIR= ${.CURDIR}/../../x11/qt4-libs/files |
20 | PATCHDIR= ${.CURDIR}/../../x11/qt4-libs/patches | | 20 | PATCHDIR= ${.CURDIR}/../../x11/qt4-libs/patches |
21 | | | 21 | |
22 | HAS_CONFIGURE= yes | | 22 | HAS_CONFIGURE= yes |
23 | USE_LANGUAGES= c c++ | | 23 | USE_LANGUAGES= c c++ |
24 | USE_LIBTOOL= yes | | 24 | USE_LIBTOOL= yes |
25 | USE_TOOLS+= gmake | | 25 | USE_TOOLS+= gmake |
26 | | | 26 | |
27 | .if empty(PKGNAME:U:Mqt4-libs-*) | | 27 | .if empty(PKGNAME:U:Mqt4-libs-*) |
28 | BUILDLINK_API_DEPENDS.qt4-libs+= qt4-libs>=${QTVERSION} | | 28 | BUILDLINK_API_DEPENDS.qt4-libs+= qt4-libs>=${QTVERSION} |
29 | .endif | | 29 | .endif |
30 | | | 30 | |
31 | QTPREFIX= ${PREFIX}/qt4 | | 31 | QTPREFIX= ${PREFIX}/qt4 |
32 | | | 32 | |
33 | # libphonon is available in multimedia/phonon | | 33 | # libphonon is available in multimedia/phonon |
34 | CONFIGURE_ARGS+= -no-phonon | | 34 | CONFIGURE_ARGS+= -no-phonon |
35 | CONFIGURE_ARGS+= -no-phonon-backend | | 35 | CONFIGURE_ARGS+= -no-phonon-backend |
36 | CONFIGURE_ARGS+= -optimized-qmake | | 36 | CONFIGURE_ARGS+= -optimized-qmake |
37 | CONFIGURE_ARGS+= -prefix "${QTPREFIX}" | | 37 | CONFIGURE_ARGS+= -prefix "${QTPREFIX}" |
38 | CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-l*} | | 38 | CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-l*} |
39 | CONFIGURE_ARGS+= -opensource -confirm-license | | 39 | CONFIGURE_ARGS+= -opensource -confirm-license |
40 | CONFIGURE_ARGS+= -sysconfdir "${PKG_SYSCONFDIR}/xdg" | | 40 | CONFIGURE_ARGS+= -sysconfdir "${PKG_SYSCONFDIR}/xdg" |
41 | | | 41 | |
42 | .include "../../mk/bsd.prefs.mk" | | 42 | .include "../../mk/bsd.prefs.mk" |
43 | | | 43 | |
44 | .if !empty(MAKE_JOBS) | | 44 | .if !empty(MAKE_JOBS) |
45 | CONFIGURE_ENV+= MAKE_FLAGS=-j${MAKE_JOBS:Q} | | 45 | CONFIGURE_ENV+= MAKE_FLAGS=-j${MAKE_JOBS:Q} |
46 | .endif | | 46 | .endif |
47 | | | 47 | |
48 | LIBQT?= -lQtCore -lQtGui | | 48 | LIBQT?= -lQtCore -lQtGui |
49 | | | 49 | |
50 | MAKE_ENV+= QTPREFIX=${QTPREFIX:Q} | | 50 | MAKE_ENV+= QTPREFIX=${QTPREFIX:Q} |
51 | MAKE_ENV+= QTDIR=${WRKSRC} | | 51 | MAKE_ENV+= QTDIR=${WRKSRC} |
52 | PLIST_VARS+= mac unix | | 52 | PLIST_VARS+= mac unix |
53 | .if ${OPSYS} == "Darwin" | | 53 | .if ${OPSYS} == "Darwin" |
54 | CFLAGS+= -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1 | | 54 | CFLAGS+= -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1 |
55 | PLIST.mac= yes | | 55 | PLIST.mac= yes |
56 | QMAKE_CONF= qmake.conf.mac | | 56 | QMAKE_CONF= qmake.conf.mac |
57 | QMAKE_RANLIB= ${RANLIB} | | 57 | QMAKE_RANLIB= ${RANLIB} |
58 | .else | | 58 | .else |
59 | PLIST.unix= yes | | 59 | PLIST.unix= yes |
60 | QMAKE_CONF= qmake.conf | | 60 | QMAKE_CONF= qmake.conf |
61 | QMAKE_RANLIB= ${TRUE} | | 61 | QMAKE_RANLIB= ${TRUE} |
62 | .endif | | 62 | .endif |
63 | | | 63 | |
64 | # avoid creating a .qt directory in the users home directory | | 64 | # avoid creating a .qt directory in the users home directory |
65 | SCRIPTS_ENV+= HOME=${WRKDIR} | | 65 | SCRIPTS_ENV+= HOME=${WRKDIR} |
66 | | | 66 | |
67 | .include "../../mk/compiler.mk" | | 67 | .include "../../mk/compiler.mk" |
68 | | | 68 | |
69 | # We can't set USE_LANGUAGES+=c++11 yet because doing so breaks the GCC build | | 69 | # We can't set USE_LANGUAGES+=c++11 yet because doing so breaks the GCC build |
70 | # in lots of ways, so for now just enable it manually for clang, and enforce | | 70 | # in lots of ways, so for now just enable it manually for clang, and enforce |
71 | # C++98 for GCC as GCC 7 defaults to C++14. | | 71 | # C++98 for GCC as GCC 7 defaults to C++14. |
72 | # | | 72 | # |
73 | .if !empty(PKGSRC_COMPILER:Mclang) | | 73 | .if !empty(PKGSRC_COMPILER:Mclang) |
74 | CXXFLAGS+= -std=c++11 -Wno-c++11-narrowing | | 74 | CXXFLAGS+= -std=c++11 -Wno-c++11-narrowing |
75 | . if empty(MACHINE_PLATFORM:MDarwin-*-*) | | 75 | . if empty(MACHINE_PLATFORM:MDarwin-*-*) |
76 | CXXFLAGS+= -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1 | | 76 | CXXFLAGS+= -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1 |
77 | . endif | | 77 | . endif |
78 | .elif !empty(PKGSRC_COMPILER:Mgcc) | | 78 | .elif !empty(PKGSRC_COMPILER:Mgcc) |
79 | CXXFLAGS+= -std=c++98 | | 79 | CXXFLAGS+= -std=c++98 |
80 | .endif | | 80 | .endif |
81 | | | 81 | |
82 | .if ${OPSYS} == "SunOS" | | 82 | .if ${OPSYS} == "SunOS" |
83 | . if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang) | | 83 | . if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang) |
84 | . if ${ABI:U} == "64" | | 84 | . if ${ABI:U} == "64" |
85 | CONFIGURE_ARGS+= -platform solaris-g++-64 | | 85 | CONFIGURE_ARGS+= -platform solaris-g++-64 |
86 | . else | | 86 | . else |
87 | CONFIGURE_ARGS+= -platform solaris-g++ | | 87 | CONFIGURE_ARGS+= -platform solaris-g++ |
88 | . endif | | 88 | . endif |
89 | . else | | 89 | . else |
90 | . if ${ABI:U} == "64" | | 90 | . if ${ABI:U} == "64" |
91 | CONFIGURE_ARGS+= -platform solaris-cc-64 | | 91 | CONFIGURE_ARGS+= -platform solaris-cc-64 |
92 | . else | | 92 | . else |
93 | CONFIGURE_ARGS+= -platform solaris-cc | | 93 | CONFIGURE_ARGS+= -platform solaris-cc |
94 | . endif | | 94 | . endif |
95 | . endif | | 95 | . endif |
96 | SYS_LIBS= -lresolv -lsocket -lnsl -lrt | | 96 | SYS_LIBS= -lresolv -lsocket -lnsl -lrt |
97 | .elif ${OPSYS} == "Interix" | | 97 | .elif ${OPSYS} == "Interix" |
98 | CONFIGURE_ARGS+= -platform interix-g++ | | 98 | CONFIGURE_ARGS+= -platform interix-g++ |
99 | CFLAGS+= -I/usr/local/include/bind | | 99 | CFLAGS+= -I/usr/local/include/bind |
100 | LDFLAGS+= -L/usr/local/lib/bind -lbind | | 100 | LDFLAGS+= -L/usr/local/lib/bind -lbind |
101 | BUILDLINK_PASSTHRU_DIRS+=/usr/local/include/bind /usr/local/lib/bind | | 101 | BUILDLINK_PASSTHRU_DIRS+=/usr/local/include/bind /usr/local/lib/bind |
102 | SYS_LIBS= -lbind -ldb -ldl | | 102 | SYS_LIBS= -lbind -ldb -ldl |
103 | .elif ${OPSYS} == "DragonFly" | | 103 | .elif ${OPSYS} == "DragonFly" |
104 | CONFIGURE_ARGS+= -platform freebsd-g++ | | 104 | CONFIGURE_ARGS+= -platform freebsd-g++ |
105 | .elif ${OPSYS} == "Darwin" | | 105 | .elif ${OPSYS} == "Darwin" |
106 | . if !empty(PKGSRC_COMPILER:Mclang) | | 106 | . if !empty(PKGSRC_COMPILER:Mclang) |
107 | CONFIGURE_ARGS+= -platform macx-llvm | | 107 | CONFIGURE_ARGS+= -platform macx-llvm |
108 | . else | | 108 | . else |
109 | CONFIGURE_ARGS+= -platform macx-g++ | | 109 | CONFIGURE_ARGS+= -platform macx-g++ |
110 | . endif | | 110 | . endif |
111 | CONFIGURE_ARGS+= -no-dwarf2 | | 111 | CONFIGURE_ARGS+= -no-dwarf2 |
112 | CONFIGURE_ARGS+= -no-framework | | 112 | CONFIGURE_ARGS+= -no-framework |
113 | . if exists(/usr/lib/libresolv.dylib) | | 113 | . if exists(/usr/lib/libresolv.dylib) |
114 | LDFLAGS+= -lresolv | | 114 | LDFLAGS+= -lresolv |
115 | . endif | | 115 | . endif |
116 | .elif ${OPSYS} == "Linux" | | 116 | .elif ${OPSYS} == "Linux" |
117 | LDFLAGS+= -ldl | | 117 | LDFLAGS+= -ldl |
118 | .endif | | 118 | .endif |
119 | | | 119 | |
120 | .if ${OPSYS} != "Darwin" && ${X11_TYPE} != "native" | | 120 | .if ${OPSYS} != "Darwin" && ${X11_TYPE} != "native" |
121 | .include "../../x11/libXinerama/buildlink3.mk" | | 121 | .include "../../x11/libXinerama/buildlink3.mk" |
122 | .elif !exists(${X11BASE}/lib/libXinerama.so) && \ | | 122 | .elif !exists(${X11BASE}/lib/libXinerama.so) && \ |
123 | !exists(${X11BASE}/lib/libXinerama.dylib) | | 123 | !exists(${X11BASE}/lib/libXinerama.dylib) |
124 | CONFIGURE_ARGS+= -no-xinerama | | 124 | CONFIGURE_ARGS+= -no-xinerama |
125 | .endif | | 125 | .endif |
126 | | | 126 | |
127 | SUBST_CLASSES+= dnr | | 127 | SUBST_CLASSES+= dnr |
128 | SUBST_MESSAGE.dnr= Disabling debug_and_release. | | 128 | SUBST_MESSAGE.dnr= Disabling debug_and_release. |
129 | SUBST_STAGE.dnr= pre-configure | | 129 | SUBST_STAGE.dnr= pre-configure |
130 | SUBST_FILES.dnr= mkspecs/features/debug_and_release.prf | | 130 | SUBST_FILES.dnr= mkspecs/features/debug_and_release.prf |
131 | SUBST_SED.dnr= -e 's,^,\#\#\#,' | | 131 | SUBST_SED.dnr= -e 's,^,\#\#\#,' |
132 | | | 132 | |
133 | SUBST_CLASSES+= nib | | 133 | SUBST_CLASSES+= nib |
134 | SUBST_MESSAGE.nib= Fixing nib loading on Mac OS X. | | 134 | SUBST_MESSAGE.nib= Fixing nib loading on Mac OS X. |
135 | SUBST_STAGE.nib= pre-configure | | 135 | SUBST_STAGE.nib= pre-configure |
136 | SUBST_FILES.nib= src/gui/kernel/qapplication_mac.mm | | 136 | SUBST_FILES.nib= src/gui/kernel/qapplication_mac.mm |
137 | SUBST_VARS.nib= QTPREFIX | | 137 | SUBST_VARS.nib= QTPREFIX |
138 | | | 138 | |
139 | SUBST_CLASSES+= lt | | 139 | SUBST_CLASSES+= lt |
140 | SUBST_MESSAGE.lt= Enabling libtool. | | 140 | SUBST_MESSAGE.lt= Enabling libtool. |
141 | SUBST_STAGE.lt= pre-configure | | 141 | SUBST_STAGE.lt= pre-configure |
142 | SUBST_FILES.lt= src/gui/gui.pro | | 142 | SUBST_FILES.lt= src/gui/gui.pro |
143 | SUBST_SED.lt= -e 's,$$$$QMAKE_CXX -c -W,$${LIBTOOL} --mode=compile &,' | | 143 | SUBST_SED.lt= -e 's,$$$$QMAKE_CXX -c -W,$${LIBTOOL} --mode=compile &,' |
144 | SUBST_SED.lt+= -e 's,$$$${first(QMAKE_EXT_OBJ)},.lo,' | | 144 | SUBST_SED.lt+= -e 's,$$$${first(QMAKE_EXT_OBJ)},.lo,' |
145 | | | 145 | |
146 | .include "options.mk" | | 146 | .include "options.mk" |
147 | | | 147 | |
148 | # Reverse the change to how templates are handled made between 3.0.4 | | 148 | # Reverse the change to how templates are handled made between 3.0.4 |
149 | # and 3.0.5 for older toolchains. Removing inline for newer toolchains | | 149 | # and 3.0.5 for older toolchains. Removing inline for newer toolchains |
150 | # produces smaller code. Removing inline for older toolchains prod- | | 150 | # produces smaller code. Removing inline for older toolchains prod- |
151 | # uces buggy code. | | 151 | # uces buggy code. |
152 | .if !empty(CC_VERSION:Mgcc-2.8*) | | 152 | .if !empty(CC_VERSION:Mgcc-2.8*) |
153 | CXXFLAGS+= -DQ_INLINE_TEMPLATES=inline | | 153 | CXXFLAGS+= -DQ_INLINE_TEMPLATES=inline |
154 | .endif | | 154 | .endif |
155 | | | 155 | |
156 | pre-configure: | | 156 | pre-configure: |
157 | sed -e 's:@LOCALBASE@:${LOCALBASE}:g' \ | | 157 | sed -e 's:@LOCALBASE@:${LOCALBASE}:g' \ |
158 | -e 's:@X11BASE@:${X11BASE}:g' \ | | 158 | -e 's:@X11BASE@:${X11BASE}:g' \ |
159 | -e 's:@LIBTOOL@:${LIBTOOL:Q}:g' \ | | 159 | -e 's:@LIBTOOL@:${LIBTOOL:Q}:g' \ |
160 | -e 's:@CC@:${CC:Q}:g' \ | | 160 | -e 's:@CC@:${CC:Q}:g' \ |
161 | -e 's:@CXX@:${CXX:Q}:g' \ | | 161 | -e 's:@CXX@:${CXX:Q}:g' \ |
162 | -e 's:@LDFLAGS@:${LDFLAGS:Q}:g' \ | | 162 | -e 's:@LDFLAGS@:${LDFLAGS:Q}:g' \ |
163 | -e 's:@CFLAGS@:${CFLAGS:Q}:g' \ | | 163 | -e 's:@CFLAGS@:${CFLAGS:Q}:g' \ |
164 | -e 's:@CXXFLAGS@:${CXXFLAGS:Q}:g' \ | | 164 | -e 's:@CXXFLAGS@:${CXXFLAGS:Q}:g' \ |
165 | -e 's:@SYS_LIBS@:${SYS_LIBS:Q}:g' \ | | 165 | -e 's:@SYS_LIBS@:${SYS_LIBS:Q}:g' \ |
166 | -e 's:@LEX@:${LEX}:g' \ | | 166 | -e 's:@LEX@:${LEX}:g' \ |
167 | -e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \ | | 167 | -e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \ |
168 | -e 's:@AR@:${AR:Q}:g' \ | | 168 | -e 's:@AR@:${AR:Q}:g' \ |
169 | -e 's:@MKDIR@:${MKDIR}:g' \ | | 169 | -e 's:@MKDIR@:${MKDIR}:g' \ |
170 | -e 's:@LIBQT@:${LIBQT:Q}:g' \ | | 170 | -e 's:@LIBQT@:${LIBQT:Q}:g' \ |
171 | -e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS:Q}:g' \ | | 171 | -e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS:Q}:g' \ |
172 | -e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \ | | 172 | -e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \ |
173 | -e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \ | | 173 | -e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \ |
174 | -e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \ | | 174 | -e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \ |
175 | ${FILESDIR}/${QMAKE_CONF} > ${WRKSRC}/qmake.conf | | 175 | ${FILESDIR}/${QMAKE_CONF} > ${WRKSRC}/qmake.conf |
176 | for dir in ${WRKSRC}/mkspecs/*; do \ | | 176 | for dir in ${WRKSRC}/mkspecs/*; do \ |
177 | cp ${WRKSRC}/qmake.conf $${dir}; \ | | 177 | cp ${WRKSRC}/qmake.conf $${dir}; \ |
178 | rm -f $${dir}/*.orig; \ | | 178 | rm -f $${dir}/*.orig; \ |
179 | done | | 179 | done |