]> git.pld-linux.org Git - packages/ghostscript.git/blobdiff - ghostscript.spec
Up to 10.02.0
[packages/ghostscript.git] / ghostscript.spec
index 02c32936ee485fb7251e87f1b63526060816f817..f9e6bebbf57fec9185873fe08ebe29bfc1d8289d 100644 (file)
@@ -1,13 +1,17 @@
 # TODO:
-# - fix svga bcond
 # - add djvu driver:
 #   http://dl.sourceforge.net/djvu/gsdjvu-1.3.tar.gz (or newer)
 #
 # Conditional build:
-%bcond_without cairo           # disable cairo support (for cairo bootstrap)
-%bcond_without system_jbig2dec # build with included jbig2dec
-%bcond_with    svga            # svgalib display support (vgalib,lvga256 devices) [broken in sources]
+%bcond_without cairo           # cairo support (disable for cairo bootstrap)
+%bcond_without system_freetype # system freetype
+%bcond_without system_jbig2dec # system jbig2dec
+%bcond_with    system_libjpeg  # system libjpeg (incompatible with D_MAX_BLOCKS_IN_MCU=64 variant)
+%bcond_with    system_libtiff  # system libtiff (incompatible with modified libjpeg)
+%bcond_without system_openjp2  # system openjpeg2
+%bcond_with    system_lcms2    # build with included lcms2 (which is thread safe)
 %bcond_without gtk             # gsx (GTK+ based frontend)
+%bcond_without texdocs         # skip tetex BRs
 
 Summary:       PostScript & PDF interpreter and renderer
 Summary(de.UTF-8):     PostScript & PDF Interpreter und Renderer
@@ -16,51 +20,70 @@ Summary(ja.UTF-8):  PostScript インタープリタ・レンダラー
 Summary(pl.UTF-8):     Bezpłatny interpreter i renderer PostScriptu i PDF
 Summary(tr.UTF-8):     PostScript & PDF yorumlayıcı ve gösterici
 Name:          ghostscript
-Version:       9.04
+Version:       10.02.0
 Release:       1
-License:       GPL v3+
+License:       AGPL v3+
 Group:         Applications/Graphics
-Source0:       http://downloads.sourceforge.net/ghostscript/%{name}-%{version}.tar.bz2
-# Source0-md5: 9f6899e821ab6d78ab2c856f10fa3023
+#Source0Download: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
+Source0:       https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10020/%{name}-%{version}.tar.xz
+# Source0-md5: 80c1cdfada72f2eb5987dc0d590ea5b2
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 9b5953aa0cc155f4364f20036b848585
 Patch0:                %{name}-missquotes.patch
-Patch1:                %{name}-setuid.patch
-Patch2:                %{name}-time_h.patch
-Patch5:                %{name}-cups-sh.patch
+Patch1:                %{name}-a4.patch
+Patch2:                ijs-pkgconfig.patch
+
 Patch6:                %{name}-gdevcd8-fixes.patch
-Patch7:                %{name}-fPIC.patch
-Patch8:                %{name}-zlib.patch
+
+# fedora
+Patch20:       %{name}-scripts.patch
+
+Patch28:       %{name}-iccprofiles-initdir.patch
+
 URL:           http://www.ghostscript.com/
-BuildRequires: autoconf >= 2.57
+BuildRequires: autoconf >= 2.63
 BuildRequires: automake >= 1.6
 %{?with_cairo:BuildRequires:   cairo-devel >= 1.2.0}
-BuildRequires: cups-devel
+BuildRequires: cups-devel >= 1.5
 BuildRequires: dbus-devel
 BuildRequires: docbook-style-dsssl
 BuildRequires: fontconfig-devel
-BuildRequires: freetype-devel >= 2.0
-%{?with_gtk:BuildRequires:     gtk+2-devel >= 1:2.0.0}
-%{?with_system_jbig2dec:BuildRequires: jbig2dec-devel}
+%{?with_system_freetype:BuildRequires: freetype-devel >= 1:2.10.4}
+%{?with_gtk:BuildRequires:     gtk+3-devel >= 3.0}
+%{?with_system_jbig2dec:BuildRequires: jbig2dec-devel >= 0.19}
+%{?with_system_lcms2:BuildRequires:    lcms2-devel >= 2.6}
 BuildRequires: libidn-devel
+%{?with_system_libjpeg:BuildRequires:  libjpeg-devel >= 9c}
 BuildRequires: libpaper-devel
-BuildRequires: libpng-devel >= 1.2.42
+BuildRequires: libpng-devel >= 2:1.6.37
 BuildRequires: libstdc++-devel
-BuildRequires: libtiff-devel >= 3.9.2
+%{?with_system_libtiff:BuildRequires:  libtiff-devel >= 4.2.0}
 BuildRequires: libtool
