summaryrefslogtreecommitdiff
path: root/media-gfx/sam2p
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /media-gfx/sam2p
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'media-gfx/sam2p')
-rw-r--r--media-gfx/sam2p/Manifest7
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49.3-build-fixes.patch160
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49.3-perl526.patch23
-rw-r--r--media-gfx/sam2p/files/sam2p-build-fixes.patch53
-rw-r--r--media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild (renamed from media-gfx/sam2p/sam2p-0.49.3.ebuild)29
5 files changed, 78 insertions, 194 deletions
diff --git a/media-gfx/sam2p/Manifest b/media-gfx/sam2p/Manifest
index 5773724e0441..efbefafb22dc 100644
--- a/media-gfx/sam2p/Manifest
+++ b/media-gfx/sam2p/Manifest
@@ -1,5 +1,4 @@
-AUX sam2p-0.49.3-build-fixes.patch 6108 BLAKE2B 85c608628a932c698a5ad7f44394c85138f850f3e4c2807101eab1fefee5721bd76cd3edfebf71d57221b94709e2aa1c09c415821f3128d3ee5f71c37640365d SHA512 70e14339b6fb8f587adc4692982601db0b1d0343a737cf08931101589eaecc419e8f571bd138a6e585a7a9a7a9f2e8f3ebf3ccf4c315d805be9f625a917a56c3
-AUX sam2p-0.49.3-perl526.patch 648 BLAKE2B 0fa1d54116325cfbf1720c8465ddf5d8bc6a3a11843207e075f63ffae803e128e8c961ff9ca33f961f169f1af2f1419bb5edddb139c87a7193da064aab8cc6da SHA512 22628eadcf9399ba89a652ad41ac55e98fdb596df029e466a4bbc609131e914e456451362e8639c98dbf59c7e288296b4940fa2e92d8ce671715103e9b622f0d
-DIST sam2p-0.49.3.tar.gz 2184864 BLAKE2B 47d3ce6384c344f66e564ea9f70e89e311540c1bbaf640a70cec2830347b3767aa79d525d25c12cfc2aecc61aca676239b99b345fc7e6bb2edfac7c60bd8d674 SHA512 9e9c91a2cd692e49bf73e7c197a0fcbe7df96c685636d1d00456eb8b4b847de3f4848d9bb3d9246340c479c62900ddd4e0a248257aa5e6ec6e16683c5dad54f8
-EBUILD sam2p-0.49.3.ebuild 977 BLAKE2B f271f97481d19a1bc58930007ea2674d8237435b3a1ae0977a2a1f784e4d82dbe038982bebb1a458c074180ad8a96da3b0d97e5905f31d8d91256dc1c4efa988 SHA512 274eea35289dc9a180dc0b962e26568e8aeb522edbc6917265cdbd500448aaead014fb7f00bca1d0edbf5d2ba8581e56f1e8c0e4c8c330c30d74fa31ada257e9
+AUX sam2p-build-fixes.patch 1803 BLAKE2B d9c805da6c46f5457cc6006941a1331f0e46ed8fcadf7c73b9a11debfaa7e2f040beeae42aa9cf316a2df71ffe9d136808a1e9ebeea5c146851057a8addb7bf6 SHA512 fa32011db37a74f746542df82f29e7869412cf8ad93d0b4c3c6e100dda06c254f204671199db0d1abd6134975325cb939f65f0a22457a84a78b6b277411ea2f5
+DIST sam2p-0.49.4_p20190718.tar.gz 1816309 BLAKE2B 3d97e00c2bd6b6c292c051d4eb6b73549d1c82a5bd7be3d6b718d8e9d2e96b47657c184af43fa57c0ca4b2b8c26904fb42508d17f7dda715def7d2082affa8b6 SHA512 1c6074fabca6146e51fe0d5a10c912ec679cf122e10aab7bead9e35e3d007e79773aedb1f627572b1b88cacefe0e7edf72efd71d32c47731723b910667220c51
+EBUILD sam2p-0.49.4_p20190718-r1.ebuild 1217 BLAKE2B 729c4c96c26c8fb2ad9490a963d4d48623f3113502e232506eaa3953e6acaa01724d58a3fefd1fa1825d95ee1a44256a0eb805312a73a2e736e5ef22b0fb75fb SHA512 686c9c27eb9d01bf33eeaca50045c14862751c5efa732d28d75c13a96adc105dc1172714f253196d9b0780be12d774d8695baf1bdc318ec42d9f12f420cef912
MISC metadata.xml 373 BLAKE2B a0a62fca7fbcd916d83a6d7fa8f020c333b529ed06492cd8f52a8e04d228714bd53d1283e0b43f5a0c399aafdaf99b5caa5534a0ba54e1bff4958b4f28e899f7 SHA512 2bac0bb931232d7b994f24551d0fedccfcaf69932e4900264857e9ba09a9c32495ab743c1fe930e63adca3b7bc11efdea526982e6e27869033bc17731fa5c7fa
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
deleted file mode 100644
index dfad65cc05d9..000000000000
--- a/media-gfx/sam2p/files/sam2p-0.49.3-build-fixes.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-Fix literal suffix errors in C++14, caused by missing spaces between
-C-strings and macros.
-See also: https://bugs.gentoo.org/show_bug.cgi?id=585630
-
---- a/configure.in
-+++ b/configure.in
-@@ -81,8 +81,6 @@
- dnl Checks for programs.
- dnl AC_PROG_CC
- AC_LANG_CPLUSPLUS
--CXXFLAGS=" "
--dnl ^^^ set it to non-empty, so AC_PROG_CXX won't include `-g'
- CCC="$CCC g++"
- dnl ^^^ check g++ before c++ (see acspecific.m4, grep AC_PROG_CXX)
- AC_PROG_CXX
-@@ -216,7 +214,7 @@
-
- dnl AC_PTS_RUN_OK([perl -x -S ./ccdep.pl $CXX], [], [AC_MSG_ERROR(cannot compute depends)])
- rm -f Makedep
--AC_PTS_RUN_OK([make Makedep], [], [AC_MSG_ERROR(cannot compute depends)])
-+AC_PTS_RUN_OK([gmake Makedep], [], [AC_MSG_ERROR(cannot compute depends)])
- AC_PTS_OK
- echo "configure done. Now you should run: make; make install"
-
---- a/gensio.cpp
-+++ b/gensio.cpp
-@@ -494,7 +494,7 @@
-
- #if HAVE_PTS_POPEN
- if (!tmpsname) {
-- 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;
-+ 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;
- signal(SIGPIPE, SIG_IGN); /* Don't abort process with SIGPIPE signals if child cannot read our data */
- } else {
- #else
-@@ -622,7 +622,7 @@
- if (state==0) { /* Read the whole stream from `in', write it to `tmpsname' */
- #if HAVE_PTS_POPEN
- if (!tmpsname) {
-- 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;
-+ 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;
- signal(SIGPIPE, SIG_IGN); /* Don't abort process with SIGPIPE signals if child cannot read our data */
- vi_precopy();
- in.vi_read(0,0);
-@@ -730,12 +730,7 @@
-
- /* --- */
-
--
--#if HAVE_lstat_in_sys_stat
--# define PTS_lstat lstat
--#else
- # define PTS_lstat stat
--#endif
-
- /** @param fname must start with '/' (dir separator)
- * @return true if file successfully created
---- a/in_ps.cpp
-+++ b/in_ps.cpp
-@@ -137,7 +137,7 @@
- // fprintf(stderr, "bbox=[%"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g]\n", llx, lly, urx, ury);
- /* 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 */
- sprintf(bboxline,
-- "<</PageSize[%"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g]>>setpagedevice\n"
-+ "<</PageSize[%" PTS_CFG_PRINTFGLEN "g %" PTS_CFG_PRINTFGLEN "g]>>setpagedevice\n"
- /* removing /PageSize also cancels /a4, /a5 etc. */
- /* we need `currentmatrix ... setpagedevice setmatrix' because
- * setpagedevice cancels the current transformation matrix so our
-@@ -147,7 +147,7 @@
- "/setpagedevice{matrix currentmatrix exch "
- "dup length dict copy dup /PageSize undef setpagedevice "
- "setmatrix}bind def\n"
-- "%"PTS_CFG_PRINTFGLEN"g %"PTS_CFG_PRINTFGLEN"g translate\n"
-+ "%" PTS_CFG_PRINTFGLEN "g %" PTS_CFG_PRINTFGLEN "g translate\n"
- , urx-llx, ury-lly, -llx, -lly);
- } else {
- Error::sev(Error::WARNING) << "in_eps_reader: missing EPS bbox" << (Error*)0;
---- a/Makefile
-+++ b/Makefile
-@@ -17,7 +17,7 @@
- export PERL_BADLANG
-
- CXXX=$(CXD_assert)
--LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS)
-+LDALL=$(LDXX) $(LDFLAGS) $(LIBS)
- ifeq ($(ENABLE_DEBUG), no)
- CXXX=$(CXD_no)
- endif
-@@ -51,8 +51,8 @@
- IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS))
- IDE_TARGETS_release := $(TARGETS)
-
--CXD_assert =$(CXX) -s -O2
--CXD_no =$(CXX) -s -DNDEBUG -O3
-+CXD_assert =$(CXX)
-+CXD_no =$(CXX) -DNDEBUG
- # CXD_yes =$(CXX) $(GFLAG) -lefence
- CXD_yes =$(CXX) $(GFLAG)
- CXD_checker=checkerg++ $(GFLAG)
---- a/minips.cpp
-+++ b/minips.cpp
-@@ -292,9 +292,9 @@
- void MiniPS::Real::dump(GenBuffer::Writable &out_, bool dumpPS_force) {
- char buf[64]; /* Imp: should be enough?? */
- if (metric!=0 && (dumpPS_force || dumpPS)) {
-- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g%s", d, me_psfactor[metric]);
-+ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g%s", d, me_psfactor[metric]);
- } else {
-- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g", d*me_factor[metric]);
-+ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g", d*me_factor[metric]);
- }
- out_ << buf;
- }
-@@ -1044,7 +1044,7 @@
- } else {
- d = d < 0 ? 72.0 / -d : d / 72.0;
- char buf[64]; /* Dat: enough */
-- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g", d);
-+ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g", d);
- out << buf;
- }
- }
-@@ -1093,7 +1093,7 @@
- out << (rounding>=2 && ll<0 ? 0 : ll);
- } else {
- char buf[64]; /* Dat: enough */
-- sprintf(buf, "%"PTS_CFG_PRINTFGLEN"g", d);
-+ sprintf(buf, "%" PTS_CFG_PRINTFGLEN "g", d);
- out << buf;
- }
- }
---- a/ps_tiny.c
-+++ b/ps_tiny.c
-@@ -151,7 +151,7 @@
- }
-
- static void erri(char const*msg1, char const*msg2) {
-- fprintf(stderr, "%s: error at %"SLEN_P"u.%"SLEN_P"u.%"SLEN_P"u: %s%s\n",
-+ fprintf(stderr, "%s: error at %" SLEN_P "u.%" SLEN_P "u.%" SLEN_P "u: %s%s\n",
- PROGNAME, curline, curofs-leftofs+1, curofs, msg1, msg2?msg2:"");
- exit(3);
- }
-@@ -230,7 +230,7 @@
- /** @param b: assume null-terminated @return true on error */
- static /*inline*/ sbool toInteger(char *s, psint_t *ret) {
- int n=0; /* BUGFIX?? found by __CHECKER__ */
-- return sscanf(s, "%"SLEN_P"i%n", ret, &n)<1 || s[n]!='\0';
-+ return sscanf(s, "%" SLEN_P "i%n", ret, &n)<1 || s[n]!='\0';
- }
-
- /** @param b: assume null-terminated @return true on error */
-@@ -700,7 +700,7 @@
- getotag("Abbr");
- getkey("acount"); acount=getuintval();
- getkey("xcount"); xcount=getuintval();
-- sprintf(tmp,"%"SLEN_P"u dict%%</I>", acount+xcount);
-+ sprintf(tmp,"%" SLEN_P "u dict%%</I>", acount+xcount);
- setifmt(tmp,0); copy("I"); noifmt();
- gettagbeg();
-
diff --git a/media-gfx/sam2p/files/sam2p-0.49.3-perl526.patch b/media-gfx/sam2p/files/sam2p-0.49.3-perl526.patch
deleted file mode 100644
index cb24dbda1bda..000000000000
--- a/media-gfx/sam2p/files/sam2p-0.49.3-perl526.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 79a7de171f461a1c79089fa770f0da186e87c723
-Author: Peter Szabo <pts@fazekas.hu>
-Date: Sun Apr 30 04:00:23 2017 +0200
-
- fixed Perl 5.26 compatibility for perl -x (https://github.com/pts/sam2p/issues/2)
-
-diff --git a/Makefile b/Makefile
-index 849b09d..1791a9c 100644
---- a/Makefile
-+++ b/Makefile
-@@ -71,10 +71,10 @@ sam2p_version.h: debian/changelog
- sam2p_main.o: sam2p_version.h
-
- xpmc.h: cols2.pl
-- perl -x cols2.pl >xpmc.h
-+ perl -x ./cols2.pl >xpmc.h
-
- #HQ=perl -e'$$_=join"",<STDIN>; s@([^\w\.\/\-])@sprintf"\\%03o",ord$$1@ge; print "\"$$_\"\n"'
--HQ=perl -x hq.pl
-+HQ=perl -x ./hq.pl
- #%.tth: %.tte
- # <$< >$@ $(HQ)
- #%.tth: %.ttm
diff --git a/media-gfx/sam2p/files/sam2p-build-fixes.patch b/media-gfx/sam2p/files/sam2p-build-fixes.patch
new file mode 100644
index 000000000000..6a1c80175127
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-build-fixes.patch
@@ -0,0 +1,53 @@
+Make stripping configurable, correct CC/CXX/CFLAGS/CXXFLAGS handling, add
+missing include
+
+diff --git a/Makefile b/Makefile
+index 1433167..38bb7cc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,12 +28,13 @@ ifeq ($(MAKECMDGOALS),Makedep.force)
+ MAKE_DIST=000
+ endif
+
++GCC_STRIP ?= -s
+ BASH=bash
+ PERL_BADLANG=x
+ export PERL_BADLANG
+
+ CXXX=$(CXD_assert)
+-LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS)
++LDALL=$(LDXX) $(GCC_STRIP) $(LDFLAGS) $(LIBS)
+ ifeq ($(ENABLE_DEBUG), no)
+ CXXX=$(CXD_no)
+ endif
+@@ -46,8 +47,8 @@ CXXX=$(CXD_checker)
+ LDALL=checkerg++ $(LDFLAGS) $(LIBS)
+ endif
+
+-CXXALL=$(CXXX) $(CXXFLAGS) $(CXXFLAGSB)
+-CCALL =$(CXXX) $(CXXFLAGS) $(CXXFLAGSB)
++CXXALL=$(CXX) $(CXXFLAGS) $(CXXFLAGSB)
++CCALL =$(CC) $(CFLAGS) $(CXXFLAGSB)
+ CXDFAL=$(CXXFLAGS) $(CXXFLAGSB) $(LDFLAGS) $(LIBS)
+
+ .PHONY: clean dist dist-noautoconf dist-more allclean distclean dist-install
+@@ -67,7 +68,7 @@ ifeq ($(MAKE_DIST),)
+ #
+ # echo to config.h is needed to make config.h younger than config.h.in;
+ # configure doesn't change the timestamp of config.h if it's unchanged.
+- Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h; ./configure MAKE=$(MAKE) --enable-gif --enable-lzw && echo "" >>config.h
++ Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h;
+ Makehelp:;
+ include Makehelp # Defines CXX. File generated by ./configure.
+ include Makedep # Contains ALL+=... .
+@@ -101,8 +102,8 @@ IDE_MODES := release debug
+ IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS))
+ IDE_TARGETS_release := $(TARGETS)
+
+-CXD_assert =$(CXX) -s -O2
+-CXD_no =$(CXX) -s -DNDEBUG -O3
++CXD_assert =$(CXX) $(GCC_STRIP) $(CXXFLAGS)
++CXD_no =$(CXX) $(GCC_STRIP) $(CXXFLAGS)
+ # CXD_yes =$(CXX) $(GFLAG) -lefence
+ CXD_yes =$(CXX) $(GFLAG)
+ CXD_checker=checkerg++ $(GFLAG)
diff --git a/media-gfx/sam2p/sam2p-0.49.3.ebuild b/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild
index aab339fb4890..7672df96d2c9 100644
--- a/media-gfx/sam2p/sam2p-0.49.3.ebuild
+++ b/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild
@@ -1,24 +1,27 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit autotools toolchain-funcs
+COMMIT="b953f63307c4a83fa4615a4863e3fb250205cd98"
+
DESCRIPTION="Utility to convert raster images to EPS, PDF and many others"
HOMEPAGE="https://github.com/pts/sam2p"
-SRC_URI="https://github.com/pts/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/pts/sam2p/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~x64-macos"
IUSE="examples gif"
+RESTRICT="test"
-DEPEND="dev-lang/perl"
+BDEPEND="dev-lang/perl"
-RESTRICT="test"
+S="${WORKDIR}/${PN}-${COMMIT}"
-PATCHES=( "${FILESDIR}"/${P}-build-fixes.patch "${FILESDIR}/${P}-perl526.patch" )
+PATCHES=( "${FILESDIR}"/${PN}-build-fixes.patch )
src_prepare() {
default
@@ -26,14 +29,23 @@ src_prepare() {
# configure.in files are deprecated
mv configure.{in,ac} || die
+ # missing include for memset
+ sed -i '1s;^;#include <string.h>\n;' pts_defl.c
+
# eautoreconf is still needed or you get bad warnings
eautoreconf
}
src_configure() {
- tc-export CXX
+ tc-export CC CXX
- econf --enable-lzw $(use_enable gif)
+ econf \
+ --enable-lzw \
+ $(use_enable gif)
+}
+
+src_compile() {
+ emake GCC_STRIP=
}
src_install() {
@@ -41,6 +53,9 @@ src_install() {
einstalldocs
if use examples; then
+ # clear pre-compressed files
+ rm examples/*.gz || die
+
dodoc -r examples
docompress -x /usr/share/doc/${PF}/examples
fi