pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] graphics/graphite2: fix build on Apple Sillcon



> Attached is an updated version of the existing patch to src/CMakeLists.txt which changes the build so it doesn't force sse2 on Darwin aarch64 or PPC.
Great, works, thanks.
I added an updated patch comment, could someone commit this (It's a build fix for Darwin only)?
Index: patches/patch-src_CMakeLists.txt
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/graphite2/patches/patch-src_CMakeLists.txt,v
retrieving revision 1.7
diff -u -r1.7 patch-src_CMakeLists.txt
--- patches/patch-src_CMakeLists.txt	17 Jul 2019 09:45:13 -0000	1.7
+++ patches/patch-src_CMakeLists.txt	28 Dec 2020 18:38:38 -0000
@@ -2,9 +2,25 @@
 
 Always install the libtool .la file.
 
---- src/CMakeLists.txt.orig	2018-12-20 06:28:50.000000000 +0000
-+++ src/CMakeLists.txt
-@@ -151,6 +151,12 @@ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Wind
+Don't use SSE on Darwin with non-Intel processors.
+
+--- ./src/CMakeLists.txt.orig	2018-12-20 00:28:50.000000000 -0600
++++ ./src/CMakeLists.txt	2020-12-28 11:59:05.000000000 -0600
+@@ -136,9 +136,12 @@
+ 
+ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+     set_target_properties(graphite2 PROPERTIES
+-        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -mfpmath=sse -msse2"
++        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
+         LINK_FLAGS      "-nodefaultlibs"
+         LINKER_LANGUAGE C)
++    if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
++        add_definitions(-mfpmath=sse -msse2)
++    endif()
+     target_link_libraries(graphite2 c)
+     include(Graphite)
+     nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
+@@ -151,6 +154,12 @@
          COMPILE_DEFINITIONS "_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE;GRAPHITE2_EXPORTING")
  endif()
  


Home | Main Index | Thread Index | Old Index