pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[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.
Alternatively, updating to version graphite2-1.3.14 includes the fix as well, but I am not sure if there are any compatibility concerns with the update.
https://github.com/silnrsi/graphite/commit/4f78a29ef31572f1360ae457ea0b9163b28eb039
Thanks!
--
Mark Felder
pkgsrc%feld.me@localhost
--- ./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()
+if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+ target_link_libraries(graphite2 c)
+ include(Graphite)
+ set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
+ CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
+endif (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin)
install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_)
Home |
Main Index |
Thread Index |
Old Index