%define __build_nypatchy 1 %define _have_motif YES %define _sdk_dir `xcrun --show-sdk-path` Summary: CERNLIB Name: cernlib Version: 2006 Release: 12%{?dist}6i Source0: localhost:/2006_src.tar.gz Patch0: localhost:/cernlib2006-2006b-14.patch Patch1: localhost:/cernlib-2006-macosx10.9.patch Patch2: localhost:/cernlib-2006-macosx10.11.patch Patch3: localhost:/cernlib-2006-macos12.patch Patch4: localhost:/cernlib-2006-test.patch Patch5: localhost:/cernlib-2006-arm64.patch Patch6: localhost:/cernlib-2006-arm64-gfortran-bug.patch Patch7: localhost:/cernlib-2006-nypatchy.patch URL: http://wwwasd.web.cern.ch/wwwasd/cernlib/ Group: Development/Libraries License: CERN, INFN %define __prefix /opt/cern Prefix: %{__prefix} %if %{__build_nypatchy} BuildRequires: patchy %endif BuildRoot: %{_tmppath}/%{name}-root %description The CERN Program Library is a large collection of general purpose libraries and modules maintained and offered in both source and object code form on the CERN central computers. The two most popular applications based on CERNLIB are PAW and GEANT 3.21. Most of these programs were developed at CERN and are therefore oriented towards the needs of a physics research laboratory that is general mathematics, data analysis, detectors simulation, data-handling etc... applicable to a wide range of problems. Some tools like cfortran.h are developed outside CERN. Some commercial softwares (e.g: NAG etc ...) have also been acquired. For any questions about CERNLIB contact Heplib.Support@cern.ch. %if %{__build_nypatchy} %package -n cernlib-nypatchy Summary: CERNLIB's nypatchy Group: Development/Libraries %description -n cernlib-nypatchy CERNLIB's source code management system. %endif %prep %setup -c %{name}-%{version} -q -a 0 ln -s 2006 pro ln -s 2006 new cd 2006/src %patch0 -p1 -b .m64 %patch1 -p1 -b .osx %patch2 -p1 -b .osx11 %patch3 -p1 -b .macos12 %patch4 -p1 -b .test %ifarch arm64 %patch5 -p1 -b .arm64 %patch6 -p1 -b .arm64gfb %endif %if %{__build_nypatchy} %patch7 -p1 -b .nypatchy %endif cd .. mkdir bin lib work cd lib #ln -s /usr/lib/liblapack.dylib liblapack3.a #ln -s /usr/lib/libblas.dylib libblas.a ln -s %{?_sdk_dir}/usr/lib/liblapack.tbd liblapack3.a ln -s %{?_sdk_dir}/usr/lib/libblas.tbd libblas.a rm -rf $RPM_BUILD_ROOT %build export CERN=`pwd` cd 2006 export CVSCOSRC=$CERN/2006/src (cd $CVSCOSRC/scripts/ for i in cernlib gxint paw; do mv $i $i.orig sed -e "s;/cern;/opt/cern;" $i.orig | sed -e "s;/afs/opt/cern;/afs/cern;" > $i chmod 755 $i rm -f $i.orig done ) (cd $CVSCOSRC/graflib/dzdoc/dzedit mv dzedit.script dzedit.script.orig sed -e "s;/cern;/opt/cern;" dzedit.script.orig > dzedit.script chmod 755 dzedit.script rm -f dzedit.script.orig ) (cd $CVSCOSRC/pawlib/paw/programs mv paw.script paw.script.orig sed -e "s;/cern;/opt/cern;" paw.script.orig > paw.script chmod 755 paw.script rm -f paw.script.orig ) cp $CVSCOSRC/scripts/cernlib bin/ cd work $CVSCOSRC/config/imake_boot export PATH=$PATH:$CERN/2006/bin make tree HAVE_MOTIF=%{?_have_motif} pushd packlib/kuip/programs/kuipc make make install.bin popd make %{?_smp_mflags} HAVE_MOTIF=%{?_have_motif} cd packlib make %{?_smp_mflags} install.bin HAVE_MOTIF=%{?_have_motif} cd ../pawlib make %{?_smp_mflags} install.bin HAVE_MOTIF=%{?_have_motif} \ EXTRA_INCLUDES="-I$CERN/2006/src/pawlib/comis" cd ../graflib make %{?_smp_mflags} install.bin HAVE_MOTIF=%{?_have_motif} cd ../scripts make install.bin HAVE_MOTIF=%{?_have_motif} cd .. make install.include CERN_INCLUDEDIR=$CERN/2006/include %install mkdir -p $RPM_BUILD_ROOT%{__prefix}/2006 export CERN=`pwd` cd 2006 tar -zcf - bin | tar -zxvf - -C $RPM_BUILD_ROOT%{__prefix}/2006 tar -zcf - lib | tar -zxvf - -C $RPM_BUILD_ROOT%{__prefix}/2006 tar -zcf - include | tar -zxvf - -C $RPM_BUILD_ROOT%{__prefix}/2006 find $RPM_BUILD_ROOT -type d | sed -e "s;$RPM_BUILD_ROOT;%dir ;" \ | grep -ve '^%dir %{__prefix}$' \ | grep -ve '^%dir /$' \ | grep -ve '^%dir /opt$' \ | grep -ve '^%dir $' > list.f find $RPM_BUILD_ROOT -type f | sed -e "s;$RPM_BUILD_ROOT;;" >> list.f find $RPM_BUILD_ROOT -type l | sed -e "s;$RPM_BUILD_ROOT;;" >> list.f mv list.f .. %if %{__build_nypatchy} # nypatchy export CVSCOSRC=$CERN/2006/src export PATH=$PATH:$CERN/2006/bin:%{__prefix}/patchy/4.15/bin cd work/patchy make %{?_smp_mflags} install.bin cp -p ../../bin/fcasplit $RPM_BUILD_ROOT%{__prefix}/2006/bin/ cp -p ../../bin/ny* $RPM_BUILD_ROOT%{__prefix}/2006/bin/ cp -p ../../bin/yexpand $RPM_BUILD_ROOT%{__prefix}/2006/bin/ %endif %clean rm -rf $RPM_BUILD_ROOT %files -f list.f %defattr(-,root,wheel) %if %{__build_nypatchy} %files -n cernlib-nypatchy %{__prefix}/2006/bin/fcasplit %{__prefix}/2006/bin/ny* %{__prefix}/2006/bin/yexpand %endif %changelog * Thu Jun 30 2022 Keisuke Fujii 2006-12hepx6i - 9th release of automatic built version on MacOS 12 - built with OSXWS 12beta and libgfortran.a and with gcc-11.2.0-4osx12.arm64 - added nypatchy patch - with nypatchy * Sat May 21 2022 Keisuke Fujii 2006-12hepx6h - 8th release of automatic built version on MacOS 12 for M1 Macs - updated arm64-gfortran-bug patch for paw++ - built with OSXWS 12beta and libgfortran.a and with gcc-11.2.0-4osx12.arm64 * Thu May 19 2022 Keisuke Fujii 2006-12hepx6g - 7th release of automatic built version on MacOS 12 for M1 Macs - added arm64-gfortran-bug patch - built with OSXWS 12beta and libgfortran.a and with gcc-11.2.0-4osx12.arm64 * Sat Feb 26 2022 Keisuke Fujii 2006-12hepx6f - 6th release of automatic built version on MacOS 12 for M1 Macs - built with OSXWS 12beta and libgfortran.a and with gcc-11.2.0-4osx12.arm64 * Mon Feb 14 2022 Keisuke Fujii 2006-12hepx6e - 5th release of automatic built version on MacOS 12 for M1 Macs - built with OSXWS 11 and libgfortran.a and with gcc-11.2.0-3osx12.arm64 * Fri Feb 4 2022 Keisuke Fujii 2006-12hepx6d - 4th release of automatic built version on MacOS 12 for M1 Macs - built with libgfortran.dylib instead of libgfortran.a - added arm64 patch with libgfortran.a and -no_pie replaced by -bind_at_load * Thu Feb 3 2022 Keisuke Fujii 2006-12hepx6c - 3rd release of automatic built version on MacOS 12 for M1 Macs - built with libgfortran.dylib instead of libgfortran.a - cleanup spec file a little bit * Wed Feb 2 2022 Keisuke Fujii 2006-12hepx6b - 2nd release of automatic built version on MacOS 12 for M1 Macs - cleanup spec file a little bit - added test patch - without nypatchy * Sun Jan 30 2022 Keisuke Fujii 2006-12hepx6a - 1st release of automatic built version on MacOS 12 for M1 Macs - added macos12 patch - corrected lapack and blas location - without nypatchy * Thu Jan 23 2020 Keisuke Fujii 2006-10.15hepx5c - 3rd release of automatic built version on MacOS X 10.15 for Intel Macs - built with OSXWS 10.15 - with nypatchy - now installed in /opt/cern - set default CERN to /opt/cern * Wed Jan 22 2020 Keisuke Fujii 2006-10.15hepx5b - 2nd release of automatic built version on MacOS X 10.15 for Intel Macs - built with OSXWS 10.15 - with nypatchy - now installed in /opt/cern * Wed Jan 22 2020 Keisuke Fujii 2006-10.15hepx5a - 1st release of automatic built version on MacOS X 10.15 for Intel Macs - built with OSXWS 10.15 - without nypatchy - now installed in /opt/cern * Sat Dec 28 2019 Keisuke Fujii 2006-10.14hepx5d - 4th release of automatic built version on MacOS X 10.14 for Intel Macs - built with OSXWS 10.14 - with nypatchy * Sat Dec 28 2019 Keisuke Fujii 2006-10.14hepx5c - 3rd release of automatic built version on MacOS X 10.14 for Intel Macs - built with OSXWS 10.14 - without nypatchy * Mon Dec 24 2018 Keisuke Fujii 2006-10.14hepx5b - 2nd release of automatic built version on MacOS X 10.14 for Intel Macs - built with OSXWS 10.13 - with nypatchy * Mon Dec 24 2018 Keisuke Fujii 2006-10.14hepx5a - 1st release of automatic built version on MacOS X 10.14 for Intel Macs - built with OSXWS 10.13 - without nypatchy * Thu Apr 12 2018 Keisuke Fujii 2006-10.13hepx5c - 3rd release of automatic built version on MacOS X 10.13 for Intel Macs - built with OSXWS 10.13 - with kmterm modification in the 10.9 patch updated * Mon Apr 02 2018 Keisuke Fujii 2006-10.13hepx5b - 2nd release of automatic built version on MacOS X 10.13 for Intel Macs - built with OSXWS 10.13 - with nypatchy * Mon Apr 02 2018 Keisuke Fujii 2006-10.13hepx5a - 1st release of automatic built version on MacOS X 10.13 for Intel Macs - built with OSXWS 10.13 - without nypatchy * Mon Dec 26 2016 Keisuke Fujii 2006-10.12hepx5b - 2nd release of automatic built version on MacOS X 10.12 for Intel Macs - built with OSXWS 10.12 * Sun Dec 18 2016 Keisuke Fujii 2006-10.12hepx5a - 1st release of automatic built version on MacOS X 10.12 for Intel Macs - built with OSXWS 10.11 - added a flag to switch on and off nypatchy. * Mon Feb 08 2016 Keisuke Fujii 2006-10.11hepx4a - 1st release of automatic built version on MacOS X 10.11 for Intel Macs - added cernlib-2006-macosx10.11.patch. * Wed Dec 24 2014 Keisuke Fujii 2006-10.10hepx3a - 1st release of automatic built version on MacOS X 10.10 for Intel Macs * Wed Aug 06 2014 Keisuke Fujii 2006-10.9hepx2b - 2nd release of automatic built version on MacOS X 10.9 for Intel Macs * Sun Dec 15 2013 Keisuke Fujii 2006-10.9hepx2a - 1st release of automatic built version on MacOS X 10.9 for Intel Macs - now nyptachy is built together with the main body cernlib. * Fri Nov 29 2013 Keisuke Fujii 2006-10.9hepx1a - 1st release on MacOS X 10.9 for Intel Macs * Wed May 02 2012 Keisuke Fujii 2006-10.7hepx1a - 1st release on MacOS X 10.7 for Intel Macs - now built for x86_64 * Tue Jan 25 2011 Keisuke Fujii 2006-10.6hepx1d - 4th release on MacOS X 10.6 for Intel Macs - rebuilt with gcc4.5.1 and linked against libgfortran.dylib * Sat Nov 13 2010 Keisuke Fujii 2006-10.6hepx1c - 3rd release on MacOS X 10.6 for Intel Macs - rebuilt with gcc4.5.1 * Fri Oct 01 2010 Keisuke Fujii 2006-10.6hepx1b - 2nd release on MacOS X 10.6 for Intel Macs - rebuilt with gcc4.5.1 * Sun Mar 07 2010 Keisuke Fujii 2006-10.6hepx1a - 1st release on MacOS X 10.6 for PPC Macs with paw++ and nypatchy. * Thu Aug 14 2008 Keisuke Fujii 2006-10.5hepx1e - 3rd release on MacOS X 10.5 for PPC Macs with paw++ and nypatchy. * Fri Aug 8 2008 Keisuke Fujii 2006-10.5hepx1d - 3rd release on MacOS X 10.5 for Intel Macs with paw++. - Fixed double-free problem in kmfile.c. * Mon Aug 4 2008 Keisuke Fujii 2006-10.5hepx1c - 2nd release on MacOS X 10.5 for Intel Macs with paw++. * Thu Mar 27 2008 Keisuke Fujii 2006-10.5hepx1b - 1st release on MacOS X 10.5 for PPC Macs. * Wed Mar 26 2008 Keisuke Fujii 2006-10.5hepx1a - 1st release on MacOS X 10.5 for Intel Macs. * Wed Apr 18 2007 Keisuke Fujii 2006-1b - 2nd release on MacOS X 10.4 for Intel Macs. * Wed Mar 7 2007 Keisuke Fujii 2006-1a - 1st release on MacOS X 10.4 for Intel Macs.