[mapcode] 03/06: Make it build

Stefan Fritsch sf at moszumanska.debian.org
Wed Nov 2 23:26:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository mapcode.

commit 4aa32cada09a6e89a12aa676af3e1c65f47b2ae7
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Wed Nov 2 18:06:00 2016 +0100

    Make it build
    
    Needs some cmake fixes for linking/install
---
 debian/control             |  2 +-
 debian/patches/build-fixes | 33 +++++++++++++++++++++++++++++++++
 debian/patches/series      |  1 +
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index b4093e1..619cdd1 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
 Uploaders: Stefan Fritsch <sf at debian.org>
 Section: misc
 Priority: optional
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 9), cmake (>= 3.3)
 Standards-Version: 3.9.8
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/mapcode.git/
 Vcs-Git: https://anonscm.debian.org/git/pkg-grass/mapcode.git
diff --git a/debian/patches/build-fixes b/debian/patches/build-fixes
new file mode 100644
index 0000000..bfc4da1
--- /dev/null
+++ b/debian/patches/build-fixes
@@ -0,0 +1,33 @@
+Description: Fix build infra
+ Link some libs and install targets
+Author: Stefan Fritsch <sf at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2016-11-02
+
+--- mapcode.orig/CMakeLists.txt
++++ mapcode/CMakeLists.txt
+@@ -65,11 +65,23 @@ set(SOURCE_FILES_UNITTEST
+ set(SOURCE_FILES_UTILITY
+         utility/mapcode.cpp)
+ 
++set(THREADS_PREFER_PTHREAD_FLAG ON)
++find_package(Threads REQUIRED)
++find_library(M_LIB m)
++
+ add_library(mapcodelib ${SOURCE_FILES_MAPCODELIB})
+ target_include_directories(mapcodelib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
++target_link_libraries(mapcodelib Threads::Threads)
++target_link_libraries(mapcodelib ${M_LIB})
+ 
+ add_executable(unittest ${SOURCE_FILES_UNITTEST})
+ target_link_libraries(unittest LINK_PUBLIC mapcodelib)
++target_link_libraries(unittest LINK_PUBLIC Threads::Threads)
++target_link_libraries(unittest LINK_PUBLIC ${M_LIB})
+ 
+ add_executable(mapcode ${SOURCE_FILES_UTILITY})
+ target_link_libraries(mapcode LINK_PUBLIC mapcodelib)
++target_link_libraries(mapcode LINK_PUBLIC Threads::Threads)
++target_link_libraries(mapcode LINK_PUBLIC ${M_LIB})
++
++install(TARGETS mapcode DESTINATION /usr/bin)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2282ce6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+build-fixes

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapcode.git



More information about the Pkg-grass-devel mailing list