Merge lp:~stefanor/ubuntu/maverick/ghostscript/defoma-removal into lp:ubuntu/maverick/ghostscript
- Maverick (10.10)
- defoma-removal
- Merge into maverick
Proposed by
Stefano Rivera
Status: | Merged |
---|---|
Merge reported by: | James Westby |
Merged at revision: | not available |
Proposed branch: | lp:~stefanor/ubuntu/maverick/ghostscript/defoma-removal |
Merge into: | lp:ubuntu/maverick/ghostscript |
Diff against target: |
1202 lines (+63/-1013) 11 files modified
debian/changelog (+8/-0) debian/control (+1/-2) debian/dirs (+4/-3) debian/ghostscript.links (+1/-1) debian/ghostscript.postinst (+9/-15) debian/ghostscript.postrm (+0/-44) debian/ghostscript.preinst (+9/-2) debian/ghostscript.prerm (+5/-9) debian/gs.defoma (+0/-930) debian/rules (+6/-7) debian/update-gsfontmap (+20/-0) |
To merge this branch: | bzr merge lp:~stefanor/ubuntu/maverick/ghostscript/defoma-removal |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Sponsors | Pending | ||
Ubuntu branches | Pending | ||
Review via email: mp+25850@code.launchpad.net |
Commit message
Description of the change
Ghostscript is missing a defoma removal patch. The accompanying patch in gsfonts made it into Ubuntu already.
Without this, albatross FTBFS
To post a comment you must log in.
- 70. By Stefano Rivera
-
Merge Debian's defoma-removal patch from Deb Bug #582113
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2010-04-29 09:43:23 +0000 |
3 | +++ debian/changelog 2010-05-23 18:44:26 +0000 |
4 | @@ -1,3 +1,11 @@ |
5 | +ghostscript (8.71.dfsg.1-0ubuntu5.2) maverick; urgency=low |
6 | + |
7 | + * Merge changes from 8.71~dfsg2-1.1 (LP: #584597): |
8 | + - Drop defoma. |
9 | + - Add update-gsfontmap to provide cidfmap and Fontmap. |
10 | + |
11 | + -- Stefano Rivera <stefano@rivera.za.net> Sun, 23 May 2010 18:13:43 +0200 |
12 | + |
13 | ghostscript (8.71.dfsg.1-0ubuntu5.1) lucid-proposed; urgency=low |
14 | |
15 | * debian/patches/pdf-interpreter-segfault-fixes.dpatch, |
16 | |
17 | === modified file 'debian/control' |
18 | --- debian/control 2010-02-11 11:31:23 +0000 |
19 | +++ debian/control 2010-05-23 18:44:26 +0000 |
20 | @@ -15,9 +15,8 @@ |
21 | Conflicts: gs (<< 8.63), gs-esp (<< 8.63), gs-gpl (<< 8.63), gs-afpl (<< 8.63), gs-aladdin (<< 8.63), gs-cjk-resource (<< 1.20010910-1), gs-pdfencrypt (<< 7.00), gs-common (<< 8.63), ghostscript-fonts |
22 | Replaces: gs (<< 8.63), gs-esp (<< 8.63), gs-gpl (<< 8.63), gs-afpl (<< 8.63), gs-aladdin (<< 8.63), gs-pdfencrypt (<< 7.00), gs-common (<< 8.63), ghostscript-fonts |
23 | Provides: gs-pdfencrypt, postscript-viewer, gs-common |
24 | -Recommends: psfontmgr |
25 | Suggests: ghostscript-cups, ghostscript-x, hpijs |
26 | -Depends: ${shlibs:Depends}, gsfonts (>= 6.0-1), defoma, debconf | debconf-2.0, debianutils (>= 1.6), libgs8 (= ${binary:Version}), ${misc:Depends} |
27 | +Depends: ${shlibs:Depends}, gsfonts (>= 6.0-1), debconf | debconf-2.0, debianutils (>= 1.6), libgs8 (= ${binary:Version}), ${misc:Depends} |
28 | Description: The GPL Ghostscript PostScript/PDF interpreter |
29 | Ghostscript is used for PostScript/PDF preview and printing. Usually as |
30 | a back-end to a program such as ghostview, it can display PostScript and PDF |
31 | |
32 | === modified file 'debian/dirs' |
33 | --- debian/dirs 2007-05-21 13:00:21 +0000 |
34 | +++ debian/dirs 2010-05-23 18:44:26 +0000 |
35 | @@ -1,5 +1,6 @@ |
36 | usr/bin |
37 | usr/share/defoma/scripts |
38 | -etc/defoma/config |
39 | -var/lib/defoma/gs.d/dirs/fonts |
40 | -var/lib/defoma/gs.d/dirs/CMap |
41 | +etc/ghostscript/cidfmap.d |
42 | +etc/ghostscript/fontmap.d |
43 | +var/lib/ghostscript/CMap |
44 | +var/lib/ghostscript/fonts |
45 | |
46 | === modified file 'debian/ghostscript.links' |
47 | --- debian/ghostscript.links 2010-02-11 11:31:23 +0000 |
48 | +++ debian/ghostscript.links 2010-05-23 18:44:26 +0000 |
49 | @@ -1,4 +1,4 @@ |
50 | -var/lib/defoma/gs.d/dirs/CMap usr/share/ghostscript/8.71/Resource/CMap |
51 | +var/lib/ghostscript/CMap usr/share/ghostscript/8.71/Resource/CMap |
52 | var/lib/defoma/gs.d/dirs/CMap usr/share/ghostscript/CMap |
53 | usr/bin/ps2ascii usr/bin/ps2txt |
54 | usr/share/man/de/man1/ps2ps.1.gz usr/share/man/de/man1/eps2eps.1.gz |
55 | |
56 | === modified file 'debian/ghostscript.postinst' |
57 | --- debian/ghostscript.postinst 2009-05-18 23:19:49 +0000 |
58 | +++ debian/ghostscript.postinst 2010-05-23 18:44:26 +0000 |
59 | @@ -19,21 +19,15 @@ |
60 | |
61 | case "$1" in |
62 | configure) |
63 | - # /usr/bin/ps2pdf is now controlled by update-alternatives |
64 | - update-alternatives --install /usr/bin/ps2pdf \ |
65 | - ps2pdf /usr/bin/ps2pdf14 50 |
66 | - update-alternatives --install /usr/bin/ps2pdf \ |
67 | - ps2pdf /usr/bin/ps2pdf12 30 |
68 | - update-alternatives --install /usr/bin/ps2pdf \ |
69 | - ps2pdf /usr/bin/ps2pdf13 40 |
70 | - |
71 | - # Make sure the substitution file for Ghostscript exists |
72 | - if ! defoma-subst check-rule ghostscript; then |
73 | - defoma-subst new-rule ghostscript |
74 | - fi |
75 | - |
76 | - defoma-app -t update gs |
77 | - |
78 | + # /usr/bin/ps2pdf is now controlled by update-alternatives |
79 | + update-alternatives --install /usr/bin/ps2pdf \ |
80 | + ps2pdf /usr/bin/ps2pdf14 50 |
81 | + update-alternatives --install /usr/bin/ps2pdf \ |
82 | + ps2pdf /usr/bin/ps2pdf12 30 |
83 | + update-alternatives --install /usr/bin/ps2pdf \ |
84 | + ps2pdf /usr/bin/ps2pdf13 40 |
85 | + |
86 | + update-gsfontmap |
87 | ;; |
88 | |
89 | abort-upgrade|abort-remove|abort-deconfigure) |
90 | |
91 | === removed file 'debian/ghostscript.postrm' |
92 | --- debian/ghostscript.postrm 2007-05-21 13:00:21 +0000 |
93 | +++ debian/ghostscript.postrm 1970-01-01 00:00:00 +0000 |
94 | @@ -1,44 +0,0 @@ |
95 | -#! /bin/sh |
96 | -# postrm script for ghostscript |
97 | -# |
98 | -# see: dh_installdeb(1) |
99 | - |
100 | -set -e |
101 | - |
102 | -# summary of how this script can be called: |
103 | -# * <postrm> `remove' |
104 | -# * <postrm> `purge' |
105 | -# * <old-postrm> `upgrade' <new-version> |
106 | -# * <new-postrm> `failed-upgrade' <old-version> |
107 | -# * <new-postrm> `abort-install' |
108 | -# * <new-postrm> `abort-install' <old-version> |
109 | -# * <new-postrm> `abort-upgrade' <old-version> |
110 | -# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> |
111 | -# for details, see http://www.debian.org/doc/debian-policy/ or |
112 | -# the debian-policy package |
113 | - |
114 | - |
115 | -case "$1" in |
116 | - remove) |
117 | - # Remove defoma directory |
118 | - rm -rf /var/lib/defoma/gs.d |
119 | - ;; |
120 | - purge) |
121 | - # Remove defoma-related files |
122 | - rm -f /etc/defoma/ghostscript.subst-rule |
123 | - rm -f /etc/defoma/ghostscript.subst-rule~ |
124 | - ;; |
125 | - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
126 | - ;; |
127 | - *) |
128 | - echo "postrm called with unknown argument \`$1'" >&2 |
129 | - exit 1 |
130 | - |
131 | -esac |
132 | - |
133 | -# dh_installdeb will replace this with shell code automatically |
134 | -# generated by other debhelper scripts. |
135 | - |
136 | -#DEBHELPER# |
137 | - |
138 | -exit 0 |
139 | |
140 | === modified file 'debian/ghostscript.preinst' |
141 | --- debian/ghostscript.preinst 2009-01-05 12:21:45 +0000 |
142 | +++ debian/ghostscript.preinst 2010-05-23 18:44:26 +0000 |
143 | @@ -17,13 +17,20 @@ |
144 | |
145 | case "$1" in |
146 | install|upgrade) |
147 | - # Do away with update-alternative for /usr/bin/gs, we have one |
148 | - # grand unified Ghostscript now! |
149 | + # Do away with update-alternative for /usr/bin/gs, we have one |
150 | + # grand unified Ghostscript now! |
151 | if dpkg --compare-versions "$2" lt-nl "8.63.dfsg.1-1"; then |
152 | update-alternatives --remove-all gs || true |
153 | update-alternatives --remove-all gs.1 || true |
154 | fi |
155 | |
156 | + # Remove obsolete defoma files |
157 | + if dpkg --compare-versions "$2" lt-nl "8.71~dfsg1.0ubuntu5.1"; then |
158 | + rm -rf /var/lib/defoma/gs.d |
159 | + rm -f /etc/defoma/ghostscript.subst-rule |
160 | + rm -f /etc/defoma/ghostscript.subst-rule~ |
161 | + rm -f /var/lib/defoma/ghostscript.subst-cache |
162 | + fi |
163 | ;; |
164 | |
165 | abort-upgrade) |
166 | |
167 | === modified file 'debian/ghostscript.prerm' |
168 | --- debian/ghostscript.prerm 2007-05-22 21:38:21 +0000 |
169 | +++ debian/ghostscript.prerm 2010-05-23 18:44:26 +0000 |
170 | @@ -20,16 +20,12 @@ |
171 | case "$1" in |
172 | remove) |
173 | # install-info --quiet --remove /usr/info/ghostscript.info.gz |
174 | - if type defoma-app >/dev/null 2>&1; then |
175 | - defoma-app -t purge gs |
176 | - fi |
177 | - update-alternatives --remove-all ps2pdf |
178 | - ;; |
179 | + rm -f /var/lib/ghostscript/fonts/cidfmap \ |
180 | + /var/lib/ghostscript/fonts/Fontmap |
181 | + update-alternatives --remove-all ps2pdf |
182 | + ;; |
183 | upgrade) |
184 | - if type defoma-app >/dev/null 2>&1; then |
185 | - defoma-app -t clean gs |
186 | - update-alternatives --remove-all ps2pdf |
187 | - fi |
188 | + update-alternatives --remove-all ps2pdf |
189 | ;; |
190 | deconfigure) |
191 | # install-info --quiet --remove /usr/info/ghostscript.info.gz |
192 | |
193 | === removed file 'debian/gs.defoma' |
194 | --- debian/gs.defoma 2007-05-21 13:00:21 +0000 |
195 | +++ debian/gs.defoma 1970-01-01 00:00:00 +0000 |
196 | @@ -1,930 +0,0 @@ |
197 | -# |
198 | -# gs.defoma: Defoma support for Ghostscripts |
199 | -# |
200 | - |
201 | -@ACCEPT_CATEGORIES = qw(type1 type3 gsfontderivative truetype cid |
202 | - cmap psprint); |
203 | - |
204 | -package gs; |
205 | -use strict; |
206 | -use POSIX; |
207 | - |
208 | -use vars qw($DEFOMA_TEST_DIR $ROOTDIR); |
209 | - |
210 | -use Debian::Defoma::Common; |
211 | -use Debian::Defoma::Font; |
212 | -use Debian::Defoma::Id; |
213 | -use Debian::Defoma::Subst; |
214 | -import Debian::Defoma::Font; |
215 | -import Debian::Defoma::Id; |
216 | -import Debian::Defoma::Subst; |
217 | -import Debian::Defoma::Common; |
218 | - |
219 | -my $Id; |
220 | -my $IdCmap; |
221 | -my $Sb1; |
222 | -my $Sb2; |
223 | - |
224 | -my $PkgDir = "$ROOTDIR/gs.d"; |
225 | -my $CidDir = "$PkgDir/dirs/CIDFont"; |
226 | -my $CMapDir = "$PkgDir/dirs/CMap"; |
227 | -my $TTCidDir = "$PkgDir/dirs/TTCIDFont"; |
228 | -my $FontDir = "$PkgDir/dirs/fonts"; |
229 | -my $FontMap = "$FontDir/Fontmap"; # F |
230 | -my $CIDFontMap = "$FontDir/CIDFnmap"; # FF |
231 | -my $Subst4psprint = 0; |
232 | -# For Ghostscript 8 or later |
233 | -my $FAPIfmap = "$FontDir/FAPIfontmap"; # FFF |
234 | -my $Cidfmap = "$FontDir/cidfmap"; # FFFF |
235 | - |
236 | -sub init { |
237 | - unless ($Id) { |
238 | - $Id = defoma_id_open_cache(); |
239 | - } |
240 | - unless ($IdCmap) { |
241 | - $IdCmap = defoma_id_open_cache('cmap'); |
242 | - } |
243 | - unless ($Sb1) { |
244 | - $Sb1 = defoma_subst_open(rulename => 'psprint', threshold => 50, |
245 | - idobject => $Id, private => 1); |
246 | - } |
247 | - unless ($Sb2) { |
248 | - $Sb2 = defoma_subst_open(rulename => 'ghostscript', threshold => 30, |
249 | - idobject => $Id); |
250 | - } |
251 | - |
252 | - return 0; |
253 | -} |
254 | - |
255 | -sub term { |
256 | - my @list; |
257 | - my $i; |
258 | - |
259 | - if ($Id) { |
260 | - if (open(F, '>' . $FontMap) && open(FF, '>' . $CIDFontMap) && |
261 | - open(FFF, '>' . $FAPIfmap) && open(FFFF, '>' . $Cidfmap)) { |
262 | - @list = defoma_id_get_font($Id, 'installed'); |
263 | - |
264 | - foreach $i (@list) { |
265 | - next if ($Id->{2}->[$i] ne 'SrI'); |
266 | - my $c = $Id->{4}->[$i]; |
267 | - my $f; |
268 | - my @h; |
269 | - my $cmap; |
270 | - my @cmaplist; |
271 | - my $j; |
272 | - my @ch; |
273 | - my %hh; |
274 | - |
275 | - if ($c =~ /^(type1|type3|gsfontderivative)$/) { |
276 | - $f = $Id->{1}->[$i]; |
277 | - $f =~ s/^.*\///; |
278 | - # |
279 | - # Spit out $FontDir/Fontmap |
280 | - # |
281 | - print F '/', $Id->{0}->[$i], ' (', $f, ") ;\n"; |
282 | - } elsif ($c =~ /^truetype$/) { |
283 | - $f = $Id->{1}->[$i]; |
284 | - # |
285 | - # Spit out $FontDir/FAPIfontmap |
286 | - # |
287 | - # FIXME: need to support the sub font id for the collection. |
288 | - print FFF '/', $Id->{0}->[$i], ' << /Path (', $f, ') /FontType 1 /FAPI /FreeType /SubfontId ', '0' , " >> ;\n" |
289 | - } elsif ($c =~ /^(truetype-cjk|cid)$/) { |
290 | - $f = $Id->{1}->[$i]; |
291 | - @h = split(/ +/, $Id->{7}->[$i]); |
292 | - # |
293 | - # Spit out $FontDir/CIDFnmap |
294 | - # |
295 | - print FF '/', $Id->{0}->[$i], ' (', $f, ') '; |
296 | - if ($c eq 'truetype-cjk') { |
297 | - print FF '/', $h[0], '-', $h[1], '-', $h[2]; |
298 | - } |
299 | - print FF " ;\n"; |
300 | - # For Ghostscript 8 or later |
301 | - if ($c eq 'truetype-cjk') { |
302 | - my @hints = defoma_id_get_hints( $Id, $i ); |
303 | - my $cidsupplement; |
304 | - while (@hints) { |
305 | - my $var = shift @hints; |
306 | - if ($var eq "--CIDSupplement") { |
307 | - $cidsupplement = shift @hints; |
308 | - last; |
309 | - } |
310 | - } |
311 | - unless (defined $cidsupplement) { |
312 | - print STDERR "No CIDSupplement specified for $Id->{0}->[$i], defaulting to 0.\n"; |
313 | - $cidsupplement = 0; |
314 | - } |
315 | - # |
316 | - # Spit out $FontDir/cidfmap |
317 | - # |
318 | - # FIXME: need to support the sub font id for the collection. |
319 | - print FFFF '/', $Id->{0}->[$i], ' << /FileType /TrueType /Path (', $f, ') /SubfontID ', '0', ' /CSI [(', $h[6], ') ', $cidsupplement, "] >> ;\n"; |
320 | - } |
321 | - } |
322 | - } |
323 | - |
324 | - @list = defoma_id_get_font($Id, 'installed'); |
325 | - |
326 | - foreach $i (@list) { |
327 | - next if ($Id->{2}->[$i] !~ /^.[aS]/); |
328 | - |
329 | - my $c = $Id->{4}->[$i]; |
330 | - # |
331 | - # Spit out aliases |
332 | - # |
333 | - if ($c =~ /^(truetype|type1|type3|gsfontderivative)$/) { |
334 | - print F '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ; \n"; |
335 | - print FFF '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ; \n"; |
336 | - } elsif ($c =~ /^(truetype-cjk|cid)$/) { |
337 | - print FF '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ;\n"; |
338 | - print FFFF '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ;\n"; |
339 | - } |
340 | - |
341 | - } |
342 | - |
343 | - close F; |
344 | - close FF; |
345 | - close FFF; |
346 | - close FFFF; |
347 | - unlink($FontMap) unless(-s $FontMap); |
348 | - unlink($CIDFontMap) unless(-s $CIDFontMap); |
349 | - unlink($FAPIfmap) unless(-s $FAPIfmap); |
350 | - unlink($Cidfmap) unless(-s $Cidfmap); |
351 | - } |
352 | - |
353 | - defoma_id_close_cache($Id); |
354 | - $Id = 0; |
355 | - } |
356 | - if ($IdCmap) { |
357 | - defoma_id_close_cache($IdCmap); |
358 | - $IdCmap = 0; |
359 | - } |
360 | - if ($Sb1) { |
361 | - defoma_subst_close($Sb1); |
362 | - $Sb1 = 0; |
363 | - } |
364 | - if ($Sb2) { |
365 | - defoma_subst_close($Sb2); |
366 | - $Sb2 = 0; |
367 | - } |
368 | - |
369 | - return 0; |
370 | -} |
371 | - |
372 | -sub create_symlink { |
373 | - my $font = shift; |
374 | - my $dir = shift || $FontDir; |
375 | - |
376 | - if ($font =~ /^(.*)\/(.+)$/) { |
377 | - my $fontpath = $1; |
378 | - my $fontfile = $2; |
379 | - my $newfile = $dir . '/' . $fontfile; |
380 | - |
381 | - return 1 if (-e $newfile); |
382 | - |
383 | - symlink($font, $newfile) || return 1; |
384 | - } else { |
385 | - return 1; |
386 | - } |
387 | - |
388 | - return 0; |
389 | -} |
390 | - |
391 | -sub remove_symlink { |
392 | - my $font = shift; |
393 | - my $dir = shift || $FontDir; |
394 | - |
395 | - if ($font =~ /^(.*)\/(.+)$/) { |
396 | - my $fontpath = $1; |
397 | - my $fontfile = $2; |
398 | - my $newfile = $dir . '/' . $fontfile; |
399 | - |
400 | - return 1 unless (-l $newfile); |
401 | - |
402 | - unlink($newfile); |
403 | - } else { |
404 | - return 1; |
405 | - } |
406 | - |
407 | - return 0; |
408 | -} |
409 | - |
410 | -sub register_ps { |
411 | - my $id = shift; |
412 | - |
413 | - defoma_font_register('postscript', '<gs>/' . $id, @_); |
414 | -} |
415 | - |
416 | -sub unregister_ps { |
417 | - my $id = shift; |
418 | - |
419 | - if (defoma_font_if_register('postscript', '<gs>/' . $id)) { |
420 | - defoma_font_unregister('postscript', '<gs>/' . $id); |
421 | - } |
422 | -} |
423 | - |
424 | -sub t1_register { |
425 | - my $type = shift; |
426 | - my $font = shift; |
427 | - my $h = parse_hints_start(@_); |
428 | - |
429 | - my $fontname = $h->{FontName}; |
430 | - return 1 unless ($fontname); |
431 | - $fontname =~ s/ .*//; |
432 | - |
433 | - my $priority = $h->{Priority} || 0; |
434 | - |
435 | - my %add; |
436 | - $add{hints} = join(' ', @_); |
437 | - |
438 | - if ($type eq 'gsfontderivative') { |
439 | - my $ofont = $h->{'GSF-OriginFont'}; |
440 | - my $oid = $h->{'GSF-OriginID'}; |
441 | - |
442 | - if ($ofont && $oid) { |
443 | - $add{depend} = $ofont.' '.$oid; |
444 | - } else { |
445 | - return 2; |
446 | - } |
447 | - } |
448 | - |
449 | - return 3 if (create_symlink($font)); |
450 | - |
451 | - defoma_id_register($Id, type => 'real', font => $font, id => $fontname, |
452 | - priority => $priority, %add); |
453 | - |
454 | - my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : (); |
455 | - my $i; |
456 | - |
457 | - foreach $i (@alias) { |
458 | - defoma_id_register($Id, type => 'alias', font => $font, id => $i, |
459 | - priority => $priority, origin => $fontname); |
460 | - } |
461 | - |
462 | - defoma_subst_register($Sb1, $font, $fontname); |
463 | - defoma_subst_register($Sb2, $font, $fontname); |
464 | - |
465 | - return 0; |
466 | -} |
467 | - |
468 | -sub t1_unregister { |
469 | - my $font = shift; |
470 | - |
471 | - defoma_subst_unregister($Sb1, $font); |
472 | - defoma_subst_unregister($Sb2, $font); |
473 | - defoma_id_unregister($Id, type => 'alias', font => $font); |
474 | - defoma_id_unregister($Id, type => 'real', font => $font); |
475 | - |
476 | - remove_symlink($font); |
477 | - |
478 | - return 0; |
479 | -} |
480 | - |
481 | -sub t1_install { |
482 | - my $type = shift; |
483 | - my $font = shift; |
484 | - my $id = shift; |
485 | - my $depfont = shift; |
486 | - my $depid = shift; |
487 | - my @add = (); |
488 | - |
489 | - if ($type eq 'real') { |
490 | - return 0 if (grep($_ eq '--Alias', @_)); |
491 | - |
492 | - $add[0] = '--RealName'; |
493 | - } |
494 | - |
495 | - register_ps($id, @_, @add); |
496 | - |
497 | - return 0; |
498 | -} |
499 | - |
500 | -sub t1_remove { |
501 | - my $type = shift; |
502 | - my $font = shift; |
503 | - my $id = shift; |
504 | - my $depfont = shift; |
505 | - my $depid = shift; |
506 | - |
507 | - unregister_ps($id); |
508 | - |
509 | - return 0; |
510 | -} |
511 | - |
512 | -sub type1 { |
513 | - my $com = shift; |
514 | - |
515 | - if ($com eq 'register') { |
516 | - return t1_register('type1', @_); |
517 | - } elsif ($com eq 'unregister') { |
518 | - return t1_unregister(@_); |
519 | - } elsif ($com =~ /^do-install-(.*)$/) { |
520 | - return t1_install($1, @_); |
521 | - } elsif ($com =~ /^do-remove-(.*)$/) { |
522 | - return t1_remove($1, @_); |
523 | - } elsif ($com eq 'init') { |
524 | - return init(); |
525 | - } elsif ($com eq 'term') { |
526 | - return term(); |
527 | - } |
528 | - |
529 | - return 0; |
530 | -} |
531 | - |
532 | -sub type3 { |
533 | - return type1(@_); |
534 | -} |
535 | - |
536 | -sub gsfontderivative { |
537 | - my $com = shift; |
538 | - |
539 | - if ($com eq 'register') { |
540 | - return t1_register('gsfontderivative', @_); |
541 | - } else { |
542 | - return type1($com, @_); |
543 | - } |
544 | -} |
545 | - |
546 | -sub tt_register_cjk { |
547 | - my %addstr = ('Japanese' => '-Ja', |
548 | - 'Korean' => '-Ko', |
549 | - 'Chinese-China' => '-GB', |
550 | - 'Chinese-Taiwan' => '-CNS'); |
551 | - my %ordering = ('Japanese' => 'Japan1', |
552 | - 'Korean' => 'Korea1', |
553 | - 'Chinese-China' => 'GB1', |
554 | - 'Chinese-Taiwan' => 'CNS1'); |
555 | - my %coding = ('Unicode' => 'Unicode', |
556 | - 'BIG5' => 'Big5', |
557 | - 'ShiftJIS' => 'ShiftJIS', |
558 | - 'WanSung' => 'WanSung', |
559 | - 'Johab' => 'Johab'); |
560 | - |
561 | - my $cnt = shift; |
562 | - my $loc = shift; |
563 | - my $font = shift; |
564 | - my $fontname = shift; |
565 | - my $alias = shift; |
566 | - my $charset = shift; |
567 | - my $encoding = shift; |
568 | - my $priority = shift; |
569 | - |
570 | - return $cnt unless (exists($addstr{$loc}) && exists($ordering{$loc}) && |
571 | - exists($coding{$encoding})); |
572 | - my $ord = $ordering{$loc}; |
573 | - my $enc = $coding{$encoding}; |
574 | - |
575 | - my $add = ''; |
576 | - $add = $addstr{$loc} if ($cnt > 0); |
577 | - |
578 | - my @hints = ('Adobe', $ord, $enc, |
579 | - '--CIDRegistry', 'Adobe', '--CIDOrdering', $ord); |
580 | - |
581 | - defoma_id_register($Id, type => 'real', font => $font, |
582 | - id => $fontname . $add, priority => $priority, |
583 | - category => 'truetype-cjk', |
584 | - hints => join(' ', @hints, @_)); |
585 | - |
586 | - foreach my $i (@{$alias}) { |
587 | - defoma_id_register($Id, type => 'alias', font => $font, |
588 | - id => $i . $add, priority => $priority, |
589 | - category => 'truetype-cjk', |
590 | - origin => $fontname . $add); |
591 | - } |
592 | - |
593 | - defoma_subst_register($Sb1, $font, $fontname . $add); |
594 | - defoma_subst_register($Sb2, $font, $fontname . $add); |
595 | - |
596 | - $cnt++; |
597 | - return $cnt unless ($charset =~ /JISX0212/ && $loc eq 'Japanese' && |
598 | - $encoding eq 'Unicode'); |
599 | - |
600 | - $add = '-JaH'; |
601 | - @hints = ('Adobe', 'Japan2', 'Unicode', |
602 | - '--CIDRegistry', 'Adobe', '--CIDOrdering', 'Japan2'); |
603 | - |
604 | - defoma_id_register($Id, type => 'real', font => $font, |
605 | - id => $fontname . $add, priority => $priority, |
606 | - category => 'truetype-cjk', |
607 | - hints => join(' ', @hints, @_)); |
608 | - |
609 | - foreach my $i (@{$alias}) { |
610 | - defoma_id_register($Id, type => 'alias', font => $font, |
611 | - id => $i . $add, priority => $priority, |
612 | - category => 'truetype-cjk', |
613 | - origin => $fontname . $add); |
614 | - } |
615 | - |
616 | - defoma_subst_register($Sb1, $font, $fontname . $add); |
617 | - defoma_subst_register($Sb2, $font, $fontname . $add); |
618 | - |
619 | - $cnt++; |
620 | - return $cnt; |
621 | -} |
622 | - |
623 | -sub tt_register { |
624 | - my $font = shift; |
625 | - my $h = parse_hints_start(@_); |
626 | - my $i; |
627 | - |
628 | - my $fontname = $h->{FontName}; |
629 | - my $location = $h->{Location}; |
630 | - my $encoding = $h->{Encoding}; |
631 | - my $priority = $h->{Priority} || 0; |
632 | - my $charset = $h->{Charset}; |
633 | - |
634 | - return 1 unless ($fontname && $location && $encoding); |
635 | - $fontname =~ s/ .*//; |
636 | - my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : (); |
637 | - |
638 | - return 2 if (create_symlink($font)); |
639 | - |
640 | - parse_hints_cut($h, 'Encoding', 'Location', 'FontName'); |
641 | - my @hints; |
642 | - |
643 | - if ($location !~ /Japanese|Korean|Chinese/) { |
644 | - @hints = parse_hints_build($h); |
645 | - |
646 | - defoma_id_register($Id, type => 'real', font => $font, id => $fontname, |
647 | - priority => $priority, hints => join(' ', @hints)); |
648 | - |
649 | - foreach $i (@alias) { |
650 | - defoma_id_register($Id, type => 'alias', font => $font, id => $i, |
651 | - priority => $priority, origin => $fontname); |
652 | - } |
653 | - |
654 | - defoma_subst_register($Sb1, $font, $fontname); |
655 | - defoma_subst_register($Sb2, $font, $fontname); |
656 | - } else { |
657 | - parse_hints_cut($h, 'Charset'); |
658 | - @hints = parse_hints_build($h); |
659 | - |
660 | - my $loc; |
661 | - my @locs = split(/ /, $location); |
662 | - my $cnt = 0; |
663 | - |
664 | - foreach $loc (@locs) { |
665 | - $cnt = tt_register_cjk($cnt, $loc, $font, $fontname, \@alias, |
666 | - $charset, $encoding, $priority, @hints); |
667 | - } |
668 | - } |
669 | - |
670 | - return 0; |
671 | -} |
672 | - |
673 | -sub tt_unregister { |
674 | - my $font = shift; |
675 | - |
676 | - defoma_subst_unregister($Sb1, $font); |
677 | - defoma_subst_unregister($Sb2, $font); |
678 | - defoma_id_unregister($Id, type => 'alias', font => $font); |
679 | - defoma_id_unregister($Id, type => 'real', font => $font); |
680 | - |
681 | - remove_symlink($font); |
682 | - |
683 | - return 0; |
684 | -} |
685 | - |
686 | -sub tt_install { |
687 | - my $type = shift; |
688 | - my $font = shift; |
689 | - my $id = shift; |
690 | - my $depfont = shift; |
691 | - my $depid = shift; |
692 | - |
693 | - my @add = (); |
694 | - |
695 | - $add[0] = '--RealName' if ($type eq 'real'); |
696 | - |
697 | - register_ps($id, @_, @add); |
698 | - |
699 | - return 0; |
700 | -} |
701 | - |
702 | -sub tt_remove { |
703 | - my $type = shift; |
704 | - my $font = shift; |
705 | - my $id = shift; |
706 | - my $depfont = shift; |
707 | - my $depid = shift; |
708 | - |
709 | - unregister_ps($id); |
710 | - |
711 | - return 0; |
712 | -} |
713 | - |
714 | -sub truetype { |
715 | - my $com = shift; |
716 | - |
717 | - if ($com eq 'register') { |
718 | - return tt_register(@_); |
719 | - } elsif ($com eq 'unregister') { |
720 | - return tt_unregister(@_); |
721 | - } elsif ($com =~ /^do-install-(.*)$/) { |
722 | - return tt_install($1, @_); |
723 | - } elsif ($com =~ /^do-remove-(.*)$/) { |
724 | - return tt_remove($1, @_); |
725 | - } elsif ($com eq 'init') { |
726 | - return init(); |
727 | - } elsif ($com eq 'term') { |
728 | - return term(); |
729 | - } |
730 | - |
731 | - return 0; |
732 | -} |
733 | - |
734 | -sub truetype_cjk { |
735 | - my $com = shift; |
736 | - |
737 | - if ($com =~ /^do-install-(.*)$/) { |
738 | - return cid_install($1, @_); |
739 | - } elsif ($com =~ /^do-remove-(.*)$/) { |
740 | - return cid_remove($1, @_); |
741 | - } elsif ($com eq 'init') { |
742 | - return init(); |
743 | - } elsif ($com eq 'term') { |
744 | - return term(); |
745 | - } |
746 | - |
747 | - return 0; |
748 | -} |
749 | - |
750 | -sub cid_register { |
751 | - my $type = shift; |
752 | - my $font = shift; |
753 | - my $h = parse_hints_start(@_); |
754 | - |
755 | - my $fontname = $h->{FontName}; |
756 | - my $registry = $h->{CIDRegistry}; |
757 | - my $ordering = $h->{CIDOrdering}; |
758 | - my $priority = $h->{Priority} || 0; |
759 | - |
760 | - return 1 unless($fontname && $registry && $ordering); |
761 | - $fontname =~ s/ .*//; |
762 | - $registry =~ s/ .*//; |
763 | - $ordering =~ s/ .*//; |
764 | - my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : (); |
765 | - |
766 | - return 2 if (create_symlink($font)); |
767 | - |
768 | - parse_hints_cut($h, 'PSCharset', 'PSEncoding', 'Charset', 'Encoding'); |
769 | - my @hints = parse_hints_build($h); |
770 | - @hints = ($registry, $ordering, '.', @hints); |
771 | - |
772 | - defoma_id_register($Id, type => 'real', font => $font, |
773 | - id => $fontname, priority => $priority, |
774 | - category => $type, hints => join(' ', @hints)); |
775 | - |
776 | - my $i; |
777 | - foreach $i (@alias) { |
778 | - defoma_id_register($Id, type => 'alias', font => $font, id => $i, |
779 | - priority => $priority, origin => $fontname, |
780 | - category => $type); |
781 | - } |
782 | - |
783 | - defoma_subst_register($Sb1, $font, $fontname); |
784 | - defoma_subst_register($Sb2, $font, $fontname); |
785 | - |
786 | - return 0; |
787 | -} |
788 | - |
789 | -sub cid_unregister { |
790 | - my $font = shift; |
791 | - |
792 | - defoma_subst_unregister($Sb1, $font); |
793 | - defoma_subst_unregister($Sb2, $font); |
794 | - defoma_id_unregister($Id, type => 'alias', font => $font); |
795 | - defoma_id_unregister($Id, type => 'real', font => $font); |
796 | - |
797 | - remove_symlink($font); |
798 | - |
799 | - return 0; |
800 | -} |
801 | - |
802 | -sub cid_install_all { |
803 | - my $type = shift; |
804 | - my $id = shift; |
805 | - my $registry = shift; |
806 | - my $ordering = shift; |
807 | - |
808 | - my @cmaps = defoma_id_get_font($IdCmap, 'installed'); |
809 | - foreach my $c (@cmaps) { |
810 | - my @chs = split(/ +/, $IdCmap->{7}->[$c]); |
811 | - |
812 | - next if ($chs[0] ne $registry); |
813 | - next if ($chs[1] ne $ordering && $chs[1] ne 'Identity'); |
814 | - |
815 | - shift(@chs); |
816 | - shift(@chs); |
817 | - |
818 | - my $psname = $id . '-' . $IdCmap->{0}->[$c]; |
819 | - |
820 | - my @add = (); |
821 | - $add[0] = '--RealName' if ($type eq 'real'); |
822 | - |
823 | - register_ps($psname, @_, @add, @chs); |
824 | - } |
825 | - |
826 | - return 0; |
827 | -} |
828 | - |
829 | -sub cid_remove_all { |
830 | - my $type = shift; |
831 | - my $id = shift; |
832 | - my $registry = shift; |
833 | - my $ordering = shift; |
834 | - |
835 | - my @cmaps = defoma_id_get_font($IdCmap, 'installed'); |
836 | - foreach my $c (@cmaps) { |
837 | - my @chs = split(/ +/, $IdCmap->{7}->[$c]); |
838 | - |
839 | - next if ($chs[0] ne $registry); |
840 | - next if ($chs[1] ne $ordering && $chs[1] ne 'Identity'); |
841 | - |
842 | - my $psname = $id . '-' . $IdCmap->{0}->[$c]; |
843 | - |
844 | - unregister_ps($psname); |
845 | - } |
846 | - |
847 | - return 0; |
848 | -} |
849 | - |
850 | -sub cid_install { |
851 | - my $type = shift; |
852 | - my $font = shift; |
853 | - my $id = shift; |
854 | - my $depfont = shift; |
855 | - my $depid = shift; |
856 | - my $registry = shift; |
857 | - my $ordering = shift; |
858 | - my $encoding = shift; |
859 | - |
860 | - cid_install_all($type, $id, $registry, $ordering, @_); |
861 | - |
862 | - return 0; |
863 | -} |
864 | - |
865 | -sub cid_remove { |
866 | - my $type = shift; |
867 | - my $font = shift; |
868 | - my $id = shift; |
869 | - my $depfont = shift; |
870 | - my $depid = shift; |
871 | - my $registry = shift; |
872 | - my $ordering = shift; |
873 | - my $encoding = shift; |
874 | - |
875 | - cid_remove_all($type, $id, $registry, $ordering); |
876 | - |
877 | - return 0; |
878 | -} |
879 | - |
880 | -sub cid { |
881 | - my $com = shift; |
882 | - |
883 | - if ($com eq 'register') { |
884 | - return cid_register('cid', @_); |
885 | - } elsif ($com eq 'unregister') { |
886 | - return cid_unregister(@_); |
887 | - } elsif ($com =~ /^do-install-(.*)$/) { |
888 | - return cid_install($1, @_); |
889 | - } elsif ($com =~ /^do-remove-(.*)$/) { |
890 | - return cid_remove($1, @_); |
891 | - } elsif ($com eq 'init') { |
892 | - return init(); |
893 | - } elsif ($com eq 'term') { |
894 | - return term(); |
895 | - } |
896 | - |
897 | - return 0; |
898 | -} |
899 | - |
900 | -sub cmap_register { |
901 | - my $font = shift; |
902 | - |
903 | - if ($font =~ /\/gs-cjk-resource\//) { |
904 | - return 2 if (create_symlink($font, $CMapDir)); |
905 | - return 0; |
906 | - } |
907 | - |
908 | - my $h = parse_hints_start(@_); |
909 | - |
910 | - my $cmap = $h->{CMapName}; |
911 | - my $reg = $h->{CIDRegistry}; |
912 | - my $ord = $h->{CIDOrdering}; |
913 | - |
914 | - return 1 unless ($cmap && $reg && $ord); |
915 | - $reg =~ s/ .*//; |
916 | - $ord =~ s/ .*//; |
917 | - $cmap =~ s/ .*//; |
918 | - |
919 | - my @hints = ($reg, $ord, @_); |
920 | - |
921 | - defoma_id_register($IdCmap, type => 'real', font => $font, id => $cmap, |
922 | - priority => 0, hints => join(' ', @hints)); |
923 | - |
924 | - return 0; |
925 | -} |
926 | - |
927 | -sub cmap_unregister { |
928 | - my $font = shift; |
929 | - |
930 | - if ($font =~ /\/gs-cjk-resource\//) { |
931 | - remove_symlink($font, $CMapDir); |
932 | - return 0; |
933 | - } |
934 | - |
935 | - defoma_id_unregister($IdCmap, type => 'real', font => $font); |
936 | - |
937 | - return 0; |
938 | -} |
939 | - |
940 | -sub cmap_install { |
941 | - my $font = shift; |
942 | - my $cmap = shift; |
943 | - my $df = shift; |
944 | - my $di = shift; |
945 | - my $reg = shift; |
946 | - my $ord = shift; |
947 | - my %hash; |
948 | - my @nonreal = (); |
949 | - |
950 | - return 1 if (create_symlink($font, $CMapDir)); |
951 | - |
952 | - my @list = (defoma_id_get_font($Id, 'installed', f4 => 'cid'), |
953 | - defoma_id_get_font($Id, 'installed', f4 => 'truetype-cjk')); |
954 | - |
955 | - foreach my $i (@list) { |
956 | - my $type = $Id->{2}->[$i]; |
957 | - my $id = $Id->{0}->[$i]; |
958 | - |
959 | - if ($type ne 'SrI') { |
960 | - push(@nonreal, $i); |
961 | - next; |
962 | - } |
963 | - |
964 | - my @hints = split(/ +/, $Id->{7}->[$i]); |
965 | - |
966 | - next if ($hints[0] ne $reg); |
967 | - next if ($hints[1] ne $ord && $ord ne 'Identity'); |
968 | - |
969 | - $hash{$id} = $i; |
970 | - |
971 | - shift(@hints); |
972 | - shift(@hints); |
973 | - shift(@hints); |
974 | - |
975 | - my $psname = $id . '-' . $cmap; |
976 | - |
977 | - register_ps($psname, @hints, '--RealName', @_); |
978 | - } |
979 | - |
980 | - foreach my $i (@nonreal) { |
981 | - my $depid = $Id->{5}->[$i]; |
982 | - next unless (exists($hash{$depid})); |
983 | - |
984 | - my @hints = split(/ +/, $Id->{7}->[$hash{$depid}]); |
985 | - |
986 | - next if ($hints[0] ne $reg); |
987 | - next if ($hints[1] ne $ord && $ord ne 'Identity'); |
988 | - |
989 | - shift(@hints); |
990 | - shift(@hints); |
991 | - shift(@hints); |
992 | - |
993 | - my $psname = $Id->{0}->[$i] . '-' . $cmap; |
994 | - |
995 | - register_ps($psname, @hints, @_); |
996 | - } |
997 | - |
998 | - return 0; |
999 | -} |
1000 | - |
1001 | -sub cmap_remove { |
1002 | - my $font = shift; |
1003 | - my $cmap = shift; |
1004 | - my $df = shift; |
1005 | - my $di = shift; |
1006 | - my $reg = shift; |
1007 | - my $ord = shift; |
1008 | - my %hash; |
1009 | - |
1010 | - remove_symlink($font, $CMapDir); |
1011 | - |
1012 | - my @list = (defoma_id_get_font($Id, 'installed', f4 => 'cid'), |
1013 | - defoma_id_get_font($Id, 'installed', f4 => 'truetype-cjk')); |
1014 | - |
1015 | - foreach my $i (@list) { |
1016 | - my @hints = split(/ +/, $Id->{7}->[$i]); |
1017 | - |
1018 | - if (@hints > 0) { |
1019 | - next if ($hints[0] ne $reg); |
1020 | - next if ($hints[1] ne $ord && $ord ne 'Identity'); |
1021 | - } |
1022 | - |
1023 | - my $psname = $Id->{0}->[$i] . '-' . $cmap; |
1024 | - |
1025 | - unregister_ps($psname); |
1026 | - } |
1027 | - |
1028 | - return 0; |
1029 | -} |
1030 | - |
1031 | -sub cmap { |
1032 | - my $com = shift; |
1033 | - |
1034 | - if ($com eq 'register') { |
1035 | - return cmap_register(@_); |
1036 | - } elsif ($com eq 'unregister') { |
1037 | - return cmap_unregister(@_); |
1038 | - } elsif ($com eq 'do-install-real') { |
1039 | - return cmap_install(@_); |
1040 | - } elsif ($com eq 'do-remove-real') { |
1041 | - return cmap_remove(@_); |
1042 | - } elsif ($com eq 'init') { |
1043 | - return init(); |
1044 | - } elsif ($com eq 'term') { |
1045 | - return term(); |
1046 | - } |
1047 | - |
1048 | - return 0; |
1049 | -} |
1050 | - |
1051 | -sub psprint_register { |
1052 | - my $font = shift; |
1053 | - return 0 unless ($Subst4psprint); |
1054 | - return 1 if ($font !~ /(.+)\/(.+)/); |
1055 | - |
1056 | - return 0 if ($1 eq '<gs>'); |
1057 | - my $fontname = $2; |
1058 | - |
1059 | - return 2 if ($Sb1->grep_rule('', $fontname)); |
1060 | - |
1061 | - my @hints; |
1062 | - my $h = parse_hints_start(@_); |
1063 | - my $cset = $h->{PSCharset}; |
1064 | - my $enc = $h->{PSEncoding}; |
1065 | - |
1066 | - if ($cset && $enc && $cset =~ /^Adobe-([^-]+).*$/) { |
1067 | - my $ord = $1; |
1068 | - $fontname =~ s/-$enc$//; |
1069 | - |
1070 | - parse_hints_cut($h, 'PSCharset', 'PSEncoding', 'Charset', 'Encoding', |
1071 | - 'Direction'); |
1072 | - @hints = parse_hints_build($h); |
1073 | - push(@hints, '--CIDRegistry,*', 'Adobe', '--CIDOrdering,*', $ord); |
1074 | - } else { |
1075 | - @hints = @_; |
1076 | - } |
1077 | - |
1078 | - for my $i (@hints) { |
1079 | - $i = '--Charset,*' if ($i eq '--Charset'); |
1080 | - $i = '--Encoding,*' if ($i eq '--Encoding'); |
1081 | - $i = '--Direction,*' if ($i eq '--Direction'); |
1082 | - $i = '--Shape,2' if ($i eq '--Shape'); |
1083 | - } |
1084 | - |
1085 | - defoma_subst_add_rule($Sb1, $fontname, @hints); |
1086 | - |
1087 | - return 0; |
1088 | -} |
1089 | - |
1090 | -sub psprint_unregister { |
1091 | - my $font = shift; |
1092 | - return 0 if ($font !~ /(.+)\/(.+)/); |
1093 | - |
1094 | - return 0 if ($1 eq '<gs>'); |
1095 | - my $fontname = $2; |
1096 | - |
1097 | - my $h = parse_hints_start(@_); |
1098 | - my $cset = $h->{PSCharset}; |
1099 | - my $enc = $h->{PSEncoding}; |
1100 | - |
1101 | - if ($cset && $enc && $cset =~ /^Adobe-.*$/) { |
1102 | - $fontname =~ s/-$enc$//; |
1103 | - } |
1104 | - |
1105 | - defoma_subst_remove_rule($Sb1, $fontname); |
1106 | - |
1107 | - return 0; |
1108 | -} |
1109 | - |
1110 | -sub psprint { |
1111 | - my $com = shift; |
1112 | - |
1113 | - if ($com eq 'register') { |
1114 | - return psprint_register(@_); |
1115 | - } elsif ($com eq 'unregister') { |
1116 | - return psprint_unregister(@_); |
1117 | - } elsif ($com eq 'init') { |
1118 | - return init(); |
1119 | - } elsif ($com eq 'term') { |
1120 | - return term(); |
1121 | - } |
1122 | - |
1123 | - return 0; |
1124 | -} |
1125 | - |
1126 | -1; |
1127 | |
1128 | === modified file 'debian/rules' |
1129 | --- debian/rules 2009-09-18 15:37:23 +0000 |
1130 | +++ debian/rules 2010-05-23 18:44:26 +0000 |
1131 | @@ -27,7 +27,7 @@ |
1132 | --with-ijs --with-jbig2dec --with-jasper --with-x --disable-gtk \ |
1133 | --enable-dynamic --with-omni --enable-cups --disable-compile-inits \ |
1134 | --disable-cairo --with-drivers=ALL \ |
1135 | - --with-fontpath=/var/lib/defoma/gs.d/dirs/fonts:/usr/share/cups/fonts:/usr/share/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/fonts |
1136 | + --with-fontpath=/var/lib/ghostscript/fonts:/usr/share/cups/fonts:/usr/share/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/fonts |
1137 | DEB_MAKE_BUILD_TARGET := STDDIRS $(FT_OPTS) |
1138 | DEB_MAKE_INSTALL_TARGET := soinstall install-shared install-cups install-contrib-extras \ |
1139 | DESTDIR=$(CURDIR)/debian/ghostscript \ |
1140 | @@ -52,7 +52,7 @@ |
1141 | -cd jasper && $(MAKE) distclean |
1142 | [ ! -f Makefile ] || $(MAKE) soclean |
1143 | [ ! -f Makefile ] || $(MAKE) distclean |
1144 | - # These are somehow left... |
1145 | + # These are somehow left... |
1146 | -rm -rf sobin soobj cups/pstopxl cups/pstoraster |
1147 | |
1148 | build/ghostscript:: |
1149 | @@ -76,9 +76,6 @@ |
1150 | rmdir --ignore-fail-on-non-empty $(CURDIR)/debian/ghostscript/etc/cups |
1151 | rmdir --ignore-fail-on-non-empty $(CURDIR)/debian/ghostscript/etc |
1152 | |
1153 | - # Install Defoma script |
1154 | - install -m 644 $(CURDIR)/debian/gs.defoma $(CURDIR)/debian/ghostscript/usr/share/defoma/scripts |
1155 | - |
1156 | # Remove some of the scripts |
1157 | rm $(CURDIR)/debian/ghostscript/usr/bin/unix-lpr.sh $(CURDIR)/debian/ghostscript/usr/bin/lprsetup.sh $(CURDIR)/debian/ghostscript/usr/bin/pv.sh $(CURDIR)/debian/ghostscript/usr/bin/fixmswrd.pl |
1158 | |
1159 | @@ -89,14 +86,16 @@ |
1160 | rm -f $(CURDIR)/debian/ghostscript/usr/bin/gsx |
1161 | |
1162 | # Do not include the shipped Fontmaps, since Fontmaps will be |
1163 | - # automatically generated by Defoma. |
1164 | - # You may find them in /var/lib/defoma/gs.d/dirs/fonts/ |
1165 | + # automatically generated by update-gsfontmap. |
1166 | + # You may find them in /var/lib/ghostscript/fonts/ |
1167 | GSVERSION=`ls -1 $(CURDIR)/debian/ghostscript/usr/share/ghostscript/ | head -1`; \ |
1168 | rm -f $(CURDIR)/debian/ghostscript/usr/share/ghostscript/$$GSVERSION/Resource/Init/Fontmap*; \ |
1169 | rm -f $(CURDIR)/debian/ghostscript/usr/share/ghostscript/$$GSVERSION/Resource/Init/cidfmap |
1170 | |
1171 | # Rename /usr/bin/gsc, to not conflict with gambc |
1172 | mv $(CURDIR)/debian/ghostscript/usr/bin/gsc $(CURDIR)/debian/ghostscript/usr/bin/gs |
1173 | + mkdir -p $(CURDIR)/debian/ghostscript/usr/sbin/ |
1174 | + install -m 755 debian/update-gsfontmap $(CURDIR)/debian/ghostscript/usr/sbin/ |
1175 | |
1176 | # Some convenience links |
1177 | ln -s /usr/bin/gs $(CURDIR)/debian/ghostscript/usr/bin/ghostscript |
1178 | |
1179 | === added file 'debian/update-gsfontmap' |
1180 | --- debian/update-gsfontmap 1970-01-01 00:00:00 +0000 |
1181 | +++ debian/update-gsfontmap 2010-05-23 18:44:26 +0000 |
1182 | @@ -0,0 +1,20 @@ |
1183 | +#!/bin/sh |
1184 | +# update-gsfontmap |
1185 | +# Copyright 2010 Kenshi Muto <kmuto@debian.org> |
1186 | +# License: GPL |
1187 | + |
1188 | +CIDFMAP=/var/lib/ghostscript/fonts/cidfmap |
1189 | +FONTMAP=/var/lib/ghostscript/fonts/Fontmap |
1190 | +CIDFDIR=/etc/ghostscript/cidfmap.d/ |
1191 | +FONTMDIR=/etc/ghostscript/fontmap.d/ |
1192 | + |
1193 | +rm -f $CIDFMAP $FONTMAP |
1194 | +touch $CIDFMAP $FONTMAP |
1195 | + |
1196 | +for i in $CIDFDIR/*.conf; do |
1197 | + cat $i >> $CIDFMAP |
1198 | +done 2>/dev/null |
1199 | + |
1200 | +for i in $FONTMDIR/*.conf; do |
1201 | + cat $i >> $FONTMAP |
1202 | +done 2>/dev/null |