+%{?with_system_openjp2:BuildRequires:  openjpeg2-devel}
 BuildRequires: pkgconfig
-# Required by 'gdevvglb' device.
-%{?with_svga:BuildRequires:    svgalib-devel}
+BuildRequires: rpm-build >= 4.6
 BuildRequires: tar >= 1:1.22
 # for documentation regeneration
+%if %{with texdocs}
 BuildRequires: tetex
 BuildRequires: tetex-dvips
+%endif
+BuildRequires: xorg-lib-libX11-devel
 BuildRequires: xorg-lib-libXext-devel
 BuildRequires: xorg-lib-libXt-devel
-BuildRequires: zlib-devel >= 1.2.3
-Obsoletes:     ghostscript-afpl
-Obsoletes:     ghostscript-esp
-Obsoletes:     ghostscript-gpl
+BuildRequires: xz
+BuildRequires: zlib-devel >= 1.2.11
+%{?with_system_freetype:Requires:      freetype >= 1:2.10.4}
+%{?with_system_jbig2dec:Requires:      jbig2dec >= 0.19}
+%{?with_system_lcms2:Requires: lcms2 >= 2.6}
+%{?with_system_libjpeg:Requires:       libjpeg >= 9c}
+Requires:      libpng >= 2:1.6.37
+%{?with_system_libtiff:Requires:       libtiff >= 4.2.0}
+Requires:      zlib >= 1.2.11
+Obsoletes:     ghostscript-afpl < 8.54
+Obsoletes:     ghostscript-esp < 8.50
+Obsoletes:     ghostscript-gpl < 8.51
+Obsoletes:     ghostscript-svga < 9.24
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _ulibdir        %{_prefix}/lib
@@ -98,26 +121,14 @@ GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde
 gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği
 biçime getirebilir.
 
-%package cups
-Summary:       Ghostscript CUPS files
-Summary(pl.UTF-8):     Pliki Ghostscripta dla CUPS-a
-Group:         Applications/Graphics
-Requires:      %{name} = %{version}-%{release}
-
-%description cups
-This package contains CUPS files provided by ghostscript.
-
-%description cups -l pl.UTF-8
-Ten pakiet zawiera pliki dla CUPS-a dostarczane przez ghostscript.
-
 %package gtk
 Summary:       Ghostscript with GTK+ console
 Summary(pl.UTF-8):     Ghostscript z konsolą GTK+
 Group:         Applications/Graphics
 Requires:      %{name} = %{version}-%{release}
-Obsoletes:     ghostscript-afpl-gtk
-Obsoletes:     ghostscript-esp-gtk
-Obsoletes:     ghostscript-gpl-gtk
+Obsoletes:     ghostscript-afpl-gtk < 8.54
+Obsoletes:     ghostscript-esp-gtk < 8.50
+Obsoletes:     ghostscript-gpl-gtk < 8.51
 
 %description gtk
 Ghostscript with GTK+ console.
@@ -142,8 +153,8 @@ Summary:    libgs header files
 Summary(pl.UTF-8):     Pliki nagłówkowe libgs
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Obsoletes:     ghostscript-afpl-devel
-Obsoletes:     ghostscript-esp-devel
+Obsoletes:     ghostscript-afpl-devel < 8.54
+Obsoletes:     ghostscript-esp-devel < 8.50
 
 %description devel
 Header files for libgs - ghostscript shared library.
@@ -151,13 +162,34 @@ Header files for libgs - ghostscript shared library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
 
+%package doc
+Summary:       Documentation for ghostscript
+Group:         Documentation
+BuildArch:     noarch
+
+%description doc
+The documentation files that come with ghostscript.
+
+%package ijs
+Summary:       IJS (InkJet Server) shared library
+Summary(pl.UTF-8):     Biblioteka współdzielona IJS (InkJet Server)
+Group:         Libraries
+Conflicts:     ghostscript < 9.10-2
+
+%description ijs
+IJS (InkJet Server) Raster Image Transport Protocol shared library.
+
+%description ijs -l pl.UTF-8
+Biblioteka współdzielona protokołu transportu obrazów rastrowych IJS
+(InkJet Server).
+
 %package ijs-devel
 Summary:       IJS development files
 Summary(pl.UTF-8):     Pliki dla programistów IJS
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     ghostscript-afpl-ijs-devel
-Obsoletes:     ghostscript-esp-ijs-devel
+Requires:      %{name}-ijs = %{version}-%{release}
+Obsoletes:     ghostscript-afpl-ijs-devel < 8.54
+Obsoletes:     ghostscript-esp-ijs-devel < 8.50
 
 %description ijs-devel
 IJS development files.
