[packages/ghostpdl] - base package renamed from ghostpcl to ghostpdl, new URLs, updated to 9.20 - updated fonts_location

qboosh qboosh at pld-linux.org
Tue Feb 7 20:39:39 CET 2017


commit db1286171a7e48fc8a974b32b1eb07c1f94bef37
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Feb 7 20:41:16 2017 +0100

    - base package renamed from ghostpcl to ghostpdl, new URLs, updated to 9.20
    - updated fonts_locations,make patches
    - removed obsolete format-security patch
    - added system-libs patch
    - build ghostpcl and ghostxps packages

 ghostpcl-fonts_locations.patch |  11 ----
 ghostpcl-format-security.patch |  40 ------------
 ghostpcl-make.patch            |  47 --------------
 ghostpcl.spec                  |  68 --------------------
 ghostpdl-fonts_locations.patch |  11 ++++
 ghostpdl-make.patch            |  14 +++++
 ghostpdl-system-libs.patch     |  47 ++++++++++++++
 ghostpdl.spec                  | 139 +++++++++++++++++++++++++++++++++++++++++
 8 files changed, 211 insertions(+), 166 deletions(-)
---
diff --git a/ghostpcl.spec b/ghostpcl.spec
deleted file mode 100644
index 00968d6..0000000
--- a/ghostpcl.spec
+++ /dev/null
@@ -1,68 +0,0 @@
-# TODO:
-#	- prevent linking pspcl6 and pcl6 with expat
-#	- fix GS_LIB_DEFAULT path to gs_init.ps (pspcl6)
-#	  how about GS_DOT_VERSION?
-
-Summary:	PostScript, PDF and XPS interpreter and renderer
-Summary(pl.UTF-8):	Interpreter i renderer PostScriptu, PDF oraz XPS
-Name:		ghostpcl
-Version:	1.54
-Release:	9
-License:	GPL v2
-Group:		Applications/Graphics
-#Source0:	http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/ghostpdl/ghostpdl-%{version}.tar.bz2
-#Source0:	http://www.ctan.org/get/support/ghostscript/GPL/ghostpdl/ghostpdl-%{version}.tar.bz2
-Source0:	http://ghostscript.com/releases/ghostpdl-%{version}.tar.bz2
-# Source0-md5:	228f96df51d192b95bc4d9340015aa9e
-Patch0:		%{name}-fonts_locations.patch
-Patch1:		%{name}-make.patch
-Patch2:		%{name}-format-security.patch
-URL:		http://www.artifex.com/downloads/
-#BuildRequires:	XFree86-devel
-BuildRequires:	expat-devel
-BuildRequires:	libjpeg-devel
-BuildRequires:	libpng-devel
-BuildRequires:	xorg-lib-libXext-devel
-BuildRequires:	xorg-lib-libXt-devel
-BuildRequires:	zlib-devel
-Suggests:	fonts-TTF-urw
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-GhostPCL is Artifex Software's implementation of the PCL-5(TM) and
-PCL-XL(TM) family of page description languages. For more information
-please see the documentation included with the source package.
-
-%description -l pl.UTF-8
-GhostPCL jest implementacją języków z rodzin PCL-5(TM) i PCL-XL(TM)
-opisujących stronę. Więcej informacji znajduje się w dokumentacji
-załączonej do pakietu.
-
-%prep
-%setup -q -n ghostpdl-%{version}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-
-%build
-%{__make} -j1 \
-	CC="%{__cc}" \
-	XCFLAGS="%{rpmcflags}" \
-	XLDFLAGS="%{rpmldflags}" \
-	SHARE_JPEG=1
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
-install language_switch/obj/pspcl6 main/obj/pcl6 tools/pcl2pdfwr xps/obj/gxps $RPM_BUILD_ROOT%{_bindir}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(644,root,root,755)
-%doc README.txt doc/ghostpdl.pdf
-%attr(755,root,root) %{_bindir}/gxps
-%attr(755,root,root) %{_bindir}/pcl2pdfwr
-%attr(755,root,root) %{_bindir}/pcl6
-%attr(755,root,root) %{_bindir}/pspcl6
diff --git a/ghostpdl.spec b/ghostpdl.spec
new file mode 100644
index 0000000..98f8900
--- /dev/null
+++ b/ghostpdl.spec
@@ -0,0 +1,139 @@
+#
+# Conditional build:
+%bcond_without	system_expat	# build with included expat
+%bcond_without	system_freetype	# build with included freetype
+%bcond_without	system_jbig2dec	# build with included jbig2dec
+%bcond_without	system_lcms2	# build with included lcms2
+#
+Summary:	PostScript, PDF and XPS interpreter and renderer
+Summary(pl.UTF-8):	Interpreter i renderer PostScriptu, PDF oraz XPS
+Name:		ghostpdl
+Version:	9.20
+Release:	1
+License:	AGPL v3+
+Group:		Applications/Graphics
+#Source0Download: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
+Source0:	https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs920/%{name}-%{version}.tar.xz
+# Source0-md5:	eb2e79f777c8953e932159d1c7ea2d1a
+Patch0:		%{name}-fonts_locations.patch
+Patch1:		%{name}-make.patch
+Patch2:		%{name}-system-libs.patch
+URL:		http://ghostscript.com/
+BuildRequires:	autoconf >= 2.63
+BuildRequires:	cups-devel
+%{!?with_system_expat:BuildRequires:	expat-devel >= 1.95}
+BuildRequires:	fontconfig-devel
+BuildRequires:	libidn-devel
+%{!?with_system_freetype:BuildRequires:	freetype-devel >= 1:2.6}
+%{?with_system_jbig2dec:BuildRequires:	jbig2dec-devel >= 0.12}
+%{?with_system_lcms2:BuildRequires:	lcms2-devel >= 2.6}
+BuildRequires:	libjpeg-devel
+BuildRequires:	libpaper-devel
+BuildRequires:	libpng-devel >= 2:1.6.17
+BuildRequires:	libtiff-devel >= 4.0.1
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xorg-lib-libX11-devel
+BuildRequires:	xorg-lib-libXext-devel
+BuildRequires:	xorg-lib-libXt-devel
+BuildRequires:	xz
+BuildRequires:	zlib-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+GhostPCL is Artifex Software's implementation of the PCL-5(TM) and
+PCL-XL(TM) family of page description languages. For more information
+please see the documentation included with the source package.
+
+%description -l pl.UTF-8
+GhostPCL jest implementacją języków z rodzin PCL-5(TM) i PCL-XL(TM)
+opisujących stronę. Więcej informacji znajduje się w dokumentacji
+załączonej do pakietu.
+
+%package -n ghostpcl
+Summary:	PCL-5 and PCL-XL implementation
+Summary(pl.UTF-8):	Implementacja PCL-5 oraz PCL-XL
+Group:		Applications/Graphics
+URL:		http://ghostscript.com/GhostPCL.html
+Requires:	ghostscript = %{version}
+Suggests:	fonts-TTF-urw
+Conflicts:	ghostpcl < 9
+
+%description -n ghostpcl
+GhostPCL is Artifex Software's implementation of the PCL-5 and PCL-XL
+family of page description languages.
+
+%description -n ghostpcl -l pl.UTF-8
+GhostPCL to rozwijana przez Artifex Software implementacja rodzin
+języków opisu strony PCL-5 oraz PCL-XL.
+
+%package -n ghostxps
+Summary:	XPS document format implementation based on Ghostscript
+Summary(pl.UTF-8):	Implementacja formatu dokumentów XPS oparta na Ghostscripcie
+Group:		Applications/Graphics
+URL:		http://ghostscript.com/GhostXPS.html
+Requires:	ghostscript = %{version}
+
+%description -n ghostxps
+GhostXPS is an implementation of the Microsoft XPS document format
+built on top of Ghostscript.
+
+%description -n ghostxps -l pl.UTF-8
+GhostXPS to implementacja formatu dokumentu XPS Microsoftu zbudowana w
+oparciu o Ghostscript.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+# use system libs:
+# freetype 2.5.5 + few pre-2.6 fixes from git
+%{?with_system_freetype:%{__rm} -r freetype}
+# jbig2dec 0.13 + minor fix
+%{?with_system_jbig2dec:%{__rm} -r jbig2dec}
+# (unmodified) libpng 1.6.17 and zlib 1.2.8
+%{__rm} -r libpng zlib
+# (unmodified) libjpeg 9a is built with different configuration (D_MAX_BLOCKS_IN_MCU=64)
+# openjpeg is 2.1.0 + fixes; stick to bundled for now
+# lcms2 is 2.6 with some minor future changes (one already in 2.7, two post-2.7, extra_xform.h ???)
+%{?with_system_lcms2:%{__rm} -r lcms2}
+%{?with_system_expat:%{__rm} -r expat}
+%{__autoconf}
+%configure \
+	--with-system-libtiff
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+install pcl/tools/{pcl2pdf,pcl2pdfwr,plot2pdf.sh} $RPM_BUILD_ROOT%{_bindir}
+ln -sf gpcl6 $RPM_BUILD_ROOT%{_bindir}/pcl6
+
+# packaged in ghostscript.spec
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/{dvipdf,eps2eps,font2c,gs*,lprsetup.sh,pdf2*,pf2afm,pfbtopfa,pphs,printafm,ps2*,unix-lpr.sh,wftopfa}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dvipdf,eps2eps,font2c,gs*,pdf2*,pf2afm,pfbtopfa,printafm,ps2*,wftopfa}.1
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/de/man1/{dvipdf,eps2eps,font2c,gsnd,pdf2*,printafm,ps2*,wftopfa}.1
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ghostscript
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -n ghostpcl
+%defattr(644,root,root,755)
+%doc doc/pclxps/ghostpdl.pdf pcl/{LICENSE,NEWS,README.txt} pcl/pcl/Anomalies.txt pcl/pxl/{pxcet,pxdiff,pxfts,pxlib,pxspec}.txt
+%attr(755,root,root) %{_bindir}/gpcl6
+%attr(755,root,root) %{_bindir}/pcl2pdf
+%attr(755,root,root) %{_bindir}/pcl2pdfwr
+%attr(755,root,root) %{_bindir}/pcl6
+%attr(755,root,root) %{_bindir}/plot2pdf.sh
+
+%files -n ghostxps
+%defattr(644,root,root,755)
+%doc doc/pclxps/ghostpdl.pdf xps/TODO
+%attr(755,root,root) %{_bindir}/gxps
diff --git a/ghostpcl-fonts_locations.patch b/ghostpcl-fonts_locations.patch
deleted file mode 100644
index 35b0328..0000000
--- a/ghostpcl-fonts_locations.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ghostpcl_1.38p1/pl/pjparse.c.orig	2002-10-17 01:28:22.000000000 +0200
-+++ ghostpcl_1.38p1/pl/pjparse.c	2003-12-18 20:41:49.000000000 +0100
-@@ -107,7 +107,7 @@
-    there is some unnecessary overlap in the factory default and font
-    source table. */
- static const pjl_fontsource_t pjl_fontsource_table[] = {
--    { "I", "fonts/;urwfonts/;/windows/fonts/;/win95/fonts/;/winnt/fonts/" },
-+    { "I", "/usr/share/fonts/Type1/;/usr/share/fonts/TTF/" },
-     { "C", "CART0/", "" },
-     { "C1", "CART1/", "" },
-     { "C2", "CART2/", "" },
diff --git a/ghostpcl-format-security.patch b/ghostpcl-format-security.patch
deleted file mode 100644
index fc33b80..0000000
--- a/ghostpcl-format-security.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- ghostpdl-1.54/pl/plmain.c.orig	2012-11-19 00:05:12.958343465 +0100
-+++ ghostpdl-1.54/pl/plmain.c	2012-11-19 00:05:55.211675307 +0100
-@@ -266,7 +266,7 @@
-     /* Create PDL instances, etc */
-     if (pl_main_universe_init(&universe, err_buf, mem, pdl_implementation,
- 			      pjl_instance, &inst, &pl_pre_finish_page, &pl_post_finish_page) < 0) {
--	errprintf(err_buf);
-+	errprintf("%s", err_buf);
- 	return -1;
-     }
- 
-@@ -384,7 +384,7 @@
- 							pl_select_implementation(pjl_instance, &inst, r),
- 							&inst, (gs_param_list *)&params);
- 		if ( curr_instance == NULL ) {
--		    dprintf(err_buf);
-+		    dputs(err_buf);
- 		    return -1;
- 		}
- 
-@@ -447,7 +447,7 @@
- 
-     /* Dnit PDLs */
-     if (pl_main_universe_dnit(&universe, err_buf)) {
--	dprintf(err_buf);
-+	dputs(err_buf);
- 	return -1;
-     }
-     /* dnit pjl */
---- ghostpdl-1.54/pxl/pxtop.c~	2008-08-02 23:09:12.000000000 +0200
-+++ ghostpdl-1.54/pxl/pxtop.c	2012-11-19 00:18:39.224981686 +0100
-@@ -515,7 +515,7 @@
- 	   code, st, pxs)) >= 0
- 	)
- 	  { if ( (report & eBackChannel) || force_to_cout )
--	      errprintf(message);
-+	      errprintf("%s", message);
- 	    if ( report & eErrorPage )
- 	      y = px_error_page_show(message, y, pxs);
- 	  }
diff --git a/ghostpcl-make.patch b/ghostpcl-make.patch
deleted file mode 100644
index ab6efd4..0000000
--- a/ghostpcl-make.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- ghostpcl_1.38p1/gs/base/ugcclib.mak.orig	2002-06-13 01:18:14.000000000 +0200
-+++ ghostpcl_1.38p1/gs/base/ugcclib.mak	2003-12-25 18:26:48.504185696 +0100
-@@ -67,10 +67,7 @@
- GCFLAGS_WARNINGS=-Wall -Wcast-qual -Wpointer-arith -Wstrict-prototypes -Wwrite-strings
- GCFLAGS=$(GCFLAGS_NO_WARN) $(GCFLAGS_WARNINGS)
- XCFLAGS=
--CFLAGS_STANDARD=-O2
--CFLAGS_DEBUG=-g -O
--CFLAGS_PROFILE=-pg -O2
--CFLAGS=$(CFLAGS_DEBUG) $(GCFLAGS) $(XCFLAGS)
-+CFLAGS=$(GCFLAGS) $(XCFLAGS)
- LDFLAGS=$(XLDFLAGS)
- STDLIBS=-lm
- EXTRALIBS=
---- ghostpcl_1.38p1/main/pcl6_gcc.mak.orig	2002-11-22 22:20:25.000000000 +0100
-+++ ghostpcl_1.38p1/main/pcl6_gcc.mak	2003-12-25 18:28:49.802745512 +0100
-@@ -16,8 +16,8 @@
- ZSRCDIR?=../gs/zlib
- ZGENDIR?=$(GENDIR)
- ZOBJDIR?=$(GENDIR)
--SHARE_ZLIB?=0
--SHARE_LIBPNG?=0
-+SHARE_ZLIB?=1
-+SHARE_LIBPNG?=1
- 
- PNGSRCDIR?=../gs/libpng
- # only relevant if not shared
-@@ -207,7 +207,7 @@
- 
- SYNC=posync
- # some systems may need -ldl as well as pthread
--STDLIBS=-lm -lpthread -ldl
-+STDLIBS=-lm -lpthread -ldl -lz -lpng -lexpat -ljpeg
- DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11mono.dev $(DD)x11cmyk.dev $(DEVICES_DEVS)
- endif
- 
---- ghostpcl_1.38p1/xps/xps_gcc.mak.orig	2008-01-09 18:23:58.000000000 +0100
-+++ ghostpcl_1.38p1/xps/xps_gcc.mak	2008-04-25 16:08:18.000000000 +0200
-@@ -30,7 +30,7 @@
- PNGSRCDIR?=../gs/libpng
- EXPATSRCDIR?=../gs/expat
- 
--SHARE_EXPAT?=0
-+SHARE_EXPAT?=1
- EXPAT_CFLAGS=-DHAVE_MEMMOVE
- 
- # PLPLATFORM indicates should be set to 'ps' for language switch
diff --git a/ghostpdl-fonts_locations.patch b/ghostpdl-fonts_locations.patch
new file mode 100644
index 0000000..29a3ed8
--- /dev/null
+++ b/ghostpdl-fonts_locations.patch
@@ -0,0 +1,11 @@
+--- ghostpdl-9.19/pcl/pl/pjparse.c.orig	2016-03-23 09:19:58.000000000 +0100
++++ ghostpdl-9.19/pcl/pl/pjparse.c	2016-07-30 20:27:35.447003714 +0200
+@@ -124,7 +124,7 @@
+    source table. */
+ static pjl_fontsource_t pjl_fontsource_table[] = {
+     {"I",
+-     "%rom%ttfonts/;fonts/;urwfonts/;/windows/fonts/;/win95/fonts/;/winnt/fonts/", ""},
++     "/usr/share/fonts/Type1/;/usr/share/fonts/TTF/" },
+     {"C", "CART0/", ""},
+     {"C1", "CART1/", ""},
+     {"C2", "CART2/", ""},
diff --git a/ghostpdl-make.patch b/ghostpdl-make.patch
new file mode 100644
index 0000000..48f457c
--- /dev/null
+++ b/ghostpdl-make.patch
@@ -0,0 +1,14 @@
+--- ghostpcl-9.19/base/ugcclib.mak.orig	2002-06-13 01:18:14.000000000 +0200
++++ ghostpcl-9.19/base/ugcclib.mak	2003-12-25 18:26:48.504185696 +0100
+@@ -67,10 +67,7 @@
+ GCFLAGS_WARNINGS=-Wall -Wcast-qual -Wpointer-arith -Wstrict-prototypes -Wwrite-strings
+ GCFLAGS=$(GCFLAGS_NO_WARN) $(GCFLAGS_WARNINGS)
+ XCFLAGS=
+-CFLAGS_STANDARD=-O2
+-CFLAGS_DEBUG=-g -O
+-CFLAGS_PROFILE=-pg -O2
+-CFLAGS=$(CFLAGS_DEBUG) $(GCFLAGS) $(XCFLAGS)
++CFLAGS=$(GCFLAGS) $(XCFLAGS)
+ LDFLAGS=$(XLDFLAGS)
+ STDLIBS=-lm
+ EXTRALIBS=
diff --git a/ghostpdl-system-libs.patch b/ghostpdl-system-libs.patch
new file mode 100644
index 0000000..513a1c5
--- /dev/null
+++ b/ghostpdl-system-libs.patch
@@ -0,0 +1,47 @@
+--- ghostpdl-9.19/xps/xps.mak.orig	2016-03-23 09:19:58.000000000 +0100
++++ ghostpdl-9.19/xps/xps.mak	2016-08-01 21:49:32.874974496 +0200
+@@ -57,7 +57,7 @@
+ $(XPSOBJ)xpsjpeg.$(OBJ): $(XPSSRC)xpsjpeg.c $(XPSINCLUDES) $(XPS_MAK) $(MAKEDIRS)
+ 	$(XPSCCC) $(XPSSRC)xpsjpeg.c $(XPSO_)xpsjpeg.$(OBJ)
+ 
+-$(XPSOBJ)xpspng.$(OBJ): $(XPSSRC)xpspng.c $(XPSINCLUDES) $(PNGSRCDIR)$(D)png.h \
++$(XPSOBJ)xpspng.$(OBJ): $(XPSSRC)xpspng.c $(XPSINCLUDES) \
+                         $(PNGGENDIR)$(D)libpng.dev $(XPS_MAK) $(MAKEDIRS)
+ 	$(XPSCCC) $(I_)$(PNGSRCDIR)$(_I) $(XPSSRC)xpspng.c $(XPSO_)xpspng.$(OBJ)
+ 
+--- ghostpdl-9.20/Makefile.in.orig	2016-09-26 12:36:27.000000000 +0200
++++ ghostpdl-9.20/Makefile.in	2017-02-06 21:59:33.532453094 +0100
+@@ -321,7 +321,7 @@
+ EXPATGENDIR=$(GLGENDIR)
+ EXPATOBJDIR=$(GLOBJDIR)
+ EXPATINCDIR = $(EXPATSRCDIR)$(D)lib
+-SHARE_EXPAT=0
++SHARE_EXPAT=1
+ 
+ JPEGXR_SRCDIR=@SRCDIR@/jpegxr
+ SHARE_JPEGXR=0
+@@ -450,7 +450,7 @@
+ # Solaris may need -lnsl -lsocket -lposix4.
+ # (Libraries required by individual drivers are handled automatically.)
+ 
+-EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@
++EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @EXPAT_LIB@
+ AUXEXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @AUX_SHARED_ZLIB@
+ 
+ # Define the standard libraries to search at the end of linking.
+--- ghostpdl-9.20/configure.ac.orig	2017-02-06 21:58:23.352453896 +0100
++++ ghostpdl-9.20/configure.ac	2017-02-06 21:58:26.675787193 +0100
+@@ -1543,6 +1543,13 @@
+ AC_SUBST(SHARE_JPX)
+ AC_SUBST(JPXDEVS)
+ 
++EXPAT_LIB=
++if test ! -d expat && $PKGCONFIG --exists expat ; then
++	CFLAGS="$CFLAGS `$PKGCONFIG --cflags expat`"
++	EXPAT_LIB="`$PKGCONFIG --libs expat`"
++fi
++AC_SUBST([EXPAT_LIB])
++
+ dnl check if we can/should build the gtk loader
+ AC_ARG_ENABLE([gtk], AC_HELP_STRING([--disable-gtk],
+     [Do not build the gtk loader]))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghostpdl.git/commitdiff/db1286171a7e48fc8a974b32b1eb07c1f94bef37



More information about the pld-cvs-commit mailing list