aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2010-08-27 04:18:50 +0800
committerdinoex <dinoex@FreeBSD.org>2010-08-27 04:18:50 +0800
commit4ff6ad71bd60e20ce5ec47730f16b8d0fa1e1631 (patch)
tree4c3bcfa90077da46c4b1fe7438ef26e848663f17 /comms
parentf9d9fe01b63cd267d1fdfd6f26866aa12ad174b7 (diff)
downloadfreebsd-ports-gnome-4ff6ad71bd60e20ce5ec47730f16b8d0fa1e1631.tar.gz
freebsd-ports-gnome-4ff6ad71bd60e20ce5ec47730f16b8d0fa1e1631.tar.zst
freebsd-ports-gnome-4ff6ad71bd60e20ce5ec47730f16b8d0fa1e1631.zip
- fix after tiff update to 4.0.0
PR: 149611
Diffstat (limited to 'comms')
-rw-r--r--comms/hylafax/Makefile2
-rw-r--r--comms/hylafax/files/patch-FileTransfer.c++102
-rw-r--r--comms/hylafax/files/patch-configure18
3 files changed, 116 insertions, 6 deletions
diff --git a/comms/hylafax/Makefile b/comms/hylafax/Makefile
index 04d5b710dfae..7f640e92a570 100644
--- a/comms/hylafax/Makefile
+++ b/comms/hylafax/Makefile
@@ -7,7 +7,7 @@
PORTNAME= hylafax
PORTVERSION= 6.0.4
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= comms
MASTER_SITES= ftp://ftp.hylafax.org/source/
diff --git a/comms/hylafax/files/patch-FileTransfer.c++ b/comms/hylafax/files/patch-FileTransfer.c++
new file mode 100644
index 000000000000..ff58afa1f1e2
--- /dev/null
+++ b/comms/hylafax/files/patch-FileTransfer.c++
@@ -0,0 +1,102 @@
+--- hfaxd/FileTransfer.c++.orig 2009-12-28 20:05:40.000000000 +0100
++++ hfaxd/FileTransfer.c++ 2010-08-26 21:47:16.000000000 +0200
+@@ -65,11 +65,31 @@
+ static const char* strunames[] = { "File", "Record", "Page", "TIFF" };
+ static const char* modenames[] = { "Stream", "Block", "Compressed", "ZIP" };
+
++extern "C" {
++/*
++ * TIFF Image File Directories are comprised of a table of field
++ * descriptors of the form shown below. The table is sorted in
++ * ascending order by tag. The values associated with each entry are
++ * disjoint and may appear anywhere in the file (so long as they are
++ * placed on a word boundary).
++ *
++ * If the value is 4 bytes or less, then it is placed in the offset
++ * field to save space. If the value is less than 4 bytes, it is
++ * left-justified in the offset field.
++ */
++typedef struct {
++ uint16 tdir_tag; /* see below */
++ uint16 tdir_type; /* data type; see below */
++ uint32 tdir_count; /* number of items; length in spec */
++ uint32 tdir_offset; /* byte offset to field data */
++} TIFFDirEntry;
++}
++
+ #define N(a) (sizeof (a) / sizeof (a[0]))
+
+
+ static bool
+-isTIFF(const TIFFHeader& h)
++isTIFF(const TIFFHeaderClassic& h)
+ {
+ if (h.tiff_magic != TIFF_BIGENDIAN && h.tiff_magic != TIFF_LITTLEENDIAN)
+ return (false);
+@@ -82,7 +102,7 @@
+ // byte swap version stamp if opposite byte order
+ if ((u.c[0] == 0) ^ (h.tiff_magic == TIFF_BIGENDIAN))
+ TIFFSwabShort(&version);
+- return (version == TIFF_VERSION);
++ return (version == TIFF_VERSION_CLASSIC);
+ }
+
+
+@@ -229,7 +249,7 @@
+ uint32* sb;
+ TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &sb);
+ file_size = sizeof (DirTemplate) +
+- sizeof (TIFFHeader) + sizeof (uint16);
++ sizeof (TIFFHeaderClassic) + sizeof (uint16);
+ for (tstrip_t s = 0, ns = TIFFNumberOfStrips(tif); s < ns; s++)
+ file_size += sb[s];
+ reply(code, "%s for %s (%lu bytes).",
+@@ -261,10 +281,10 @@
+ if (fd >= 0) {
+ union {
+ char buf[512];
+- TIFFHeader h;
++ TIFFHeaderClassic h;
+ } b;
+ ssize_t cc = Sys::read(fd, (char*) &b, sizeof (b));
+- if (cc > (ssize_t)sizeof (b.h) && b.h.tiff_version == TIFF_VERSION &&
++ if (cc > (ssize_t)sizeof (b.h) && b.h.tiff_version == TIFF_VERSION_CLASSIC &&
+ (b.h.tiff_magic == TIFF_BIGENDIAN ||
+ b.h.tiff_magic == TIFF_LITTLEENDIAN)) {
+ (void) lseek(fd, 0L, SEEK_SET); // rewind
+@@ -343,7 +363,7 @@
+ {
+ static DirTemplate templ = {
+ #define TIFFdiroff(v) \
+- (uint32) (sizeof (TIFFHeader) + sizeof (uint16) + \
++ (uint32) (sizeof (TIFFHeaderClassic) + sizeof (uint16) + \
+ (intptr_t) &(((DirTemplate*) 0)->v))
+ { TIFFTAG_SUBFILETYPE, TIFF_LONG, 1 },
+ { TIFFTAG_IMAGEWIDTH, TIFF_LONG, 1 },
+@@ -377,14 +397,14 @@
+ * of things about the contents of the TIFF file.
+ */
+ struct {
+- TIFFHeader h;
++ TIFFHeaderClassic h;
+ uint16 dircount;
+ u_char dirstuff[sizeof (templ)];
+ } buf;
+ union { int32 i; char c[4]; } u; u.i = 1;
+ buf.h.tiff_magic = (u.c[0] == 0 ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN);
+- buf.h.tiff_version = TIFF_VERSION;
+- buf.h.tiff_diroff = sizeof (TIFFHeader);
++ buf.h.tiff_version = TIFF_VERSION_CLASSIC;
++ buf.h.tiff_diroff = sizeof (TIFFHeaderClassic);
+ buf.dircount = (uint16) NTAGS;
+ getLong(tif, templ.SubFileType);
+ getLong(tif, templ.ImageWidth);
+@@ -957,7 +977,7 @@
+ if (FileCache::lookup(docname, sb) && S_ISREG(sb.st_mode)) {
+ union {
+ char buf[512];
+- TIFFHeader h;
++ TIFFHeaderClassic h;
+ } b;
+ ssize_t cc = Sys::read(fd, (char*) &b, sizeof (b));
+ if (cc > 2 && b.buf[0] == '%' && b.buf[1] == '!')
diff --git a/comms/hylafax/files/patch-configure b/comms/hylafax/files/patch-configure
index 2a85ea7ed4e1..455dc136694e 100644
--- a/comms/hylafax/files/patch-configure
+++ b/comms/hylafax/files/patch-configure
@@ -1,5 +1,5 @@
--- configure.orig 2009-12-28 20:05:40.000000000 +0100
-+++ configure 2009-12-31 10:43:58.000000000 +0100
++++ configure 2010-08-26 21:36:38.000000000 +0200
@@ -831,6 +831,7 @@
# NB: use ANSI C prototype to weed out non-ANSI compilers.
#
@@ -21,11 +21,11 @@
if [ "$DISABLE_JBIG" != "yes" ]; then
Note "Checking for JBIG library support"
- CheckForLibrary jbg_enc_init -ljbig &&
-+ CheckForLibrary jbg_enc_init -L/usr/local/lib -ljbig &&
++ CheckForLibrary jbg_enc_init -L/usr/local/lib -L/usr/local/lib -ljbig &&
CheckForIncludeFile jbig.h && {
HAVE_JBIG="#define HAVE_JBIG 1"
- LIBJBIG="-ljbig"
-+ LIBJBIG="-L/usr/local/lib -ljbig"
++ LIBJBIG="-L/usr/local/lib -L/usr/local/lib -ljbig"
}
if [ "x$LIBJBIG" = "x" ]; then
Note "... not found. Disabling JBIG support"
@@ -125,7 +125,15 @@
#include "tiffio.h"
main()
{
-@@ -3233,7 +3269,7 @@
+@@ -2552,6 +2588,7 @@
+ case ${lib_ver} in
+ 3.4) tiff_runlen_t="uint16" ;;
+ 3.[56789]) tiff_runlen_t="uint32" ;;
++ 4.[0-9]) tiff_runlen_t="uint32" ;;
+ esac
+ fi
+ else
+@@ -3233,7 +3270,7 @@
strtoul
writev
"
@@ -134,7 +142,7 @@
for i in $FUNCS; do
CheckForFunc $i || {
Note "... emulate $i"
-@@ -3291,6 +3327,7 @@
+@@ -3291,6 +3328,7 @@
# Verify library is compatible.
#
cat>t.c<<EOF