| @@ -1,80 +1,83 @@ | | | @@ -1,80 +1,83 @@ |
1 | # $NetBSD: Makefile.common,v 1.40 2020/03/18 21:55:23 tnn Exp $ | | 1 | # $NetBSD: Makefile.common,v 1.41 2020/03/26 14:11:29 nia Exp $ |
2 | # used by x11/qt5-mysql/Makefile | | 2 | # used by x11/qt5-mysql/Makefile |
3 | # used by x11/qt5-odbc/Makefile | | 3 | # used by x11/qt5-odbc/Makefile |
4 | # used by x11/qt5-psql/Makefile | | 4 | # used by x11/qt5-psql/Makefile |
5 | # used by x11/qt5-qtbase/Makefile | | 5 | # used by x11/qt5-qtbase/Makefile |
6 | # used by x11/qt5-qtcharts/Makefile | | 6 | # used by x11/qt5-qtcharts/Makefile |
7 | # used by x11/qt5-qtconnectivity/Makefile | | 7 | # used by x11/qt5-qtconnectivity/Makefile |
8 | # used by x11/qt5-qtdeclarative/Makefile | | 8 | # used by x11/qt5-qtdeclarative/Makefile |
9 | # used by x11/qt5-qtdoc/Makefile | | 9 | # used by x11/qt5-qtdoc/Makefile |
10 | # used by x11/qt5-qtgraphicaleffects/Makefile | | 10 | # used by x11/qt5-qtgraphicaleffects/Makefile |
11 | # used by x11/qt5-qtimageformats/Makefile | | 11 | # used by x11/qt5-qtimageformats/Makefile |
12 | # used by x11/qt5-qtlocation/Makefile | | 12 | # used by x11/qt5-qtlocation/Makefile |
13 | # used by x11/qt5-qtmacextras/Makefile | | 13 | # used by x11/qt5-qtmacextras/Makefile |
14 | # used by x11/qt5-qtmultimedia/Makefile | | 14 | # used by x11/qt5-qtmultimedia/Makefile |
15 | # used by x11/qt5-qtnetworkauth/Makefile | | 15 | # used by x11/qt5-qtnetworkauth/Makefile |
16 | # used by x11/qt5-qtquickcontrols/Makefile | | 16 | # used by x11/qt5-qtquickcontrols/Makefile |
17 | # used by x11/qt5-qtscript/Makefile | | 17 | # used by x11/qt5-qtscript/Makefile |
18 | # used by x11/qt5-qtscxml/Makefile | | 18 | # used by x11/qt5-qtscxml/Makefile |
19 | # used by x11/qt5-qtsensors/Makefile | | 19 | # used by x11/qt5-qtsensors/Makefile |
20 | # used by x11/qt5-qtserialport/Makefile | | 20 | # used by x11/qt5-qtserialport/Makefile |
21 | # used by x11/qt5-qtspeech/Makefile | | 21 | # used by x11/qt5-qtspeech/Makefile |
22 | # used by x11/qt5-qtsvg/Makefile | | 22 | # used by x11/qt5-qtsvg/Makefile |
23 | # used by x11/qt5-qttools/Makefile | | 23 | # used by x11/qt5-qttools/Makefile |
24 | # used by x11/qt5-qttranslations/Makefile | | 24 | # used by x11/qt5-qttranslations/Makefile |
25 | # used by x11/qt5-qtvirtualkeyboard/Makefile | | 25 | # used by x11/qt5-qtvirtualkeyboard/Makefile |
26 | # used by x11/qt5-qtwayland/Makefile | | 26 | # used by x11/qt5-qtwayland/Makefile |
27 | # used by x11/qt5-qtwebchannel/Makefile | | 27 | # used by x11/qt5-qtwebchannel/Makefile |
28 | # used by x11/qt5-qtwebkit/Makefile | | 28 | # used by x11/qt5-qtwebkit/Makefile |
29 | # used by x11/qt5-qtwebsockets/Makefile | | 29 | # used by x11/qt5-qtwebsockets/Makefile |
30 | # used by x11/qt5-qtx11extras/Makefile | | 30 | # used by x11/qt5-qtx11extras/Makefile |
31 | # used by x11/qt5-qtxmlpatterns/Makefile | | 31 | # used by x11/qt5-qtxmlpatterns/Makefile |
32 | | | 32 | |
33 | .include "../../x11/qt5/Makefile.common" | | 33 | .include "../../x11/qt5/Makefile.common" |
34 | | | 34 | |
35 | .include "../../mk/dlopen.buildlink3.mk" | | 35 | .include "../../mk/dlopen.buildlink3.mk" |
36 | BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q} | | 36 | BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q} |
37 | | | 37 | |
38 | USE_LANGUAGES= c gnu++11 | | 38 | USE_LANGUAGES= c gnu++11 |
39 | USE_TOOLS+= gmake perl:build pkg-config | | 39 | USE_TOOLS+= gmake perl:build pkg-config |
40 | | | 40 | |
| | | 41 | # C++11 |
| | | 42 | GCC_REQD+= 4.7 |
| | | 43 | |
41 | # Avoid failures to due 'register' usage in X11 headers. | | 44 | # Avoid failures to due 'register' usage in X11 headers. |
42 | CFLAGS+= -Wno-register | | 45 | CFLAGS+= -Wno-register |
43 | | | 46 | |
44 | # wcstof(3) etc. is used in C++ code. | | 47 | # wcstof(3) etc. is used in C++ code. |
45 | CFLAGS.NetBSD+= -D_NETBSD_SOURCE | | 48 | CFLAGS.NetBSD+= -D_NETBSD_SOURCE |
46 | | | 49 | |
47 | # for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined. | | 50 | # for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined. |
48 | BUILDLINK_TRANSFORM+= rm:-Wundef | | 51 | BUILDLINK_TRANSFORM+= rm:-Wundef |
49 | | | 52 | |
50 | # SunOS ld doesn't support -rpath-link | | 53 | # SunOS ld doesn't support -rpath-link |
51 | BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${PREFIX}/qt5/lib | | 54 | BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${PREFIX}/qt5/lib |
52 | BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${WRKSRC}/lib | | 55 | BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${WRKSRC}/lib |
53 | | | 56 | |
54 | MAKE_ENV+= QTPREFIX=${QTPREFIX:Q} | | 57 | MAKE_ENV+= QTPREFIX=${QTPREFIX:Q} |
55 | PLIST_VARS+= notdarwin | | 58 | PLIST_VARS+= notdarwin |
56 | .if ${OPSYS} != "Darwin" | | 59 | .if ${OPSYS} != "Darwin" |
57 | PLIST.notdarwin= yes | | 60 | PLIST.notdarwin= yes |
58 | .endif | | 61 | .endif |
59 | | | 62 | |
60 | # avoid creating a .qt directory in the users home directory | | 63 | # avoid creating a .qt directory in the users home directory |
61 | SCRIPTS_ENV+= HOME=${WRKDIR} | | 64 | SCRIPTS_ENV+= HOME=${WRKDIR} |
62 | | | 65 | |
63 | .if "${PKGPATH}" != "x11/qt5-qtbase" && "${PKGPATH}" != "x11/qt5-odbc" && \ | | 66 | .if "${PKGPATH}" != "x11/qt5-qtbase" && "${PKGPATH}" != "x11/qt5-odbc" && \ |
64 | "${PKGPATH}" != "x11/qt5-mysql" && "${PKGPATH}" != "x11/qt5-psql" && \ | | 67 | "${PKGPATH}" != "x11/qt5-mysql" && "${PKGPATH}" != "x11/qt5-psql" && \ |
65 | "${PKGPATH}" != "x11/qt5-qtwayland" | | 68 | "${PKGPATH}" != "x11/qt5-qtwayland" |
66 | do-configure: | | 69 | do-configure: |
67 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QTPREFIX}/bin/qmake -o Makefile | | 70 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QTPREFIX}/bin/qmake -o Makefile |
68 | .endif | | 71 | .endif |
69 | | | 72 | |
70 | .if ${OPSYS} == "Darwin" | | 73 | .if ${OPSYS} == "Darwin" |
71 | .PHONY: fix-darwin-install-name | | 74 | .PHONY: fix-darwin-install-name |
72 | post-install: fix-darwin-install-name | | 75 | post-install: fix-darwin-install-name |
73 | fix-darwin-install-name: | | 76 | fix-darwin-install-name: |
74 | ${FIND} ${DESTDIR}${PREFIX} -name "*.dylib" -print | \ | | 77 | ${FIND} ${DESTDIR}${PREFIX} -name "*.dylib" -print | \ |
75 | while read lib; do \ | | 78 | while read lib; do \ |
76 | libname=`basename $${lib}`; \ | | 79 | libname=`basename $${lib}`; \ |
77 | libdir=`dirname $${lib} | sed -e 's,${DESTDIR},,'`; \ | | 80 | libdir=`dirname $${lib} | sed -e 's,${DESTDIR},,'`; \ |
78 | install_name_tool -id $${libdir}/$${libname} $${lib}; \ | | 81 | install_name_tool -id $${libdir}/$${libname} $${lib}; \ |
79 | done | | 82 | done |
80 | .endif | | 83 | .endif |