Package: suitesparse / 1:5.8.1+dfsg-2

mongoose-build.patch Patch series | download
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Description: Fix Mongoose build system
 - top-level Makefile: do not try to build Mongoose dynamic library before
   dynamic suitesparse_config has been compiled
 - do not compile static Mongoose with PIC
 - link mongoose executable against dynamic Mongoose library
 - hardcode paths for static libsuitesparse_config
 All this mess comes from the fact that upstream build system compiles
 libsuitesparse_config.a with PIC by default (this is changed in Debian by
 buildflags.patch).
 Also clean LaTeX generated files when doing "make clean"
Author: Sébastien Villemot <sebastien@debian.org>
Forwarded: no
Last-Update: 2018-12-26
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -154,7 +154,6 @@ endif
 # both the dynamic and static libraries.
 static: metis
 	( cd SuiteSparse_config && $(MAKE) static )
-	( cd Mongoose  && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' static )
 	( cd AMD && $(MAKE) static )
 	( cd BTF && $(MAKE) static )
 	( cd CAMD && $(MAKE) static )
--- a/Mongoose/CMakeLists.txt
+++ b/Mongoose/CMakeLists.txt
@@ -176,11 +176,10 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMA
 
 # Build the Mongoose library
 add_library(mongoose_lib ${MONGOOSE_LIB_FILES})
-set_property(TARGET mongoose_lib PROPERTY POSITION_INDEPENDENT_CODE ON)
 set_target_properties(mongoose_lib
         PROPERTIES OUTPUT_NAME mongoose)
 if ( SUITESPARSE_CONFIG_LIBRARY )
-    target_link_libraries(mongoose_lib ${SUITESPARSE_CONFIG_LIBRARY})
+    target_link_libraries(mongoose_lib -L${CMAKE_CURRENT_SOURCE_DIR}/../static_lib -lsuitesparseconfig)
 endif ()
 
 if (UNIX AND NOT APPLE)
@@ -238,7 +237,7 @@ endif ()
 add_executable(mongoose_exe ${EXE_FILES})
 set_target_properties(mongoose_exe
         PROPERTIES OUTPUT_NAME mongoose)
-target_link_libraries(mongoose_exe mongoose_lib)
+target_link_libraries(mongoose_exe mongoose_dylib)
 
 install(TARGETS mongoose_exe
         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
--- a/Mongoose/Makefile
+++ b/Mongoose/Makefile
@@ -47,6 +47,7 @@ purge: distclean
 
 # remove all files not in the distribution
 distclean:
+	-make -C build purge
 	rm -rf build/* Lib/* MATLAB/*.mex*
 	rm -rf SuiteSparse_config/*.o SuiteSparse_config/*.a