1 |
commit: 1393c21c9de2d431a071332b45d5460fcb26ead1 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 8 17:56:13 2017 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 8 17:56:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1393c21c |
7 |
|
8 |
dev-tex/pgf: Add pgfsys-luatex.def file from Norbert Preining on the TeX Live mailing list. |
9 |
|
10 |
Fixes building documents using pgf/tikz with luatex. Bug #607642. |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
dev-tex/pgf/files/pgfsys-luatex.def | 431 ++++++++++++++++++++++++++++++++++++ |
15 |
dev-tex/pgf/pgf-3.0.1-r1.ebuild | 44 ++++ |
16 |
2 files changed, 475 insertions(+) |
17 |
|
18 |
diff --git a/dev-tex/pgf/files/pgfsys-luatex.def b/dev-tex/pgf/files/pgfsys-luatex.def |
19 |
new file mode 100644 |
20 |
index 0000000000..4e00695f38 |
21 |
--- /dev/null |
22 |
+++ b/dev-tex/pgf/files/pgfsys-luatex.def |
23 |
@@ -0,0 +1,431 @@ |
24 |
+% Copyright 2006 by Till Tantau |
25 |
+% |
26 |
+% This file may be distributed and/or modified |
27 |
+% |
28 |
+% 1. under the LaTeX Project Public License and/or |
29 |
+% 2. under the GNU Public License. |
30 |
+% |
31 |
+% See the file doc/generic/pgf/licenses/LICENSE for more details. |
32 |
+ |
33 |
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-luatex.def,v 1.35 2014/10/11 09:23:31 vibrovski Exp $ |
34 |
+ |
35 |
+ |
36 |
+% Driver commands for pdf |
37 |
+ |
38 |
+% |
39 |
+% Load common pdf commands: |
40 |
+% |
41 |
+\input pgfsys-common-pdf.def |
42 |
+ |
43 |
+% |
44 |
+% pdftex-specific stuff: |
45 |
+% |
46 |
+\def\pgfsys@invoke#1{\pdfextension literal{#1}} |
47 |
+ |
48 |
+% Synced hboxes |
49 |
+\def\pgfsys@hboxsynced#1{% |
50 |
+ {% |
51 |
+ \pgfsys@beginscope% |
52 |
+ \setbox\pgf@hbox=\hbox{% |
53 |
+ \hskip\pgf@pt@x% |
54 |
+ \raise\pgf@pt@y\hbox{% |
55 |
+ \pgf@pt@x=0pt% |
56 |
+ \pgf@pt@y=0pt% |
57 |
+ \pgflowlevelsynccm% |
58 |
+ \pgfsys@hbox#1}% |
59 |
+ \hss% |
60 |
+ }% |
61 |
+ \wd\pgf@hbox=0pt% |
62 |
+ \ht\pgf@hbox=0pt% |
63 |
+ \dp\pgf@hbox=0pt% |
64 |
+ \box\pgf@hbox% |
65 |
+ \pgfsys@endscope% |
66 |
+ }% |
67 |
+} |
68 |
+ |
69 |
+ |
70 |
+ |
71 |
+\def\pgfsys@imagesuffixlist{.pdf:.jpg:.jpeg:.png:} |
72 |
+\def\pgfsys@defineimage{% width, height, page number |
73 |
+ \ifx\pgf@imagewidth\pgfutil@empty\else\edef\pgf@imagewidth{ width \pgf@imagewidth }\fi% |
74 |
+ \ifx\pgf@imageheight\pgfutil@empty\else\edef\pgf@imageheight{ height \pgf@imageheight }\fi% |
75 |
+ \ifx\pgf@imagepage\pgfutil@empty\else\edef\pgf@imagepage{ page \pgf@imagepage }\fi% |
76 |
+ \ifx\saveimageresource\@undefined% old version of lualatex |
77 |
+ \ifx\pgf@imagepage\pgfutil@empty\else% |
78 |
+ \pgfwarning{Page selection not supported. Ignoring page selection}% |
79 |
+ \fi% |
80 |
+ \setbox\pgfutil@tempboxa=\hbox{% |
81 |
+ \pdfimage \pgf@imageheight \pgf@imagewidth {\pgf@filename}}% |
82 |
+ \pdfform\pgfutil@tempboxa% |
83 |
+ \edef\pgf@image{\noexpand\pdfrefform\the\pdflastform}% |
84 |
+ \else% new version |
85 |
+ {\saveimageresource \pgf@imageheight \pgf@imagewidth attr |
86 |
+ {/Interpolate \pgf@imageinterpolate\space\pgf@imagemask} \pgf@imagepage |
87 |
+ {\pgf@filename}}% |
88 |
+ \edef\pgf@image{\noexpand\useimageresource\the\lastsavedimageresourceindex}% |
89 |
+ \fi |
90 |
+}% |
91 |
+\def\pgfsys@definemask#1{% |
92 |
+ \ifx\pgf@maskmatte\pgfutil@empty% |
93 |
+ \else% |
94 |
+ \edef\pgf@maskmatte{/Matte [\pgf@maskmatte]}% |
95 |
+ \fi% |
96 |
+ \edef\pgf@attr{{\pgf@maskmatte\space /Decode [1 0]}}% |
97 |
+ \immediate\saveimageresource attr \pgf@attr {\pgf@filename}% |
98 |
+ \edef\pgf@mask{/SMask \the\lastsavedimageresourceindex\space 0 R}% |
99 |
+} |
100 |
+\def\pgfsys@horishading#1#2#3{% |
101 |
+ {% |
102 |
+ \pgf@parsefunc{#3}% |
103 |
+ \pgfmathparse{#2}% |
104 |
+ \setbox\pgfutil@tempboxa=\hbox to\pgf@max{\vbox to\pgfmathresult pt{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% |
105 |
+ \pgf@process{\pgfpoint{\pgf@max}{#2}}% |
106 |
+ \immediate\saveboxresource resources {% |
107 |
+ /Shading << /Sh << /ShadingType 2 |
108 |
+ /ColorSpace /DeviceRGB |
109 |
+ /Domain [\pgf@pdfparseddomain] |
110 |
+ /Coords [\pgf@doma\space0 \pgf@domb\space0] |
111 |
+ /Function \pgf@pdfparsedfunction |
112 |
+ /Extend [false false] >> >>}\pgfutil@tempboxa% << |
113 |
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\useboxresource\the\lastsavedboxresourceindex}% |
114 |
+ }% |
115 |
+} |
116 |
+\def\pgfsys@vertshading#1#2#3{% |
117 |
+ {% |
118 |
+ \pgf@parsefunc{#3}% |
119 |
+ \pgfmathparse{#2}% |
120 |
+ \setbox\pgfutil@tempboxa=\hbox to\pgfmathresult pt{\vbox to\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% |
121 |
+ \pgf@process{\pgfpoint{#2}{\pgf@max}}% |
122 |
+ \immediate\saveboxresource resources {% |
123 |
+ /Shading << /Sh << /ShadingType 2 |
124 |
+ /ColorSpace /DeviceRGB |
125 |
+ /Domain [\pgf@pdfparseddomain] |
126 |
+ /Coords [0 \pgf@doma\space0 \pgf@domb] |
127 |
+ /Function \pgf@pdfparsedfunction |
128 |
+ /Extend [false false] >> >>}\pgfutil@tempboxa% << |
129 |
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\useboxresource\the\lastsavedboxresourceindex}% |
130 |
+ }% |
131 |
+} |
132 |
+\def\pgfsys@radialshading#1#2#3{% |
133 |
+ {% |
134 |
+ \pgf@parsefunc{#3}% |
135 |
+ \setbox\pgfutil@tempboxa=\hbox to2\pgf@max{\vbox to2\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% |
136 |
+ \pgf@process{#2}% |
137 |
+ \pgf@xa=\pgf@x% |
138 |
+ \pgf@ya=\pgf@y% |
139 |
+ \pgf@process{\pgfpoint{\pgf@max}{\pgf@max}}% |
140 |
+ \advance\pgf@xa by \pgf@x% |
141 |
+ \advance\pgf@ya by \pgf@y% |
142 |
+ \pgf@sys@bp@correct{\pgf@x}% |
143 |
+ \pgf@sys@bp@correct{\pgf@y}% |
144 |
+ \pgf@sys@bp@correct{\pgf@xa}% |
145 |
+ \pgf@sys@bp@correct{\pgf@ya}% |
146 |
+ \immediate\saveboxresource resources {% |
147 |
+ /Shading << /Sh << /ShadingType 3 |
148 |
+ /ColorSpace /DeviceRGB |
149 |
+ /Domain [\pgf@pdfparseddomain] |
150 |
+ /Coords [\pgf@sys@tonumber{\pgf@xa} \pgf@sys@tonumber{\pgf@ya} \pgf@doma\space \pgf@sys@tonumber{\pgf@x} \pgf@sys@tonumber{\pgf@y} \pgf@domb] |
151 |
+ /Function \pgf@pdfparsedfunction |
152 |
+ /Extend [true false] >> >>}\pgfutil@tempboxa% << |
153 |
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\useboxresource\the\lastsavedboxresourceindex}% |
154 |
+ }% |
155 |
+}% |
156 |
+\def\pgfsys@functionalshading#1#2#3#4{% |
157 |
+ {% |
158 |
+ \pgf@process{#2}% |
159 |
+ \pgf@xa=\pgf@x% |
160 |
+ \pgf@ya=\pgf@y% |
161 |
+ \pgf@process{#3}% |
162 |
+ \pgf@xb=\pgf@x% |
163 |
+ \pgf@yb=\pgf@y% |
164 |
+ \advance\pgf@x by-\pgf@xa% |
165 |
+ \advance\pgf@y by-\pgf@ya% |
166 |
+ \setbox\pgfutil@tempboxa=\hbox to\pgf@x{\vbox to\pgf@y{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% |
167 |
+ \pgf@sys@bp@correct{\pgf@xa}% |
168 |
+ \pgf@sys@bp@correct{\pgf@ya}% |
169 |
+ \pgf@sys@bp@correct{\pgf@xb}% |
170 |
+ \pgf@sys@bp@correct{\pgf@yb}% |
171 |
+ \pgf@xc=-\pgf@xa% |
172 |
+ \pgf@yc=-\pgf@ya% |
173 |
+ % Now build the function |
174 |
+ \pdfextension obj |
175 |
+ stream |
176 |
+ attr |
177 |
+ { |
178 |
+ /FunctionType 4 |
179 |
+ /Domain [\pgf@sys@tonumber{\pgf@xa}\space\pgf@sys@tonumber{\pgf@xb}\space\pgf@sys@tonumber{\pgf@ya}\space\pgf@sys@tonumber{\pgf@yb}] |
180 |
+ /Range [0 1 0 1 0 1] |
181 |
+ } |
182 |
+ {{#4}}% |
183 |
+ \edef\pgf@temp@num{\the\numexpr\pdffeedback lastobj\relax}% |
184 |
+ \saveboxresource resources {% |
185 |
+ /Shading << /Sh << /ShadingType 1 |
186 |
+ /ColorSpace /DeviceRGB |
187 |
+ /Matrix [1 0 0 1 \pgf@sys@tonumber{\pgf@xc}\space\pgf@sys@tonumber{\pgf@yc}] |
188 |
+ /Domain [\pgf@sys@tonumber{\pgf@xa}\space\pgf@sys@tonumber{\pgf@xb}\space\pgf@sys@tonumber{\pgf@ya}\space\pgf@sys@tonumber{\pgf@yb}] |
189 |
+ /Function \pgf@temp@num\space 0 R |
190 |
+ >> >>}\pgfutil@tempboxa% << |
191 |
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{% |
192 |
+ \leavevmode% |
193 |
+ \noexpand\useboxresource\the\lastsavedboxresourceindex% |
194 |
+ \noexpand\pdfextension refobj \pgf@temp@num% |
195 |
+ }% |
196 |
+ }% |
197 |
+} |
198 |
+ |
199 |
+ |
200 |
+ |
201 |
+% Patterns |
202 |
+ |
203 |
+\def\pgfsys@declarepattern#1#2#3#4#5#6#7#8#9{% |
204 |
+ % Start building the pattern dictionary: |
205 |
+ \pgf@xa=#2\relax% |
206 |
+ \pgf@ya=#3\relax% |
207 |
+ \pgf@xb=#4\relax% |
208 |
+ \pgf@yb=#5\relax% |
209 |
+ \pgf@xc=#6\relax% |
210 |
+ \pgf@yc=#7\relax% |
211 |
+ \pgf@sys@bp@correct\pgf@xa% |
212 |
+ \pgf@sys@bp@correct\pgf@ya% |
213 |
+ \pgf@sys@bp@correct\pgf@xb% |
214 |
+ \pgf@sys@bp@correct\pgf@yb% |
215 |
+ \pgf@sys@bp@correct\pgf@xc% |
216 |
+ \pgf@sys@bp@correct\pgf@yc% |
217 |
+ % Now create the pattern object: |
218 |
+ \immediate\pdfextension obj stream |
219 |
+ attr |
220 |
+ { |
221 |
+ /Type /Pattern |
222 |
+ /PatternType 1 |
223 |
+ /PaintType \ifnum#9=0 2 \else 1 \fi |
224 |
+ /TilingType 1 |
225 |
+ /BBox [\pgf@sys@tonumber\pgf@xa\space\pgf@sys@tonumber\pgf@ya\space\pgf@sys@tonumber\pgf@xb\space\pgf@sys@tonumber\pgf@yb] |
226 |
+ /XStep \pgf@sys@tonumber\pgf@xc\space |
227 |
+ /YStep \pgf@sys@tonumber\pgf@yc\space |
228 |
+ /Resources << >> %<< |
229 |
+ } |
230 |
+ {#8}% |
231 |
+ \pgfutil@addpdfresource@patterns{/pgfpat#1\space \the\numexpr\pdffeedback lastobj\relax\space 0 R}% |
232 |
+} |
233 |
+ |
234 |
+\def\pgfsys@setpatternuncolored#1#2#3#4{% |
235 |
+ \pgfsysprotocol@literal{/pgfprgb cs #2 #3 #4 /pgfpat#1\space scn}% |
236 |
+} |
237 |
+ |
238 |
+\def\pgfsys@setpatterncolored#1{% |
239 |
+ \pgfsysprotocol@literal{/Pattern cs /pgfpat#1\space scn}% |
240 |
+} |
241 |
+ |
242 |
+% System layer for meta patterns |
243 |
+% Takes 15(!) arguments |
244 |
+% #1 pattern name |
245 |
+% #2 #3 bounding box lower left |
246 |
+% #4 #5 bounding box upper right |
247 |
+% #6 #7 tile size |
248 |
+% #8 #9 #10 #11 #12 #13 transformation matrix |
249 |
+% #14 protocoled text |
250 |
+% #15 pattern type |
251 |
+\def\pgfsys@declarepattern@meta#1#2#3#4#5#6#7{% |
252 |
+ % Start building the pattern dictionary: |
253 |
+ \pgf@xa=#2\relax% |
254 |
+ \pgf@ya=#3\relax% |
255 |
+ \pgf@xb=#4\relax% |
256 |
+ \pgf@yb=#5\relax% |
257 |
+ \pgf@xc=#6\relax% |
258 |
+ \pgf@yc=#7\relax% |
259 |
+ \pgf@sys@bp@correct\pgf@xa% |
260 |
+ \pgf@sys@bp@correct\pgf@ya% |
261 |
+ \pgf@sys@bp@correct\pgf@xb% |
262 |
+ \pgf@sys@bp@correct\pgf@yb% |
263 |
+ \pgf@sys@bp@correct\pgf@xc% |
264 |
+ \pgf@sys@bp@correct\pgf@yc% |
265 |
+ \pgfsys@@declarepattern@meta{#1}} |
266 |
+ |
267 |
+\def\pgfsys@@declarepattern@meta#1#2#3#4#5#6#7#8#9{% |
268 |
+ \pgfutil@tempdima=#6\relax% |
269 |
+ \pgfutil@tempdimb=#7\relax% |
270 |
+ \pgf@sys@bp@correct\pgf@xa% |
271 |
+ \pgf@sys@bp@correct\pgf@ya% |
272 |
+ % Now create the pattern object: |
273 |
+ \immediate\pdfextension obj stream |
274 |
+ attr |
275 |
+ { |
276 |
+ /Type /Pattern |
277 |
+ /PatternType 1 |
278 |
+ /PaintType \ifnum#9=0 2 \else 1 \fi |
279 |
+ /TilingType 1 |
280 |
+ /BBox [\pgf@sys@tonumber\pgf@xa\space\pgf@sys@tonumber\pgf@ya\space\pgf@sys@tonumber\pgf@xb\space\pgf@sys@tonumber\pgf@yb] |
281 |
+ /XStep \pgf@sys@tonumber\pgf@xc\space |
282 |
+ /YStep \pgf@sys@tonumber\pgf@yc\space |
283 |
+ /Matrix [#2\space#3\space#4\space#5\space\pgf@sys@tonumber\pgfutil@tempdima\space\pgf@sys@tonumber\pgfutil@tempdimb] |
284 |
+ /Resources << >> %<< |
285 |
+ } |
286 |
+ {#8}% |
287 |
+ \pgfutil@addpdfresource@patterns{/pgfpat#1\space \the\numexpr\pdffeedback lastobj\relax\space 0 R}% |
288 |
+ } |
289 |
+ |
290 |
+ |
291 |
+ |
292 |
+\def\pgfsys@papersize#1#2{\pageheight#2\relax\pagewidth#1\relax} |
293 |
+ |
294 |
+\def\pgfsys@global@papersize#1#2{\global\pageheight#2\relax\global\pagewidth#1\relax} |
295 |
+ |
296 |
+\ifx\paperheight\@undefined |
297 |
+ \def\pgfsys@thepageheight{\pageheight} |
298 |
+ \def\pgfsys@thepagewidth{\pagewidth} |
299 |
+\fi |
300 |
+ |
301 |
+ |
302 |
+% |
303 |
+% Position tracking |
304 |
+% |
305 |
+\def\pgfsys@markposition#1{% |
306 |
+ \savepos% |
307 |
+ \edef\pgf@temp{#1}% |
308 |
+ \expandafter\pgfutil@writetoaux\expandafter{% |
309 |
+ \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\lastxpos}{\the\lastypos}}% |
310 |
+} |
311 |
+ |
312 |
+\def\pgfsyspdfmark#1#2#3{% |
313 |
+ \expandafter\gdef\csname pgf@sys@pdf@mark@pos@#1\endcsname{\pgfqpoint{#2sp}{#3sp}}% |
314 |
+ \pgfutil@check@rerun{#1}{{#2}{#3}}% |
315 |
+} |
316 |
+ |
317 |
+\def\pgfsys@getposition#1#2{% |
318 |
+ \edef\pgf@marshal{\let\noexpand#2=\expandafter\noexpand\csname pgf@sys@pdf@mark@pos@#1\endcsname}% |
319 |
+ \pgf@marshal% |
320 |
+} |
321 |
+ |
322 |
+\def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfqpoint{\hoffset}{\voffset}} |
323 |
+ |
324 |
+ |
325 |
+% |
326 |
+% Opacity masks |
327 |
+% |
328 |
+\def\pgfsys@fadingfrombox#1#2{% |
329 |
+ {% |
330 |
+ \pgf@sys@pdf@check@resources% |
331 |
+ \pgf@x=-.5\wd#2% |
332 |
+ \pgf@y=-.5\ht#2% |
333 |
+ \advance\pgf@y by.5\dp#2% |
334 |
+ \expandafter\xdef\csname pgfsmasktrans@#1\endcsname{% |
335 |
+ \noexpand\pgftransformcm{1}{0}{0}{1}{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}% |
336 |
+ \saveboxresource resources { \pgf@sys@pdf@possible@resources } #2% |
337 |
+ \expandafter\xdef\csname pgfsmaskxform@#1\endcsname{\the\lastsavedboxresourceindex}% |
338 |
+ }% |
339 |
+} |
340 |
+\def\pgfsys@usefading#1#2#3#4#5#6#7{% |
341 |
+ \expandafter\ifx\csname pgfsmaskxform@#1\endcsname\relax% |
342 |
+ \pgferror{Undefined fading '#1'}% |
343 |
+ \else% |
344 |
+ {% |
345 |
+ \expandafter\ifx\csname pgfsmaks@#1\endcsname\relax% |
346 |
+ \pgf@sys@pdf@install@mask{#1}% |
347 |
+ \fi% |
348 |
+ \pgftransformreset% |
349 |
+ \pgftransformcm{#2}{#3}{#4}{#5}{\pgfpoint{#6}{#7}}% |
350 |
+ \csname pgfsmasktrans@#1\endcsname% |
351 |
+ {% |
352 |
+ \pgflowlevelsynccm% |
353 |
+ \pgfsys@invoke{/pgfsmask\csname pgfsmask@#1\endcsname\space gs}% |
354 |
+ }% |
355 |
+ \pgftransforminvert% |
356 |
+ \pgflowlevelsynccm% |
357 |
+ }% |
358 |
+ \fi |
359 |
+} |
360 |
+ |
361 |
+\def\pgf@sys@pdf@install@mask#1{% |
362 |
+ \setbox\pgfutil@tempboxa=\hbox{\useboxresource\csname pgfsmaskxform@#1\endcsname} |
363 |
+ \immediate\saveboxresource% |
364 |
+ attr { |
365 |
+ /Group |
366 |
+ << |
367 |
+ /S /Transparency |
368 |
+ /CS /DeviceGray |
369 |
+ >> |
370 |
+ }% << |
371 |
+ \pgfutil@tempboxa% |
372 |
+ \pgfutil@addpdfresource@extgs{% |
373 |
+ /pgfsmask\the\lastsavedboxresourceindex\space |
374 |
+ << |
375 |
+ /SMask |
376 |
+ << |
377 |
+ /S /Luminosity |
378 |
+ /G \the\lastsavedboxresourceindex\space 0 R |
379 |
+ >> |
380 |
+ >> } %<< |
381 |
+ \expandafter\xdef\csname pgfsmask@#1\endcsname{\the\lastsavedboxresourceindex}% |
382 |
+} |
383 |
+ |
384 |
+% |
385 |
+% Transparency groups |
386 |
+% |
387 |
+\def\pgfsys@transparencygroupfrombox#1{% |
388 |
+ \pgf@sys@pdf@check@resources% |
389 |
+ \saveboxresource |
390 |
+ attr { /Group << /S /Transparency |
391 |
+ /I \ifpgfsys@transparency@group@isolated true \else false \fi |
392 |
+ /K \ifpgfsys@transparency@group@knockout true \else false \fi >> } %<< |
393 |
+ resources { \pgf@sys@pdf@possible@resources } |
394 |
+ #1% |
395 |
+ \setbox#1=\hbox{\useboxresource\lastsavedboxresourceindex}% |
396 |
+} |
397 |
+ |
398 |
+ |
399 |
+ |
400 |
+ |
401 |
+% |
402 |
+% Resource management |
403 |
+% |
404 |
+ |
405 |
+\def\pgf@sys@setuppdfresources@plain{% |
406 |
+ % This command will setup pdf resource in plain and in latex |
407 |
+ % mode. ConTeXt has its own handler |
408 |
+ % Page resources (they are kept in objects and only written at the |
409 |
+ % very end) |
410 |
+ \pdfextension obj reserveobjnum \edef\pgf@sys@pdf@extgs@objnum{\the\numexpr\pdffeedback lastobj\relax} |
411 |
+ \pdfextension obj reserveobjnum \edef\pgf@sys@pdf@pattern@objnum{\the\numexpr\pdffeedback lastobj\relax} |
412 |
+ \pdfextension obj reserveobjnum \edef\pgf@sys@pdf@colrospaces@objnum{\the\numexpr\pdffeedback lastobj\relax} |
413 |
+ \def\pgf@sys@pdf@possible@resources{% |
414 |
+ /ColorSpace \pgf@sys@pdf@colrospaces@objnum\space 0 R |
415 |
+ /Pattern \pgf@sys@pdf@pattern@objnum\space 0 R |
416 |
+ /ExtGState \pgf@sys@pdf@extgs@objnum\space 0 R |
417 |
+ } |
418 |
+ \let\pgf@sys@pdf@check@resources=\relax% |
419 |
+ \def\pgf@sys@pdf@install@pageresources{ |
420 |
+ { |
421 |
+ \edef\temp{ |
422 |
+ \pgf@sys@pdf@possible@resources |
423 |
+ } |
424 |
+ \expandafter\global\expandafter\pdfvariable pageresources\expandafter{\temp} |
425 |
+ } |
426 |
+ } |
427 |
+ \pgf@sys@pdf@install@pageresources |
428 |
+ \expandafter\pgfutil@everybye\expandafter{% |
429 |
+ \the\pgfutil@everybye% |
430 |
+ \immediate \pdfextension obj useobjnum \pgf@sys@pdf@extgs@objnum {<<\pgf@sys@pgf@resource@list@extgs>>}%<< |
431 |
+ \immediate \pdfextension obj useobjnum \pgf@sys@pdf@pattern@objnum {<<\pgf@sys@pgf@resource@list@patterns>>}%<< |
432 |
+ \immediate \pdfextension obj useobjnum \pgf@sys@pdf@colrospaces@objnum {<<\pgf@sys@pgf@resource@list@colorspaces>>}%<< |
433 |
+ } |
434 |
+ \let\pgf@sys@pgf@resource@list@extgs=\pgfutil@empty% |
435 |
+ \let\pgf@sys@pgf@resource@list@patterns=\pgfutil@empty% |
436 |
+ \let\pgf@sys@pgf@resource@list@colorspaces=\pgfutil@empty% |
437 |
+ \def\pgf@sys@addpdfresource@extgs@plain##1{\xdef\pgf@sys@pgf@resource@list@extgs{\pgf@sys@pgf@resource@list@extgs\space##1}} |
438 |
+ \def\pgf@sys@addpdfresource@patterns@plain##1{\xdef\pgf@sys@pgf@resource@list@patterns{\pgf@sys@pgf@resource@list@patterns\space##1}} |
439 |
+ \def\pgf@sys@addpdfresource@colorspaces@plain##1{\xdef\pgf@sys@pgf@resource@list@colorspaces{\pgf@sys@pgf@resource@list@colorspaces\space##1}} |
440 |
+} |
441 |
+\pgfutil@setuppdfresources % possibly call the above |
442 |
+ |
443 |
+\pgfutil@addpdfresource@colorspaces{ /pgfprgb [/Pattern /DeviceRGB] } |
444 |
+ |
445 |
+\def\pgfsys@color@unstacked#1{% |
446 |
+ \pdfextension literal{\csname\string\color@#1\endcsname}% |
447 |
+} |
448 |
+ |
449 |
+\endinput |
450 |
+ |
451 |
+ |
452 |
+%%% Local Variables: |
453 |
+%%% mode: latex |
454 |
+%%% End: |
455 |
|
456 |
diff --git a/dev-tex/pgf/pgf-3.0.1-r1.ebuild b/dev-tex/pgf/pgf-3.0.1-r1.ebuild |
457 |
new file mode 100644 |
458 |
index 0000000000..b6ab919347 |
459 |
--- /dev/null |
460 |
+++ b/dev-tex/pgf/pgf-3.0.1-r1.ebuild |
461 |
@@ -0,0 +1,44 @@ |
462 |
+# Copyright 1999-2017 Gentoo Foundation |
463 |
+# Distributed under the terms of the GNU General Public License v2 |
464 |
+# $Id$ |
465 |
+ |
466 |
+EAPI=5 |
467 |
+ |
468 |
+inherit latex-package |
469 |
+ |
470 |
+DESCRIPTION="pgf -- The TeX Portable Graphic Format" |
471 |
+HOMEPAGE="https://sourceforge.net/projects/pgf" |
472 |
+SRC_URI="mirror://sourceforge/pgf/${PN}_${PV}.tds.zip" |
473 |
+ |
474 |
+LICENSE="GPL-2 LPPL-1.3c FDL-1.2" |
475 |
+SLOT="0" |
476 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
477 |
+IUSE="doc source" |
478 |
+ |
479 |
+RDEPEND="dev-texlive/texlive-latexrecommended |
480 |
+ >=dev-tex/xcolor-2.11" |
481 |
+DEPEND="app-arch/unzip" |
482 |
+ |
483 |
+S=${WORKDIR} |
484 |
+ |
485 |
+src_install() { |
486 |
+ # Bug #607642 |
487 |
+ cp "${FILESDIR}/pgfsys-luatex.def" "${WORKDIR}/tex/generic/pgf/systemlayer/" || die |
488 |
+ |
489 |
+ insinto ${TEXMF} |
490 |
+ doins -r tex || die |
491 |
+ |
492 |
+ if use source ; then |
493 |
+ doins -r source || die |
494 |
+ fi |
495 |
+ |
496 |
+ cd "${S}/doc/generic/pgf" |
497 |
+ dodoc AUTHORS ChangeLog README || die |
498 |
+ if use doc ; then |
499 |
+ insinto /usr/share/doc/${PF}/texdoc |
500 |
+ doins pgfmanual.pdf || die |
501 |
+ doins -r images macros text-en version-* || die |
502 |
+ dosym /usr/share/doc/${PF}/texdoc ${TEXMF}/doc/latex/${PN} || die |
503 |
+ docompress -x /usr/share/doc/${PF}/texdoc/ |
504 |
+ fi |
505 |
+} |