File: pkgconfig.patch

package info (click to toggle)
spherepack 3.2-7
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,940 kB
  • ctags: 3,045
  • sloc: fortran: 18,323; python: 5,763; makefile: 58
file content (49 lines) | stat: -rw-r--r-- 1,819 bytes parent folder | download | duplicates (3)
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
Author: Alastair McKinstry <mckinstry@debian.org>
Description: Rudimentary support for pkgconfig files in spherepack
Last-Updated: 2010-11-04
Forwarded: no

Index: spherepack-3.2/Src/Makefile
===================================================================
--- spherepack-3.2.orig/Src/Makefile	2013-07-03 18:52:15.000000000 +0100
+++ spherepack-3.2/Src/Makefile	2013-07-04 11:23:13.000000000 +0100
@@ -1,8 +1,10 @@
 FC:=gfortran
 PREFIX:=/usr/local
+PACKAGE_VERSION:=3.2
+LIBDIR=$(PREFIX)/lib
 LD:=$(LD)
 SONAME=libsphere.so.0d
-SHLIBFLAGS:=  -Wl,--soname,$(SONAME) -Wl,--version-script,spherepack.ver -Wl,--script,aliases.ld -lm
+SHLIBFLAGS:=  -Wl,--soname,$(SONAME) -Wl,--version-script,spherepack.ver  -lm
 PIC_OBJS = $(patsubst %.f,%.pic_o, $(wildcard *.f))
 
 all: libsphere.a shlib libsphere.so
@@ -22,6 +24,13 @@
 	cp libsphere.a $(DESTDIR)$(PREFIX)/lib
 	cp $(SONAME)  $(DESTDIR)$(PREFIX)/lib
 	ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/lib/libsphere.so
+	mkdir -p $(DESTDIR)$(LIBDIR)
+	mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
+	cp libsphere.a $(DESTDIR)$(LIBDIR)
+	cp $(SONAME)  $(DESTDIR)$(LIBDIR)
+	ln -sf $(SONAME) $(DESTDIR)$(LIDBIR)/libsphere.so
+	sed -e 's;@prefix@;${PREFIX};' -e 's;@PACKAGE_VERSION@;${PACKAGE_VERSION};' -e 's;@LIBDIR@;${LIBDIR};'  \
+		   < sphere.pc.in > $(DESTDIR)$(LIBDIR)/pkgconfig/sphere.pc
 
 clean:
 	rm -f *.o *.pic_o libsphere.a $(SONAME)	 libsphere.so
Index: spherepack-3.2/Src/sphere.pc.in
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ spherepack-3.2/Src/sphere.pc.in	2013-07-03 18:52:15.000000000 +0100
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@LIBDIR@
+
+Name: sphere
+Description: Spherical operators for geophysics
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lsphere
+