Move C++11 setting before the first inclusion of compiler.mk. Reuse the results instead of multiply inclusions.diff -r1.116 -r1.117 pkgsrc/x11/qt4-libs/Makefile
(joerg)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.116 2017/05/03 08:38:46 jperkin Exp $ | 1 | # $NetBSD: Makefile,v 1.117 2017/05/05 17:38:00 joerg Exp $ | |
2 | 2 | |||
3 | PKGNAME= qt4-libs-${QTVERSION} | 3 | PKGNAME= qt4-libs-${QTVERSION} | |
4 | PKGREVISION= 6 | 4 | PKGREVISION= 6 | |
5 | COMMENT= C++ X GUI toolkit | 5 | COMMENT= C++ X GUI toolkit | |
6 | 6 | |||
7 | .include "../../x11/qt4-libs/Makefile.common" | 7 | .include "../../x11/qt4-libs/Makefile.common" | |
8 | 8 | |||
9 | # XXX this is to test what really gets installed when 'do-install' is disabled | 9 | # XXX this is to test what really gets installed when 'do-install' is disabled | |
10 | INSTALL_DIRS+= src | 10 | INSTALL_DIRS+= src | |
11 | 11 | |||
12 | BUILD_TARGET= sub-src | 12 | BUILD_TARGET= sub-src | |
13 | 13 | |||
14 | PTHREAD_OPTS+= require | 14 | PTHREAD_OPTS+= require | |
@@ -18,29 +18,26 @@ BUILDLINK_PASSTHRU_DIRS+=${QTPREFIX} | @@ -18,29 +18,26 @@ BUILDLINK_PASSTHRU_DIRS+=${QTPREFIX} | |||
18 | PLIST_SRC= ${WRKDIR}/PLIST ${PKGDIR}/PLIST | 18 | PLIST_SRC= ${WRKDIR}/PLIST ${PKGDIR}/PLIST | |
19 | 19 | |||
20 | # built as plugins | 20 | # built as plugins | |
21 | CONFIGURE_ARGS+= -no-dbus | 21 | CONFIGURE_ARGS+= -no-dbus | |
22 | CONFIGURE_ARGS+= -no-libmng | 22 | CONFIGURE_ARGS+= -no-libmng | |
23 | CONFIGURE_ARGS+= -no-libtiff | 23 | CONFIGURE_ARGS+= -no-libtiff | |
24 | CONFIGURE_ARGS+= -no-sql-sqlite | 24 | CONFIGURE_ARGS+= -no-sql-sqlite | |
25 | 25 | |||
26 | # kdelibs4 requires openssl support! | 26 | # kdelibs4 requires openssl support! | |
27 | CONFIGURE_ARGS+= -openssl-linked | 27 | CONFIGURE_ARGS+= -openssl-linked | |
28 | 28 | |||
29 | CONFIGURE_ARGS+= -iconv | 29 | CONFIGURE_ARGS+= -iconv | |
30 | 30 | |||
31 | USE_LANGUAGES+= c++11 | |||
32 | ||||
33 | .include "../../mk/compiler.mk" | |||
34 | .if !empty(PKGSRC_COMPILER:Mclang) | 31 | .if !empty(PKGSRC_COMPILER:Mclang) | |
35 | CXXFLAGS+= -Wno-c++11-narrowing | 32 | CXXFLAGS+= -Wno-c++11-narrowing | |
36 | . if empty(MACHINE_PLATFORM:MDarwin-*-*) | 33 | . if empty(MACHINE_PLATFORM:MDarwin-*-*) | |
37 | CXXFLAGS+= -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1 | 34 | CXXFLAGS+= -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1 | |
38 | . endif | 35 | . endif | |
39 | .endif | 36 | .endif | |
40 | 37 | |||
41 | INSTALLATION_DIRS= lib/pkgconfig | 38 | INSTALLATION_DIRS= lib/pkgconfig | |
42 | INSTALLATION_DIRS+= ${QTPREFIX}/bin | 39 | INSTALLATION_DIRS+= ${QTPREFIX}/bin | |
43 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/folderlistmodel | 40 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/folderlistmodel | |
44 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/gestures | 41 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/gestures | |
45 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/particles | 42 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/particles | |
46 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/shaders | 43 | INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/shaders |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile.common,v 1.41 2016/02/25 08:27:05 jperkin Exp $ | 1 | # $NetBSD: Makefile.common,v 1.42 2017/05/05 17:38:00 joerg 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-project.org/official_releases/qt/${QTVERSION:R}/${QTVERSION}/ | |
14 | EXTRACT_USING= bsdtar | 14 | EXTRACT_USING= bsdtar | |
@@ -53,26 +53,28 @@ PLIST_VARS+= mac unix | @@ -53,26 +53,28 @@ PLIST_VARS+= mac unix | |||
53 | .if ${OPSYS} == "Darwin" | 53 | .if ${OPSYS} == "Darwin" | |
54 | PLIST.mac= yes | 54 | PLIST.mac= yes | |
55 | QMAKE_CONF= qmake.conf.mac | 55 | QMAKE_CONF= qmake.conf.mac | |
56 | QMAKE_RANLIB= ${RANLIB} | 56 | QMAKE_RANLIB= ${RANLIB} | |
57 | .else | 57 | .else | |
58 | PLIST.unix= yes | 58 | PLIST.unix= yes | |
59 | QMAKE_CONF= qmake.conf | 59 | QMAKE_CONF= qmake.conf | |
60 | QMAKE_RANLIB= ${TRUE} | 60 | QMAKE_RANLIB= ${TRUE} | |
61 | .endif | 61 | .endif | |
62 | 62 | |||
63 | # avoid creating a .qt directory in the users home directory | 63 | # avoid creating a .qt directory in the users home directory | |
64 | SCRIPTS_ENV+= HOME=${WRKDIR} | 64 | SCRIPTS_ENV+= HOME=${WRKDIR} | |
65 | 65 | |||
66 | USE_LANGUAGES+= c++11 | |||
67 | ||||
66 | .include "../../mk/compiler.mk" | 68 | .include "../../mk/compiler.mk" | |
67 | 69 | |||
68 | .if ${OPSYS} == "SunOS" | 70 | .if ${OPSYS} == "SunOS" | |
69 | . if !empty(CC_VERSION:Mgcc*) | 71 | . if !empty(CC_VERSION:Mgcc*) | |
70 | . if ${ABI:U} == "64" | 72 | . if ${ABI:U} == "64" | |
71 | CONFIGURE_ARGS+= -platform solaris-g++-64 | 73 | CONFIGURE_ARGS+= -platform solaris-g++-64 | |
72 | . else | 74 | . else | |
73 | CONFIGURE_ARGS+= -platform solaris-g++ | 75 | CONFIGURE_ARGS+= -platform solaris-g++ | |
74 | . endif | 76 | . endif | |
75 | . else | 77 | . else | |
76 | . if ${ABI:U} == "64" | 78 | . if ${ABI:U} == "64" | |
77 | CONFIGURE_ARGS+= -platform solaris-cc-64 | 79 | CONFIGURE_ARGS+= -platform solaris-cc-64 | |
78 | . else | 80 | . else |
@@ -1,28 +1,26 @@ | @@ -1,28 +1,26 @@ | |||
1 | # $NetBSD: hacks.mk,v 1.3 2014/12/15 11:46:36 jperkin Exp $ | 1 | # $NetBSD: hacks.mk,v 1.4 2017/05/05 17:38:00 joerg Exp $ | |
2 | 2 | |||
3 | ### [Wed Aug 3 12:18:16 UTC 2011 : tron] | 3 | ### [Wed Aug 3 12:18:16 UTC 2011 : tron] | |
4 | ### If "qmake" is build with "-O2" or better with "g++" under Mac OS X the | 4 | ### If "qmake" is build with "-O2" or better with "g++" under Mac OS X the | |
5 | ### resulting binary will crash. This fixes PR pkg/44716 by Richard Hansen. | 5 | ### resulting binary will crash. This fixes PR pkg/44716 by Richard Hansen. | |
6 | .if ${OPSYS} == "Darwin" | 6 | .if ${OPSYS} == "Darwin" | |
7 | . include "../../mk/compiler.mk" | |||
8 | . if !empty(CC_VERSION:Mgcc*) | 7 | . if !empty(CC_VERSION:Mgcc*) | |
9 | PKG_HACKS+= macosx-codegen | 8 | PKG_HACKS+= macosx-codegen | |
10 | BUILDLINK_TRANSFORM+= opt:-O[0-9]*:-O1 | 9 | BUILDLINK_TRANSFORM+= opt:-O[0-9]*:-O1 | |
11 | . endif | 10 | . endif | |
12 | .endif | 11 | .endif | |
13 | 12 | |||
14 | ### [Wed Sep 19 09:24:11 UTC 2012 : apb] | 13 | ### [Wed Sep 19 09:24:11 UTC 2012 : apb] | |
15 | ### g++-4.5.3 and 4.5.4 on NetBSD/i386 fails with an internal compiler error | 14 | ### g++-4.5.3 and 4.5.4 on NetBSD/i386 fails with an internal compiler error | |
16 | ### when building gui/painting/qdrawhelper_mmx.cpp. | 15 | ### when building gui/painting/qdrawhelper_mmx.cpp. | |
17 | ### Building with -O1 instead of -O2 seems to work around the problem. | 16 | ### Building with -O1 instead of -O2 seems to work around the problem. | |
18 | .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386" | 17 | .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386" | |
19 | . include "../../mk/compiler.mk" | |||
20 | . if !empty(CC_VERSION:Mgcc-4.5.*) | 18 | . if !empty(CC_VERSION:Mgcc-4.5.*) | |
21 | PKG_HACKS+= pr46978 | 19 | PKG_HACKS+= pr46978 | |
22 | SUBST_CLASSES+= pr46978 | 20 | SUBST_CLASSES+= pr46978 | |
23 | SUBST_STAGE.pr46978= post-configure | 21 | SUBST_STAGE.pr46978= post-configure | |
24 | SUBST_MESSAGE.pr46978= Working around optimizer bug (NetBSD PR 46978) | 22 | SUBST_MESSAGE.pr46978= Working around optimizer bug (NetBSD PR 46978) | |
25 | SUBST_FILES.pr46978= src/gui/Makefile | 23 | SUBST_FILES.pr46978= src/gui/Makefile | |
26 | SUBST_SED.pr46978= -e '/^CXXFLAGS/s/-O2/-O1/' | 24 | SUBST_SED.pr46978= -e '/^CXXFLAGS/s/-O2/-O1/' | |
27 | . endif | 25 | . endif | |
28 | .endif | 26 | .endif |