Skip to content

Commit

Permalink
graphite2: Fix universal build.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuffnatty committed Jun 20, 2023
1 parent edcd073 commit c305ea5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions graphics/graphite2/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
PortSystem 1.0
PortGroup cmake 1.1
PortGroup github 1.0
PortGroup muniversal 1.1

github.setup silnrsi graphite 1.3.14
revision 0
Expand Down Expand Up @@ -31,6 +32,8 @@ extract.suffix .tgz
compiler.cxx_standard \
2011

patchfiles-append patch-src-CMakeLists.txt.diff

set py_ver 3.11
set py_ver_nodot [string map {. {}} ${py_ver}]

Expand Down
14 changes: 14 additions & 0 deletions graphics/graphite2/files/patch-src-CMakeLists.txt.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Don't use -mfpmath=sse -msse2 on Mac OS universal ARM/Intel, PowerPC/Intel
builds.
https://github.com/silnrsi/graphite/pull/84
--- src/CMakeLists.txt.orig 2020-04-01 04:53:13.000000000 +0200
+++ src/CMakeLists.txt 2023-04-04 15:43:50.000000000 +0200
@@ -139,7 +139,7 @@
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")
+ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86" AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm|ppc")
add_definitions(-mfpmath=sse -msse2)
endif()
target_link_libraries(graphite2 c)

0 comments on commit c305ea5

Please sign in to comment.