Thu Sep 28 09:54:42 2023 UTC ()
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.


(nros)
diff -r1.12 -r1.13 pkgsrc/x11/qt6-qtbase/Makefile
diff -r1.34 -r1.35 pkgsrc/x11/qt6-qtbase/Makefile.common

cvs diff -r1.12 -r1.13 pkgsrc/x11/qt6-qtbase/Makefile (expand / switch to unified diff)

--- pkgsrc/x11/qt6-qtbase/Makefile 2023/08/14 05:25:35 1.12
+++ pkgsrc/x11/qt6-qtbase/Makefile 2023/09/28 09:54:42 1.13
@@ -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
3DISTNAME= qtbase-everywhere-src-${QTVERSION} 3DISTNAME= qtbase-everywhere-src-${QTVERSION}
4PKGNAME= qt6-qtbase-${QTVERSION} 4PKGNAME= qt6-qtbase-${QTVERSION}
5PKGREVISION= 1 5PKGREVISION= 1
6COMMENT= C++ X GUI toolkit 6COMMENT= C++ X GUI toolkit
7CATEGORIES= x11 7CATEGORIES= x11
8 8
9LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2 OR gnu-gpl-v3 9LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2 OR gnu-gpl-v3
10 10
11.include "Makefile.common" 11.include "Makefile.common"
12 12
13HAS_CONFIGURE= yes 13HAS_CONFIGURE= yes
14CONFIGURE_ARGS+= -prefix "${QTPREFIX}" 14CONFIGURE_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
193CONFIGURE_ARGS+= -- -DQT_DISABLE_RPATH:BOOL=ON 193CONFIGURE_ARGS+= -- -DQT_DISABLE_RPATH:BOOL=ON
194.if ${OPSYS} != "Darwin" 194.if ${OPSYS} != "Darwin"
195CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=ON 195CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=ON
196LDFLAGS+= ${COMPILER_RPATH_FLAG}${QTPREFIX}/lib 196LDFLAGS+= ${COMPILER_RPATH_FLAG}${QTPREFIX}/lib
197.else 197.else
198CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=OFF 198CONFIGURE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=OFF
199CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib 199CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib
 200.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64)
 201CONFIGURE_ARGS+= -DCMAKE_APPLE_SILICON_PROCESSOR=arm64
 202.endif
200.endif 203.endif
201 204
202TOOL_DEPENDS+= xmlstarlet-[0-9]*:../../textproc/xmlstarlet 205TOOL_DEPENDS+= xmlstarlet-[0-9]*:../../textproc/xmlstarlet
203 206
204PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Concurrent.pc 207PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Concurrent.pc
205PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Core.pc 208PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Core.pc
206PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Gui.pc 209PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Gui.pc
207PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Network.pc 210PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Network.pc
208PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGL.pc 211PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGL.pc
209PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGLWidgets.pc 212PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6OpenGLWidgets.pc
210PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6PrintSupport.pc 213PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6PrintSupport.pc
211PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Sql.pc 214PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Sql.pc
212PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Test.pc 215PKGCONFIG_OVERRIDE+= lib/pkgconfig/Qt6Test.pc

cvs diff -r1.34 -r1.35 pkgsrc/x11/qt6-qtbase/Makefile.common (expand / switch to unified diff)

--- pkgsrc/x11/qt6-qtbase/Makefile.common 2023/08/04 19:44:00 1.34
+++ pkgsrc/x11/qt6-qtbase/Makefile.common 2023/09/28 09:54:42 1.35
@@ -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
78MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/lib 78MAKE_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
82SCRIPTS_ENV+= HOME=${WRKDIR} 82SCRIPTS_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"
87CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=ON 87CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=ON
88. else 88. else
89CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=OFF 89CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=OFF
90CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib 90CONFIGURE_ARGS+= -DCMAKE_INSTALL_NAME_DIR:PATH=${QTPREFIX}/lib
 91.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64)
 92CONFIGURE_ARGS+= -DCMAKE_APPLE_SILICON_PROCESSOR=arm64
 93.endif
91. endif 94. endif
92QTCONFDIR?= . 95QTCONFDIR?= .
93do-configure: 96do-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
103INSTALLATION_DIRS+= lib/pkgconfig 106INSTALLATION_DIRS+= lib/pkgconfig