/[packages]/cauldron/ghostscript/current/SPECS/ghostscript.spec
ViewVC logotype

Annotation of /cauldron/ghostscript/current/SPECS/ghostscript.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 351540 - (hide annotations) (download)
Fri Jan 11 23:34:44 2013 UTC (11 years, 2 months ago) by umeabot
File size: 15402 byte(s)
Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild
1 luigiwalser 289699 %define _disable_ld_no_undefined 1
2 umeabot 351540 %define rel 7
3 blino 19330
4 luigiwalser 289699 %define gsver 9.06
5 blino 19330 %define ijsver 0.35
6 luigiwalser 289744 %define ijsreloffset 86
7 luigiwalser 289742 %define ijsrelno %(echo $((%{rel} + %{ijsreloffset})))
8     %define ijsrel %mkrel %{ijsrelno}
9 luigiwalser 289699
10 blino 19330 %define ijsmajor 1
11     %define libijs %mklibname ijs %{ijsmajor}
12 luigiwalser 289699 %define libijs_devel %mklibname -d ijs
13    
14 blino 19330 %define gsmajor 9
15     %define libgs %mklibname gs %{gsmajor}
16 luigiwalser 289699 %define libgs_devel %mklibname -d gs
17 blino 19330
18 luigiwalser 289699 %define bootstrap 0
19 blino 19330
20     %define GSx11SVGAmodule 1
21     %define withcupsfilters 1
22     %define debug 0
23     %if %{bootstrap}
24     %global withcupsfilters 0
25     %endif
26    
27     Summary: PostScript/PDF interpreter and renderer (Main executable)
28     Name: ghostscript
29 luigiwalser 289699 Version: %{gsver}
30 luigiwalser 289700 Release: %mkrel %{rel}
31 blino 19330 License: GPLv2+
32     Group: Publishing
33     URL: http://www.ghostscript.com/awki/Index
34 luigiwalser 289699 Source0: http://downloads.ghostscript.com/public/ghostscript-%{gsver}.tar.bz2
35     Source2: ps2pdfpress.bz2
36     Source3: http://www.linuxprinting.org/download/printing/sipixa6.upp.bz2
37 blino 19330
38 luigiwalser 289699 # Fedora patches
39     # Fix ijs-config not to have multilib conflicts (bug #192672)
40     Patch1: ghostscript-multilib.patch
41     # Fix some shell scripts
42     Patch2: ghostscript-scripts.patch
43     # Build igcref.c with -O0 to work around bug #150771.
44     Patch3: ghostscript-noopt.patch
45     # Fix ./autgen.sh in ijs sub-project
46     # See http://bugs.ghostscript.com/show_bug.cgi?id=692040 for details.
47     Patch4: ghostscript-ijs-automake-ver.patch
48     # Define .runlibfileifexists.
49     Patch5: ghostscript-runlibfileifexists.patch
50 blino 292185 # Fixed missing error check when setting ICC profile.
51     Patch6: ghostscript-icc-missing-check.patch
52 luigiwalser 289699 # Install CUPS filter convs files in the correct place.
53     Patch10: ghostscript-cups-filters.patch
54     # Restored Fontmap.local patch, incorrectly dropped after
55     # ghostscript-8.15.4-3 (bug #610301).
56     # Note: don't use -b here to avoid the backup file ending up in the
57     # package manifest.
58     Patch27: ghostscript-Fontmap.local.patch
59     # Don't assume %%rom%% device is available for initial ICC profile dir.
60     Patch28: ghostscript-iccprofiles-initdir.patch
61     # gdevcups: don't use uninitialized variables in debugging output.
62     Patch29: ghostscript-gdevcups-debug-uninit.patch
63 blino 19330
64 blino 294138 Patch100: 0001-Fix-hang-in-gstoraster-if-gs-fails-bug-693336.patch
65    
66 luigiwalser 304018 Patch200: ghostscript-9.06-CVE-2012-4405.diff
67    
68     Patch300: ghostscript-9.05-x11_shared.diff
69 cjw 339808 Patch301: ghostscript-9.06-automake-1.13.patch
70 luigiwalser 304018
71 luigiwalser 289699 %if !%{bootstrap}
72     BuildRequires: gtk+2-devel
73     BuildRequires: cups-devel
74     BuildRequires: fontconfig-devel
75     %endif
76 blino 19330 BuildRequires: bison
77     BuildRequires: flex
78 luigiwalser 289699 BuildRequires: libtool
79     BuildRequires: unzip
80 blino 19330 BuildRequires: gettext-devel
81     BuildRequires: glibc-devel
82     BuildRequires: jbig2dec-devel
83 luigiwalser 289699 BuildRequires: jpeg-devel
84 blino 19330 BuildRequires: libpaper-devel
85 luigiwalser 289699 BuildRequires: netpbm-devel
86     BuildRequires: tiff-devel
87     BuildRequires: pkgconfig(freetype2)
88     BuildRequires: pkgconfig(ice)
89     BuildRequires: pkgconfig(jasper)
90     BuildRequires: pkgconfig(lcms)
91     BuildRequires: pkgconfig(libidn)
92     BuildRequires: pkgconfig(libpng15)
93     BuildRequires: pkgconfig(libxml-2.0)
94     BuildRequires: pkgconfig(sm)
95     BuildRequires: pkgconfig(x11)
96     BuildRequires: pkgconfig(xext)
97     BuildRequires: pkgconfig(xt)
98     BuildRequires: pkgconfig(zlib)
99 blino 19330
100     Requires: ghostscript-common
101     Requires: update-alternatives
102 luigiwalser 289699 %if !%{GSx11SVGAmodule}
103     %rename ghostscript-module-X ghostscript-module-SVGALIB
104 blino 19330 %endif
105    
106     %description
107     Ghostscript is a set of software tools that provide a PostScript(TM)
108     interpreter, a set of C procedures (the Ghostscript library, which
109     implements the graphics capabilities in the PostScript language) and
110     an interpreter for Portable Document Format (PDF) files. Ghostscript
111     translates PostScript code into many common, bitmapped and vector
112     formats, like those understood by your printer or screen. Ghostscript
113     is normally used to display PostScript files and to print PostScript
114     files to non-PostScript printers.
115    
116     You should install ghostscript if you need to display PostScript or
117     PDF files, or if you have a non-PostScript printer.
118    
119 luigiwalser 289699 %package dvipdf
120     Summary: PostScript/PDF interpreter and renderer (DVI-to-PDF converter)
121     Group: Publishing
122     Requires: ghostscript
123     Requires: coreutils
124     Requires: dvips
125     Provides: dvipdf = %{version}-%{release}
126    
127 blino 19330 %description dvipdf
128     Tool to convert the DVI format of TeX into the PDF format. There are
129 boklm 64147 more such tools (for different quality levels) in the dvipdfm
130 blino 19330 package. All these tools use dvips of TeX to convert the DVI file to
131     PostScript, then they use GhostScript to generate the PDF file.
132    
133 luigiwalser 289699 %package common
134     Summary: PostScript/PDF interpreter and renderer (Common files)
135     Group: Publishing
136     Requires: urw-fonts >= 1.1
137     Requires: ghostscript-fonts
138    
139 blino 19330 %description common
140     Ghostscript is a PostScript/PDF interpreter. It can render both
141     PostScript and PDF files to devices which include X window, many
142     printer formats, and popular graphics file formats.
143    
144     This package contains the common data files needed by GhostScript.
145    
146 luigiwalser 289699 %package X
147     Summary: PostScript/PDF interpreter and renderer (with X11 screen display)
148     Group: Publishing
149     Requires: ghostscript-common
150     Requires: update-alternatives
151    
152 blino 19330 %description X
153     Ghostscript is a PostScript/PDF interpreter. It can render both
154     PostScript and PDF files to devices which include X window, many
155     printer formats, and popular graphics file formats.
156    
157     This package contains a GhostScript executable with GTK-based X
158     display support ("display" device, default, so it displays files by
159     simply entering "gs <file>" on the command line). It makes use of the
160     GhostScript shared library.
161    
162 luigiwalser 289699 %if %{GSx11SVGAmodule}
163     %package module-X
164     Summary: PostScript/PDF interpreter and renderer (Additional support for X)
165     Group: Publishing
166     Requires: ghostscript-common
167 blino 19330
168     %description module-X
169     Ghostscript is a PostScript/PDF interpreter. It can render both
170     PostScript and PDF files to devices which include X window, many
171     printer formats, and popular graphics file formats.
172    
173     This package enhances Ghostscript with X window support
174 luigiwalser 289699 %endif
175 blino 19330
176 luigiwalser 289699 %package -n %libgs
177     Summary: PostScript/PDF interpreter and renderer (GhostScript shared library)
178     Group: Publishing
179 blino 19330
180     %description -n %libgs
181     This is the API library for programs which use the PostScript and/or
182     PDF interpreters of GhostScript.
183    
184 luigiwalser 289699 %package -n %libgs_devel
185     Summary: Headers and links to compile against the "%{libgs}" library
186     Group: Development/C
187     Requires: %libgs >= %{gsver}
188     Provides: %{name}-devel = %{gsver}
189     Provides: libgs-devel = %{gsver}
190     Obsoletes: %{_lib}gs9-devel < %{gsver}
191     Obsoletes: %{_lib}gs8-devel < %{gsver}
192    
193     %description -n %libgs_devel
194 blino 19330 This package contains the static library and the header files needed
195     to compile applications using the GhostScript shared library.
196    
197 luigiwalser 289699 %package -n %{libijs}
198     Version: %{ijsver}
199     Release: %{ijsrel}
200     Summary: Dynamic library for the IJS printer driver plug-in interface
201     Group: Publishing
202     URL: http://www.linuxprinting.org/ijs/
203     Provides: libijs = %{ijsver}-%{ijsrel}
204    
205 blino 19330 %description -n %{libijs}
206     This is the API library for programs using the IJS printer driver
207     plug-in interface. Printer drivers using this interface can be added
208     to GhostScript (6.53 or newer) without needing to rebuild
209     GhostScript. Application programs providing an IJS interface can make
210     use of IJS printer drivers directly, without needing GhostScript.
211    
212 luigiwalser 289699 %package -n %{libijs_devel}
213     Version: %{ijsver}
214     Release: %{ijsrel}
215     Summary: Headers and links for compiling against the "%{libijs}" library
216     Group: Development/C
217     URL: http://www.linuxprinting.org/ijs/
218     Requires: %{libijs} >= %{ijsver}
219     Requires: multiarch-utils
220     Provides: libijs-devel = %{ijsver}-%{ijsrel}
221     Provides: ijs-devel = %{ijsver}-%{ijsrel}
222     Obsoletes: %{_lib}ijs1-devel < %{ijsver}-%{ijsrel}
223    
224 blino 19330 %description -n %{libijs_devel}
225     This package contains the static library and the header files needed
226     to compile applications using the IJS library.
227    
228 luigiwalser 289699 %package doc
229     Summary: Documentation for GhostScript
230     Group: Publishing
231    
232 blino 19330 %description doc
233     This package contains documentation for GhostScript.
234    
235     %prep
236     %setup -q
237 luigiwalser 289699 %apply_patches
238     # Don't ship backup files
239     find . -name "*.*~" |xargs rm -f
240 blino 19330
241     # prevent building and using bundled libs
242 luigiwalser 289699 rm -rf jasper jbig2dec libpng jpeg tiff expat zlib lcms freetype
243 blino 19330
244     # Convert manual pages to UTF-8
245     from8859_1() {
246 luigiwalser 289699 iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
247     mv "${1}_" "$1"
248 blino 19330 }
249     for i in man/de/*.1; do from8859_1 "$i"; done
250    
251     # Stuff for shared library support to ghostscript.
252     %if %{GSx11SVGAmodule}
253     # build a small README describing the features available.
254 blino 19364 cat <<EOF >README.shared.%{_vendor}
255 blino 19330 This version of ghostscript support shared modules dynamically loaded
256     at run time.
257    
258 blino 19365 There are currently two modules compiled with the %{distribution} version of
259 blino 19330 ghostscript, one to support all X11 devices (typically used by gv) and
260     another to support the svgalib devices. Look at the
261     ghostscript-module-??? packages.
262    
263     There is no configuration needed, just can add (or remove) the package
264     to add (or remove) the devices concerned in ghostscript.
265     EOF
266     %endif
267    
268     # ps2pdfpress
269     bzcat %{SOURCE2} > ps2pdfpress
270    
271     # UPP file for SiPix Pocket Printer A6
272     bzcat %{SOURCE3} > sipixa6.upp
273    
274     %build
275    
276     # Change compiler flags for debugging when in debug mode
277     %if %debug
278     export DONT_STRIP=1
279     export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
280     export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
281     export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
282     %endif
283    
284 luigiwalser 289699 pushd ijs*
285 blino 19330 # Rebuild broken build infrastructure
286     # Needed by patch4.
287     ./autogen.sh
288 lmenut 87327 %configure2_5x \
289     %ifarch %{ix86}
290     --disable-sse2 \
291     %endif
292 luigiwalser 289699 --enable-shared \
293     --disable-static
294    
295 blino 19330 %make
296 luigiwalser 289699 popd
297 blino 19330
298     # We have a Subversion version, so we must re-generate "configure"
299     ./autogen.sh
300    
301     %configure2_5x \
302     --enable-dynamic \
303     %if !%{bootstrap}
304 luigiwalser 289699 --enable-fontconfig \
305 blino 19330 %endif
306 lmenut 87327 %ifarch %{ix86}
307 luigiwalser 289699 --disable-sse2 \
308 lmenut 87327 %endif
309 luigiwalser 289699 --with-drivers=ALL,opvp \
310     --with-fontpath="/usr/share/fonts/default/ghostscript:/usr/share/fonts/default/type1:/usr/share/ghostscript/fonts:/usr/share/ghostscript/%{gsver}/Resource:/usr/share/ghostscript/Resource:/usr/share/ghostscript/CIDFont:/usr/share/fonts/ttf:/usr/share/fonts/type1:/usr/share/fonts/default/Type1" \
311     --with-ijs \
312     --with-omni \
313     --with-x \
314     --disable-compile-inits \
315     --with-system-libtiff \
316     --with-install-cups
317 blino 19330
318 luigiwalser 289699 # Drivers which do not compile:
319 blino 19330 # Needs newsiop/lbp.h: nwp533
320     # Needs sys/ioccom.h: sparc
321     # Needs unbdev/lpviio.h: sparc
322    
323     # Set documentation dir
324 luigiwalser 289699 perl -p -i -e 's|^(docdir=).*$|$1\$\(datadir\)/doc/%{name}-doc-%{gsver}|' Makefile
325 blino 19330
326     # Fix references to X11 libraries
327     perl -p -i -e "s|(/usr/X11R6)/lib\b|\1/%{_lib}|g" Makefile base/*.mak
328    
329     # Correct paths for CJK fonts
330     perl -p -i -e "s:/usr/share/ghostscript/:/usr/share/ghostscript/Resource/:g" Resource/Init/gs_res.ps
331     perl -p -i -e "s:ghostscript/Resource/fonts:ghostscript/Resource/Font:g" Resource/Init/gs_res.ps
332    
333     # Do not use "-ansi" in gcc calls
334     perl -p -i -e "s:-ansi::g" Makefile
335    
336 luigiwalser 289699 # bork
337     perl -p -i -e "s|^EXTRALIBS=|EXTRALIBS=-L/%{_lib} -lz |g" Makefile
338    
339 blino 19330 # The RPM macro for make is not used here, as parallelization of the build
340     # process does not work.
341 luigiwalser 289699 %if %{GSx11SVGAmodule}
342     #make soobj/X11.so BUILDPREFIX=so
343 fwang 150967 make obj/X11.so
344 blino 19330 %endif
345     make so
346     #make pcl3opts
347 luigiwalser 289699 make cups
348 blino 19330
349     %install
350     rm -rf %{buildroot}
351    
352     # Change compiler flags for debugging when in debug mode
353     %if %debug
354     export DONT_STRIP=1
355     export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
356     export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
357     export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
358     %endif
359    
360     # Make directories
361     install -d %{buildroot}%{_bindir}
362     install -d %{buildroot}%{_libdir}
363     install -d %{buildroot}%{_includedir}
364     install -d %{buildroot}%{_sysconfdir}
365     install -d %{buildroot}%{_mandir}/man1
366     %if !%{bootstrap}
367     install -d %{buildroot}%{_prefix}/lib/cups
368     install -d %{buildroot}%{_datadir}/cups/model
369     install -d %{buildroot}%{_sysconfdir}/cups
370     %endif
371    
372 luigiwalser 289699 pushd ijs*
373     %configure2_5x \
374     --enable-shared \
375     --prefix=%{buildroot}%{_prefix} \
376     --libdir=%{buildroot}%{_libdir}
377    
378 blino 19330 # Work around bug in "configure" script
379     perl -p -i -e 's/\@OBJEXT\@/o/g' Makefile
380     perl -p -i -e 's/\@EXEEXT\@//g' Makefile
381     %makeinstall
382     # Fix prefixes in scripts
383 luigiwalser 289699 perl -p -i -e "s:%{buildroot}::g" %{buildroot}%{_bindir}/ijs-config
384     perl -p -i -e "s:%{buildroot}::g" %{buildroot}%{_libdir}/pkgconfig/ijs.pc
385     popd
386 blino 19330
387     ##### GHOSTSCRIPT
388 luigiwalser 289699 mkdir -p %{buildroot}%{_docdir}/ghostscript-doc-%{gsver}
389 blino 19330
390     %if !%{bootstrap}
391     make \
392     prefix=%{_prefix} \
393     DESTDIR=%{buildroot} \
394 luigiwalser 289699 gssharedir=%{_libdir}/ghostscript/%{gsver} \
395     docdir=%{_docdir}/ghostscript-doc-%{gsver} \
396 blino 19330 bindir=%{_bindir} \
397     mandir=%{_mandir} \
398     install-cups
399     %endif
400    
401     make \
402     prefix=%{_prefix} \
403     DESTDIR=%{buildroot} \
404 luigiwalser 289699 gssharedir=%{_libdir}/ghostscript/%{gsver} \
405     docdir=%{_docdir}/ghostscript-doc-%{gsver} \
406 blino 19330 bindir=%{_bindir} \
407 luigiwalser 289699 libdir=%{_libdir} \
408 blino 19330 mandir=%{_mandir} \
409 luigiwalser 289699 soinstall
410 blino 19330
411 luigiwalser 289699 %if %{GSx11SVGAmodule}
412 blino 19330 make \
413     prefix=%{_prefix} \
414     DESTDIR=%{buildroot} \
415 luigiwalser 289699 gssharedir=%{_libdir}/ghostscript/%{gsver} \
416     docdir=%{_docdir}/ghostscript-doc-%{gsver} \
417 blino 19330 bindir=%{_bindir} \
418 luigiwalser 289699 libdir=%{_libdir} \
419 blino 19330 mandir=%{_mandir} \
420 luigiwalser 289699 install-shared
421 blino 19330 %endif
422    
423 luigiwalser 289699 ln -sf gs.1%{_extension} %{buildroot}%{_mandir}/man1/ghostscript.1%{_extension}
424 blino 19330
425     # ps2pdfpress
426     install -m 755 ps2pdfpress %{buildroot}%{_bindir}
427    
428     # UPP file for SiPix Pocket Printer A6
429 luigiwalser 289699 #mkdir -p %{buildroot}%{_datadir}/ghostscript/%{gsver}/lib
430     install -m 644 sipixa6.upp %{buildroot}%{_datadir}/ghostscript/%{gsver}/lib/
431 blino 19330
432 luigiwalser 289699 # why?
433     mv %{buildroot}%{_datadir}/cups/mime/gstoraster.convs %{buildroot}%{_sysconfdir}/cups/gstoraster.convs
434 blino 19330
435     # Correct permissions for all documentation files
436     chmod -R a+rX %{buildroot}%{_docdir}
437     chmod -R go-w %{buildroot}%{_docdir}
438     chmod -R u+w %{buildroot}%{_docdir}
439    
440 luigiwalser 289699 # remove libtool archive
441     rm -f %{buildroot}%{_libdir}/libijs.la
442 blino 19330
443 luigiwalser 289699 %post
444     # Set up update-alternatives entries
445     %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsc 200
446    
447     %post X
448     # Set up update-alternatives entries
449     %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsx 100
450    
451     %post common
452     # Initialize japanese fonts
453     if test -f /usr/share/fonts/ttf/japanese/cidinst; then
454     sh /usr/share/fonts/ttf/japanese/cidinst
455     fi
456    
457     %preun
458     if [ "$1" = 0 ]; then
459     # Remove update-alternatives entry
460     %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsc
461     fi
462    
463     %preun X
464     if [ "$1" = 0 ]; then
465     # Remove update-alternatives entry
466     %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsx
467     fi
468    
469 blino 19330 %files
470     %{_bindir}/gsc
471    
472     %files X
473     %{_bindir}/gsx
474    
475     %files common
476     %dir %{_datadir}/ghostscript
477 luigiwalser 289699 %{_datadir}/ghostscript/%{gsver}
478 blino 19330 %{_mandir}/man1/*
479     %lang(de) %{_mandir}/de/man1/*
480 fwang 143159 #%{_bindir}/[a-c]*
481 blino 19330 %{_bindir}/[e-f]*
482     #{_bindir}/gs-common
483     %{_bindir}/gs[a-b]*
484     %{_bindir}/gs[d-n]*
485     %{_bindir}/[j-l]*
486     %{_bindir}/[n-z]*
487     %if %{withcupsfilters}
488     # "pstoraster" wrapper script to make GhostScript being used as the
489     # cups-internal RIP
490     %attr(0755,root,root) %{_prefix}/lib*/cups/filter/*
491     %{_datadir}/cups/model/*
492 lmenut 87327 %config(noreplace) %{_sysconfdir}/cups/gstoraster.convs
493 blino 19330 %endif
494    
495     %files doc
496 luigiwalser 289699 %doc %{_docdir}/ghostscript-doc-%{gsver}
497 blino 19330
498     %files dvipdf
499     %{_bindir}/dvipdf
500    
501     %if %{GSx11SVGAmodule}
502     %files module-X
503 blino 19364 %doc README.shared.%{_vendor}
504 luigiwalser 289699 %dir %{_libdir}/ghostscript/%{gsver}
505     %{_libdir}/ghostscript/%{gsver}/X11.so
506 blino 19330 %endif
507    
508     %files -n %{libgs}
509     %{_libdir}/libgs.so.*%{gsmajor}*
510    
511     %files -n %{libgs_devel}
512     %{_libdir}/libgs.so
513     %{_includedir}/ghostscript
514    
515     %files -n %{libijs}
516 fwang 150967 %{_libdir}/libijs-%{ijsver}.so
517 blino 19330
518     %files -n %{libijs_devel}
519     %doc ijs/README
520     %{_libdir}/libijs.so
521     %{_libdir}/pkgconfig/ijs.pc
522     %{_includedir}/ijs
523     %{_bindir}/ijs_client_example
524     %{_bindir}/ijs_server_example
525     %{_bindir}/ijs-config

  ViewVC Help
Powered by ViewVC 1.1.30