1 |
commit: 1e4d9bfb79505198acd14497f4da8841ef7b314e |
2 |
Author: Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Oct 28 15:53:26 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 28 22:30:23 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4d9bfb |
7 |
|
8 |
media-gfx/sam2p: version bump to 0.49.3 |
9 |
|
10 |
Gentoo-bug: 585630, 598362 |
11 |
- Switch to EAPI 6 |
12 |
- Simplify ebuild |
13 |
- Update to new HOMEPAGE |
14 |
|
15 |
Signed off by: Jonathan Scruggs (j.scrugs <AT> gmail.com) |
16 |
Closes: https://github.com/gentoo/gentoo/pull/2688 |
17 |
|
18 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
19 |
|
20 |
media-gfx/sam2p/Manifest | 1 + |
21 |
.../sam2p/files/sam2p-0.49.3-build-fixes.patch | 160 +++++++++++++++++++++ |
22 |
media-gfx/sam2p/sam2p-0.49.3.ebuild | 48 +++++++ |
23 |
3 files changed, 209 insertions(+) |
24 |
|
25 |
diff --git a/media-gfx/sam2p/Manifest b/media-gfx/sam2p/Manifest |
26 |
index 639fc75..845eb43 100644 |
27 |
--- a/media-gfx/sam2p/Manifest |
28 |
+++ b/media-gfx/sam2p/Manifest |
29 |
@@ -1,2 +1,3 @@ |
30 |
DIST sam2p-0.49.1.tar.gz 562304 SHA256 d97a270e3ad4ad138378b5fcb10e489e9af48a8150f308458771808dfceb069a SHA512 58565fdcb7c450ad23c2971b70f0362dbf4ecfd8c4dedf19c25b56fc98c8799696c6ecf75d47650bc3b21f88b8454d7c4e6b206f7c0ae0e5de35d608262c1220 WHIRLPOOL 809512e56f7e0b4ac0b8a00be1da1088a1249fbccf1b59470b4e25036ffdaf36884374c7735bad6a3440166e835c02ade7f87dc9eb00b92b84382602884517d5 |
31 |
DIST sam2p-0.49.2.tar.gz 562733 SHA256 0e75d94bed380f8d8bd629f7797a0ca533b5d0b40eba2dab339146dedc1f79bf SHA512 8e4d629df192381bddf8468687c6a41d459b70788a5e9defc68d5497f855cbae838f2f6f924237b17e4a8e6fbf982fb2709615c8fb1d9c8cec5ec7ecf91ec6ce WHIRLPOOL 90ede2ba7b8f1dbc056cfdcfbaedd3cc995ccb58439050d6b4c51ab24a33f91b022110ea3a72ffe8b72e42f9104e936511fdbcdc1bf579fdac26c145ff2bb949 |
32 |
+DIST sam2p-0.49.3.tar.gz 2184864 SHA256 687210c3ccd12da646db2a6e53f2de5a3a7639a7bcb0c381a61789eca50a824d SHA512 9e9c91a2cd692e49bf73e7c197a0fcbe7df96c685636d1d00456eb8b4b847de3f4848d9bb3d9246340c479c62900ddd4e0a248257aa5e6ec6e16683c5dad54f8 WHIRLPOOL 5362348d1955f67ae6f64b72ec0d53e88e21c46d281e3e844329059f7d0f2c4a1ac2b2faeca48c1a923fbbbcff1c9732bb016192c001a2de1970197a17051f9b |
33 |
|
34 |
diff --git a/media-gfx/sam2p/files/sam2p-0.49.3-build-fixes.patch b/media-gfx/sam2p/files/sam2p-0.49.3-build-fixes.patch |
35 |
new file mode 100644 |
36 |
index 00000000..dfad65c |
37 |
--- /dev/null |
38 |
+++ b/media-gfx/sam2p/files/sam2p-0.49.3-build-fixes.patch |
39 |
@@ -0,0 +1,160 @@ |
40 |
+Fix literal suffix errors in C++14, caused by missing spaces between |
41 |
+C-strings and macros. |
42 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=585630 |
43 |
+ |
44 |
+--- a/configure.in |
45 |
++++ b/configure.in |
46 |
+@@ -81,8 +81,6 @@ |
47 |
+ dnl Checks for programs. |
48 |
+ dnl AC_PROG_CC |
49 |
+ AC_LANG_CPLUSPLUS |
50 |
+-CXXFLAGS=" " |
51 |
+-dnl ^^^ set it to non-empty, so AC_PROG_CXX won't include `-g' |
52 |
+ CCC="$CCC g++" |
53 |
+ dnl ^^^ check g++ before c++ (see acspecific.m4, grep AC_PROG_CXX) |
54 |
+ AC_PROG_CXX |
55 |
+@@ -216,7 +214,7 @@ |
56 |
+ |
57 |
+ dnl AC_PTS_RUN_OK([perl -x -S ./ccdep.pl $CXX], [], [AC_MSG_ERROR(cannot compute depends)]) |
58 |
+ rm -f Makedep |
59 |
+-AC_PTS_RUN_OK([make Makedep], [], [AC_MSG_ERROR(cannot compute depends)]) |
60 |
++AC_PTS_RUN_OK([gmake Makedep], [], [AC_MSG_ERROR(cannot compute depends)]) |
61 |
+ AC_PTS_OK |
62 |
+ echo "configure done. Now you should run: make; make install" |
63 |
+ |
64 |
+--- a/gensio.cpp |
65 |
++++ b/gensio.cpp |
66 |
+@@ -494,7 +494,7 @@ |
67 |
+ |
68 |
+ #if HAVE_PTS_POPEN |
69 |
+ if (!tmpsname) { |
70 |
+- if (NULLP==(p=popen(redir_cmd(), "w"CFG_PTS_POPEN_B))) Error::sev(Error::EERROR) << "Filter::PipeE" << ": popen() failed: " << (SimBuffer::B().appendDumpC(redir_cmd)) << (Error*)0; |
71 |
++ if (NULLP==(p=popen(redir_cmd(), "w" CFG_PTS_POPEN_B))) Error::sev(Error::EERROR) << "Filter::PipeE" << ": popen() failed: " << (SimBuffer::B().appendDumpC(redir_cmd)) << (Error*)0; |
72 |
+ signal(SIGPIPE, SIG_IGN); /* Don't abort process with SIGPIPE signals if child cannot read our data */ |
73 |
+ } else { |
74 |
+ #else |
75 |
+@@ -622,7 +622,7 @@ |
76 |
+ if (state==0) { /* Read the whole stream from `in', write it to `tmpsname' */ |
77 |
+ #if HAVE_PTS_POPEN |
78 |
+ if (!tmpsname) { |
79 |
+- if (NULLP==(p=popen(redir_cmd(), "w"CFG_PTS_POPEN_B))) Error::sev(Error::EERROR) << "Filter::PipeD" << ": popen() failed: " << (SimBuffer::B().appendDumpC(redir_cmd)) << (Error*)0; |
80 |
++ if (NULLP==(p=popen(redir_cmd(), "w" CFG_PTS_POPEN_B))) Error::sev(Error::EERROR) << "Filter::PipeD" << ": popen() failed: " << (SimBuffer::B().appendDumpC(redir_cmd)) << (Error*)0; |
81 |
+ signal(SIGPIPE, SIG_IGN); /* Don't abort process with SIGPIPE signals if child cannot read our data */ |
82 |
+ vi_precopy(); |
83 |
+ in.vi_read(0,0); |
84 |
+@@ -730,12 +730,7 @@ |
85 |
+ |
86 |
+ /* --- */ |
87 |
+ |
88 |
+- |
89 |
+-#if HAVE_lstat_in_sys_stat |
90 |
+-# define PTS_lstat lstat |
91 |
+-#else |
92 |
+ # define PTS_lstat stat |
93 |
+-#endif |
94 |
+ |
95 |
+ /** @param fname must start with '/' (dir separator) |
96 |
+ * @return true if file successfully created |
97 |
+--- a/in_ps.cpp |
98 |
++++ b/in_ps.cpp |
99 |
+@@ -137,7 +137,7 @@ |
100 |
+ // fprintf(stderr, "bbox=[%"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g]\n", llx, lly, urx, ury); |
101 |
+ /* Dat: we must call translate _after_ setpagedevice (so it will take effect), at least with ESP Ghostscript 7.05.6 (2003-02-05); BUGFIX at Fri Aug 12 22:49:07 CEST 2005 */ |
102 |
+ sprintf(bboxline, |
103 |
+- "<</PageSize[%"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g]>>setpagedevice\n" |
104 |
++ "<</PageSize[%" PTS_CFG_PRINTFGLEN "g %" PTS_CFG_PRINTFGLEN "g]>>setpagedevice\n" |
105 |
+ /* removing /PageSize also cancels /a4, /a5 etc. */ |
106 |
+ /* we need `currentmatrix ... setpagedevice setmatrix' because |
107 |
+ * setpagedevice cancels the current transformation matrix so our |
108 |
+@@ -147,7 +147,7 @@ |
109 |
+ "/setpagedevice{matrix currentmatrix exch " |
110 |
+ "dup length dict copy dup /PageSize undef setpagedevice " |
111 |
+ "setmatrix}bind def\n" |
112 |
+- "%"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g translate\n" |
113 |
++ "%" PTS_CFG_PRINTFGLEN "g %" PTS_CFG_PRINTFGLEN "g translate\n" |
114 |
+ , urx-llx, ury-lly, -llx, -lly); |
115 |
+ } else { |
116 |
+ Error::sev(Error::WARNING) << "in_eps_reader: missing EPS bbox" << (Error*)0; |
117 |
+--- a/Makefile |
118 |
++++ b/Makefile |
119 |
+@@ -17,7 +17,7 @@ |
120 |
+ export PERL_BADLANG |
121 |
+ |
122 |
+ CXXX=$(CXD_assert) |
123 |
+-LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS) |
124 |
++LDALL=$(LDXX) $(LDFLAGS) $(LIBS) |
125 |
+ ifeq ($(ENABLE_DEBUG), no) |
126 |
+ CXXX=$(CXD_no) |
127 |
+ endif |
128 |
+@@ -51,8 +51,8 @@ |
129 |
+ IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS)) |
130 |
+ IDE_TARGETS_release := $(TARGETS) |
131 |
+ |
132 |
+-CXD_assert =$(CXX) -s -O2 |
133 |
+-CXD_no =$(CXX) -s -DNDEBUG -O3 |
134 |
++CXD_assert =$(CXX) |
135 |
++CXD_no =$(CXX) -DNDEBUG |
136 |
+ # CXD_yes =$(CXX) $(GFLAG) -lefence |
137 |
+ CXD_yes =$(CXX) $(GFLAG) |
138 |
+ CXD_checker=checkerg++ $(GFLAG) |
139 |
+--- a/minips.cpp |
140 |
++++ b/minips.cpp |
141 |
+@@ -292,9 +292,9 @@ |
142 |
+ void MiniPS::Real::dump(GenBuffer::Writable &out_, bool dumpPS_force) { |
143 |
+ char buf[64]; /* Imp: should be enough?? */ |
144 |
+ if (metric!=0 && (dumpPS_force || dumpPS)) { |
145 |
+- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g%s", d, me_psfactor[metric]); |
146 |
++ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g%s", d, me_psfactor[metric]); |
147 |
+ } else { |
148 |
+- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g", d*me_factor[metric]); |
149 |
++ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g", d*me_factor[metric]); |
150 |
+ } |
151 |
+ out_ << buf; |
152 |
+ } |
153 |
+@@ -1044,7 +1044,7 @@ |
154 |
+ } else { |
155 |
+ d = d < 0 ? 72.0 / -d : d / 72.0; |
156 |
+ char buf[64]; /* Dat: enough */ |
157 |
+- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g", d); |
158 |
++ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g", d); |
159 |
+ out << buf; |
160 |
+ } |
161 |
+ } |
162 |
+@@ -1093,7 +1093,7 @@ |
163 |
+ out << (rounding>=2 && ll<0 ? 0 : ll); |
164 |
+ } else { |
165 |
+ char buf[64]; /* Dat: enough */ |
166 |
+- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g", d); |
167 |
++ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g", d); |
168 |
+ out << buf; |
169 |
+ } |
170 |
+ } |
171 |
+--- a/ps_tiny.c |
172 |
++++ b/ps_tiny.c |
173 |
+@@ -151,7 +151,7 @@ |
174 |
+ } |
175 |
+ |
176 |
+ static void erri(char const*msg1, char const*msg2) { |
177 |
+- fprintf(stderr, "%s: error at %"SLEN_P"u.%"SLEN_P"u.%"SLEN_P"u: %s%s\n", |
178 |
++ fprintf(stderr, "%s: error at %" SLEN_P "u.%" SLEN_P "u.%" SLEN_P "u: %s%s\n", |
179 |
+ PROGNAME, curline, curofs-leftofs+1, curofs, msg1, msg2?msg2:""); |
180 |
+ exit(3); |
181 |
+ } |
182 |
+@@ -230,7 +230,7 @@ |
183 |
+ /** @param b: assume null-terminated @return true on error */ |
184 |
+ static /*inline*/ sbool toInteger(char *s, psint_t *ret) { |
185 |
+ int n=0; /* BUGFIX?? found by __CHECKER__ */ |
186 |
+- return sscanf(s, "%"SLEN_P"i%n", ret, &n)<1 || s[n]!='\0'; |
187 |
++ return sscanf(s, "%" SLEN_P "i%n", ret, &n)<1 || s[n]!='\0'; |
188 |
+ } |
189 |
+ |
190 |
+ /** @param b: assume null-terminated @return true on error */ |
191 |
+@@ -700,7 +700,7 @@ |
192 |
+ getotag("Abbr"); |
193 |
+ getkey("acount"); acount=getuintval(); |
194 |
+ getkey("xcount"); xcount=getuintval(); |
195 |
+- sprintf(tmp,"%"SLEN_P"u dict%%</I>", acount+xcount); |
196 |
++ sprintf(tmp,"%" SLEN_P "u dict%%</I>", acount+xcount); |
197 |
+ setifmt(tmp,0); copy("I"); noifmt(); |
198 |
+ gettagbeg(); |
199 |
+ |
200 |
|
201 |
diff --git a/media-gfx/sam2p/sam2p-0.49.3.ebuild b/media-gfx/sam2p/sam2p-0.49.3.ebuild |
202 |
new file mode 100644 |
203 |
index 00000000..b0af104 |
204 |
--- /dev/null |
205 |
+++ b/media-gfx/sam2p/sam2p-0.49.3.ebuild |
206 |
@@ -0,0 +1,48 @@ |
207 |
+# Copyright 1999-2016 Gentoo Foundation |
208 |
+# Distributed under the terms of the GNU General Public License v2 |
209 |
+# $Id$ |
210 |
+ |
211 |
+EAPI=6 |
212 |
+ |
213 |
+inherit autotools toolchain-funcs |
214 |
+ |
215 |
+DESCRIPTION="Utility to convert raster images to EPS, PDF and many others" |
216 |
+HOMEPAGE="https://github.com/pts/sam2p" |
217 |
+SRC_URI="https://github.com/pts/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
218 |
+ |
219 |
+LICENSE="GPL-2" |
220 |
+SLOT="0" |
221 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
222 |
+IUSE="examples gif" |
223 |
+ |
224 |
+DEPEND="dev-lang/perl" |
225 |
+ |
226 |
+RESTRICT="test" |
227 |
+ |
228 |
+PATCHES=( "${FILESDIR}"/${P}-build-fixes.patch ) |
229 |
+ |
230 |
+src_prepare() { |
231 |
+ default |
232 |
+ |
233 |
+ # configure.in files are deprecated |
234 |
+ mv configure.{in,ac} || die |
235 |
+ |
236 |
+ # eautoreconf is still needed or you get bad warnings |
237 |
+ eautoreconf |
238 |
+} |
239 |
+ |
240 |
+src_configure() { |
241 |
+ tc-export CXX |
242 |
+ |
243 |
+ econf --enable-lzw $(use_enable gif) |
244 |
+} |
245 |
+ |
246 |
+src_install() { |
247 |
+ dobin sam2p |
248 |
+ einstalldocs |
249 |
+ |
250 |
+ if use examples; then |
251 |
+ dodoc -r examples |
252 |
+ docompress -x /usr/share/doc/${PF}/examples |
253 |
+ fi |
254 |
+} |