summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/lib2geom-enable-assertions.patch
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-01-14 23:20:31 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-05-31 22:12:12 -0400
commit89c34f5e48431de070c057cf4162a4519afbb0ba (patch)
tree58c69f17a4ce84be6bc6617c1cd3ad8ab4a6910a /gnu/packages/patches/lib2geom-enable-assertions.patch
parentca3adf26072c759b198042ced866efc423dd4b97 (diff)
downloadguix-patches-89c34f5e48431de070c057cf4162a4519afbb0ba.tar
guix-patches-89c34f5e48431de070c057cf4162a4519afbb0ba.tar.gz
gnu: Add lib2geom.
* gnu/packages/graphics.scm (lib2geom): New variable. * gnu/packages/patches/lib2geom-enable-assertions.patch, lib2geom-link-tests-against-glib.patch, lib2geom-use-system-googletest.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new patches.
Diffstat (limited to 'gnu/packages/patches/lib2geom-enable-assertions.patch')
-rw-r--r--gnu/packages/patches/lib2geom-enable-assertions.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/lib2geom-enable-assertions.patch b/gnu/packages/patches/lib2geom-enable-assertions.patch
new file mode 100644
index 0000000000..8feb44acbf
--- /dev/null
+++ b/gnu/packages/patches/lib2geom-enable-assertions.patch
@@ -0,0 +1,36 @@
+From 4aa78f52232682b353eb15c219171e466987bac7 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Thu, 16 Jan 2020 00:19:29 -0500
+Subject: [PATCH] build: Enable assertions for the RelWithDebugInfo build type.
+
+This fixes issue #5 (see:
+https://gitlab.com/inkscape/lib2geom/issues/5).
+
+* CMakeLists.txt: Remove the "-DNDEBUG" CXX flag from the default
+configuration for the RelWithDebugInfo build type.
+---
+ CMakeLists.txt | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bfeb8f03..a663a1b0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,6 +19,14 @@ enable_testing()
+
+ include(CheckCXXSourceCompiles)
+
++# Enable assertions for the RelWithDebugInfo build type. This is
++# useful as some tests make use of it (see:
++# https://gitlab.com/inkscape/lib2geom/issues/5).
++if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
++ string(REPLACE "-DNDEBUG" ""
++ CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
++endif()
++
+ # Find dependencies
+ find_package(Boost 1.40 REQUIRED)
+ find_package(DoubleConversion REQUIRED)
+--
+2.24.1
+