sam2p: update to 0.49.4.

This commit is contained in:
Leah Neukirchen 2017-09-28 12:19:03 +02:00
parent e4e5de103e
commit 5c0cf67d0c
2 changed files with 5 additions and 105 deletions

View File

@ -1,101 +0,0 @@
--- minips.cpp.orig
+++ 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;
}
}
--- ps_tiny.c.orig
+++ 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();
--- gensio.cpp.orig
+++ 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);
--- in_ps.cpp.orig
+++ 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;

View File

@ -1,16 +1,17 @@
# Template file for 'sam2p'
pkgname=sam2p
version=0.49.3
revision=2
version=0.49.4
revision=1
build_style=gnu-configure
configure_args="--enable-gif --enable-lzw"
hostmakedepends="perl"
depends="perl"
depends="perl tif22pnm"
short_desc="Raster image converter with smart PDF and PostScript output"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2"
homepage="https://github.com/pts/sam2p"
distfiles="https://github.com/pts/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.gz"
checksum=33b1bf018a19b19c30d41defcb8b20c7cdcbc7ddd7703040c3a54d9cb1fcaaea
checksum=d23707b2405ca94e2a237cb81f62fb5916f5e4360cf9a705061479c8fa1dff5c
nocross=yes
LDFLAGS="-fPIC"