rpms/cernlib/devel cernlib-600-use-host.def-config-file.dpatch, NONE, 1.1 cernlib-fortify.patch, NONE, 1.1 cernlib.spec, 1.37, 1.38 patchy-fcasplit.patch, 1.1, 1.2
Patrice Dumas (pertusus)
fedora-extras-commits at redhat.com
Sun Jan 7 12:25:55 UTC 2007
- Previous message: rpms/yumex/devel .cvsignore, 1.25, 1.26 sources, 1.37, 1.38 yumex.spec, 1.43, 1.44
- Next message: rpms/yumex/FC-6 .cvsignore, 1.29, 1.30 sources, 1.37, 1.38 yumex.spec, 1.43, 1.44
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pertusus
Update of /cvs/extras/rpms/cernlib/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15712
Modified Files:
cernlib.spec patchy-fcasplit.patch
Added Files:
cernlib-600-use-host.def-config-file.dpatch
cernlib-fortify.patch
Log Message:
* Tue Dec 19 2006 Patrice Dumas <pertusus at free.fr> 2005-27
- add support for gfortran (not enabled, lshift missing in fedora gfortran)
- use fedora compiler flags when possible
- use %{optflags} and %{buildroot}
--- NEW FILE cernlib-600-use-host.def-config-file.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 600-use-host.def-config-file.dpatch by <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/config/site.def cernlib-2005.05.09.dfsg/src/config/site.def
--- cernlib-2005.05.09.dfsg~/src/config/site.def 2002-04-26 10:46:04.000000000 -0400
+++ cernlib-2005.05.09.dfsg/src/config/site.def 2006-07-05 10:25:00.691451379 -0400
@@ -71,9 +71,9 @@
#define HasFortran YES
-/*
+
#include <host.def>
-*/
+
/*
#ifndef HasGcc2
cernlib-fortify.patch:
--- NEW FILE cernlib-fortify.patch ---
--- cernlib-2005/2005/src/packlib/kuip/kuip/kstring.h.old 2007-01-06 23:10:47.000000000 +0100
+++ cernlib-2005/2005/src/packlib/kuip/kuip/kstring.h 2007-01-06 23:11:53.000000000 +0100
@@ -21,8 +21,10 @@
*/
#ifndef WIN32
+#ifndef memmove
extern void* memmove( void* dst, const void* src, size_t n );
#endif
+#endif
/* GF. make conform to kkern.c#if !defined(__convexc__)*/
#ifndef HAVE_STRCASECMP
Index: cernlib.spec
===================================================================
RCS file: /cvs/extras/rpms/cernlib/devel/cernlib.spec,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- cernlib.spec 11 Sep 2006 22:32:35 -0000 1.37
+++ cernlib.spec 7 Jan 2007 12:25:24 -0000 1.38
@@ -1,6 +1,12 @@
+%if "%fedora" > "7"
+%bcond_without gfortran
+%else
+%bcond_with gfortran
+%endif
+
Name: cernlib
Version: 2005
-Release: 26%{?dist}
+Release: 27%{?dist}
Summary: General purpose CERN library and associated binaries
Group: Development/Libraries
# As explained in the cernlib on debian FAQ, cfortran can be considered LGPL.
@@ -34,9 +40,12 @@
# for patchy build scripts
BuildRequires: tcsh
BuildRequires: gawk
-# there are missing f2c intrinsics in gfortran so gfortran cannot be used to
-# build the cernlib
+
+%if %{with gfortran}
+BuildRequires: gcc-gfortran
+%else
BuildRequires: /usr/bin/g77
+%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# these sources are different from the upstream sources as files with
@@ -189,6 +198,8 @@
Patch32002: paw-320-support-ifort-and-gfortran.dpatch
Patch321: cernlib-321-support-gfortran.dpatch
+# use host.def for gfortran
+Patch600: cernlib-600-use-host.def-config-file.dpatch
# in cernlib debian split also remove other packages from LIBDIRS
Patch700: 700-remove-kernlib-from-packlib-Imakefile.dpatch
Patch70101: cernlib-701-patch-hbook-comis-Imakefiles.dpatch
@@ -252,6 +263,8 @@
# FIXME: maybe those 2 patches aren't needed with newer gfortran anymore
Patch1203: cernlib-hwuli2_use_dimag.diff
Patch1204: cernlib-hwhiga_use_dimag.diff
+# don't add prototypes if allready defined as a macro
+Patch1205: cernlib-fortify.patch
# patchy 4
# not applied as it has allready been done by the sed one-liner in
@@ -408,6 +421,7 @@
%patch -P 1502
%patch -P 1503
+%patch -P 1205 -p1 -b .old
%patch -P 100001 -p0
@@ -421,9 +435,13 @@
%patch -P 3 -p1
%patch -P 100 -p1
%patch -P 101 -p1
+# miscompilation and ICE with optimized code should be fixed with gfortran
+# there is still some code with -O0 from upstream, they are kept as-is
+%if ! %{with gfortran}
%patch -P 10201 -p1
%patch -P 10202 -p1
%patch -P 10203 -p1
+%endif
%patch -P 103 -p1
%patch -P 104 -p1
%patch -P 10501 -p1
@@ -488,6 +506,8 @@
%patch -P 32002 -p1
%patch -P 321 -p1
+%patch -P 600 -p1
+
# move kernlib out of packlib (debian 700-move-kernlib-to-top-level.sh.dpatch)
mv src/packlib/kernlib src/kernlib
@@ -637,9 +657,9 @@
sed -e 's/==CERN_LEVEL==/%{version}/' -e 's:==CERN==:%{_libdir}/cernlib:' %{SOURCE100} > cernlib-%{version}.sh
sed -e 's/==CERN_LEVEL==/%{version}/' -e 's:==CERN==:%{_libdir}/cernlib:' %{SOURCE105} > cernlib-%{version}.csh
-cp %{SOURCE101} .
-cp %{SOURCE102} .
-cp %{SOURCE103} .
+cp -p %{SOURCE101} .
+cp -p %{SOURCE102} .
+cp -p %{SOURCE103} .
# Regenerate the copyright file (from non split debian/rules)
grep -v DEADPOOL_LIST_GOES_HERE %{SOURCE203} > debian-copyright
@@ -675,7 +695,7 @@
# rename the cernlib script cernlib-static and use the debian cernlib
# script for dynamic libraries support
# remove -lg2c to the link commands, because libg2c.so isn't available,
-# it is found by g77 if needed
+# it is found by g77/gfortran if needed
mv src/scripts/cernlib bin/cernlib-static
sed -e 's:@PREFIX@:%{_prefix}:g' \
-e 's:@LIBPREFIX@:%{_libdir}/cernlib/%{version}:g' \
@@ -684,26 +704,47 @@
chmod 0755 src/scripts/cernlib
# install mkdirhier which is needed to make directories
-cp %{SOURCE104} bin/
-chmod a+x bin/mkdirhier
+%{__install} -p -m755 %{SOURCE104} bin/
+
+# set FC_OPTFLAGS and FC_COMPILER based on compiler used
+%if %{with gfortran}
+FC_OPTFLAGS="%{optflags}"
+FC_COMPILER=gfortran
+%else
+# optflags are different for g77, so use hopefully sane defaults without
+# arch options
+FC_OPTFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables'
+FC_COMPILER=g77
+%endif
+# Create the top level Makefile with imake
PATHSAVE=$PATH
# Build patchy version 4
pushd ../patchy
+%if %{with gfortran}
+ sed -i.gfortran -e 's/f77/gfortran/' fcasplit.f p4boot.sh
+%endif
+ sed -i.optflags -e 's/FOPT \+=.*/FOPT = "'"$FC_OPTFLAGS"'"/' p4boot.sh
# export PATH="$CERN/patchy:$CERN/patchy/p4sub:$PATH"
export PATH=".:..:$PATH"
p4boot.sh 0
popd
+# copy patchy executables in bin
find ../patchy -name y* -a -perm -755 -exec install {} bin ';'
export PATH=$PATHSAVE
-# Create the top level Makefile with imake
+
+# pass informations to the build system through host.def
+echo '#define DefaultCDebugFlags %{optflags}' >> ${CVSCOSRC}/config/host.def
+
+%if %{with gfortran}
+echo '#define HasGFortran YES' >> ${CVSCOSRC}/config/host.def
+%endif
+echo "#define FortranDebugFlags $FC_OPTFLAGS" >> ${CVSCOSRC}/config/host.def
cd $CERN_ROOT/build
$CVSCOSRC/config/imake_boot
-# the RPM optflags are not used during the build
-
# Install kuipc and the scripts (cernlib, paw and gxint) in $CERN_ROOT/bin
make %{?_smp_mflags} bin/kuipc
@@ -726,10 +767,12 @@
cd $CERN_ROOT/
mv bin/pawX11 bin/pawX11.dynamic
mv bin/paw++ bin/paw++.dynamic
+
# Build static paw
-g77 $CERN_ROOT/build/pawlib/paw/programs/0pamain.o \
+# optflags shouldn't be needed during linking
+$FC_COMPILER $CERN_ROOT/build/pawlib/paw/programs/0pamain.o \
`cernlib -G X11 pawlib` -Wl,-E -o bin/pawX11
-g77 $CERN_ROOT/build/pawlib/paw/programs/0pamainm.o \
+$FC_COMPILER $CERN_ROOT/build/pawlib/paw/programs/0pamainm.o \
`cernlib -G Motif pawlib` -Wl,-E -o bin/paw++
# Build packlib
@@ -745,43 +788,43 @@
%install
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
-%{__install} -m644 cernlib-%{version}.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
-%{__install} -m644 cernlib-%{version}.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
+%{__install} -d -m755 %{buildroot}%{_sysconfdir}/profile.d
+%{__install} -p -m644 cernlib-%{version}.sh %{buildroot}%{_sysconfdir}/profile.d
+%{__install} -p -m644 cernlib-%{version}.csh %{buildroot}%{_sysconfdir}/profile.d
%{__install} -d -m755 cfortran/Examples
%{__install} -m644 %{version}/src/cfortran/Examples/*.c cfortran/Examples/
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_datadir}/aclocal
-%{__install} -m644 cernlib.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal/cernlib.m4
+%{__install} -d -m755 %{buildroot}%{_datadir}/aclocal
+%{__install} -p -m644 cernlib.m4 %{buildroot}%{_datadir}/aclocal/cernlib.m4
cd %{version}
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_libdir}/cernlib/%{version}/lib
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_datadir}/cernlib/%{version}
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}/cfortran
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_bindir}/
-
-%{__install} -m644 lib/*.dat $RPM_BUILD_ROOT%{_datadir}/cernlib/%{version}
-%{__install} -m644 lib/gxint321.f $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}
-%{__install} -m644 src/cfortran/*.h $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}/
+%{__install} -d -m755 %{buildroot}%{_libdir}/cernlib/%{version}/lib
+%{__install} -d -m755 %{buildroot}%{_datadir}/cernlib/%{version}
+%{__install} -d -m755 %{buildroot}%{_includedir}/cernlib/%{version}
+%{__install} -d -m755 %{buildroot}%{_includedir}/cernlib/%{version}/cfortran
+%{__install} -d -m755 %{buildroot}%{_bindir}/
+
+%{__install} -p -m644 lib/*.dat %{buildroot}%{_datadir}/cernlib/%{version}
+%{__install} -p -m644 lib/gxint321.f %{buildroot}%{_includedir}/cernlib/%{version}
+%{__install} -p -m644 src/cfortran/*.h %{buildroot}%{_includedir}/cernlib/%{version}/
-%{__install} -m755 bin/* $RPM_BUILD_ROOT%{_bindir}/
+%{__install} -p -m755 bin/* %{buildroot}%{_bindir}/
# add a link to pawX11 from %{_libdir}/cernlib/%{version}/bin
-%{__install} -d -m755 $RPM_BUILD_ROOT%{_libdir}/cernlib/%{version}/bin/
-%{__ln_s} %{_bindir}/pawX11 $RPM_BUILD_ROOT%{_libdir}/cernlib/%{version}/bin/pawX11
+%{__install} -d -m755 %{buildroot}%{_libdir}/cernlib/%{version}/bin/
+%{__ln_s} %{_bindir}/pawX11 %{buildroot}%{_libdir}/cernlib/%{version}/bin/pawX11
-# to preserve symlinks
-(cd lib && tar cf - *.a) | (cd $RPM_BUILD_ROOT%{_libdir}/cernlib/%{version}/lib && tar xf -)
-(cd shlib && tar cf - *.so*) | (cd $RPM_BUILD_ROOT%{_libdir}/cernlib/%{version}/lib && tar xf -)
+# to preserve symlinks and timestamps
+(cd lib && tar cf - *.a) | (cd %{buildroot}%{_libdir}/cernlib/%{version}/lib && tar xf -)
+(cd shlib && tar cf - *.so*) | (cd %{buildroot}%{_libdir}/cernlib/%{version}/lib && tar xf -)
-rm -f $RPM_BUILD_ROOT%{_bindir}/mkdirhier
+rm -f %{buildroot}%{_bindir}/mkdirhier
# add links for cfortran header files in the top include directory
-pushd $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}
+pushd %{buildroot}%{_includedir}/cernlib/%{version}
for file in *.h; do
%{__ln_s} ../$file cfortran/$file
done
@@ -790,21 +833,21 @@
cd src
# install include directories for the cernlib libraries
-base_include=$RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}
+base_include=%{buildroot}%{_includedir}/cernlib/%{version}
for dir in `cat ../../*/debian/add-ons/includelist.txt`; do
basedir=`basename $dir`
rm -rf $base_include/$basedir
cp -Rp $dir $base_include/
done
-%{__install} -d -m755 $RPM_BUILD_ROOT/etc/ld.so.conf.d
-echo %{_libdir}/cernlib/%{version}/lib > $RPM_BUILD_ROOT/etc/ld.so.conf.d/cernlib-%{version}-%{_arch}.conf
+%{__install} -d -m755 %{buildroot}/etc/ld.so.conf.d
+echo %{_libdir}/cernlib/%{version}/lib > %{buildroot}/etc/ld.so.conf.d/cernlib-%{version}-%{_arch}.conf
-find $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version} -name Imakefile -exec rm -f \{\} \;
-rm -f $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}/ntuple/*.c
+find %{buildroot}%{_includedir}/cernlib/%{version} -name Imakefile -exec rm -f \{\} \;
+rm -f %{buildroot}%{_includedir}/cernlib/%{version}/ntuple/*.c
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%post -p /sbin/ldconfig
@@ -909,6 +952,11 @@
%changelog
+* Tue Dec 19 2006 Patrice Dumas <pertusus at free.fr> 2005-27
+- add support for gfortran (not enabled, lshift missing in fedora gfortran)
+- use fedora compiler flags when possible
+- use %%{optflags} and %%{buildroot}
+
* Mon Sep 11 2006 Patrice Dumas <pertusus at free.fr> 2005-26
- update to newer debian patchsets (paw and cernlib)
- remove gfortran related patches integrated in the debian
@@ -986,7 +1034,7 @@
- correct defaults in cernlib scripts
* Sun Sep 11 2005 Patrice Dumas <pertusus at free.fr> - 2005-3
-- add rm -rf $RPM_BUILD_ROOT
+- add rm -rf %%{buildroot}
* Thu Sep 1 2005 Patrice Dumas <pertusus at free.fr> - 2005-2
- minor update of cernlib.README
patchy-fcasplit.patch:
Index: patchy-fcasplit.patch
===================================================================
RCS file: /cvs/extras/rpms/cernlib/devel/patchy-fcasplit.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- patchy-fcasplit.patch 11 Apr 2006 22:45:34 -0000 1.1
+++ patchy-fcasplit.patch 7 Jan 2007 12:25:24 -0000 1.2
@@ -9,3 +9,13 @@
PARAMETER (CHPOC = '-c -O2 -posix')
PARAMETER (CHPOA = ' ')
+@@ -37,7 +37,7 @@
+ PARAMETER (CHWHA = 'as ')
+
+ PARAMETER (MLMKLN=100)
+- PARAMETER (MXLENG=128, MXMKLN=64)
++ PARAMETER (MXLENG=256, MXMKLN=128)
+ CHARACTER CHHOLD*(MXLENG)
+ CHARACTER CHOPT(7)*(MXLENG)
+ DIMENSION NCHOPT(7)
+
- Previous message: rpms/yumex/devel .cvsignore, 1.25, 1.26 sources, 1.37, 1.38 yumex.spec, 1.43, 1.44
- Next message: rpms/yumex/FC-6 .cvsignore, 1.29, 1.30 sources, 1.37, 1.38 yumex.spec, 1.43, 1.44
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list