Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphite2: Fix universal build #18070

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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")
tuffnatty marked this conversation as resolved.
Show resolved Hide resolved
+ 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)