@@ -170,8 +202,8 @@ Summary:    Static libijs library
 Summary(pl.UTF-8):     Statyczna biblioteka IJS
 Group:         Development/Libraries
 Requires:      %{name}-ijs-devel = %{version}-%{release}
-Obsoletes:     ghostscript-afpl-ijs-static
-Obsoletes:     ghostscript-esp-ijs-static
+Obsoletes:     ghostscript-afpl-ijs-static < 8.54
+Obsoletes:     ghostscript-esp-ijs-static < 8.50
 
 %description ijs-static
 Static libijs library.
@@ -185,39 +217,41 @@ Statyczna wersja biblioteki IJS.
 %patch1 -p1
 %patch2 -p1
 
-%patch5 -p1
 %patch6 -p1
-%patch7 -p1
-%patch8 -p1
 
-%build
-%if %{with system_jbig2dec}
-%{__rm} -r jbig2dec
-%endif
-# use system libs (sources contain unmodified zlib 1.2.3 and libpng 1.2.42)
+%patch20 -p1
+
+%patch28 -p1
+
+# use system libs:
+# freetype 2.10.4
+%{?with_system_freetype:%{__rm} -r freetype}
+# jbig2dec 0.19
+%{?with_system_jbig2dec:%{__rm} -r jbig2dec}
+# (unmodified) libpng 1.6.37 and zlib 1.2.11
 %{__rm} -r libpng zlib
-# jpeg is built with different configuration (D_MAX_BLOCKS_IN_MCU=64), jasper and lcms are modified
-cd jasper
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-cd ..
+# libjpeg (9d with additional CLAMP_DC) is built with different configuration (D_MAX_BLOCKS_IN_MCU=64)
+%{?with_system_libjpeg:%{__rm} -r jpeg}
+# lcms2mt is thread safe version of lcms2 2.10
+%{?with_system_lcms2:%{__rm} -r lcms2mt}
+# leptonica 1.81.0-git (for tesseract), no switch to use system
+# openjpeg 2.4.0
+%{?with_system_openjp2:%{__rm} -r openjpeg}
+# tesseract 5.0.0-alpha, no switch to use system
+
+%build
 %{__aclocal}
 %{__autoconf}
 %configure \
-       CFLAGS="%{rpmcflags} -DA4" \
        %{!?with_cairo:--disable-cairo} \
-       --enable-dynamic \
-       --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \
+       --disable-compile-inits \
+        --enable-dynamic --disable-hidden-visibility \
+       --with-drivers=ALL \
        --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
        --with-ijs \
-       --with-install-cups \
        --with-jbig2dec \
-       --with-jasper \
        --with-pdftoraster \
-       --with-system-libtiff \
+       %{?with_system_libtiff:--with-system-libtiff} \
        --with-x
 
 cd ijs
@@ -250,9 +284,12 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C ijs install \
        DESTDIR=$RPM_BUILD_ROOT
 
+cp -p base/gserrors.h $RPM_BUILD_ROOT%{_includedir}/ghostscript
+
+cp -p LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.sh \
-       $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},eps2eps}.1 \
-       $RPM_BUILD_ROOT%{_mandir}/de/man1/{ps2pdf1{2,3},eps2eps}.1
+       $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},eps2eps}.1
 
 echo ".so gs.1"     > $RPM_BUILD_ROOT%{_mandir}/man1/ghostscript.1
 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf12.1
@@ -263,17 +300,11 @@ echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj.1
 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj500.1
 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gslj.1
 
-echo ".so ps2ps.1"  > $RPM_BUILD_ROOT%{_mandir}/de/man1/eps2eps.1
-echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf12.1
-echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf13.1
-
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/README.ghostscript-non-english-man-pages
 
-#mv -f $RPM_BUILD_ROOT%{_bindir}/{gsc,gs}
 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
-ln -s gstoraster $RPM_BUILD_ROOT%{_ulibdir}/cups/filter/pdftoraster
-ln -s gstoraster $RPM_BUILD_ROOT%{_ulibdir}/cups/filter/pstoraster
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -281,13 +312,13 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%post  ijs -p /sbin/ldconfig
+%postun        ijs -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
-%doc %{_docdir}/%{name}-%{version}
-%attr(755,root,root) %{_bindir}/dumphint
 %attr(755,root,root) %{_bindir}/dvipdf
 %attr(755,root,root) %{_bindir}/eps2eps
-%attr(755,root,root) %{_bindir}/font2c
 %attr(755,root,root) %{_bindir}/ghostscript
 %attr(755,root,root) %{_bindir}/gs
 %attr(755,root,root) %{_bindir}/gsbj
@@ -297,11 +328,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/gslj
 %attr(755,root,root) %{_bindir}/gslp
 %attr(755,root,root) %{_bindir}/gsnd
