projects/guix·blob java-team · refs

57 lines · 2.7 KiB

1From https://sources.debian.org/src/graphite2/1.3.14-11/debian/patches/non-linux.diff
2and https://github.com/silnrsi/graphite/pull/59
3
4From 9bfb76afa1d4036743902be9942f47db0642e330 Mon Sep 17 00:00:00 2001
5From: Mattia Rizzolo <[email protected]>
6Date: Mon, 19 Aug 2019 10:05:38 +0200
7Subject: [PATCH] Apply the same settings used for Linux also to k*BSD and GNU
8 Hurd
9
10The patch was originally written by Pino Toscano for Debian back in 2014.
11
12Signed-off-by: Mattia Rizzolo <[email protected]>
13---
14 src/CMakeLists.txt | 2 +-
15 tests/examples/CMakeLists.txt | 2 +-
16 tests/vm/CMakeLists.txt | 2 +-
17 3 files changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
20index b6ac26bf..7bcc4030 100644
21--- a/src/CMakeLists.txt
22+++ b/src/CMakeLists.txt
23@@ -102,7 +102,7 @@ set_target_properties(graphite2 PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}"
24 LT_VERSION_REVISION ${GRAPHITE_API_REVISION}
25 LT_VERSION_AGE ${GRAPHITE_API_AGE})
26
27-if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
28+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "k.*BSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
29 set_target_properties(graphite2 PROPERTIES
30 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"
31 LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
32diff --git a/tests/examples/CMakeLists.txt b/tests/examples/CMakeLists.txt
33index 103c78be..c4b78813 100644
34--- a/tests/examples/CMakeLists.txt
35+++ b/tests/examples/CMakeLists.txt
36@@ -23,7 +23,7 @@ macro(test_example TESTNAME SRCFILE)
37 set_tests_properties(${TESTNAME} PROPERTIES TIMEOUT 3)
38 endmacro()
39
40-if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
41+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "k.*BSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
42 find_package(Freetype)
43 if (${FREETYPE_FOUND})
44 include_directories(${FREETYPE_INCLUDE_DIRS})
45diff --git a/tests/vm/CMakeLists.txt b/tests/vm/CMakeLists.txt
46index ee866de9..e94f710c 100644
47--- a/tests/vm/CMakeLists.txt
48+++ b/tests/vm/CMakeLists.txt
49@@ -29,7 +29,7 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
50 target_link_libraries(vm-test-direct vm-test-common)
51 endif()
52
53-if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
54+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "k.*BSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
55 add_definitions(-fno-rtti -fno-exceptions)
56 if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
57 add_definitions(-DNDEBUG -fomit-frame-pointer)