summaryrefslogtreecommitdiff
path: root/graphics/graphite2/patches
diff options
context:
space:
mode:
authorpho <pho>2014-05-16 01:21:12 +0000
committerpho <pho>2014-05-16 01:21:12 +0000
commit95b9c32999409563f09dceb44ea74a3759d3931e (patch)
tree4389930ce7de5d3373b48cf98259d8cb07dae6cd /graphics/graphite2/patches
parent376c3bd3573d0a6fa183c0919e36e7f44a55e7ac (diff)
downloadpkgsrc-95b9c32999409563f09dceb44ea74a3759d3931e.tar.gz
Fix build errors on Darwin
patches/patch-Graphite.cmake (CREATE_LIBTOOL_FILE): Fix incorrect library_names patches/patch-src_CMakeLists.txt: Don't pass -nodefaultlibs to compiler or the build fails for missing symbols on PowerPC and possibly other platforms.
Diffstat (limited to 'graphics/graphite2/patches')
-rw-r--r--graphics/graphite2/patches/patch-Graphite.cmake15
-rw-r--r--graphics/graphite2/patches/patch-src_CMakeLists.txt29
2 files changed, 44 insertions, 0 deletions
diff --git a/graphics/graphite2/patches/patch-Graphite.cmake b/graphics/graphite2/patches/patch-Graphite.cmake
new file mode 100644
index 00000000000..9604b9d0721
--- /dev/null
+++ b/graphics/graphite2/patches/patch-Graphite.cmake
@@ -0,0 +1,15 @@
+$NetBSD: patch-Graphite.cmake,v 1.1 2014/05/16 01:21:12 pho Exp $
+
+CREATE_LIBTOOL_FILE: Fix incorrect library_names on Darwin
+
+--- Graphite.cmake.orig 2014-05-16 01:00:36.000000000 +0000
++++ Graphite.cmake
+@@ -46,7 +46,7 @@ FUNCTION(CREATE_LIBTOOL_FILE _target _in
+ FILE(APPEND ${_laname} "dlname='${_soname}'\n\n")
+ FILE(APPEND ${_laname} "# Names of this library.\n")
+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+- FILE(APPEND ${_laname} "library_names='${_lanamwe}.${_target_current}.${_target_revision}.${_target_age}.${_soext} ${_lanamewe}.${_target_current}.${_soext} ${_soname}'\n\n")
++ FILE(APPEND ${_laname} "library_names='${_lanamewe}.${_target_current}.${_target_revision}.${_target_age}${_soext} ${_lanamewe}.${_target_current}${_soext} ${_soname}'\n\n")
+ else (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+ FILE(APPEND ${_laname} "library_names='${_soname}.${_target_current}.${_target_revision}.${_target_age} ${_soname}.${_target_current} ${_soname}'\n\n")
+ endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
diff --git a/graphics/graphite2/patches/patch-src_CMakeLists.txt b/graphics/graphite2/patches/patch-src_CMakeLists.txt
new file mode 100644
index 00000000000..f8ce4630900
--- /dev/null
+++ b/graphics/graphite2/patches/patch-src_CMakeLists.txt
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_CMakeLists.txt,v 1.1 2014/05/16 01:21:12 pho Exp $
+
+Don't pass -nodefaultlibs to compiler or the build fails for missing
+symbols on PowerPC and possibly other platforms. I can't see any
+reason why they do this at all.
+
+The problem is already reported to the upstream:
+http://sourceforge.net/p/silgraphite/bugs/56/
+
+--- src/CMakeLists.txt.orig 2013-11-29 06:21:26.000000000 +0000
++++ src/CMakeLists.txt
+@@ -113,7 +113,7 @@ endif (${CMAKE_BUILD_TYPE} STREQUAL "Cla
+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+ set_target_properties(graphite2 PROPERTIES
+ COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
+- LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
++ LINK_FLAGS "${GRAPHITE_LINK_FLAGS}"
+ LINKER_LANGUAGE C)
+ if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
+ target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32)
+@@ -133,7 +133,7 @@ endif (${CMAKE_SYSTEM_NAME} STREQUAL "Li
+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+ set_target_properties(graphite2 PROPERTIES
+ COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
+- LINK_FLAGS "-nodefaultlibs"
++ LINK_FLAGS "${GRAPHITE_LINK_FLAGS}"
+ LINKER_LANGUAGE C)
+ target_link_libraries(graphite2 c)
+ include(Graphite)