From 574363c33976d57bfd4aceef42ab2c6745be7e97 Mon Sep 17 00:00:00 2001 From: pertusus Date: Jan 25 2008 09:10:05 +0000 Subject: sync with devel --- diff --git a/.cvsignore b/.cvsignore index f2bf04d..1ab40c9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ +grace_5.1.21-2.diff.gz grace-5.1.21.tar.gz diff --git a/grace-detect-netcdf.diff b/grace-detect-netcdf.diff new file mode 100644 index 0000000..ba2a200 --- /dev/null +++ b/grace-detect-netcdf.diff @@ -0,0 +1,11 @@ +--- configure.old 2007-02-16 22:44:49.000000000 +0000 ++++ configure 2007-09-28 23:03:29.000000000 +0100 +@@ -15181,7 +15181,7 @@ + int main(void) { + char *vlib; + vlib = nc_inq_libvers(); +- if (strcmp(vlib, "3.0") < 0) { ++ if (((vlib[0] == '"') && (strcmp(vlib, "\"3.0") < 0)) || ((vlib[0] != '"') && (strcmp(vlib, "3.0") < 0))){ + exit(1); + } + exit(0); diff --git a/grace.desktop b/grace.desktop index 4ea92cf..8079a38 100644 --- a/grace.desktop +++ b/grace.desktop @@ -2,8 +2,8 @@ Encoding=UTF-8 Name=Grace Comment=Numerical Data Processing and Visualization Tool -Exec=/usr/bin/xmgrace -Icon=grace.png +Exec=xmgrace +Icon=grace Terminal=false Type=Application -Categories=Application;Graphics; +Categories=Graphics; diff --git a/grace.spec b/grace.spec index c3f116f..25d6806 100644 --- a/grace.spec +++ b/grace.spec @@ -1,6 +1,9 @@ +# relative do datadir +%define type1fontdir fonts/default/Type1 + Name: grace Version: 5.1.21 -Release: 2%{?dist} +Release: 8%{?dist} Summary: Numerical Data Processing and Visualization Tool License: GPLv2+ @@ -9,27 +12,31 @@ URL: http://plasma-gate.weizmann.ac.il/Grace/ Source0: ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/%{name}-%{version}.tar.gz Source1: %{name}.desktop Source2: %{name}.png -Source3: cephes-license.email -Source4: LICENSE.cephes -Patch: %{name}-gracerc-no_auxiliary.diff +Source3: cephes-license.email +Source4: LICENSE.cephes +Patch0: %{name}-gracerc-no_auxiliary.diff +Patch1: %{name}-detect-netcdf.diff +Patch2: http://ftp.de.debian.org/debian/pool/main/g/grace/grace_5.1.21-2.diff.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Group: Applications/Engineering BuildRequires: libjpeg-devel, libpng-devel, netcdf-devel BuildRequires: zlib-devel, fftw2-devel, t1lib-devel -BuildRequires: xbae-devel, gcc-gfortran -BuildRequires: desktop-file-utils, font-utils - -%if "%{fedora}" < "5" -BuildRequires: xorg-x11-devel -%else +BuildRequires: xbae-devel, gcc-gfortran, libXmu-devel +BuildRequires: desktop-file-utils +# to be able to generate FontDataBase +BuildRequires: urw-fonts + +#%if "%{fedora}" < "5" +#BuildRequires: xorg-x11-devel +#%else BuildRequires: libXpm-devel -%endif +#%endif -Requires: nedit -Requires: htmlview -Requires(post): chkfontpath -Requires(postun): chkfontpath +Requires: nedit +Requires: xdg-utils +# /usr/share/fonts/default/Type1/ +Requires: urw-fonts %description Grace is a Motif application for two-dimensional data visualization. @@ -43,8 +50,9 @@ making figures for publications. %package devel Summary: Files needed for grace development Group: Development/Libraries -License: LGPL +License: LGPLv2+ Requires: %{name} = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} %description devel Install these files if you need to compile software that requires grace. @@ -52,17 +60,23 @@ Install these files if you need to compile software that requires grace. %prep %setup -q -%patch +%patch0 +%patch1 + +# avoid duplicating debian patch +%patch2 -p1 +patch -p0 < debian/patches/tmpnam_to_mkstemp.diff + # remove stripping option to have meaningfull debuginfo packages sed -i -e 's/^\(.*INSTALL_PROGRAM.*\) -s /\1 /' */Makefile -rm -rf Xbae +rm -rf Xbae T1lib %build cp %{SOURCE3} %{SOURCE4} . %configure \ --enable-editres \ --with-editor=nedit \ - --with-helpviewer="htmlview file://%{_docdir}/%{name}-%{version}/%s" \ + --with-helpviewer="xdg-open %s" \ --with-printcmd="lpr" \ --enable-grace-home=%{_datadir}/%{name} \ --disable-pdfdrv \ @@ -84,7 +98,7 @@ rm -f doc/*.1 mkdir -pm 755 \ %{buildroot}%{_bindir} \ %{buildroot}%{_includedir} \ - %{buildroot}%{_libdir} \ + %{buildroot}%{_libdir} \ %{buildroot}%{_datadir}/icons/hicolor/48x48/apps \ %{buildroot}%{_datadir}/applications \ %{buildroot}%{_mandir}/man1 \ @@ -96,46 +110,84 @@ mkdir -pm 755 \ pushd %{buildroot}%{_datadir}/%{name} install -pm 755 bin/* %{buildroot}%{_bindir}/ rm -rf bin -ln -s %{_bindir} bin -install -pm 755 lib/* %{buildroot}%{_libdir}/ +#ln -s %{_bindir} bin +ln -s ../../bin bin +cp -p lib/* %{buildroot}%{_libdir}/ rm -rf lib -ln -s %{_libdir} lib +#ln -s %{_libdir} lib +ln -s ../../%_lib lib install -pm 644 include/* %{buildroot}%{_includedir}/ rm -rf include -ln -s %{_includedir} include +#ln -s %{_includedir} include +ln -s ../../include include +# use fonts from type1fontdir +rm -rf fonts/type1 +ln -s ../../%{type1fontdir} fonts/type1 +mv fonts/FontDataBase %{buildroot}%{_sysconfdir}/%{name} +#ln -s %{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase +ln -s ../../../../%{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase + +# regenerate %{_sysconfdir}/%{name}/FontDataBase based on what is in +# type1fontdir and original FontDataBase content +FontDataBaseFile=%{buildroot}%{_sysconfdir}/%{name}/FontDataBase +rm -f $FontDataBaseFile.tmp +for file in %{_datadir}/%{type1fontdir}/*.pfb; do + base=`basename $file .pfb` + alias= + if grep -qs $base $FontDataBaseFile; then + # keep original aliases if the exist + grep $base $FontDataBaseFile >> $FontDataBaseFile.tmp + else + # no original alias case. Use FullName from afm file and change space to - + if [ -f %{_datadir}/%{type1fontdir}/$base.afm ]; then + alias=`grep '^FullName' %{_datadir}/%{type1fontdir}/$base.afm | sed 's/^FullName *//' | sed 's/ *$//' | sed 's/ /-/g'` + fi + [ "z$alias" = 'z' ] && alias=$base + echo "$alias $alias $base.pfb" >> $FontDataBaseFile.tmp + fi +done +fontcount=`wc -l $FontDataBaseFile.tmp` +echo $fontcount | sed 's:%{buildroot}.*::' > $FontDataBaseFile +cat $FontDataBaseFile.tmp >> $FontDataBaseFile +rm $FontDataBaseFile.tmp + install -pm 644 doc/*.1 %{buildroot}%{_mandir}/man1/ # doc and example directories are removed from GRACE_HOME and put in %doc rm -rf doc +#ln -s %{_docdir}/%{name}-%{version}/doc doc +ln -s ../doc/%{name}-%{version}/doc doc rm -rf examples -# the convcal source file shouldn't appear in %doc, it is removed here +#ln -s %{_docdir}/%{name}-%{version}/examples examples +ln -s ../doc/%{name}-%{version}/examples examples +# the convcal source file shouldn't be installed, it is removed here rm -f auxiliary/convcal.c # move config files to %{_sysconfdir} and do symlinks for conf in gracerc templates gracerc.user; do mv $conf %{buildroot}%{_sysconfdir}/%{name} - ln -s %{_sysconfdir}/%{name}/$conf $conf + #ln -s %{_sysconfdir}/%{name}/$conf $conf + ln -s ../../../%{_sysconfdir}/%{name}/$conf $conf done -mv fonts/FontDataBase %{buildroot}%{_sysconfdir}/%{name} -ln -s %{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase popd -mkfontdir %{buildroot}%{_datadir}/%{name}/fonts/type1 + ## # Desktop stuff # install -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png -install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop -desktop-file-install --vendor fedora --delete-original \ +desktop-file-install --vendor fedora \ --dir %{buildroot}%{_datadir}/applications \ - --add-category Application \ - --add-category Graphics \ - %{buildroot}%{_datadir}/applications/%{name}.desktop + %{SOURCE1} +# clean up docs +rm -rf __dist_doc +mkdir __dist_doc +cp -a doc __dist_doc +rm __dist_doc/doc/Makefile __dist_doc/doc/*.sgml %clean rm -rf %{buildroot} %post -%{_sbindir}/chkfontpath -q -a %{_datadir}/%{name}/fonts/type1 touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : @@ -143,7 +195,6 @@ fi %postun -%{_sbindir}/chkfontpath -q -r %{_datadir}/%{name}/fonts/type1 touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : @@ -154,7 +205,7 @@ fi %defattr(-,root,root,-) %doc ChangeLog CHANGES COPYRIGHT DEVELOPERS LICENSE README %doc cephes-license.email LICENSE.cephes -%doc examples/ doc/ +%doc examples/ __dist_doc/doc/ %config(noreplace) %{_sysconfdir}/%{name}/ %{_bindir}/* %{_datadir}/%{name} @@ -164,17 +215,40 @@ fi %{_datadir}/icons/hicolor/*/*/* %{_mandir}/man*/* - %files devel %defattr(-,root,root,-) %doc grace_np/LICENSE %{_includedir}/* %{_datadir}/%{name}/include -%{_libdir}/lib* +%{_libdir}/libgrace_np.a %{_datadir}/%{name}/lib %changelog +* Wed Jan 23 2008 Patrice Dumas - 5.1.21-8 +- correct netcdf detection patch, thanks José. + +* Wed Jan 23 2008 Patrice Dumas - 5.1.21-7 +- add support for previous netcdf version (in epel). +- drop support for monolithic X. + +* Tue Jan 22 2008 Patrice Dumas - 5.1.21-6 +- don't add the grace fonts to the X server fonts. Instead use the + urw fonts. Regenerate the FontDataBase based on the urw fonts. +- use xdg-utils instead of htmlview. +- use relative links. +- add links to doc and examples in GRACE_HOME to have correct help. +- use debian patch. +- clean docs. + +* Fri Sep 28 2007 José Matos - 5.1.21-4 +- Correctly detect netcdf (signature has changed). +- Add libXmu-devel as BR. +- Add conditional dependency on chkfontpath for <= F8. + +* Thu Sep 27 2007 José Matos - 5.1.21-3 +- Remove dependency on chkfontpath, thanks to ajax for the patch. (#252277) + * Tue Aug 28 2007 José Matos - 5.1.21-2 - License fix, rebuild for devel (F8). diff --git a/sources b/sources index bbb6b08..095fa2a 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +b82590debb07fc229ae7b003b503959b grace_5.1.21-2.diff.gz db02dee3c68179c41452e652bd469bb9 grace-5.1.21.tar.gz