File: make-add-soname.patch

package info (click to toggle)
magma 2.9.0%2Bds-3
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 83,556 kB
  • sloc: cpp: 709,115; fortran: 121,916; ansic: 32,343; python: 25,603; f90: 15,208; makefile: 945; xml: 253; csh: 232; sh: 203; perl: 104
file content (36 lines) | stat: -rw-r--r-- 1,288 bytes parent folder | download | duplicates (4)
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
Description: add soname
Index: magma/Makefile
===================================================================
--- magma.orig/Makefile
+++ magma/Makefile
@@ -931,7 +931,9 @@ ifneq ($(have_fpic),)
 	@echo "===== shared library $@"
 	$(CXX) $(LDFLAGS) -shared -o $@ \
 		$^ \
-		-L./lib $(LIBS)
+		-L./lib $(LIBS) -Wl,--soname,libmagma.so.2
+	mv $(libmagma_so) $(libmagma_so).2
+	ln -s $$(basename $(libmagma_so).2) $(libmagma_so)
 	@echo
 
     # Can't add -Llib -lmagma to LIBS, because that would apply to libsparse_so's
@@ -941,7 +943,9 @@ ifneq ($(have_fpic),)
 	@echo "===== shared library $@"
 	$(CXX) $(LDFLAGS) -shared -o $@ \
 		$^ \
-		-L./lib $(LIBS) -lmagma
+		-L./lib $(LIBS) -lmagma -Wl,--soname,libmagma_sparse.so.2
+	mv $(libsparse_so) $(libsparse_so).2
+	ln -s $$(basename $(libsparse_so).2) $(libsparse_so)
 	@echo
 else
     # missing -fPIC: "make shared" prints warning
@@ -1002,7 +1006,7 @@ install: lib sparse-lib install_dirs
 	cp include/*.h         $(DESTDIR)$(prefix)/include
 	cp include/*.mod       $(DESTDIR)$(prefix)/include
 	cp $(SPARSE_DIR)/include/*.h  $(DESTDIR)$(prefix)/include
-	cp $(libs)             $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)
+	cp -dR lib/*.a lib/*.so lib/*.so.*  $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)
 	${MAKE} pkgconfig
 
 pkgconfig: