$NetBSD: patch-src_CMakeLists.txt,v 1.2.14.1 2016/02/29 10:14:38 bsiegert 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	2016-01-15 04:17:18.000000000 +0000
+++ src/CMakeLists.txt
@@ -109,7 +109,7 @@ set_target_properties(graphite2 PROPERTI
 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_COMPILER_IS_GNUCXX)
         add_definitions(-Wdouble-promotion)
@@ -126,23 +126,19 @@ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linu
         else (GRAPHITE2_ASAN)
             target_link_libraries(graphite2 c gcc)
         endif (GRAPHITE2_ASAN)
-        include(Graphite)
         nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
     endif (${CMAKE_CXX_COMPILER} MATCHES  ".*mingw.*")
     set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
-    CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
 endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
 
 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 -fno-stack-protector"
-        LINK_FLAGS      "-nodefaultlibs" 
+        LINK_FLAGS      "${GRAPHITE_LINK_FLAGS}" 
         LINKER_LANGUAGE C)
     target_link_libraries(graphite2 c)
-    include(Graphite)
     nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
     set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
-    CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
 endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
 
 if  (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
