rpms/cernlib/devel cernlib.spec,1.62,1.63
Patrice Dumas (pertusus)
fedora-extras-commits at redhat.com
Fri Sep 21 09:01:38 UTC 2007
Author: pertusus
Update of /cvs/extras/rpms/cernlib/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21320
Modified Files:
cernlib.spec
Log Message:
* Mon Aug 27 2007 Patrice Dumas <pertusus at free.fr> 2006-19
- pass --build-id when linking, this is needed for debuginfo generation
- use g77 binaries, paw with gfortran is broken on x86_64 (#241416)
- add virtual provides for devel, utils and static packages, packages
(like kuipc) may need the cernlib, but accept g77 or gfortran compiled
cernlib
- don't set the environment. It only hurts parallel installations.
Index: cernlib.spec
===================================================================
RCS file: /cvs/extras/rpms/cernlib/devel/cernlib.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- cernlib.spec 27 Aug 2007 21:07:07 -0000 1.62
+++ cernlib.spec 21 Sep 2007 09:01:05 -0000 1.63
@@ -44,15 +44,18 @@
%if %{with gfortran}
# allows to use a suffix for the library different from the suffix
# for the utilities
-# %%define utils_suffix -gfortran
+
+# to workaround a bug in 64 bit, we use the utilities from cernlib-g77
+%define utils_suffix -gfortran
%if 0%{?g77_default_compiler}
%define compiler -gfortran
-%define utils_suffix -gfortran
+#%%define utils_suffix -gfortran
%endif
%else
%if ! 0%{?g77_default_compiler}
%define compiler -g77
-%define utils_suffix -g77
+# to workaround a bug in 64 bit, we use the utilities from cernlib-g77
+#%%define utils_suffix -g77
%endif
# no compat prefix, the utilities compiled with gfortran are non functionnal
# see Bug 241416
@@ -65,12 +68,12 @@
Name: %{?compat}cernlib%{?compiler}
Version: 2006
-Release: 18%{?dist}
+Release: 19%{?dist}
Summary: General purpose CERN library
Group: Development/Libraries
# As explained in the cernlib on debian FAQ, cfortran can be considered LGPL.
# http://borex.princeton.edu/~kmccarty/faq.html#44
-License: GPL+ and LGPLV2+
+License: GPL+ and LGPLv2+
URL: http://cernlib.web.cern.ch/cernlib/
# mandrake
#BuildRequires: libxorg-x11-devel lesstif-devel libblas3-devel liblapack3-devel
@@ -128,6 +131,8 @@
Source203: patchy-unpack-rceta
# Shell scripts that go in /etc/profile.d
+# Currently they are not installed since tey do more harm than good, when
+# parallel cernlib versions are installed.
Source100: cernlib.sh.in
Source105: cernlib.csh.in
# m4 macros for autoconf
@@ -377,6 +382,7 @@
%endif
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries
+Provides: cernlib(devel) = %{version}-%{release}
# for the m4 macro directory ownership
Requires: automake
@@ -398,6 +404,7 @@
Summary: General purpose CERN library static libraries
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
+Provides: cernlib(static) = %{version}-%{release}
%description static
CERN program library is a large collection of general purpose libraries
@@ -414,6 +421,7 @@
Group: Applications/System
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-static = %{version}-%{release}
+Provides: cernlib(utils) = %{version}-%{release}
%description utils
CERN library compilation and environment setting scripts.
@@ -450,7 +458,7 @@
%package -n %{?compat}kuipc%{?utils_suffix}
Summary: Cernlib's Kit for a User Interface Package (KUIP) compiler
Group: Development/Languages
-Requires: %{name}-devel = %{version}-%{release}
+Requires: cernlib(devel)
%description -n %{?compat}kuipc%{?utils_suffix}
KUIPC, the Kit for a User Interface Package Compiler, is a tool to simplify
@@ -461,11 +469,11 @@
with the rest of the program. Since the generated code uses KUIP routines,
the program must also be linked against the Packlib library that contains them.
-%package packlib
+%package -n cernlib-packlib%{?utils_suffix}
Group: Applications/Archiving
Summary: I/O, network and other utilities from the cernlib
-%description packlib
+%description -n cernlib-packlib%{?utils_suffix}
I/O, network and miscalleneous utilities based on the CERN Program
Library.
According to the responsible of the cernlib debian package, some
@@ -783,6 +791,9 @@
sed -i.paths -e 's:"/cern":"%{_libdir}/cernlib/":' -e 's:"pro":"%{verdir}":' \
src/scripts/paw src/scripts/cernlib src/graflib/dzdoc/dzedit/dzedit.script
+sed -i.utils_suffix -e 's:$GDIR/paw$drv:$GDIR/paw$drv%{?utils_suffix}:' src/scripts/paw
+sed -i.utils_suffix -e 's:$GDIR/dze$drv:$GDIR/dze$drv%{?utils_suffix}:' src/graflib/dzdoc/dzedit/dzedit.script
+
sed -i -e 's:"/cern":"%{_libdir}/cernlib/":' -e 's:"pro":"%{verdir}":' \
../patchy/ylist ../patchy/yindex
@@ -790,7 +801,7 @@
# substitute includedir in gxint to conform to FHS, and gxint.o to gxint.f
# and substitue the name of the cernlib link script
sed -i -e 's/"pro"/%{version}/' -e 's:\${CERN}/\${ver}/lib/gxint\${gvs}\.\$_o:%{_includedir}/cernlib/\${ver}/gxint.f:' \
- -e 's/`cernlib /cernlib%{?compiler} /' \
+ -e 's/`cernlib /`cernlib%{?compiler} /' \
src/scripts/gxint
# substitute DATADIR in source files to conform to FHS
@@ -841,6 +852,8 @@
%else
# optflags are different for g77, so we remove problematic flags
FC_OPTFLAGS=`echo "%optflags" | sed -e 's/-mtune=[^ ]\+//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=[^ ]\+//'`
+# this is needed (at least in F-8).
+G_LDFLAGS='-Wl,--build-id'
%endif
FC_COMPILER=g77
%endif
@@ -848,6 +861,11 @@
PATHSAVE=$PATH
# Build patchy version 4
pushd ../patchy
+
+if [ z"$G_LDFLAGS" != z ]; then
+ sed -i.ldflags -e "s/f77/f77 $G_LDFLAGS/" p4boot.sh
+fi
+
%if %{with gfortran}
sed -i.gfortran -e 's/f77/gfortran/' fcasplit.f p4boot.sh
%endif
@@ -870,6 +888,12 @@
echo "#define InstallCmd %{__install} -p" >> ${CVSCOSRC}/config/host.def
# don't strip executables
echo "#define InstPgmFlags -m 0755" >> ${CVSCOSRC}/config/host.def
+# this is not used for libraries
+# echo "#define ExtraLoadOptions $G_LDFLAGS" >> ${CVSCOSRC}/config/host.def
+
+# optflags are doubled for programs because they are in FortranDebugFlags
+# and below, but they are not doubled for libs.
+echo "#define FortranLinkCmd $FC_COMPILER $FC_OPTFLAGS $G_LDFLAGS" >> ${CVSCOSRC}/config/host.def
# Create the top level Makefile with imake
cd $CERN_ROOT/build
@@ -898,9 +922,9 @@
mv bin/paw++ bin/paw++.dynamic
# Build static paw
-$FC_COMPILER $FC_OPTFLAGS $CERN_ROOT/build/pawlib/paw/programs/0pamain.o \
+$FC_COMPILER $FC_OPTFLAGS $G_LDFLAGS $CERN_ROOT/build/pawlib/paw/programs/0pamain.o \
`cernlib -G X11 pawlib` -Wl,-E -o bin/pawX11
-$FC_COMPILER $FC_OPTFLAGS $CERN_ROOT/build/pawlib/paw/programs/0pamainm.o \
+$FC_COMPILER $FC_OPTFLAGS $G_LDFLAGS $CERN_ROOT/build/pawlib/paw/programs/0pamainm.o \
`cernlib -G Motif pawlib` -Wl,-E -o bin/paw++
# Build packlib
@@ -916,7 +940,7 @@
cp -p -r $CERN_ROOT/src/p5boot/* .
# there is a main program in this file, so the file is removed.
rm p5lib/nsynopt.f
-$FC_COMPILER $FC_OPTFLAGS -o nypatchy nypatchy.f p5lib/*.f $CERN_ROOT/lib/libkernlib.a
+$FC_COMPILER $FC_OPTFLAGS $G_LDFLAGS -o nypatchy nypatchy.f p5lib/*.f $CERN_ROOT/lib/libkernlib.a
ln -s $CERN_ROOT/build/p5boot/nypatchy $CERN_ROOT/bin/ypatchy
# Build npatchy
@@ -943,8 +967,8 @@
rm -rf %{buildroot}
%{__install} -d -m755 %{buildroot}%{_sysconfdir}/profile.d
-%{__install} -p -m644 cernlib-%{verdir}.sh %{buildroot}%{_sysconfdir}/profile.d
-%{__install} -p -m644 cernlib-%{verdir}.csh %{buildroot}%{_sysconfdir}/profile.d
+#%{__install} -p -m644 cernlib-%{verdir}.sh %{buildroot}%{_sysconfdir}/profile.d
+#%{__install} -p -m644 cernlib-%{verdir}.csh %{buildroot}%{_sysconfdir}/profile.d
%{__install} -d -m755 cfortran/Examples
%{__install} -p -m644 %{version}/src/cfortran/Examples/*.c cfortran/Examples/
@@ -987,8 +1011,8 @@
# add a link to pawX11 and dzeX11 from %{_libdir}/cernlib/%{verdir}/bin
%{__install} -d -m755 %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/
-%{__ln_s} %{_bindir}/pawX11%{?utils_suffix} %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/pawX11
-%{__ln_s} %{_bindir}/dzeX11%{?utils_suffix} %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/dzeX11
+%{__ln_s} %{_bindir}/pawX11%{?utils_suffix} %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/pawX11%{?utils_suffix}
+%{__ln_s} %{_bindir}/dzeX11%{?utils_suffix} %{buildroot}%{_libdir}/cernlib/%{verdir}/bin/dzeX11%{?utils_suffix}
# to preserve symlinks and timestamps
(cd lib && tar cf - *.a) | (cd %{buildroot}%{_libdir}/cernlib/%{verdir}/lib && tar xf -)
@@ -1131,9 +1155,10 @@
%files utils
%defattr(-,root,root,-)
+%doc cernlib-%{verdir}.csh cernlib-%{verdir}.sh
%{_bindir}/cernlib*%{?compiler}
-%{_sysconfdir}/profile.d/cernlib-%{verdir}.sh
-%{_sysconfdir}/profile.d/cernlib-%{verdir}.csh
+#%{_sysconfdir}/profile.d/cernlib-%{verdir}.sh
+#%{_sysconfdir}/profile.d/cernlib-%{verdir}.csh
%{_mandir}/man1/cernlib*.1*
%files -n %{?compat}paw%{?utils_suffix}
@@ -1147,7 +1172,7 @@
# paw doesn't explicitly depend on the main package, so it owns the dirs
%dir %{_libdir}/cernlib/%{verdir}
%dir %{_libdir}/cernlib/%{verdir}/bin
-%{_libdir}/cernlib/%{verdir}/bin/pawX11
+%{_libdir}/cernlib/%{verdir}/bin/pawX11%{?utils_suffix}
%{_datadir}/X11/app-defaults/*Paw++
%{_datadir}/icons/hicolor/
%{_mandir}/man1/paw*.1*
@@ -1165,16 +1190,16 @@
%{_bindir}/kuipc%{?utils_suffix}
%{_mandir}/man1/kuipc.1*
-%files packlib
+%files -n cernlib-packlib%{?utils_suffix}
%defattr(-,root,root,-)
-%doc cernlib-2006.dfsg.2/debian/debhelper/zftp.README.debian
+%doc cernlib-*/debian/debhelper/zftp.README.debian
%{_bindir}/cdbackup%{?utils_suffix}
%{_bindir}/cdserv%{?utils_suffix}
%{_bindir}/dzedit%{?utils_suffix}
# packlib doesn't explicitly depend on the main package, so it owns the dirs
%dir %{_libdir}/cernlib/%{verdir}
%dir %{_libdir}/cernlib/%{verdir}/bin
-%{_libdir}/cernlib/%{verdir}/bin/dzeX11
+%{_libdir}/cernlib/%{verdir}/bin/dzeX11%{?utils_suffix}
%{_bindir}/dzeX11%{?utils_suffix}
%{_bindir}/fatmen%{?utils_suffix}
%{_bindir}/fatsrv%{?utils_suffix}
@@ -1226,6 +1251,14 @@
%changelog
+* Mon Aug 27 2007 Patrice Dumas <pertusus at free.fr> 2006-19
+- pass --build-id when linking, this is needed for debuginfo generation
+- use g77 binaries, paw with gfortran is broken on x86_64 (#241416)
+- add virtual provides for devel, utils and static packages, packages
+ (like kuipc) may need the cernlib, but accept g77 or gfortran compiled
+ cernlib
+- don't set the environment. It only hurts parallel installations.
+
* Mon Aug 27 2007 Patrice Dumas <pertusus at free.fr> 2006-18
- correct license
- use the right debian patch source
More information about the fedora-extras-commits
mailing list