[packages/psplot] - added gfortran patch and adjusted Makefile for gfortran compiler - use soname for shared library -
qboosh
qboosh at pld-linux.org
Wed Mar 6 21:25:41 CET 2013
commit eb86c378bdd0c65576b359bdbe2b74d8181ab76a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Mar 6 21:25:30 2013 +0100
- added gfortran patch and adjusted Makefile for gfortran compiler
- use soname for shared library
- added -static
psplot-Makefile | 9 +++++----
psplot-gfortran.patch | 20 ++++++++++++++++++++
psplot.spec | 45 ++++++++++++++++++++++++++++++++++-----------
3 files changed, 59 insertions(+), 15 deletions(-)
---
diff --git a/psplot.spec b/psplot.spec
index f8124cb..5c28e5c 100644
--- a/psplot.spec
+++ b/psplot.spec
@@ -8,8 +8,9 @@ Group: Libraries
Source0: ftp://student.ifpan.edu.pl/pub/psplot/%{name}-%{version}.tar.gz
# Source0-md5: 3704836929eae06c9419b339d6e4c5c4
Source1: %{name}-Makefile
+Patch0: %{name}-gfortran.patch
URL: http://www.nova.edu/cwis/oceanography/psplot.html
-BuildRequires: gcc-g77
+BuildRequires: gcc-fortran
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -27,29 +28,46 @@ nie jest wykorzystywanych. Ten pakiet zawiera bibliotekę
współdzieloną.
%package devel
-Summary: A Fortran-callable Postscript plotting library - header files
-Summary(pl.UTF-8): Pliki nagłówkowe do działającej z Fortranem biblioteki rysującej Postscript
+Summary: A Fortran-callable Postscript plotting library - development files
+Summary(pl.UTF-8): Pliki programistyczne działającej z Fortranem biblioteki rysującej Postscript
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
-Header files for the psplot library.
+Development files for the psplot library.
%description devel -l pl.UTF-8
-Pliki nagłówkowe do biblioteki psplot.
+Pliki programistyczne biblioteki psplot.
+
+%package static
+Summary: Static psplot library
+Summary(pl.UTF-8): Statyczna biblioteka psplot
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static psplot library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka psplot.
%prep
%setup -q -n %{name}
+%patch0 -p1
-%build
cp -f %{SOURCE1} Makefile
-%{__make} "CFLAGS=%{rpmcflags}"
+%build
+%{__make} \
+ F77=%{_target_alias}-gfortran \
+ CFLAGS="%{rpmcflags}" \
+ LDFLAGS="%{rpmldflags}"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_libdir}
-install libpsplot.so $RPM_BUILD_ROOT%{_libdir}
+
+cp -dp libpsplot.so* $RPM_BUILD_ROOT%{_libdir}
install libpsplot.a $RPM_BUILD_ROOT%{_libdir}
%clean
@@ -60,9 +78,14 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib%{name}.so
+%doc readme.txt release_notes.txt
+%attr(755,root,root) %{_libdir}/libpsplot.so.0
%files devel
%defattr(644,root,root,755)
-%doc grmana4.ps *.txt *.for
-%{_libdir}/lib%{name}.a
+%doc grmana4.ps *.for
+%attr(755,root,root) %{_libdir}/libpsplot.so
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libpsplot.a
diff --git a/psplot-Makefile b/psplot-Makefile
index ceadbd5..899a7e5 100644
--- a/psplot-Makefile
+++ b/psplot-Makefile
@@ -5,11 +5,12 @@ RANLIB=ranlib
all: libpsplot.so libpsplot.a
psplot.o: psplot.txt
- ${F77} -x f77 psplot.txt -c ${CFLAGS}
+ $(F77) -x f77 psplot.txt -c $(CFLAGS) -fPIC
libpsplot.so: psplot.o
- ${F77} --shared psplot.o ${CFLAGS} -o libpsplot.so
+ $(F77) $(LDFLAGS) -shared -Wl,-soname,libpsplot.so.0 psplot.o $(CFLAGS) -o libpsplot.so.0
+ ln -sf libpsplot.so.0 libpsplot.so
libpsplot.a: psplot.o
- ${AR} r libpsplot.a psplot.o
- ${RANLIB} libpsplot.a
+ $(AR) r libpsplot.a psplot.o
+ $(RANLIB) libpsplot.a
diff --git a/psplot-gfortran.patch b/psplot-gfortran.patch
new file mode 100644
index 0000000..a4b629f
--- /dev/null
+++ b/psplot-gfortran.patch
@@ -0,0 +1,20 @@
+--- psplot/psplot.txt.orig 2001-08-10 16:12:09.000000000 +0200
++++ psplot/psplot.txt 2013-03-06 20:50:24.569471004 +0100
+@@ -7439,6 +7439,7 @@
+ character*132 cmdstr,curfnt
+ character*80 fileout
+ character tim*8,dat*9
++ character zone*5
+ character*1 timer(8),dater(9)
+ equivalence(timer(1),tim),(dater(1),dat)
+ common/conre1/ioffp,spval
+@@ -7493,8 +7494,7 @@
+ cmdstr= '%%Title: '//fileout(1:lenstr(fileout,80))
+
+ call filler
+- call time(tim)
+- call date(dat)
++ call date_and_time(dat, tim, zone)
+ if(timer(1).eq.' ')timer(1)='0'
+ if(dater(1).eq.' ')dater(1)='0'
+ cmdstr= '%%CreationDate: '//DAT//' '//TIM
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/psplot.git/commitdiff/eb86c378bdd0c65576b359bdbe2b74d8181ab76a
More information about the pld-cvs-commit
mailing list