[packages/cdflib] - fix linking with libcdf - added opt patch (use optflags for tools)

qboosh qboosh at pld-linux.org
Sat Mar 8 17:53:58 CET 2014


commit 81a69c52ede71c7e9315129023c727fc7d96b44c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 8 17:56:47 2014 +0100

    - fix linking with libcdf
    - added opt patch (use optflags for tools)

 cdflib-opt.patch | 20 ++++++++++++++++++++
 cdflib.spec      |  7 +++++++
 2 files changed, 27 insertions(+)
---
diff --git a/cdflib.spec b/cdflib.spec
index 3115c10..bf989f5 100644
--- a/cdflib.spec
+++ b/cdflib.spec
@@ -8,6 +8,7 @@ Group:		Libraries
 # see http://cdf.gsfc.nasa.gov/html/sw_and_docs.html
 Source0:	http://cdaweb.gsfc.nasa.gov/pub/software/cdf/dist/cdf35_0/linux/cdf35_0-dist-all.tar.gz
 # Source0-md5:	61dcabe51427e03f83b8a6dcf9d4dfd4
+Patch0:		%{name}-opt.patch
 URL:		http://cdf.gsfc.nasa.gov/cdf_home.html
 BuildRequires:	gcc-fortran >= 6:4.4.2
 BuildRequires:	ncurses-devel
@@ -58,13 +59,19 @@ API Javy do biblioteki CDF.
 
 %prep
 %setup -q -n cdf35_0-dist
+%patch0 -p1
+
+# note: included zlib (src/lib/zlib) is modified (at last public symbol names)
 
 %build
 %{__make} all \
 	OS=linux \
 	ENV=gnu \
 	CC_linux_gnu="%{__cc}" \
+	LD_linux_gnu="%{__cc}" \
 	LIBCDFa="../lib/libcdf.so" \
+	LIBs1="-L../lib -lcdf -lm" \
+	LIBs2="-L../lib -lcdf -lncurses -lm" \
 	UCOPTIONS="%{rpmcflags}"
 
 %install
diff --git a/cdflib-opt.patch b/cdflib-opt.patch
new file mode 100644
index 0000000..6969d89
--- /dev/null
+++ b/cdflib-opt.patch
@@ -0,0 +1,20 @@
+--- cdf35_0-dist/Makefile.orig	2013-09-09 18:31:16.000000000 +0200
++++ cdf35_0-dist/Makefile	2014-03-08 17:36:13.311830189 +0100
+@@ -781,7 +781,7 @@
+ 	@cd $(TOOLSsrcDIR); $(MAKE) \
+ "CURSES=$(AND.$(CURSES).$(CURSES_$(OS)_$(ENV)))" \
+ "CCx=$(CC_$(OS)_$(ENV))" \
+-"COPTIONS=$(COPTIONS_$(OS)_$(ENV))" \
++"COPTIONS=$(UCOPTIONS) $(COPTIONS_$(OS)_$(ENV))" \
+ "COPTIONSld=$(COPTIONSld_$(OS)_$(ENV))" \
+ "SYSLIBS=$(SYSLIBSexe_$(OS)_$(ENV))" \
+ "CURSESLIB=$(CURSESLIB_$(OS)_$(ENV))" \
+@@ -793,7 +793,7 @@
+ "SHARED=$(AND.$(SHARED).$(SHARED_$(OS)))" \
+ "FOPTIONS=$(FOPTIONS_$(OS)) $(FOPTIONS_$(OS)_$(ENV))" \
+ "FOPTIONSld=$(FOPTIONSld_$(OS)) $(FOPTIONSld_$(OS)_$(ENV))" \
+-"COPTIONS=$(COPTIONS_$(OS)_$(ENV))" \
++"COPTIONS=$(UCOPTIONS) $(COPTIONS_$(OS)_$(ENV))" \
+ "COPTIONSld=$(COPTIONSld_$(OS)_$(ENV))" \
+ "SYSLIBS=$(SYSLIBSexe_$(OS)_$(ENV))" \
+ "SHAREDEXT=$(SHAREDEXT_$(OS))" \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cdflib.git/commitdiff/81a69c52ede71c7e9315129023c727fc7d96b44c



More information about the pld-cvs-commit mailing list