unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 7726c55fe836292239a11dc37e240208c3936307 1184 bytes (raw)
name: packages/patches/openboardview-use-system-mpc.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 
Upstream status: https://github.com/OpenBoardView/OpenBoardView/pull/281

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 452dfa9..e30c3cf 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -206,13 +206,15 @@ endif()
 add_definitions(-DSTBI_FAILURE_USERMSG)
 
 ## mpc - Micro Parser Combinators ##
-execute_process(
-	COMMAND git submodule update --init src/mpc
-	WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-)
-
-add_library(mpc STATIC "mpc/mpc.c")
-
+pkg_check_modules(MPC QUIET mpc)
+if(NOT MPC_FOUND)
+	execute_process(
+		COMMAND git submodule update --init src/mpc
+		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+    	)
+        add_library(mpc STATIC "mpc/mpc.c")
+        include_directories(${CMAKE_CURRENT_SOURCE_DIR}/mpc)
+endif()
 
 ## OpenBoardView ##
 add_subdirectory(openboardview)
diff --git a/src/openboardview/FileFormats/GenCADFile.h b/src/openboardview/FileFormats/GenCADFile.h
index 1ccf8df..c57f7ff 100644
--- a/src/openboardview/FileFormats/GenCADFile.h
+++ b/src/openboardview/FileFormats/GenCADFile.h
@@ -5,7 +5,7 @@
 
 #include "build-generated/GenCADFileGrammar.h"
 
-#include "mpc/mpc.h"
+#include "mpc.h"
 
 #include <map>
 #include <string>

debug log:

solving 7726c55fe836292239a11dc37e240208c3936307 ...
found 7726c55fe836292239a11dc37e240208c3936307 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).