Qt6: set CMAKE_APPLE_SILICON_PROCESSOR on arm64 Set CMAKE_APPLE_SILICON_PROCESSOR just like other cmake builds. The Qt6 configure script acts outside the settings in devel/cmake so we have to replicate them to get the same environment.diff -r1.12 -r1.13 pkgsrc/x11/qt6-qtbase/Makefile
(nros)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.12 2023/08/14 05:25:35 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.13 2023/09/28 09:54:42 nros Exp $ | |
2 | 2 | |||
3 | DISTNAME= qtbase-everywhere-src-${QTVERSION} | 3 | DISTNAME= qtbase-everywhere-src-${QTVERSION} | |
4 | PKGNAME= qt6-qtbase-${QTVERSION} | 4 | PKGNAME= qt6-qtbase-${QTVERSION} | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 1 | |
6 | COMMENT= C++ X GUI toolkit | 6 | COMMENT= C++ X GUI toolkit | |
7 | CATEGORIES= x11 | 7 | CATEGORIES= x11 | |
8 | 8 | |||
9 | LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2 OR gnu-gpl-v3 | 9 | LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2 OR gnu-gpl-v3 | |
10 | 10 | |||
11 | .include "Makefile.common" | 11 | .include "Makefile.common" | |
12 | 12 | |||
13 | HAS_CONFIGURE= yes | 13 | HAS_CONFIGURE= yes | |
14 | CONFIGURE_ARGS+= -prefix "${QTPREFIX}" | 14 | CONFIGURE_ARGS+= -prefix "${QTPREFIX}" | |
@@ -187,26 +187,29 @@ pre-configure: | @@ -187,26 +187,29 @@ pre-configure: | |||
187 | done | 187 | done | |
188 | ${RM} -f ${WRKSRC}/mkspecs/features/mac/default_pre.prf | 188 | ${RM} -f ${WRKSRC}/mkspecs/features/mac/default_pre.prf | |
189 | ${RM} -f ${WRKSRC}/mkspecs/features/mac/default_post.prf | 189 | ${RM} -f ${WRKSRC}/mkspecs/features/mac/default_post.prf | |
190 | 190 | |||
191 | .include "options.mk" | 191 | .include "options.mk" | |
192 | 192 | |||
193 | CONFIGURE_ARGS+= -- -DQT_DISABLE_RPATH:BOOL=ON | 193 | CONFIGURE_ARGS+= -- -DQT_DISABLE_RPATH:BOOL=ON | |
194 | .if ${OPSYS} != "Darwin" | 194 | .if ${OPSYS} != "Darwin" | |
195 | CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=ON | 195 | CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=ON | |
196 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${QTPREFIX}/lib | 196 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${QTPREFIX}/lib | |
197 | .else | 197 | .else | |
198 | CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=OFF | 198 | CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=OFF | |
199 | CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib | 199 | CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib | |
200 | .if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64) | |||
201 | CONFIGURE_ARGS+= -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 | |||
202 | .endif | |||
200 | .endif | 203 | .endif | |
201 | 204 | |||
202 | TOOL_DEPENDS+= xmlstarlet-[0-9]*:../../textproc/xmlstarlet | 205 | TOOL_DEPENDS+= xmlstarlet-[0-9]*:../../textproc/xmlstarlet | |
203 | 206 | |||
204 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Concurrent.pc | 207 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Concurrent.pc | |
205 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Core.pc | 208 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Core.pc | |
206 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Gui.pc | 209 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Gui.pc | |
207 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Network.pc | 210 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Network.pc | |
208 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGL.pc | 211 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGL.pc | |
209 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGLWidgets.pc | 212 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGLWidgets.pc | |
210 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6PrintSupport.pc | 213 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6PrintSupport.pc | |
211 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Sql.pc | 214 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Sql.pc | |
212 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Test.pc | 215 | PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Test.pc |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile.common,v 1.34 2023/08/04 19:44:00 adam Exp $ | 1 | # $NetBSD: Makefile.common,v 1.35 2023/09/28 09:54:42 nros Exp $ | |
2 | # used by audio/qt6-qtspeech/Makefile | 2 | # used by audio/qt6-qtspeech/Makefile | |
3 | # used by comms/qt6-qtconnectivity/Makefile | 3 | # used by comms/qt6-qtconnectivity/Makefile | |
4 | # used by databases/qt6-odbc/Makefile | 4 | # used by databases/qt6-odbc/Makefile | |
5 | # used by databases/qt6-psql/Makefile | 5 | # used by databases/qt6-psql/Makefile | |
6 | # used by devel/qt6-qt5compat/Makefile | 6 | # used by devel/qt6-qt5compat/Makefile | |
7 | # used by devel/qt6-qttools/Makefile | 7 | # used by devel/qt6-qttools/Makefile | |
8 | # used by devel/qt6-qtwayland/Makefile | 8 | # used by devel/qt6-qtwayland/Makefile | |
9 | # used by geography/qt6-qtlocation/Makefile | 9 | # used by geography/qt6-qtlocation/Makefile | |
10 | # used by geography/qt6-qtpositioning/Makefile | 10 | # used by geography/qt6-qtpositioning/Makefile | |
11 | # used by graphics/qt6-qt3d/Makefile | 11 | # used by graphics/qt6-qt3d/Makefile | |
12 | # used by graphics/qt6-qtcharts/Makefile | 12 | # used by graphics/qt6-qtcharts/Makefile | |
13 | # used by graphics/qt6-qtdatavis3d/Makefile | 13 | # used by graphics/qt6-qtdatavis3d/Makefile | |
14 | # used by graphics/qt6-qtimageformats/Makefile | 14 | # used by graphics/qt6-qtimageformats/Makefile | |
@@ -78,26 +78,29 @@ MAKE_ENV+= DYLD_LIBRARY_PATH=${WRKSRC}/l | @@ -78,26 +78,29 @@ MAKE_ENV+= DYLD_LIBRARY_PATH=${WRKSRC}/l | |||
78 | MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/lib | 78 | MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/lib | |
79 | .endif | 79 | .endif | |
80 | 80 | |||
81 | # avoid creating a .qt directory in the users home directory | 81 | # avoid creating a .qt directory in the users home directory | |
82 | SCRIPTS_ENV+= HOME=${WRKDIR} | 82 | SCRIPTS_ENV+= HOME=${WRKDIR} | |
83 | 83 | |||
84 | .if "${PKGPATH}" != "x11/qt6-qtbase" | 84 | .if "${PKGPATH}" != "x11/qt6-qtbase" | |
85 | #CONFIGURE_ARGS+= -cmake-use-default-generator | 85 | #CONFIGURE_ARGS+= -cmake-use-default-generator | |
86 | . if ${OPSYS} != "Darwin" | 86 | . if ${OPSYS} != "Darwin" | |
87 | CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=ON | 87 | CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=ON | |
88 | . else | 88 | . else | |
89 | CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=OFF | 89 | CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=OFF | |
90 | CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib | 90 | CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib | |
91 | .if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64) | |||
92 | CONFIGURE_ARGS+= -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 | |||
93 | .endif | |||
91 | . endif | 94 | . endif | |
92 | QTCONFDIR?= . | 95 | QTCONFDIR?= . | |
93 | do-configure: | 96 | do-configure: | |
94 | cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${QTPREFIX}/bin/qt-configure-module ${QTCONFDIR} ${CONFIGURE_ARGS} | 97 | cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${QTPREFIX}/bin/qt-configure-module ${QTCONFDIR} ${CONFIGURE_ARGS} | |
95 | .endif | 98 | .endif | |
96 | 99 | |||
97 | #do-build: | 100 | #do-build: | |
98 | # cd ${WRKSRC}/${QTCONFDIR} && ${SETENV} ${MAKE_ENV} ninja ${BUILD_TARGET} | 101 | # cd ${WRKSRC}/${QTCONFDIR} && ${SETENV} ${MAKE_ENV} ninja ${BUILD_TARGET} | |
99 | 102 | |||
100 | #do-install: | 103 | #do-install: | |
101 | # cd ${WRKSRC}/${QTCONFDIR} && ${SETENV} ${INSTALL_ENV} ninja ${INSTALL_TARGET} | 104 | # cd ${WRKSRC}/${QTCONFDIR} && ${SETENV} ${INSTALL_ENV} ninja ${INSTALL_TARGET} | |
102 | 105 | |||
103 | INSTALLATION_DIRS+= lib/pkgconfig | 106 | INSTALLATION_DIRS+= lib/pkgconfig |