-%attr(755,root,root) %{_bindir}/ijs_client_example
-%attr(755,root,root) %{_bindir}/ijs_server_example
 %attr(755,root,root) %{_bindir}/pdf2dsc
 %attr(755,root,root) %{_bindir}/pdf2ps
-%attr(755,root,root) %{_bindir}/pdfopt
 %attr(755,root,root) %{_bindir}/pf2afm
 %attr(755,root,root) %{_bindir}/pfbtopfa
 %attr(755,root,root) %{_bindir}/printafm
@@ -315,25 +343,20 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/ps2ps
 %attr(755,root,root) %{_bindir}/ps2ps2
 %attr(755,root,root) %{_bindir}/pphs
-%attr(755,root,root) %{_bindir}/wftopfa
 %attr(755,root,root) %{_libdir}/libgs.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgs.so.9
-%attr(755,root,root) %{_libdir}/libijs-*.so
-%dir %{_libdir}/%{name}
-%dir %{_libdir}/%{name}/%{version}
+%attr(755,root,root) %ghost %{_libdir}/libgs.so.10
 %dir %{_datadir}/%{name}
 %dir %{_datadir}/%{name}/%{version}
+%{_datadir}/%{name}/%{version}/Resource
+%{_datadir}/%{name}/%{version}/iccprofiles
 %dir %{_datadir}/%{name}/%{version}/lib
-%{_datadir}/%{name}/%{version}/examples
 %{_datadir}/%{name}/%{version}/lib/*.ppd
 %{_datadir}/%{name}/%{version}/lib/*.ps
 %{_datadir}/%{name}/%{version}/lib/*.rpd
-%{_datadir}/%{name}/%{version}/lib/*.src
 %{_datadir}/%{name}/%{version}/lib/*.upp
 %{_datadir}/%{name}/%{version}/lib/*.x[bp]m
 %{_mandir}/man1/dvipdf.1*
 %{_mandir}/man1/eps2eps.1*
-%{_mandir}/man1/font2c.1*
 %{_mandir}/man1/ghostscript.1*
 %{_mandir}/man1/gs.1*
 %{_mandir}/man1/gsbj.1*
@@ -344,7 +367,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/gsnd.1*
 %{_mandir}/man1/pdf2dsc.1*
 %{_mandir}/man1/pdf2ps.1*
-%{_mandir}/man1/pdfopt.1*
 %{_mandir}/man1/pf2afm.1*
 %{_mandir}/man1/pfbtopfa.1*
 %{_mandir}/man1/printafm.1*
@@ -353,24 +375,17 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/ps2pdf.1*
 %{_mandir}/man1/ps2pdf12.1*
 %{_mandir}/man1/ps2pdf13.1*
+%{_mandir}/man1/ps2pdf14.1*
 %{_mandir}/man1/ps2pdfwr.1*
 %{_mandir}/man1/ps2ps.1*
-%{_mandir}/man1/wftopfa.1*
 %lang(cs) %{_mandir}/cs/man1/*
-%lang(de) %{_mandir}/de/man1/*
 %lang(es) %{_mandir}/es/man1/*
 %lang(fr) %{_mandir}/fr/man1/*
 %lang(pl) %{_mandir}/pl/man1/*
 
-%files cups
+%files doc
 %defattr(644,root,root,755)
-%{_sysconfdir}/cups/gstoraster.convs
-%attr(755,root,root) %{_ulibdir}/cups/filter/gstoraster
-%attr(755,root,root) %{_ulibdir}/cups/filter/pdftoraster
-%attr(755,root,root) %{_ulibdir}/cups/filter/pstoraster
-%attr(755,root,root) %{_ulibdir}/cups/filter/pstopxl
-%{_datadir}/cups/model/pxlcolor.ppd
-%{_datadir}/cups/model/pxlmono.ppd
+%doc %{_docdir}/%{name}-%{version}
 
 %if %{with gtk}
 %files gtk
@@ -387,14 +402,19 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libgs.so
 %{_includedir}/ghostscript
 
+%files ijs
+%defattr(644,root,root,755)
+%doc ijs/README
+%attr(755,root,root) %{_bindir}/ijs_client_example
+%attr(755,root,root) %{_bindir}/ijs_server_example
+%attr(755,root,root) %{_libdir}/libijs-*.so
+
 %files ijs-devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/ijs-config
 %attr(755,root,root) %{_libdir}/libijs.so
 %{_libdir}/libijs.la
 %{_includedir}/ijs
 %{_pkgconfigdir}/ijs.pc
-%{_mandir}/man1/ijs-config.1*
 
 %files ijs-static
 %defattr(644,root,root,755)
This page took 0.073361 seconds and 4 git commands to generate.