gv/gv.spec

331 lines
12 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gv (Version 3.6.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: gv
BuildRequires: update-desktop-files xorg-x11 xorg-x11-devel
%if %suse_version > 1020
BuildRequires: xaw3d-devel
%else
BuildRequires: xaw3d
%endif
%if %suse_version < 1100
BuildRequires: desktop-data-SuSE
%endif
License: GPL v2 or later
Group: Productivity/Publishing/PS
PreReq: %install_info_prereq
Requires: ghostscript_x11
Conflicts: gs_serv gs_vga
# NOTE: We don't want this dependency and desktop-data-SuSE is in all
# desktop selections.
#Requires: desktop-data-SuSE
AutoReqProv: on
Url: http://www.gnu.org/software/gv/
Summary: A Program to View PostScript Files
Version: 3.6.3
Release: 1
Source0: gv-3.6.3.tar.bz2
Source1: gv.desktop
Source2: gv.png
Patch0: gv-3.6.3-deb.patch
Patch1: gv-3.6.3.dif
Patch2: gv-3.6.3-security.patch
Patch3: gv-3.6.3-bzip2.patch
# I18N patch originally from:
# http://www.on.cs.keio.ac.jp/~yasu/jp_xaw.html
# http://www.on.cs.keio.ac.jp/~yasu/linux/Xaw/gv-3.5.8-I18N-mb.patch
# changed a little bit for SuSE:
Patch4: gv-3.6.3-I18N-mb.patch
Patch5: gv-3.6.3-intptr_t.patch
Patch6: gv-3.6.3-settitle.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
%global _mandir %{_exec_prefix}/man
%define _x11lib %{_exec_prefix}/%{_lib}
%define _x11data %{_exec_prefix}/lib/X11
%define _appdefdir %{_x11data}/app-defaults
%define _x11inc %{_x11_prefix}/include
%else
%define _x11lib %{_libdir}
%define _x11data %{_datadir}/X11
%define _appdefdir %{_x11data}/app-defaults
%define _x11inc %{_includedir}
%endif
%description
GV offers you an X Window System GUI for viewing PostScript files. This
is an X Window System interface to ghostscript.
Authors:
--------
Tim Theisen <tim@cs.wisc.edu>
Johannes Plass <plass@dipmza.physik.uni-mainz.de>
Jos<EFBFBD> E. Marchesi <jemarch@gnu.org>
%prep
%setup
echo >> src/Makefile.am
%patch0 -p1 -b .deb
%patch1 -p0
%patch2 -p0 -b .sec
# fzopen from libzio does not work due ftell()
#patch3 -p0 -b .bzip2
#
%patch4 -p0 -b .I18N-mb
%patch5 -p0 -b .intptr_t
%patch6 -p0 -b .settitle
%build
autoreconf -fis
sed -ri 's@[[:blank:]]*-(R|rpath)[[:blank:]]*\$[[:alpha:]_]+@@g' configure
chmod 755 configure
CC=gcc
CFLAGS="$RPM_OPT_FLAGS"
LDFLAGS="-Wl,-z,defs"
cflags ()
{
local flag=$1; shift
case "${RPM_OPT_FLAGS}" in
*${flag}*) return
esac
if test -n "$1" && gcc -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
local var=$1; shift
eval $var=\${$var:+\$$var\ }$flag
fi
if test -n "$1" && g++ -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
local var=$1; shift
eval $var=\${$var:+\$$var\ }$flag
fi
}
cflags -std=gnu89 CFLAGS
cflags -fno-strict-aliasing CFLAGS
cflags -Wno-unused CFLAGS
cflags -Wno-unprototyped-calls CFLAGS
cflags -pipe CFLAGS
export CC CFLAGS LDFLAGS
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--with-x \
--x-includes=%{_x11inc} \
--x-libraries=%{_x11lib}\
--enable-backing-pixmap \
--disable-memmove-code \
--disable-setenv-code \
--with-default-papersize=a4
make pkglibdir='%{_x11data}/gv'
%install
rm -rf %{buildroot}
mkdir %{buildroot}
make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install
make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-info
make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-man
make -C src DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-nls
mkdir -p %{buildroot}/%{_defaultdocdir}/gv
install -m 0444 NOTE %{buildroot}/%{_defaultdocdir}/gv/Copyright
# add font settings to app-defaults:
for i in $(find %{buildroot}%{_x11data} -type f -name "GV")
do
cat src/gv_font_res-I18N_mb.dat >> ${i}
chmod 0644 ${i}
done
# japanese app-defaults:
mkdir -p %{buildroot}%{_x11data}/{ja_JP.SJIS,ja_JP.EUC-JP}/app-defaults
iconv -f UTF-8 -t SJIS < %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV \
> %{buildroot}%{_x11data}/ja_JP.SJIS/app-defaults/GV
iconv -f UTF-8 -t EUC-JP < %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV \
> %{buildroot}%{_x11data}/ja_JP.EUC-JP/app-defaults/GV
mkdir -p %{buildroot}%{_x11data}/ko_KR.EUC-KR/app-defaults
iconv -f UTF-8 -t EUC-KR < %{buildroot}%{_x11data}/ko_KR.UTF-8/app-defaults/GV \
> %{buildroot}%{_x11data}/ko_KR.EUC-KR/app-defaults/GV
%suse_update_desktop_file -i gv Office Viewer
%post
%install_info --info-dir=.%{_infodir} .%{_infodir}/gv.info.gz
%postun
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/gv.info.gz
%files
%defattr(-,root,root)
%{_datadir}/applications/gv.desktop
%{_datadir}/pixmaps/gv.png
%dir %{_x11data}/gv/
%config %{_x11data}/gv/*.ad
%config %{_x11data}/gv/*.dat
%config %{_appdefdir}/GV
%dir %{_x11data}/??
%dir %{_x11data}/??_*
%dir %{_x11data}/*/app-defaults
%config %{_x11data}/*/app-defaults/GV
%{_bindir}/gv
%doc %{_mandir}/man1/gv.1.gz
%doc %{_infodir}/gv.info.gz
%dir %{_defaultdocdir}/gv
%docdir %{_defaultdocdir}/gv
%{_defaultdocdir}/gv/Copyright
%changelog
* Thu Mar 27 2008 werner@suse.de
- Update to gv 3.6.3
* gv is now able to work with latest ghostscript: gs 8.57
* The bug causing the version not to figure in the manual has been
fixed.
* The SIGINT signal is now masked (ignored) by gv.
* gv no more segfaults when reading a configuration file as produced by
State -> Setup Options -> Save
* gv should compile in non-GNU system that doesnt have glib2. The
`getopt' gnulib module has been imported to fix this.
* gv now correctly adjust the page index window after PAGE-UP and
PAGE-DOWN events.
* gv is now able to open files with minus character beginning
filenames.
* X resources related bugs has been fixed. gv is now able to get
resources from the display database, user file, gv system database
and command line doing the Right Thing (TM).
* gv is now able to correctly understand DocumentMedia and other DSC
directives that uses postscript strings. It was not possible with
previous versions due to a bug in the postscript names scanning
routine.
* New set of command line arguments. This solves the horrid bug on
gv 3.6.0 that made such release nearly unusable. See the
documentation for details about the new argument list.
* The "Reopen" entry on the File menu has been renamed to "Reload" in
order to be coherent with the "Reload" button.
* The distributed package structure have been fixed, now conforming a
legal GNU source package.
* The delete key now work as expected, that is, it deletes the next
character rather the last character when typed on text entries.
* Dot files are not shown by default on file selection forms.
* If you try to open an empty file you get a coherent error
message.
* New manual page
* The gs command used for PDF to PostScript conversion has been fixed to allow
document saving.
* New configuration/compilation/installation using GNU Autotools
* Documentation is now distributed in texinfo format.
* "Redisplay" button has been renamed to "Reload".
* Some GNU standard command line arguments are supported now:
--help, --usage and --version.
* Antialiasing is now used by default.
* Solved bug #11014: gv is capable to open files with spaces (or other
harm character) in the filename.
- Use Debain patch
- Port our patches to this version
* Sun Jan 13 2008 coolo@suse.de
- remove desktop-data from buildrequires
* Thu Jul 05 2007 coolo@suse.de
- put desktop file and icon into the package
* Fri Jun 01 2007 dmueller@suse.de
- fix buildrequires
* Fri Nov 17 2006 werner@suse.de
- Corrected version of last fix (bug #219454)
* Thu Nov 09 2006 werner@suse.de
- Avoid buffer overflow in gv gettext() (bug #219454)
* Thu Aug 24 2006 werner@suse.de
- Check for existence of gv.png
* Wed Aug 02 2006 werner@suse.de
- Make it build with X11R7
* Tue Feb 28 2006 werner@suse.de
- Fix range of array subscript (bug #154109)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Nov 29 2005 sbrabec@suse.cz
- Don't package icon already present in desktop-data-SuSE.
Cleans rpm -V output.
* Tue Jun 07 2005 meissner@suse.de
- Use RPM_OPT_FLAGS.
* Mon May 23 2005 mfabian@suse.de
- Bugzilla #85410: improve default fontsets to make it work better
with the recent changes in the XLC_LOCALE files in Xorg.
Japanese should look nicer now and warning messages should
usually disappear.
* Mon Apr 18 2005 werner@suse.de
- Set DELAYSAFER for dsc file of the pdf within a pipe (bug #78322)
* Wed Apr 13 2005 werner@suse.de
- Add a return after label even for void functions for stupid gcc4
* Wed Nov 17 2004 werner@suse.de
- Add gv.png pixmap to file list
* Mon Jun 28 2004 mfabian@suse.de
- add "-*-*-Medium-R-*--16-*-*-*-*-*-*-*" to all fontsets as a
fallback to suppress useless warnings if
"-*-*-Medium-R-*--14-*-*-*-*-*-*-*" or other sizes are not
available. For example, Korean fonts in sizes other than 16
pixel are usually not available in a Japanese installation.
Therefore one gets warnings because the ja_JP.UTF-8/XLC_LOCALE \
file usually specifies the charset KSC5601.1987-0 as well.
In 16 pixel, there are fonts for all common encodings already
in the basic X11 packages, therefore 16 pixel should
always work as a fallback.
* Fri May 28 2004 adrian@suse.de
- add "Office" to Categories to match the menu definition (#41338)
* Fri Apr 30 2004 mfabian@suse.de
- Bugzilla #39594: add gv-3.5.8-I18N-mb.patch to support the
display of multibyte file names.
- intptr_t.patch: fix compiler warnings
"converting integer to pointer of different size"
- fix display of file names in the window title and icons by
setting _NET_WM_NAME and _NET_WM_ICON_NAME properties
(thanks a lot to Marcus Schaefer <ms@suse.de> for help).
* Thu Apr 29 2004 werner@suse.de
- correct category for desktop file: "PostScript Viewer"
-> "Viewer".
* Tue Apr 06 2004 werner@suse.de
- Add desktop entry
* Sat Jan 10 2004 adrian@suse.de
- add %%defattr
* Mon Aug 25 2003 werner@suse.de
- Fix menu entry for bunzip2 label
* Fri Aug 22 2003 werner@suse.de
- Uncompress bzip2 files on the fly, patch based on
Volker Kuhlmann's patch (bug #29260)
* Tue Apr 15 2003 coolo@suse.de
- use BuildRoot
* Mon Mar 10 2003 werner@suse.de
- Fix sigsegv in case of unkown paper size.
* Fri Nov 08 2002 werner@suse.de
- Remove XCOMM definition to make new cpp happy
* Fri Sep 20 2002 okir@suse.de
- added security patch to address buffer overflows
* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
* Mon Jan 14 2002 schwab@suse.de
- Fix use of token concatenation.
* Fri Jun 22 2001 ro@suse.de
- use ComplexProgramTargetNoMan
* Fri Oct 06 2000 kukuk@suse.de
- change group tag
- Remove bogus xshared requires, rpm will handle this correct
* Wed May 24 2000 kukuk@suse.de
- Use /usr/share/doc/packages
* Mon Jan 24 2000 werner@suse.de
- Add Debian patch 15 for gv 3.5.8
- Use RPM_OPT_FLAGS
* Mon Sep 20 1999 ro@suse.de
- added Requires ghostscript_x11
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed Oct 15 1997 werner@suse.de
- New version: 3.5.8
- This version is usable only with Xaw3d
* Fri Feb 14 1997 werner@suse.de
- New package with gv version 2_7_6
- Remove call of Xaw/Xaw3d private function ...
now we can use Xaw or Xaw3d or Xaw95.
- Some small changes on app-defaults for
better viewing in all three Athena Widgets