public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: pertusus <pertusus@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/grace] epel10.3: - don't add the grace fonts to the X server fonts. Instead use the urw
Date: Sat, 17 Oct 2026 16:20:15 GMT [thread overview]
Message-ID: <179225401538.1.11220747822498197454.rpms-grace-7bdcc63a8454@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/grace
Branch : epel10.3
Commit : 7bdcc63a84540ab472d10e72b2e17ac2d9b6e38a
Author : pertusus <pertusus@fedoraproject.org>
Date : 2008-01-23T09:18:35+00:00
Stats : +90/-49 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/grace/c/7bdcc63a84540ab472d10e72b2e17ac2d9b6e38a?branch=epel10.3
Log:
- 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
---
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 affcb42..e338338 100644
--- a/grace.spec
+++ b/grace.spec
@@ -1,9 +1,9 @@
-%define _x11fontdir %{_datadir}/X11/fonts
-%define catalogue /etc/X11/fontpath.d
+# relative do datadir
+%define type1fontdir fonts/default/Type1
Name: grace
Version: 5.1.21
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Numerical Data Processing and Visualization Tool
License: GPLv2+
@@ -12,17 +12,20 @@ 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
+Source3: cephes-license.email
+Source4: LICENSE.cephes
Patch0: %{name}-gracerc-no_auxiliary.diff
-Patch1: %{name}-detect-netcdf.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, libXmu-devel
-BuildRequires: desktop-file-utils, font-utils
+BuildRequires: desktop-file-utils
+# to be able to generate FontDataBase
+BuildRequires: urw-fonts
%if "%{fedora}" < "5"
BuildRequires: xorg-x11-devel
@@ -30,12 +33,10 @@ BuildRequires: xorg-x11-devel
BuildRequires: libXpm-devel
%endif
-Requires: nedit
-Requires: htmlview
-%if "%{fedora}" < "8"
-Requires(post): chkfontpath
-Requires(postun): chkfontpath
-%endif
+Requires: nedit
+Requires: xdg-utils
+# /usr/share/fonts/default/Type1/
+Requires: urw-fonts
%description
Grace is a Motif application for two-dimensional data visualization.
@@ -49,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.
@@ -61,16 +63,20 @@ Install these files if you need to compile software that requires grace.
%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 \
@@ -91,7 +97,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 \
@@ -103,52 +109,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}
-%if "%{fedora}" >= "8"
-mkdir -p $RPM_BUILD_ROOT%{catalogue}
-ln -sf %{_datadir}/%{name}/type1 $RPM_BUILD_ROOT%{catalogue}/%{name}-type1
-%endif
+# 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
-%if "%{fedora}" < "8"
-%{_sbindir}/chkfontpath -q -a %{_datadir}/%{name}/fonts/type1
-%endif
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
@@ -156,9 +194,6 @@ fi
%postun
-%if "%{fedora}" < "8"
-%{_sbindir}/chkfontpath -q -r %{_datadir}/%{name}/fonts/type1
-%endif
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
@@ -169,7 +204,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}
@@ -178,20 +213,26 @@ fi
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man*/*
-%if "%{fedora}" >= "8"
-%{catalogue}/%{name}-type1
-%endif
%files devel
%defattr(-,root,root,-)
%doc grace_np/LICENSE
%{_includedir}/*
%{_datadir}/%{name}/include
-%{_libdir}/lib*
+%{_libdir}/libgrace_np.a
%{_datadir}/%{name}/lib
%changelog
+* Tue Jan 22 2008 Patrice Dumas <pertusus[AT]free.fr> - 5.1.21-5
+- 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 <jamatos[AT]fc.up.pt> - 5.1.21-4
- Correctly detect netcdf (signature has changed).
- Add libXmu-devel as BR.
reply other threads:[~2026-10-17 16:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179225401538.1.11220747822498197454.rpms-grace-7bdcc63a8454@fedoraproject.org \
--to=pertusus@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox