pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2012Q1]: pkgsrc/comms/hylafax Pullup ticket #3719 - requested ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/835522120c82
branches:  pkgsrc-2012Q1
changeset: 602010:835522120c82
user:      spz <spz%pkgsrc.org@localhost>
date:      Mon Apr 09 16:48:51 2012 +0000

description:
Pullup ticket #3719 - requested by dholland
comms/hylafax: build fix

Revisions pulled up:
- comms/hylafax/Makefile                                        1.65
- comms/hylafax/distinfo                                        1.23
- comms/hylafax/patches/patch-ae                                1.16
- comms/hylafax/patches/patch-hfaxd_FileSystem_c__              1.1
- comms/hylafax/patches/patch-hfaxd_FileTransfer_c__            1.1

-------------------------------------------------------------------
   Module Name: pkgsrc
   Committed By:        dholland
   Date:                Sun Apr  8 03:25:04 UTC 2012

   Modified Files:
        pkgsrc/comms/hylafax: Makefile distinfo
        pkgsrc/comms/hylafax/patches: patch-ae
   Added Files:
        pkgsrc/comms/hylafax/patches: patch-hfaxd_FileSystem_c__
            patch-hfaxd_FileTransfer_c__

   Log Message:
   Hack this to build against libtiff 4.x. With luck, it'll still work.
   Because it depends on changes to the API in libtiff 4.x, set the minimum
   BUILDLINK_API_DEPENDS accordingly. And, even though it wasn't building,
   bump PKGREVISION to 7; the new package depending on tiff>=4.0 needs to
   be distinguishable from the old package depending on tiff<4.0.

   XXX: This package desperately needs to be updated. It is years out of
   XXX: date with respect to upstream.


   To generate a diff of this commit:
   cvs rdiff -u -r1.64 -r1.65 pkgsrc/comms/hylafax/Makefile
   cvs rdiff -u -r1.22 -r1.23 pkgsrc/comms/hylafax/distinfo
   cvs rdiff -u -r1.15 -r1.16 pkgsrc/comms/hylafax/patches/patch-ae
   cvs rdiff -u -r0 -r1.1 \
       pkgsrc/comms/hylafax/patches/patch-hfaxd_FileSystem_c__ \
       pkgsrc/comms/hylafax/patches/patch-hfaxd_FileTransfer_c__

diffstat:

 comms/hylafax/Makefile                             |   7 +-
 comms/hylafax/distinfo                             |   6 +-
 comms/hylafax/patches/patch-ae                     |   8 +-
 comms/hylafax/patches/patch-hfaxd_FileSystem_c__   |  33 ++++++++++
 comms/hylafax/patches/patch-hfaxd_FileTransfer_c__ |  70 ++++++++++++++++++++++
 5 files changed, 118 insertions(+), 6 deletions(-)

diffs (181 lines):

diff -r 87981e3b16d1 -r 835522120c82 comms/hylafax/Makefile
--- a/comms/hylafax/Makefile    Mon Apr 09 15:30:03 2012 +0000
+++ b/comms/hylafax/Makefile    Mon Apr 09 16:48:51 2012 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.64 2012/02/16 17:18:50 hans Exp $
+# $NetBSD: Makefile,v 1.64.2.1 2012/04/09 16:48:51 spz Exp $
 
 VERS=          4.2.5
 DISTNAME=      hylafax-${VERS}
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    comms
 MASTER_SITES_BETA=     ftp://ftp.hylafax.org/source/BETA/
 MASTER_SITES_RELEASE=  ftp://ftp.hylafax.org/source/
@@ -64,6 +64,9 @@
 CONFIGURE_ENV+=                MACHDEPLIBS=-lrt
 .endif
 
+# Affected by TIFFHeader -> TIFFHeaderClassic change in 4.x.
+BUILDLINK_API_DEPENDS.libtiff+=        tiff>=4.0.0
+
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../graphics/tiff/buildlink3.mk"
diff -r 87981e3b16d1 -r 835522120c82 comms/hylafax/distinfo
--- a/comms/hylafax/distinfo    Mon Apr 09 15:30:03 2012 +0000
+++ b/comms/hylafax/distinfo    Mon Apr 09 16:48:51 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2011/09/03 08:52:59 obache Exp $
+$NetBSD: distinfo,v 1.22.6.1 2012/04/09 16:48:51 spz Exp $
 
 SHA1 (hylafax-4.2.5.tar.gz) = b3bfd492dcb85e8aa1ddff9e6dcec3c31e00fccc
 RMD160 (hylafax-4.2.5.tar.gz) = aef5e7a8ff32bafa43b5efc431b9fd8c334ddb3a
@@ -7,7 +7,7 @@
 SHA1 (patch-ab) = 5ee930814178223fa66dd308f365ff400559fd1d
 SHA1 (patch-ac) = 6f89cc0c9e7a0e789c23b0dfc604376e457091b7
 SHA1 (patch-ad) = a7e361980c94a025be0b326c1cf694cce3cbff72
