| @@ -1,88 +1,89 @@ | | | @@ -1,88 +1,89 @@ |
1 | # $NetBSD: Makefile.common,v 1.51 2023/07/19 22:08:05 tnn Exp $ | | 1 | # $NetBSD: Makefile.common,v 1.52 2023/07/19 22:45:56 tnn 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-qtquickcontrols2/Makefile | | 17 | # used by x11/qt5-qtquickcontrols2/Makefile |
18 | # used by x11/qt5-qtscript/Makefile | | 18 | # used by x11/qt5-qtscript/Makefile |
19 | # used by x11/qt5-qtscxml/Makefile | | 19 | # used by x11/qt5-qtscxml/Makefile |
20 | # used by x11/qt5-qtsensors/Makefile | | 20 | # used by x11/qt5-qtsensors/Makefile |
21 | # used by x11/qt5-qtserialport/Makefile | | 21 | # used by x11/qt5-qtserialport/Makefile |
22 | # used by x11/qt5-qtspeech/Makefile | | 22 | # used by x11/qt5-qtspeech/Makefile |
23 | # used by x11/qt5-qtsvg/Makefile | | 23 | # used by x11/qt5-qtsvg/Makefile |
24 | # used by x11/qt5-qttools/Makefile | | 24 | # used by x11/qt5-qttools/Makefile |
25 | # used by x11/qt5-qttranslations/Makefile | | 25 | # used by x11/qt5-qttranslations/Makefile |
26 | # used by x11/qt5-qtvirtualkeyboard/Makefile | | 26 | # used by x11/qt5-qtvirtualkeyboard/Makefile |
27 | # used by x11/qt5-qtwayland/Makefile | | 27 | # used by x11/qt5-qtwayland/Makefile |
28 | # used by x11/qt5-qtwebchannel/Makefile | | 28 | # used by x11/qt5-qtwebchannel/Makefile |
29 | # used by x11/qt5-qtwebengine/Makefile | | 29 | # used by x11/qt5-qtwebengine/Makefile |
30 | # used by x11/qt5-qtwebsockets/Makefile | | 30 | # used by x11/qt5-qtwebsockets/Makefile |
31 | # used by x11/qt5-qtx11extras/Makefile | | 31 | # used by x11/qt5-qtx11extras/Makefile |
32 | # used by x11/qt5-qtxmlpatterns/Makefile | | 32 | # used by x11/qt5-qtxmlpatterns/Makefile |
33 | | | 33 | |
34 | WRKSRC= ${WRKDIR}/${DISTNAME:S/-opensource//} | | 34 | WRKSRC= ${WRKDIR}/${DISTNAME:S/-opensource//} |
35 | | | 35 | |
36 | # https://doc.qt.io/qt-5/supported-platforms.html | | 36 | # https://doc.qt.io/qt-5/supported-platforms.html |
37 | GCC_REQD+= 5 | | 37 | GCC_REQD+= 5 |
38 | | | 38 | |
39 | .include "../../x11/qt5/Makefile.common" | | 39 | .include "../../x11/qt5/Makefile.common" |
40 | | | 40 | |
41 | .include "../../mk/dlopen.buildlink3.mk" | | 41 | .include "../../mk/dlopen.buildlink3.mk" |
42 | BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q} | | 42 | BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q} |
43 | | | 43 | |
44 | USE_LANGUAGES= c gnu++11 | | 44 | USE_LANGUAGES= c gnu++11 |
45 | USE_TOOLS+= gmake perl:build pkg-config | | 45 | USE_TOOLS+= gmake perl:build pkg-config |
46 | | | 46 | |
47 | # Avoid failures to due 'register' usage in X11 headers. | | 47 | # Avoid failures to due 'register' usage in X11 headers. |
48 | CFLAGS+= -Wno-register | | 48 | CFLAGS+= -Wno-register |
49 | | | 49 | |
50 | # wcstof(3) etc. is used in C++ code. | | 50 | # wcstof(3) etc. is used in C++ code. |
51 | CFLAGS.NetBSD+= -D_NETBSD_SOURCE | | 51 | CFLAGS.NetBSD+= -D_NETBSD_SOURCE |
52 | | | 52 | |
53 | # include/openssl/e_os2.h:283:25: error: '_Noreturn' does not name a type | | 53 | # include/openssl/e_os2.h:283:25: error: '_Noreturn' does not name a type |
54 | CXXFLAGS.SunOS+= -D_Noreturn="" | | 54 | CXXFLAGS.SunOS+= -D_Noreturn="" |
55 | | | 55 | |
56 | # for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined. | | 56 | # for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined. |
57 | BUILDLINK_TRANSFORM+= rm:-Wundef | | 57 | BUILDLINK_TRANSFORM+= rm:-Wundef |
58 | | | 58 | |
59 | # ld: unknown option: -O1 | | 59 | # Remove unknown ld(1) options |
60 | BUILDLINK_TRANSFORM.Darwin+= rm:-Wl,-O1 | | 60 | BUILDLINK_TRANSFORM.Darwin+= rm:-Wl,-O1 |
| | | 61 | BUILDLINK_TRANSFORM.Darwin+= rm:-Wl,--no-undefined |
61 | | | 62 | |
62 | MAKE_ENV+= QTPREFIX=${QTPREFIX:Q} | | 63 | MAKE_ENV+= QTPREFIX=${QTPREFIX:Q} |
63 | PLIST_VARS+= notdarwin | | 64 | PLIST_VARS+= notdarwin |
64 | .if ${OPSYS} != "Darwin" | | 65 | .if ${OPSYS} != "Darwin" |
65 | PLIST.notdarwin= yes | | 66 | PLIST.notdarwin= yes |
66 | .endif | | 67 | .endif |
67 | | | 68 | |
68 | # avoid creating a .qt directory in the users home directory | | 69 | # avoid creating a .qt directory in the users home directory |
69 | SCRIPTS_ENV+= HOME=${WRKDIR} | | 70 | SCRIPTS_ENV+= HOME=${WRKDIR} |
70 | | | 71 | |
71 | .if "${PKGPATH}" != "x11/qt5-qtbase" && "${PKGPATH}" != "x11/qt5-odbc" && \ | | 72 | .if "${PKGPATH}" != "x11/qt5-qtbase" && "${PKGPATH}" != "x11/qt5-odbc" && \ |
72 | "${PKGPATH}" != "x11/qt5-mysql" && "${PKGPATH}" != "x11/qt5-psql" && \ | | 73 | "${PKGPATH}" != "x11/qt5-mysql" && "${PKGPATH}" != "x11/qt5-psql" && \ |
73 | "${PKGPATH}" != "x11/qt5-qtwayland" | | 74 | "${PKGPATH}" != "x11/qt5-qtwayland" |
74 | do-configure: | | 75 | do-configure: |
75 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QTPREFIX}/bin/qmake -o Makefile ${QMAKE_ARGS} | | 76 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QTPREFIX}/bin/qmake -o Makefile ${QMAKE_ARGS} |
76 | .endif | | 77 | .endif |
77 | | | 78 | |
78 | .if ${OPSYS} == "Darwin" | | 79 | .if ${OPSYS} == "Darwin" |
79 | .PHONY: fix-darwin-install-name | | 80 | .PHONY: fix-darwin-install-name |
80 | post-install: fix-darwin-install-name | | 81 | post-install: fix-darwin-install-name |
81 | fix-darwin-install-name: | | 82 | fix-darwin-install-name: |
82 | ${FIND} ${DESTDIR}${PREFIX} -name "*.dylib" -type f -print | \ | | 83 | ${FIND} ${DESTDIR}${PREFIX} -name "*.dylib" -type f -print | \ |
83 | while read lib; do \ | | 84 | while read lib; do \ |
84 | libname=`basename $${lib}`; \ | | 85 | libname=`basename $${lib}`; \ |
85 | libdir=`dirname $${lib} | sed -e 's,${DESTDIR},,'`; \ | | 86 | libdir=`dirname $${lib} | sed -e 's,${DESTDIR},,'`; \ |
86 | install_name_tool -id $${libdir}/$${libname} $${lib}; \ | | 87 | install_name_tool -id $${libdir}/$${libname} $${lib}; \ |
87 | done | | 88 | done |
88 | .endif | | 89 | .endif |