summaryrefslogtreecommitdiff
path: root/media-gfx/sam2p/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-gfx/sam2p/files
reinit the tree, so we can have metadata
Diffstat (limited to 'media-gfx/sam2p/files')
-rw-r--r--media-gfx/sam2p/files/sam2p-0.45-fbsd.patch14
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch18
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49.1-build.patch42
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch39
-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
6 files changed, 296 insertions, 0 deletions
diff --git a/media-gfx/sam2p/files/sam2p-0.45-fbsd.patch b/media-gfx/sam2p/files/sam2p-0.45-fbsd.patch
new file mode 100644
index 000000000000..aed13acf08dd
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.45-fbsd.patch
@@ -0,0 +1,14 @@
+--- gensio.cpp.orig Fri Feb 7 02:24:56 2003
++++ gensio.cpp Fri Feb 7 02:25:11 2003
+@@ -491,11 +491,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
diff --git a/media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch b/media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch
new file mode 100644
index 000000000000..f96a97969390
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/524048
+
+ignore warnings w/newer glibc-2.20
+
+patch by Dmitry Derevyanko
+
+--- a/ccdep.pl
++++ b/ccdep.pl
+@@ -233,6 +233,9 @@
+ } elsif ($S=~/\A([^:]+):\d+:(\d+:)? warning: this is the location of /) {
+ # ^^^ gcc-3.1
+ undef $included_from;
++ } elsif ($S=~/\A([^:]+):\d+:(\d+:)? warning: .*\bdeprecated\b/) {
++ # Example: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
++ undef $included_from;
+ } elsif ($S=~/: No such file or directory$/) { # Depends on $ENV{LC_ALL}.
+ # ^^^ gcc-3.3
+ undef $included_from;
diff --git a/media-gfx/sam2p/files/sam2p-0.49.1-build.patch b/media-gfx/sam2p/files/sam2p-0.49.1-build.patch
new file mode 100644
index 000000000000..ba421463d536
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49.1-build.patch
@@ -0,0 +1,42 @@
+--- configure.in
++++ configure.in
+@@ -81,7 +81,7 @@
+ dnl Checks for programs.
+ dnl AC_PROG_CC
+ AC_LANG_CPLUSPLUS
+-CXXFLAGS=" "
++#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)
+@@ -215,7 +215,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"
+
+--- Makefile
++++ 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)
diff --git a/media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch b/media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch
new file mode 100644
index 000000000000..d427c2076d3c
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch
@@ -0,0 +1,39 @@
+Index: ccdep.pl
+===================================================================
+--- ccdep.pl (revision 123)
++++ ccdep.pl (revision 125)
+@@ -137,13 +137,20 @@
+
+ my @DS=find_ds();
+ my @DSQ=map{shq$_}@DS;
+-my $R="$GCCP -DOBJDEP -M -MG -E 2>&1 @DSQ";
+-$R=backtick($R);
++my $DIAG=" -fno-diagnostics-show-caret";
++my $Q="$GCCP -DOBJDEP$DIAG -M -MG -E 2>&1 @DSQ";
++my $R=backtick($Q);
++if ($R=~/\berror: .*-fno-diagnostics-show-caret\b/) {
++ # gcc-4.6 and earlier don't have this flag, and they fail.
++ $Q=~s@ -fno-diagnostics-show-caret(?=\s)@@;
++ $DIAG="";
++ $R=backtick($Q);
++}
+
+ if ($R!~/: warning: #warning\b/) {
+ # config2.h:314:4: warning: #warning REQUIRES: c_lgcc3.o
+ # Dat: g++-3.3 ignores #warning with -M -MG -E
+- $R.="\n".backtick("$GCCP -DOBJDEP -E 2>&1 >/dev/null @DSQ");
++ $R.="\n".backtick("$GCCP -DOBJDEP$DIAG -E 2>&1 >/dev/null @DSQ");
+ }
+
+ ## die $R;
+--- rule.hpp 2013-04-18 12:14:20.385333527 +0200
++++ rule.hpp 2013-04-18 12:14:35.818870070 +0200
+@@ -88,7 +88,7 @@
+ PR_PNGAuto=15,
+ PR_PNGAutoMaybe=25,
+ PR_PNGAutoBadUnsigned=45,
+- PR_PNGAutoBadSigned=55,
++ PR_PNGAutoBadSigned=55
+ END_STATIC_ENUM()
+ pr_t Predictor;
+
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
new file mode 100644
index 000000000000..dfad65cc05d9
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49.3-build-fixes.patch
@@ -0,0 +1,160 @@
+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
new file mode 100644
index 000000000000..cb24dbda1bda
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49.3-perl526.patch
@@ -0,0 +1,23 @@
+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