pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/graphite2 Fix build errors on Darwin



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0c29f0b86ccb
branches:  trunk
changeset: 634394:0c29f0b86ccb
user:      pho <pho%pkgsrc.org@localhost>
date:      Fri May 16 01:21:12 2014 +0000

description:
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:

 graphics/graphite2/Makefile                         |   3 +-
 graphics/graphite2/PLIST                            |   6 +--
 graphics/graphite2/distinfo                         |   4 ++-
 graphics/graphite2/patches/patch-Graphite.cmake     |  15 ++++++++++
 graphics/graphite2/patches/patch-src_CMakeLists.txt |  29 +++++++++++++++++++++
 5 files changed, 51 insertions(+), 6 deletions(-)

diffs (98 lines):

diff -r 92a9e28dade1 -r 0c29f0b86ccb graphics/graphite2/Makefile
--- a/graphics/graphite2/Makefile       Fri May 16 01:10:22 2014 +0000
+++ b/graphics/graphite2/Makefile       Fri May 16 01:21:12 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2014/02/02 07:47:36 ryoon Exp $
+# $NetBSD: Makefile,v 1.2 2014/05/16 01:21:12 pho Exp $
 
 DISTNAME=      graphite2-1.2.4
 CATEGORIES=    graphics
@@ -12,5 +12,6 @@
 
 USE_LANGUAGES= c c++
 USE_CMAKE=     yes
+USE_LIBTOOL=   yes
 
 .include "../../mk/bsd.pkg.mk"
diff -r 92a9e28dade1 -r 0c29f0b86ccb graphics/graphite2/PLIST
--- a/graphics/graphite2/PLIST  Fri May 16 01:10:22 2014 +0000
+++ b/graphics/graphite2/PLIST  Fri May 16 01:21:12 2014 +0000
@@ -1,12 +1,10 @@
-@comment $NetBSD: PLIST,v 1.1 2014/02/02 07:47:36 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.2 2014/05/16 01:21:12 pho Exp $
 bin/gr2fonttest
 include/graphite2/Font.h
 include/graphite2/Log.h
 include/graphite2/Segment.h
 include/graphite2/Types.h
-lib/libgraphite2.so
-lib/libgraphite2.so.3
-lib/libgraphite2.so.3.0.1
+lib/libgraphite2.la
 lib/pkgconfig/graphite2.pc
 share/graphite2/graphite2-release.cmake
 share/graphite2/graphite2.cmake
diff -r 92a9e28dade1 -r 0c29f0b86ccb graphics/graphite2/distinfo
--- a/graphics/graphite2/distinfo       Fri May 16 01:10:22 2014 +0000
+++ b/graphics/graphite2/distinfo       Fri May 16 01:21:12 2014 +0000
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.1 2014/02/02 07:47:36 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2014/05/16 01:21:12 pho Exp $
 
 SHA1 (graphite2-1.2.4.tgz) = 5b3a907fee3ce0c6efcc2b31d0d98939ec031b7d
 RMD160 (graphite2-1.2.4.tgz) = a4adc89befc86a9adcab3b0dbd6caf2ac3866fb4
 Size (graphite2-1.2.4.tgz) = 6938866 bytes
+SHA1 (patch-Graphite.cmake) = 32cab319afa56ecb5f379e4097fe9059a89d2b59
+SHA1 (patch-src_CMakeLists.txt) = 4ea7c6f237f05334dffd09b33edf2ab00ee1059a
diff -r 92a9e28dade1 -r 0c29f0b86ccb graphics/graphite2/patches/patch-Graphite.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/graphite2/patches/patch-Graphite.cmake   Fri May 16 01:21:12 2014 +0000
@@ -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 -r 92a9e28dade1 -r 0c29f0b86ccb graphics/graphite2/patches/patch-src_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/graphite2/patches/patch-src_CMakeLists.txt       Fri May 16 01:21:12 2014 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index