| @@ -1,29 +1,53 @@ | | | @@ -1,29 +1,53 @@ |
1 | $NetBSD: patch-src_CMakeLists.txt,v 1.1 2014/05/16 01:21:12 pho Exp $ | | 1 | $NetBSD: patch-src_CMakeLists.txt,v 1.2 2014/05/16 12:51:24 wiz Exp $ |
2 | | | 2 | |
3 | Don't pass -nodefaultlibs to compiler or the build fails for missing | | 3 | Don't pass -nodefaultlibs to compiler or the build fails for missing |
4 | symbols on PowerPC and possibly other platforms. I can't see any | | 4 | symbols on PowerPC and possibly other platforms. I can't see any |
5 | reason why they do this at all. | | 5 | reason why they do this at all. |
6 | | | 6 | |
7 | The problem is already reported to the upstream: | | 7 | The problem is already reported to the upstream: |
8 | http://sourceforge.net/p/silgraphite/bugs/56/ | | 8 | http://sourceforge.net/p/silgraphite/bugs/56/ |
9 | | | 9 | |
10 | --- src/CMakeLists.txt.orig 2013-11-29 06:21:26.000000000 +0000 | | 10 | --- src/CMakeLists.txt.orig 2013-11-29 06:21:26.000000000 +0000 |
11 | +++ src/CMakeLists.txt | | 11 | +++ src/CMakeLists.txt |
12 | @@ -113,7 +113,7 @@ endif (${CMAKE_BUILD_TYPE} STREQUAL "Cla | | 12 | @@ -113,7 +113,7 @@ endif (${CMAKE_BUILD_TYPE} STREQUAL "Cla |
13 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | | 13 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
14 | set_target_properties(graphite2 PROPERTIES | | 14 | set_target_properties(graphite2 PROPERTIES |
15 | 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" | | 15 | 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" |
16 | - LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" | | 16 | - LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" |
17 | + LINK_FLAGS "${GRAPHITE_LINK_FLAGS}" | | 17 | + LINK_FLAGS "${GRAPHITE_LINK_FLAGS}" |
18 | LINKER_LANGUAGE C) | | 18 | LINKER_LANGUAGE C) |
19 | if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") | | 19 | if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") |
20 | target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) | | 20 | target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) |
21 | @@ -133,7 +133,7 @@ endif (${CMAKE_SYSTEM_NAME} STREQUAL "Li | | 21 | @@ -123,28 +123,27 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linu |
| | | 22 | else (GRAPHITE2_ASAN) |
| | | 23 | target_link_libraries(graphite2 c gcc) |
| | | 24 | endif (GRAPHITE2_ASAN) |
| | | 25 | - include(Graphite) |
| | | 26 | nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) |
| | | 27 | endif (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") |
| | | 28 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") |
| | | 29 | - CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") |
| | | 30 | endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
| | | 31 | |
22 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | | 32 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") |
23 | set_target_properties(graphite2 PROPERTIES | | 33 | set_target_properties(graphite2 PROPERTIES |
24 | 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" | | 34 | 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" |
25 | - LINK_FLAGS "-nodefaultlibs" | | 35 | - LINK_FLAGS "-nodefaultlibs" |
26 | + LINK_FLAGS "${GRAPHITE_LINK_FLAGS}" | | 36 | + LINK_FLAGS "${GRAPHITE_LINK_FLAGS}" |
27 | LINKER_LANGUAGE C) | | 37 | LINKER_LANGUAGE C) |
28 | target_link_libraries(graphite2 c) | | 38 | target_link_libraries(graphite2 c) |
29 | include(Graphite) | | 39 | - include(Graphite) |
| | | 40 | nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) |
| | | 41 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") |
| | | 42 | - CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") |
| | | 43 | endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") |
| | | 44 | |
| | | 45 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
| | | 46 | set_target_properties(graphite2 PROPERTIES |
| | | 47 | COMPILE_DEFINITIONS "_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE;GRAPHITE2_EXPORTING") |
| | | 48 | +else (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
| | | 49 | +include(Graphite) |
| | | 50 | +CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") |
| | | 51 | endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
| | | 52 | |
| | | 53 | |