Fri May 5 17:38:00 2017 UTC ()
Move C++11 setting before the first inclusion of compiler.mk. Reuse the
results instead of multiply inclusions.


(joerg)
diff -r1.116 -r1.117 pkgsrc/x11/qt4-libs/Makefile
diff -r1.41 -r1.42 pkgsrc/x11/qt4-libs/Makefile.common
diff -r1.3 -r1.4 pkgsrc/x11/qt4-libs/hacks.mk

cvs diff -r1.116 -r1.117 pkgsrc/x11/qt4-libs/Makefile (switch to unified diff)

--- pkgsrc/x11/qt4-libs/Makefile 2017/05/03 08:38:46 1.116
+++ pkgsrc/x11/qt4-libs/Makefile 2017/05/05 17:38:00 1.117
@@ -1,167 +1,164 @@ @@ -1,167 +1,164 @@
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
3PKGNAME= qt4-libs-${QTVERSION} 3PKGNAME= qt4-libs-${QTVERSION}
4PKGREVISION= 6 4PKGREVISION= 6
5COMMENT= C++ X GUI toolkit 5COMMENT= 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
10INSTALL_DIRS+= src 10INSTALL_DIRS+= src
11 11
12BUILD_TARGET= sub-src 12BUILD_TARGET= sub-src
13 13
14PTHREAD_OPTS+= require 14PTHREAD_OPTS+= require
15UNLIMIT_RESOURCES= datasize 15UNLIMIT_RESOURCES= datasize
16BUILDLINK_PASSTHRU_DIRS+=${QTPREFIX} 16BUILDLINK_PASSTHRU_DIRS+=${QTPREFIX}
17 17
18PLIST_SRC= ${WRKDIR}/PLIST ${PKGDIR}/PLIST 18PLIST_SRC= ${WRKDIR}/PLIST ${PKGDIR}/PLIST
19 19
20# built as plugins 20# built as plugins
21CONFIGURE_ARGS+= -no-dbus 21CONFIGURE_ARGS+= -no-dbus
22CONFIGURE_ARGS+= -no-libmng 22CONFIGURE_ARGS+= -no-libmng
23CONFIGURE_ARGS+= -no-libtiff 23CONFIGURE_ARGS+= -no-libtiff
24CONFIGURE_ARGS+= -no-sql-sqlite 24CONFIGURE_ARGS+= -no-sql-sqlite
25 25
26# kdelibs4 requires openssl support! 26# kdelibs4 requires openssl support!
27CONFIGURE_ARGS+= -openssl-linked 27CONFIGURE_ARGS+= -openssl-linked
28 28
29CONFIGURE_ARGS+= -iconv 29CONFIGURE_ARGS+= -iconv
30 30
31USE_LANGUAGES+= c++11 
32 
33.include "../../mk/compiler.mk" 
34.if !empty(PKGSRC_COMPILER:Mclang) 31.if !empty(PKGSRC_COMPILER:Mclang)
35CXXFLAGS+= -Wno-c++11-narrowing 32CXXFLAGS+= -Wno-c++11-narrowing
36. if empty(MACHINE_PLATFORM:MDarwin-*-*) 33. if empty(MACHINE_PLATFORM:MDarwin-*-*)
37CXXFLAGS+= -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1 34CXXFLAGS+= -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1
38. endif 35. endif
39.endif 36.endif
40 37
41INSTALLATION_DIRS= lib/pkgconfig 38INSTALLATION_DIRS= lib/pkgconfig
42INSTALLATION_DIRS+= ${QTPREFIX}/bin 39INSTALLATION_DIRS+= ${QTPREFIX}/bin
43INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/folderlistmodel 40INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/folderlistmodel
44INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/gestures 41INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/gestures
45INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/particles 42INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/particles
46INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/shaders 43INSTALLATION_DIRS+= ${QTPREFIX}/imports/Qt/labs/shaders
47INSTALLATION_DIRS+= ${QTPREFIX}/imports/QtWebKit 44INSTALLATION_DIRS+= ${QTPREFIX}/imports/QtWebKit
48INSTALLATION_DIRS+= ${QTPREFIX}/include 45INSTALLATION_DIRS+= ${QTPREFIX}/include
49INSTALLATION_DIRS+= ${QTPREFIX}/lib 46INSTALLATION_DIRS+= ${QTPREFIX}/lib
50INSTALLATION_DIRS+= ${QTPREFIX}/plugins/accessible 47INSTALLATION_DIRS+= ${QTPREFIX}/plugins/accessible
51INSTALLATION_DIRS+= ${QTPREFIX}/plugins/bearer 48INSTALLATION_DIRS+= ${QTPREFIX}/plugins/bearer
52INSTALLATION_DIRS+= ${QTPREFIX}/plugins/codecs 49INSTALLATION_DIRS+= ${QTPREFIX}/plugins/codecs
53INSTALLATION_DIRS+= ${QTPREFIX}/plugins/graphicssystems 50INSTALLATION_DIRS+= ${QTPREFIX}/plugins/graphicssystems
54INSTALLATION_DIRS+= ${QTPREFIX}/plugins/iconengines 51INSTALLATION_DIRS+= ${QTPREFIX}/plugins/iconengines
55INSTALLATION_DIRS+= ${QTPREFIX}/plugins/imageformats 52INSTALLATION_DIRS+= ${QTPREFIX}/plugins/imageformats
56.if ${OPSYS} == "Darwin" 53.if ${OPSYS} == "Darwin"
57INSTALLATION_DIRS+= ${QTPREFIX}/qt_menu.nib 54INSTALLATION_DIRS+= ${QTPREFIX}/qt_menu.nib
58.else 55.else
59INSTALLATION_DIRS+= ${QTPREFIX}/plugins/inputmethods 56INSTALLATION_DIRS+= ${QTPREFIX}/plugins/inputmethods
60.endif 57.endif
61 58
62INSTALL_ENV+= INSTALL_ROOT=${DESTDIR} 59INSTALL_ENV+= INSTALL_ROOT=${DESTDIR}
63 60
64SUBST_CLASSES+= no-libtool 61SUBST_CLASSES+= no-libtool
65SUBST_MESSAGE.no-libtool= Removing unwanted libtool link command. 62SUBST_MESSAGE.no-libtool= Removing unwanted libtool link command.
66SUBST_STAGE.no-libtool= post-configure 63SUBST_STAGE.no-libtool= post-configure
67SUBST_FILES.no-libtool= translations/Makefile 64SUBST_FILES.no-libtool= translations/Makefile
68SUBST_SED.no-libtool= -e '/@: IGNORE THIS LINE/s,=.*$$,= @:,' 65SUBST_SED.no-libtool= -e '/@: IGNORE THIS LINE/s,=.*$$,= @:,'
69 66
70do-install: 67do-install:
71.for f in moc rcc uic 68.for f in moc rcc uic
72 ${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${DESTDIR}${QTPREFIX}/bin/ 69 ${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${DESTDIR}${QTPREFIX}/bin/
73.endfor 70.endfor
74 ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/bin/uic3 \ 71 ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/bin/uic3 \
75 ${DESTDIR}${QTPREFIX}/bin/ 72 ${DESTDIR}${QTPREFIX}/bin/
76 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 73 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
77 ${WRKSRC}/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.la \ 74 ${WRKSRC}/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.la \
78 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/folderlistmodel/ 75 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/folderlistmodel/
79 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 76 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
80 ${WRKSRC}/imports/Qt/labs/gestures/libqmlgesturesplugin.la \ 77 ${WRKSRC}/imports/Qt/labs/gestures/libqmlgesturesplugin.la \
81 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/gestures/ 78 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/gestures/
82 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 79 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
83 ${WRKSRC}/imports/Qt/labs/particles/libqmlparticlesplugin.la \ 80 ${WRKSRC}/imports/Qt/labs/particles/libqmlparticlesplugin.la \
84 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/particles/ 81 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/particles/
85 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 82 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
86 ${WRKSRC}/imports/Qt/labs/shaders/libqmlshadersplugin.la \ 83 ${WRKSRC}/imports/Qt/labs/shaders/libqmlshadersplugin.la \
87 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/shaders/ 84 ${DESTDIR}${QTPREFIX}/imports/Qt/labs/shaders/
88 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 85 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
89 ${WRKSRC}/imports/QtWebKit/libqmlwebkitplugin.la \ 86 ${WRKSRC}/imports/QtWebKit/libqmlwebkitplugin.la \
90 ${DESTDIR}${QTPREFIX}/imports/QtWebKit/ 87 ${DESTDIR}${QTPREFIX}/imports/QtWebKit/
91.for f in corelib declarative gui multimedia network opengl qt3support script scripttools sql svg testlib xml xmlpatterns 3rdparty/webkit/Source/WebKit/qt 88.for f in corelib declarative gui multimedia network opengl qt3support script scripttools sql svg testlib xml xmlpatterns 3rdparty/webkit/Source/WebKit/qt
92 cd ${WRKSRC}/src/${f} && env ${MAKE_ENV} ${INSTALL_ENV} \ 89 cd ${WRKSRC}/src/${f} && env ${MAKE_ENV} ${INSTALL_ENV} \
93 ${MAKE_PROGRAM} install_flat_headers install_targ_headers install_class_headers 90 ${MAKE_PROGRAM} install_flat_headers install_targ_headers install_class_headers
94.endfor 91.endfor
95 cd ${DESTDIR}${PREFIX} && find qt4/include -type f -print > ${WRKDIR}/PLIST 92 cd ${DESTDIR}${PREFIX} && find qt4/include -type f -print > ${WRKDIR}/PLIST
96.for f in Qt3Support QtCore QtDeclarative QtGui QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns jscore webcore 93.for f in Qt3Support QtCore QtDeclarative QtGui QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns jscore webcore
97 ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/lib/lib${f}.la \ 94 ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/lib/lib${f}.la \
98 ${DESTDIR}${QTPREFIX}/lib/ 95 ${DESTDIR}${QTPREFIX}/lib/
99 sed -e "s:${WRKSRC}:${QTPREFIX}:g" \ 96 sed -e "s:${WRKSRC}:${QTPREFIX}:g" \
100 -e "s:${QTPREFIX}/lib/lib\\([A-Za-z3]*\\)\\.la:-l\\1:g" \ 97 -e "s:${QTPREFIX}/lib/lib\\([A-Za-z3]*\\)\\.la:-l\\1:g" \
101 ${WRKSRC}/lib/pkgconfig/${f}.pc | ${AWK} '!x[$$0]++' > ${WRKDIR}/${f}.pc 98 ${WRKSRC}/lib/pkgconfig/${f}.pc | ${AWK} '!x[$$0]++' > ${WRKDIR}/${f}.pc
102 ${INSTALL_DATA} ${WRKDIR}/${f}.pc ${DESTDIR}${PREFIX}/lib/pkgconfig/ 99 ${INSTALL_DATA} ${WRKDIR}/${f}.pc ${DESTDIR}${PREFIX}/lib/pkgconfig/
103.endfor 100.endfor
104 ${INSTALL_DATA} ${WRKSRC}/tools/porting/src/q3porting.xml ${DESTDIR}${QTPREFIX} 101 ${INSTALL_DATA} ${WRKSRC}/tools/porting/src/q3porting.xml ${DESTDIR}${QTPREFIX}
105.for f in qtaccessiblecompatwidgets qtaccessiblewidgets 102.for f in qtaccessiblecompatwidgets qtaccessiblewidgets
106 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 103 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
107 ${WRKSRC}/plugins/accessible/lib${f}.la \ 104 ${WRKSRC}/plugins/accessible/lib${f}.la \
108 ${DESTDIR}${QTPREFIX}/plugins/accessible/ 105 ${DESTDIR}${QTPREFIX}/plugins/accessible/
109.endfor 106.endfor
110#.for f in qcorewlanbearer qgenericbearer 107#.for f in qcorewlanbearer qgenericbearer
111.if ${OPSYS} == "Darwin" 108.if ${OPSYS} == "Darwin"
112 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 109 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
113 ${WRKSRC}/plugins/bearer/libqcorewlanbearer.la \ 110 ${WRKSRC}/plugins/bearer/libqcorewlanbearer.la \
114 ${DESTDIR}${QTPREFIX}/plugins/bearer/ 111 ${DESTDIR}${QTPREFIX}/plugins/bearer/
115.endif 112.endif
116 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 113 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
117 ${WRKSRC}/plugins/bearer/libqgenericbearer.la \ 114 ${WRKSRC}/plugins/bearer/libqgenericbearer.la \
118 ${DESTDIR}${QTPREFIX}/plugins/bearer/ 115 ${DESTDIR}${QTPREFIX}/plugins/bearer/
119#.endfor 116#.endfor
120.for f in qcncodecs qjpcodecs qkrcodecs qtwcodecs 117.for f in qcncodecs qjpcodecs qkrcodecs qtwcodecs
121 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 118 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
122 ${WRKSRC}/plugins/codecs/lib${f}.la \ 119 ${WRKSRC}/plugins/codecs/lib${f}.la \
123 ${DESTDIR}${QTPREFIX}/plugins/codecs/ 120 ${DESTDIR}${QTPREFIX}/plugins/codecs/
124.endfor 121.endfor
125.for f in qglgraphicssystem qtracegraphicssystem 122.for f in qglgraphicssystem qtracegraphicssystem
126 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 123 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
127 ${WRKSRC}/plugins/graphicssystems/lib${f}.la \ 124 ${WRKSRC}/plugins/graphicssystems/lib${f}.la \
128 ${DESTDIR}${QTPREFIX}/plugins/graphicssystems/ 125 ${DESTDIR}${QTPREFIX}/plugins/graphicssystems/
129.endfor 126.endfor
130.for f in qsvgicon 127.for f in qsvgicon
131 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 128 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
132 ${WRKSRC}/plugins/iconengines/lib${f}.la \ 129 ${WRKSRC}/plugins/iconengines/lib${f}.la \
133 ${DESTDIR}/${QTPREFIX}/plugins/iconengines/ 130 ${DESTDIR}/${QTPREFIX}/plugins/iconengines/
134.endfor 131.endfor
135.for f in qgif qico qjpeg qsvg qtga 132.for f in qgif qico qjpeg qsvg qtga
136 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 133 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
137 ${WRKSRC}/plugins/imageformats/lib${f}.la \ 134 ${WRKSRC}/plugins/imageformats/lib${f}.la \
138 ${DESTDIR}${QTPREFIX}/plugins/imageformats/ 135 ${DESTDIR}${QTPREFIX}/plugins/imageformats/
139.endfor 136.endfor
140.if ${OPSYS} == "Darwin" 137.if ${OPSYS} == "Darwin"
141 ${INSTALL_DATA} ${WRKSRC}/src/gui/mac/qt_menu.nib/*.nib \ 138 ${INSTALL_DATA} ${WRKSRC}/src/gui/mac/qt_menu.nib/*.nib \
142 ${DESTDIR}${QTPREFIX}/qt_menu.nib/ 139 ${DESTDIR}${QTPREFIX}/qt_menu.nib/
143.else 140.else
144 ${LIBTOOL} --mode=install ${INSTALL_LIB} \ 141 ${LIBTOOL} --mode=install ${INSTALL_LIB} \
145 ${WRKSRC}/plugins/inputmethods/libqimsw-multi.la \ 142 ${WRKSRC}/plugins/inputmethods/libqimsw-multi.la \
146 ${DESTDIR}/${QTPREFIX}/plugins/inputmethods/ 143 ${DESTDIR}/${QTPREFIX}/plugins/inputmethods/
147.endif 144.endif
148 145
149.if ${OPSYS} != "Darwin" 146.if ${OPSYS} != "Darwin"
150.include "../../graphics/glu/buildlink3.mk" 147.include "../../graphics/glu/buildlink3.mk"
151.include "../../x11/libSM/buildlink3.mk" 148.include "../../x11/libSM/buildlink3.mk"
152.include "../../x11/libXcursor/buildlink3.mk" 149.include "../../x11/libXcursor/buildlink3.mk"
153.include "../../x11/libXft/buildlink3.mk" 150.include "../../x11/libXft/buildlink3.mk"
154.include "../../x11/libXmu/buildlink3.mk" 151.include "../../x11/libXmu/buildlink3.mk"
155.include "../../x11/libXrandr/buildlink3.mk" 152.include "../../x11/libXrandr/buildlink3.mk"
156.endif 153.endif
157 154
158.include "../../converters/libiconv/buildlink3.mk" 155.include "../../converters/libiconv/buildlink3.mk"
159.include "../../devel/zlib/buildlink3.mk" 156.include "../../devel/zlib/buildlink3.mk"
160.include "../../fonts/fontconfig/buildlink3.mk" 157.include "../../fonts/fontconfig/buildlink3.mk"
161.include "../../graphics/freetype2/buildlink3.mk" 158.include "../../graphics/freetype2/buildlink3.mk"
162.include "../../mk/jpeg.buildlink3.mk" 159.include "../../mk/jpeg.buildlink3.mk"
163.include "../../graphics/png/buildlink3.mk" 160.include "../../graphics/png/buildlink3.mk"
164.include "../../security/openssl/buildlink3.mk" 161.include "../../security/openssl/buildlink3.mk"
165 162
166.include "../../mk/pthread.buildlink3.mk" 163.include "../../mk/pthread.buildlink3.mk"
167.include "../../mk/bsd.pkg.mk" 164.include "../../mk/bsd.pkg.mk"

cvs diff -r1.41 -r1.42 pkgsrc/x11/qt4-libs/Makefile.common (switch to unified diff)

--- pkgsrc/x11/qt4-libs/Makefile.common 2016/02/25 08:27:05 1.41
+++ pkgsrc/x11/qt4-libs/Makefile.common 2017/05/05 17:38:00 1.42
@@ -1,165 +1,167 @@ @@ -1,165 +1,167 @@
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
11DISTNAME= qt-everywhere-opensource-src-${QTVERSION} 11DISTNAME= qt-everywhere-opensource-src-${QTVERSION}
12CATEGORIES= x11 12CATEGORIES= x11
13MASTER_SITES= http://download.qt-project.org/official_releases/qt/${QTVERSION:R}/${QTVERSION}/ 13MASTER_SITES= http://download.qt-project.org/official_releases/qt/${QTVERSION:R}/${QTVERSION}/
14EXTRACT_USING= bsdtar 14EXTRACT_USING= bsdtar
15 15
16.include "../../x11/qt4/Makefile.common" 16.include "../../x11/qt4/Makefile.common"
17 17
18DISTINFO_FILE= ${.CURDIR}/../../x11/qt4-libs/distinfo 18DISTINFO_FILE= ${.CURDIR}/../../x11/qt4-libs/distinfo
19FILESDIR= ${.CURDIR}/../../x11/qt4-libs/files 19FILESDIR= ${.CURDIR}/../../x11/qt4-libs/files
20PATCHDIR= ${.CURDIR}/../../x11/qt4-libs/patches 20PATCHDIR= ${.CURDIR}/../../x11/qt4-libs/patches
21 21
22HAS_CONFIGURE= yes 22HAS_CONFIGURE= yes
23USE_LANGUAGES= c c++ 23USE_LANGUAGES= c c++
24USE_LIBTOOL= yes 24USE_LIBTOOL= yes
25USE_TOOLS+= gmake 25USE_TOOLS+= gmake
26 26
27.if empty(PKGNAME:U:Mqt4-libs-*) 27.if empty(PKGNAME:U:Mqt4-libs-*)
28BUILDLINK_API_DEPENDS.qt4-libs+= qt4-libs>=${QTVERSION} 28BUILDLINK_API_DEPENDS.qt4-libs+= qt4-libs>=${QTVERSION}
29.endif 29.endif
30 30
31QTPREFIX= ${PREFIX}/qt4 31QTPREFIX= ${PREFIX}/qt4
32 32
33# libphonon is available in multimedia/phonon 33# libphonon is available in multimedia/phonon
34CONFIGURE_ARGS+= -no-phonon 34CONFIGURE_ARGS+= -no-phonon
35CONFIGURE_ARGS+= -no-phonon-backend 35CONFIGURE_ARGS+= -no-phonon-backend
36CONFIGURE_ARGS+= -optimized-qmake 36CONFIGURE_ARGS+= -optimized-qmake
37CONFIGURE_ARGS+= -prefix "${QTPREFIX}" 37CONFIGURE_ARGS+= -prefix "${QTPREFIX}"
38CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-l*} 38CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-l*}
39CONFIGURE_ARGS+= -opensource -confirm-license 39CONFIGURE_ARGS+= -opensource -confirm-license
40CONFIGURE_ARGS+= -sysconfdir "${PKG_SYSCONFDIR}/xdg" 40CONFIGURE_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)
45CONFIGURE_ENV+= MAKE_FLAGS=-j${MAKE_JOBS:Q} 45CONFIGURE_ENV+= MAKE_FLAGS=-j${MAKE_JOBS:Q}
46.endif 46.endif
47 47
48LIBQT?= -lQtCore -lQtGui 48LIBQT?= -lQtCore -lQtGui
49 49
50MAKE_ENV+= QTPREFIX=${QTPREFIX:Q} 50MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
51MAKE_ENV+= QTDIR=${WRKSRC} 51MAKE_ENV+= QTDIR=${WRKSRC}
52PLIST_VARS+= mac unix 52PLIST_VARS+= mac unix
53.if ${OPSYS} == "Darwin" 53.if ${OPSYS} == "Darwin"
54PLIST.mac= yes 54PLIST.mac= yes
55QMAKE_CONF= qmake.conf.mac 55QMAKE_CONF= qmake.conf.mac
56QMAKE_RANLIB= ${RANLIB} 56QMAKE_RANLIB= ${RANLIB}
57.else 57.else
58PLIST.unix= yes 58PLIST.unix= yes
59QMAKE_CONF= qmake.conf 59QMAKE_CONF= qmake.conf
60QMAKE_RANLIB= ${TRUE} 60QMAKE_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
64SCRIPTS_ENV+= HOME=${WRKDIR} 64SCRIPTS_ENV+= HOME=${WRKDIR}
65 65
 66USE_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"
71CONFIGURE_ARGS+= -platform solaris-g++-64 73CONFIGURE_ARGS+= -platform solaris-g++-64
72. else 74. else
73CONFIGURE_ARGS+= -platform solaris-g++ 75CONFIGURE_ARGS+= -platform solaris-g++
74. endif 76. endif
75. else 77. else
76. if ${ABI:U} == "64" 78. if ${ABI:U} == "64"
77CONFIGURE_ARGS+= -platform solaris-cc-64 79CONFIGURE_ARGS+= -platform solaris-cc-64
78. else 80. else
79CONFIGURE_ARGS+= -platform solaris-cc 81CONFIGURE_ARGS+= -platform solaris-cc
80. endif 82. endif
81. endif 83. endif
82SYS_LIBS= -lresolv -lsocket -lnsl -lrt 84SYS_LIBS= -lresolv -lsocket -lnsl -lrt
83.elif ${OPSYS} == "Interix" 85.elif ${OPSYS} == "Interix"
84CONFIGURE_ARGS+= -platform interix-g++ 86CONFIGURE_ARGS+= -platform interix-g++
85CFLAGS+= -I/usr/local/include/bind 87CFLAGS+= -I/usr/local/include/bind
86LDFLAGS+= -L/usr/local/lib/bind -lbind 88LDFLAGS+= -L/usr/local/lib/bind -lbind
87BUILDLINK_PASSTHRU_DIRS+=/usr/local/include/bind /usr/local/lib/bind 89BUILDLINK_PASSTHRU_DIRS+=/usr/local/include/bind /usr/local/lib/bind
88SYS_LIBS= -lbind -ldb -ldl 90SYS_LIBS= -lbind -ldb -ldl
89.elif ${OPSYS} == "DragonFly" 91.elif ${OPSYS} == "DragonFly"
90CONFIGURE_ARGS+= -platform freebsd-g++ 92CONFIGURE_ARGS+= -platform freebsd-g++
91.elif ${OPSYS} == "Darwin" 93.elif ${OPSYS} == "Darwin"
92. if !empty(PKGSRC_COMPILER:Mclang) 94. if !empty(PKGSRC_COMPILER:Mclang)
93CONFIGURE_ARGS+= -platform macx-llvm 95CONFIGURE_ARGS+= -platform macx-llvm
94. else 96. else
95CONFIGURE_ARGS+= -platform macx-g++ 97CONFIGURE_ARGS+= -platform macx-g++
96. endif 98. endif
97CONFIGURE_ARGS+= -no-dwarf2 99CONFIGURE_ARGS+= -no-dwarf2
98CONFIGURE_ARGS+= -no-framework 100CONFIGURE_ARGS+= -no-framework
99. if exists(/usr/lib/libresolv.dylib) 101. if exists(/usr/lib/libresolv.dylib)
100LDFLAGS+= -lresolv 102LDFLAGS+= -lresolv
101. endif 103. endif
102.elif ${OPSYS} == "Linux" 104.elif ${OPSYS} == "Linux"
103LDFLAGS+= -ldl 105LDFLAGS+= -ldl
104.endif 106.endif
105 107
106.if ${OPSYS} != "Darwin" && ${X11_TYPE} != "native" 108.if ${OPSYS} != "Darwin" && ${X11_TYPE} != "native"
107.include "../../x11/libXinerama/buildlink3.mk" 109.include "../../x11/libXinerama/buildlink3.mk"
108.elif !exists(${X11BASE}/lib/libXinerama.so) && \ 110.elif !exists(${X11BASE}/lib/libXinerama.so) && \
109 !exists(${X11BASE}/lib/libXinerama.dylib) 111 !exists(${X11BASE}/lib/libXinerama.dylib)
110CONFIGURE_ARGS+= -no-xinerama 112CONFIGURE_ARGS+= -no-xinerama
111.endif 113.endif
112 114
113SUBST_CLASSES+= dnr 115SUBST_CLASSES+= dnr
114SUBST_MESSAGE.dnr= Disabling debug_and_release. 116SUBST_MESSAGE.dnr= Disabling debug_and_release.
115SUBST_STAGE.dnr= pre-configure 117SUBST_STAGE.dnr= pre-configure
116SUBST_FILES.dnr= mkspecs/features/debug_and_release.prf 118SUBST_FILES.dnr= mkspecs/features/debug_and_release.prf
117SUBST_SED.dnr= -e 's,^,\#\#\#,' 119SUBST_SED.dnr= -e 's,^,\#\#\#,'
118 120
119SUBST_CLASSES+= nib 121SUBST_CLASSES+= nib
120SUBST_MESSAGE.nib= Fixing nib loading on Mac OS X. 122SUBST_MESSAGE.nib= Fixing nib loading on Mac OS X.
121SUBST_STAGE.nib= pre-configure 123SUBST_STAGE.nib= pre-configure
122SUBST_FILES.nib= src/gui/kernel/qapplication_mac.mm 124SUBST_FILES.nib= src/gui/kernel/qapplication_mac.mm
123SUBST_VARS.nib= QTPREFIX 125SUBST_VARS.nib= QTPREFIX
124 126
125SUBST_CLASSES+= lt 127SUBST_CLASSES+= lt
126SUBST_MESSAGE.lt= Enabling libtool. 128SUBST_MESSAGE.lt= Enabling libtool.
127SUBST_STAGE.lt= pre-configure 129SUBST_STAGE.lt= pre-configure
128SUBST_FILES.lt= src/gui/gui.pro 130SUBST_FILES.lt= src/gui/gui.pro
129SUBST_SED.lt= -e 's,$$$$QMAKE_CXX -c -W,$${LIBTOOL} --mode=compile &,' 131SUBST_SED.lt= -e 's,$$$$QMAKE_CXX -c -W,$${LIBTOOL} --mode=compile &,'
130SUBST_SED.lt+= -e 's,$$$${first(QMAKE_EXT_OBJ)},.lo,' 132SUBST_SED.lt+= -e 's,$$$${first(QMAKE_EXT_OBJ)},.lo,'
131 133
132.include "options.mk" 134.include "options.mk"
133 135
134# Reverse the change to how templates are handled made between 3.0.4 136# Reverse the change to how templates are handled made between 3.0.4
135# and 3.0.5 for older toolchains. Removing inline for newer toolchains 137# and 3.0.5 for older toolchains. Removing inline for newer toolchains
136# produces smaller code. Removing inline for older toolchains prod- 138# produces smaller code. Removing inline for older toolchains prod-
137# uces buggy code. 139# uces buggy code.
138.if !empty(CC_VERSION:Mgcc-2.8*) 140.if !empty(CC_VERSION:Mgcc-2.8*)
139CXXFLAGS+= -DQ_INLINE_TEMPLATES=inline 141CXXFLAGS+= -DQ_INLINE_TEMPLATES=inline
140.endif 142.endif
141 143
142pre-configure: 144pre-configure:
143 sed -e 's:@LOCALBASE@:${LOCALBASE}:g' \ 145 sed -e 's:@LOCALBASE@:${LOCALBASE}:g' \
144 -e 's:@X11BASE@:${X11BASE}:g' \ 146 -e 's:@X11BASE@:${X11BASE}:g' \
145 -e 's:@LIBTOOL@:${LIBTOOL:Q}:g' \ 147 -e 's:@LIBTOOL@:${LIBTOOL:Q}:g' \
146 -e 's:@CC@:${CC:Q}:g' \ 148 -e 's:@CC@:${CC:Q}:g' \
147 -e 's:@CXX@:${CXX:Q}:g' \ 149 -e 's:@CXX@:${CXX:Q}:g' \
148 -e 's:@LDFLAGS@:${LDFLAGS:Q}:g' \ 150 -e 's:@LDFLAGS@:${LDFLAGS:Q}:g' \
149 -e 's:@CFLAGS@:${CFLAGS:Q}:g' \ 151 -e 's:@CFLAGS@:${CFLAGS:Q}:g' \
150 -e 's:@CXXFLAGS@:${CXXFLAGS:Q}:g' \ 152 -e 's:@CXXFLAGS@:${CXXFLAGS:Q}:g' \
151 -e 's:@SYS_LIBS@:${SYS_LIBS:Q}:g' \ 153 -e 's:@SYS_LIBS@:${SYS_LIBS:Q}:g' \
152 -e 's:@LEX@:${LEX}:g' \ 154 -e 's:@LEX@:${LEX}:g' \
153 -e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \ 155 -e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \
154 -e 's:@AR@:${AR:Q}:g' \ 156 -e 's:@AR@:${AR:Q}:g' \
155 -e 's:@MKDIR@:${MKDIR}:g' \ 157 -e 's:@MKDIR@:${MKDIR}:g' \
156 -e 's:@LIBQT@:${LIBQT:Q}:g' \ 158 -e 's:@LIBQT@:${LIBQT:Q}:g' \
157 -e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS:Q}:g' \ 159 -e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS:Q}:g' \
158 -e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \ 160 -e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \
159 -e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \ 161 -e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \
160 -e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \ 162 -e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \
161 ${FILESDIR}/${QMAKE_CONF} > ${WRKSRC}/qmake.conf 163 ${FILESDIR}/${QMAKE_CONF} > ${WRKSRC}/qmake.conf
162 for dir in ${WRKSRC}/mkspecs/*; do \ 164 for dir in ${WRKSRC}/mkspecs/*; do \
163 cp ${WRKSRC}/qmake.conf $${dir}; \ 165 cp ${WRKSRC}/qmake.conf $${dir}; \
164 rm -f $${dir}/*.orig; \ 166 rm -f $${dir}/*.orig; \
165 done 167 done

cvs diff -r1.3 -r1.4 pkgsrc/x11/qt4-libs/hacks.mk (switch to unified diff)

--- pkgsrc/x11/qt4-libs/hacks.mk 2014/12/15 11:46:36 1.3
+++ pkgsrc/x11/qt4-libs/hacks.mk 2017/05/05 17:38:00 1.4
@@ -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*)
9PKG_HACKS+= macosx-codegen 8PKG_HACKS+= macosx-codegen
10BUILDLINK_TRANSFORM+= opt:-O[0-9]*:-O1 9BUILDLINK_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.*)
21PKG_HACKS+= pr46978 19PKG_HACKS+= pr46978
22SUBST_CLASSES+= pr46978 20SUBST_CLASSES+= pr46978
23SUBST_STAGE.pr46978= post-configure 21SUBST_STAGE.pr46978= post-configure
24SUBST_MESSAGE.pr46978= Working around optimizer bug (NetBSD PR 46978) 22SUBST_MESSAGE.pr46978= Working around optimizer bug (NetBSD PR 46978)
25SUBST_FILES.pr46978= src/gui/Makefile 23SUBST_FILES.pr46978= src/gui/Makefile
26SUBST_SED.pr46978= -e '/^CXXFLAGS/s/-O2/-O1/' 24SUBST_SED.pr46978= -e '/^CXXFLAGS/s/-O2/-O1/'
27. endif 25. endif
28.endif 26.endif