-SHA1 (patch-ae) = f6111b7666a488e192fe4c180ccfed32fbe81348
+SHA1 (patch-ae) = 3623d9f41cfef85b0e079e6698cf974829451151
 SHA1 (patch-af) = cb76c429c01e05ceeee7664a09344dc9d27f972d
 SHA1 (patch-ag) = e1a38918cadf1d1cca7765ee2c050e99dfed0b7f
 SHA1 (patch-ah) = 084a99cfe21d7090fca33d9e068036e19707f441
@@ -17,3 +17,5 @@
 SHA1 (patch-an) = 535f9454e473d7bb26a256aec3158cffdb3d0399
 SHA1 (patch-ao) = 73da088c0dbc13a0dcb8d6abaa36804f34638c51
 SHA1 (patch-ap) = f9d6a2796535e7200419d6e24203b9995e5cfb39
+SHA1 (patch-hfaxd_FileSystem_c__) = d39e8abb1163f5f02b2cb1fa5814c4588a8fa73e
+SHA1 (patch-hfaxd_FileTransfer_c__) = 683b4a0bdd1927d0a0636e8df75d5b8bae27e0ff
diff -r 87981e3b16d1 -r 835522120c82 comms/hylafax/patches/patch-ae
--- a/comms/hylafax/patches/patch-ae    Mon Apr 09 15:30:03 2012 +0000
+++ b/comms/hylafax/patches/patch-ae    Mon Apr 09 16:48:51 2012 +0000
@@ -1,4 +1,8 @@
-$NetBSD: patch-ae,v 1.15 2011/09/03 08:52:59 obache Exp $
+$NetBSD: patch-ae,v 1.15.6.1 2012/04/09 16:48:51 spz Exp $
+
+- Configure for pkgsrc.
+- Recognize libtiff 4.x.
+- ...
 
 --- configure.orig     2005-12-16 22:40:30.000000000 +0000
 +++ configure
@@ -106,7 +110,7 @@
            case ${lib_ver} in
                3.4)            tiff_runlen_t="uint16" ;;
 -              3.[567])        tiff_runlen_t="uint32" ;;
-+              3.[56789])      tiff_runlen_t="uint32" ;;
++              3.[56789]|4*)   tiff_runlen_t="uint32" ;;
            esac
        fi
      else
diff -r 87981e3b16d1 -r 835522120c82 comms/hylafax/patches/patch-hfaxd_FileSystem_c__
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/hylafax/patches/patch-hfaxd_FileSystem_c__  Mon Apr 09 16:48:51 2012 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-hfaxd_FileSystem_c__,v 1.1.2.2 2012/04/09 16:48:51 spz Exp $
+
+Support libtiff 4.x.
+
+--- hfaxd/FileSystem.c++~      2003-02-08 22:49:52.000000000 +0000
++++ hfaxd/FileSystem.c++
+@@ -728,7 +728,7 @@ HylaFAXServer::nlstUnixFile(FILE* fd, co
+ }
+ 
+ static bool
+-isTIFF(const TIFFHeader& h)
++isTIFF(const TIFFHeaderClassic& h)
+ {
+     if (h.tiff_magic != TIFF_BIGENDIAN && h.tiff_magic != TIFF_LITTLEENDIAN)
+       return (false);
+@@ -741,7 +741,7 @@ isTIFF(const TIFFHeader& h)
+     // 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);
+ }
+ 
+ bool
+@@ -754,7 +754,7 @@ HylaFAXServer::docType(const char* docna
+       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 -r 87981e3b16d1 -r 835522120c82 comms/hylafax/patches/patch-hfaxd_FileTransfer_c__
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/hylafax/patches/patch-hfaxd_FileTransfer_c__        Mon Apr 09 16:48:51 2012 +0000
@@ -0,0 +1,70 @@
+$NetBSD: patch-hfaxd_FileTransfer_c__,v 1.1.2.2 2012/04/09 16:48:51 spz Exp $
+
+Support libtiff 4.x. Hopefully.
+
+--- hfaxd/FileTransfer.c++.orig        2005-08-05 19:08:15.000000000 +0000
++++ hfaxd/FileTransfer.c++
+@@ -50,6 +50,14 @@
+ #define       HAVE_PSLEVEL2   false
+ #define       HAVE_PCL5       false
+ 
++/* XXX */
++struct TIFFDirEntry {
++   uint16_t tdir_tag;
++   uint16_t tdir_type;
++   uint16_t tdir_count;
++   uint16_t tdir_offset;
++};
++
+ static struct {
+     const char*       name;           // protocol token name
+     bool      supported;      // true if format is supported
+@@ -210,7 +218,7 @@ HylaFAXServer::retrievePageCmd(const cha
+               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).",
+@@ -242,10 +250,10 @@ HylaFAXServer::openTIFF(const char* name
+       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
+@@ -324,7 +332,7 @@ HylaFAXServer::sendTIFFHeader(TIFF* tif,
+ {
+     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 },
+@@ -358,14 +366,14 @@ HylaFAXServer::sendTIFFHeader(TIFF* tif,
+      * 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);



Home | Main Index | Thread Index | Old Index