]> git.pld-linux.org Git - packages/crossmingw32-libtiff.git/commitdiff
- updated to 4.0.0
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 26 Dec 2011 11:18:43 +0000 (11:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    crossmingw32-libtiff.spec -> 1.11
    libtiff-CVE-2009-2285.patch -> 1.2
    libtiff-glut.patch -> 1.2
    libtiff-sec.patch -> 1.5

crossmingw32-libtiff.spec
libtiff-CVE-2009-2285.patch [deleted file]
libtiff-glut.patch
libtiff-sec.patch

index fecfd180f30b5678332dff11a92800d2905047bb..e87d3e92a1499c9d2ddb4c7b8dbe65ac071fcf84 100644 (file)
@@ -1,24 +1,25 @@
+# TODO: jbigkit support
 Summary:       Library for handling TIFF files - cross MinGW32 version
 Summary(pl.UTF-8):     Biblioteka do manipulacji plikami w formacie TIFF - wersja skrośna MinGW32
 %define                realname   libtiff
 Name:          crossmingw32-%{realname}
-Version:       3.9.5
-Release:       2
+Version:       4.0.0
+Release:       1
 License:       BSD-like
 Group:         Development/Libraries
-Source0:       ftp://ftp.remotesensing.org/pub/libtiff/tiff-%{version}.tar.gz
-# Source0-md5: 8fc7ce3b4e1d0cc8a319336967815084
-Patch0:                %{realname}-sec.patch
-Patch1:                %{realname}-glut.patch
-Patch2:                %{realname}-CVE-2009-2285.patch
+Source0:       http://download.osgeo.org/libtiff/tiff-%{version}.tar.gz
+# Source0-md5: 456ad12e7c492b275a0d047f2ba89904
+Patch0:                %{realname}-glut.patch
+Patch1:                %{realname}-sec.patch
 URL:           http://www.remotesensing.org/libtiff/
-BuildRequires: autoconf >= 2.59
+BuildRequires: autoconf >= 2.64
 BuildRequires: automake >= 1:1.11
 BuildRequires: crossmingw32-gcc-c++
 BuildRequires: crossmingw32-libjpeg
 BuildRequires: crossmingw32-zlib
-BuildRequires: libtool
+BuildRequires: libtool >= 2:2.2
 Requires:      crossmingw32-libjpeg
+Requires:      crossmingw32-xz
 Requires:      crossmingw32-zlib
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -30,6 +31,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _sysprefix              /usr
 %define                _prefix                 %{_sysprefix}/%{target}
 %define                _libdir                 %{_prefix}/lib
+%define                _pkgconfigdir           %{_prefix}/lib/pkgconfig
 %define                _dlldir                 /usr/share/wine/windows/system
 %define                __cc                    %{target}-gcc
 %define                __cxx                   %{target}-g++
@@ -67,6 +69,7 @@ Summary(pl.UTF-8):    Biblioteka DLL libtiff dla Windows
 Group:         Applications/Emulators
 Requires:      wine
 Requires:      crossmingw32-libjpeg-dll
+Requires:      crossmingw32-xz-dll
 Requires:      crossmingw32-zlib-dll
 
 %description dll
@@ -115,10 +118,7 @@ Biblioteka DLL strumieni C++ libtiff dla Windows.
 %prep
 %setup -q -n tiff-%{version}
 %patch0 -p1
-%patch1 -p0
-%patch2 -p1
-
-%{__rm} m4/{libtool,lt*}.m4
+%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -147,7 +147,8 @@ mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
 %endif
 
-rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc,man}
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,man}
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/*.exe
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -158,6 +159,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libtiff.dll.a
 %{_libdir}/libtiff.la
 %{_includedir}/tiff*.h
+%{_pkgconfigdir}/libtiff-4.pc
 
 %files static
 %defattr(644,root,root,755)
diff --git a/libtiff-CVE-2009-2285.patch b/libtiff-CVE-2009-2285.patch
deleted file mode 100644 (file)
index 435a84b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: tiff-3.8.2/libtiff/tif_lzw.c
-===================================================================
---- tiff-3.8.2.orig/libtiff/tif_lzw.c
-+++ tiff-3.8.2/libtiff/tif_lzw.c
-@@ -421,7 +421,7 @@ LZWDecode(TIFF* tif, tidata_t op0, tsize
-                       NextCode(tif, sp, bp, code, GetNextCode);
-                       if (code == CODE_EOI)
-                               break;
--                      if (code == CODE_CLEAR) {
-+                      if (code >= CODE_CLEAR) {
-                               TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                               "LZWDecode: Corrupted LZW table at scanline %d",
-                               tif->tif_row);
-@@ -624,7 +624,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0,
-                       NextCode(tif, sp, bp, code, GetNextCodeCompat);
-                       if (code == CODE_EOI)
-                               break;
--                      if (code == CODE_CLEAR) {
-+                      if (code >= CODE_CLEAR) {
-                               TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                               "LZWDecode: Corrupted LZW table at scanline %d",
-                               tif->tif_row);
index aea0098fe784a33a0014419a0587cd43804e4533..72b8fa25f52868826ab4d0954ef6c06c2fa1cefa 100644 (file)
@@ -1,22 +1,20 @@
---- m4/acinclude.m4~   2005-12-06 11:40:01.000000000 +0000
-+++ m4/acinclude.m4    2008-09-05 14:24:05.000000000 +0100
-@@ -391,7 +391,7 @@
-   [ax_cv_check_glut_libglut="no"
-   ax_save_LIBS="${LIBS}"
-   LIBS=""
--  ax_check_libs="-lglut32 -lglut"
-+  ax_check_libs="-lglut"
-   for ax_lib in ${ax_check_libs}; do
-     if test X$ax_compiler_ms = Xyes; then
-       ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
---- m4/acinclude.m4~   2008-09-05 17:45:34.000000000 +0100
-+++ m4/acinclude.m4    2008-09-05 17:53:41.000000000 +0100
-@@ -379,7 +379,7 @@
-   # If X is present, assume GLUT depends on it.
-   #
-   if test "X${no_x}" != "Xyes"; then
--    GLUT_LIBS="${X_PRE_LIBS} -lXmu -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}"
-+    GLUT_LIBS="${X_PRE_LIBS} ${X_EXTRA_LIBS} ${GLUT_LIBS}"
-   fi
+--- tiff-4.0.0/m4/acinclude.m4.orig    2010-07-08 18:10:23.000000000 +0200
++++ tiff-4.0.0/m4/acinclude.m4 2011-12-24 08:14:26.299073546 +0100
+@@ -531,7 +531,7 @@
+ dnl If X is present, assume GLUT depends on it.
+ dnl
+ AS_IF([test X$no_x != Xyes],
+-      [GLUT_LIBS="${X_PRE_LIBS} -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}"])
++      [GLUT_LIBS="${X_EXTRA_LIBS} ${GLUT_LIBS}"])
  
-   AC_LANG_PUSH(C)
+ AC_CACHE_CHECK([for GLUT library], [ax_cv_check_glut_libglut],
+ [ax_cv_check_glut_libglut="no"
+@@ -540,7 +540,7 @@
+ CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}"
+ ax_save_LIBS="${LIBS}"
+ LIBS=""
+-ax_check_libs="-lglut32 -lglut"
++ax_check_libs="-lglut"
+ for ax_lib in ${ax_check_libs}; do
+   AS_IF([test X$ax_compiler_ms = Xyes],
+         [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`],
index eff9b68dc0dca4d2454e82b495dd54799d6071d8..a04b17a4ee39ad26d62b6fe4e8ee77c3d4696920 100644 (file)
---- tiff-3.9.1/libtiff/tif_dir.c.orig  2009-01-01 01:10:43.000000000 +0100
-+++ tiff-3.9.1/libtiff/tif_dir.c       2009-08-31 17:46:34.892612613 +0200
-@@ -138,6 +138,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va
+--- tiff-4.0.0/libtiff/tif_dir.c.orig  2011-02-19 17:26:09.000000000 +0100
++++ tiff-4.0.0/libtiff/tif_dir.c       2011-12-24 10:43:18.779372638 +0100
+@@ -153,6 +153,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va
  {
        static const char module[] = "_TIFFVSetField";
  
-+      const TIFFFieldInfo* fip;
++      const TIFFField* fip;
        TIFFDirectory* td = &tif->tif_dir;
        int status = 1;
        uint32 v32, i, v;
-@@ -585,17 +586,19 @@ end:
+@@ -660,17 +661,19 @@ end:
        va_end(ap);
        return (status);
  badvalue:
-+      fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
++      fip = TIFFFieldWithTag(tif, tag);
        TIFFErrorExt(tif->tif_clientdata, module,
-                    "%s: Bad value %d for \"%s\" tag",
+                    "%s: Bad value %u for \"%s\" tag",
                     tif->tif_name, v,
--                   _TIFFFieldWithTag(tif, tag)->field_name);
+-                   TIFFFieldWithTag(tif, tag)->field_name);
 +                   fip ? fip->field_name : "Unknown");
        va_end(ap);
        return (0);
  badvalue32:
-+      fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
++      fip = TIFFFieldWithTag(tif, tag);
        TIFFErrorExt(tif->tif_clientdata, module,
                     "%s: Bad value %u for \"%s\" tag",
                     tif->tif_name, v32,
--                   _TIFFFieldWithTag(tif, tag)->field_name);
+-                   TIFFFieldWithTag(tif, tag)->field_name);
 +                   fip ? fip->field_name : "Unknown");
        va_end(ap);
        return (0);
  }
---- tiff-3.9.1/libtiff/tif_dirread.c.orig      2009-01-01 01:10:43.000000000 +0100
-+++ tiff-3.9.1/libtiff/tif_dirread.c   2009-08-31 18:38:28.060606747 +0200
-@@ -190,6 +190,11 @@ TIFFReadDirectory(TIFF* tif)
-                                                      dp->tdir_tag,
-                                                      dp->tdir_tag);
-+                                      if (!compressionknown) {
-+                                              TIFFWarningExt(tif->tif_clientdata, module,
-+                                                              "Ignoring, compression unknown");
-+                                              goto ignore;
-+                                      }
-                                       if (!_TIFFMergeFieldInfo(tif,
-                                               _TIFFCreateAnonFieldInfo(tif,
-                                               dp->tdir_tag,
-@@ -583,6 +588,7 @@ TIFFReadDirectory(TIFF* tif)
+--- tiff-4.0.0/libtiff/tif_dirread.c.orig      2011-12-22 00:18:41.000000000 +0100
++++ tiff-4.0.0/libtiff/tif_dirread.c   2011-12-24 10:39:34.932698478 +0100
+@@ -3897,6 +3897,7 @@ TIFFReadDirectory(TIFF* tif)
                 * Attempt to deal with a missing StripByteCounts tag.
                 */
                if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) {
-+                      const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
++                      const TIFFField* fip = TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
                        /*
                         * Some manufacturers violate the spec by not giving
                         * the size of the strips.  In this case, assume there
-@@ -599,7 +605,7 @@ TIFFReadDirectory(TIFF* tif)
-                               "%s: TIFF directory is missing required "
+@@ -3912,7 +3913,7 @@ TIFFReadDirectory(TIFF* tif)
+                       TIFFWarningExt(tif->tif_clientdata, module,
+                               "TIFF directory is missing required "
                                "\"%s\" field, calculating from imagelength",
-                               tif->tif_name,
--                              _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
+-                              TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
 +                              fip ? fip->field_name : "Unknown");
                        if (EstimateStripByteCounts(tif, dir, dircount) < 0)
                            goto bad;
                /*
-@@ -626,6 +632,7 @@ TIFFReadDirectory(TIFF* tif)
-               } else if (td->td_nstrips == 1
-                          && td->td_stripoffset[0] != 0
+@@ -3940,6 +3941,7 @@ TIFFReadDirectory(TIFF* tif)
+                            && _TIFFFillStriles(tif)
+                          && tif->tif_dir.td_stripoffset[0] != 0
                           && BYTECOUNTLOOKSBAD) {
-+                      const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
++                      const TIFFField* fip = TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
                        /*
                         * XXX: Plexus (and others) sometimes give a value of
                         * zero for a tag when they don't know what the
-@@ -635,7 +642,7 @@ TIFFReadDirectory(TIFF* tif)
+@@ -3948,7 +3950,7 @@ TIFFReadDirectory(TIFF* tif)
+                        */
                        TIFFWarningExt(tif->tif_clientdata, module,
-       "%s: Bogus \"%s\" field, ignoring and calculating from imagelength",
-                                   tif->tif_name,
--                                  _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-+                                  fip ? fip->field_name : "Unknown");
+                           "Bogus \"%s\" field, ignoring and calculating from imagelength",
+-                          TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
++                          fip ? fip->field_name : "Unknown");
                        if(EstimateStripByteCounts(tif, dir, dircount) < 0)
                            goto bad;
-               } else if (td->td_planarconfig == PLANARCONFIG_CONTIG
-@@ -644,6 +651,7 @@ TIFFReadDirectory(TIFF* tif)
-                          && td->td_stripbytecount[0] != td->td_stripbytecount[1]
-                            && td->td_stripbytecount[0] != 0 
-                            && td->td_stripbytecount[1] != 0 ) {
-+                      const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
+@@ -3959,6 +3961,7 @@ TIFFReadDirectory(TIFF* tif)
+                          && tif->tif_dir.td_stripbytecount[0] != tif->tif_dir.td_stripbytecount[1]
+                          && tif->tif_dir.td_stripbytecount[0] != 0
+                          && tif->tif_dir.td_stripbytecount[1] != 0 ) {
++                      const TIFFField* fip = TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
                        /*
-                        * XXX: Some vendors fill StripByteCount array with 
-                          * absolutely wrong values (it can be equal to 
-@@ -653,7 +661,7 @@ TIFFReadDirectory(TIFF* tif)
+                        * XXX: Some vendors fill StripByteCount array with
+                        * absolutely wrong values (it can be equal to
+@@ -3971,7 +3974,7 @@ TIFFReadDirectory(TIFF* tif)
+                        */
                        TIFFWarningExt(tif->tif_clientdata, module,
-       "%s: Wrong \"%s\" field, ignoring and calculating from imagelength",
-                                   tif->tif_name,
--                                  _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-+                                  fip ? fip->field_name : "Unknown");
+                           "Wrong \"%s\" field, ignoring and calculating from imagelength",
+-                          TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
++                          fip ? fip->field_name : "Unknown");
                        if (EstimateStripByteCounts(tif, dir, dircount) < 0)
                            goto bad;
-               }
-@@ -1024,16 +1032,18 @@ TIFFCheckDirOffset(TIFF* tif, toff_t dir
- static int
- CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count)
- {
-+      const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, dir->tdir_tag);
-+
-       if (count > dir->tdir_count) {
-               TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
-       "incorrect count for field \"%s\" (%u, expecting %u); tag ignored",
--                  _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
-+                  fip ? fip->field_name : "Unknown",
-                   dir->tdir_count, count);
-               return (0);
-       } else if (count < dir->tdir_count) {
-               TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
-       "incorrect count for field \"%s\" (%u, expecting %u); tag trimmed",
--                  _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
-+                  fip ? fip->field_name : "Unknown",
-                   dir->tdir_count, count);
-               return (1);
-       }
-@@ -1153,6 +1163,7 @@ static tsize_t
- TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp)
- {
-       uint32 w = TIFFDataWidth((TIFFDataType) dir->tdir_type);
-+      const TIFFFieldInfo* fip;
-       /* 
-        * FIXME: butecount should have tsize_t type, but for now libtiff
-        * defines tsize_t as a signed 32-bit integer and we are losing
-@@ -1200,9 +1211,10 @@ TIFFFetchData(TIFF* tif, TIFFDirEntry* d
-       }
-       return (cc);
- bad:
-+      fip = _TIFFFieldWithTag(tif, dir->tdir_tag);
-       TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                    "Error fetching data for field \"%s\"",
--                   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-+                   fip ? fip->field_name : "Unknown");
-       return (tsize_t) 0;
- }
-@@ -1229,9 +1241,10 @@ static int
- cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv)
- {
-       if (denom == 0) {
-+              const TIFFFieldInfo *fip = _TIFFFieldWithTag(tif, dir->tdir_tag);
-               TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                   "%s: Rational with zero denominator (num = %u)",
--                  _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num);
-+                  fip ? fip->field_name : "Unknown", num);
-               return (0);
-       } else {
-               if (dir->tdir_type == TIFF_RATIONAL)
-@@ -1351,9 +1364,10 @@ TIFFFetchShortPair(TIFF* tif, TIFFDirEnt
-        * check on tdir_count, this should never be greater than two.
-        */
-       if (dir->tdir_count > 2) {
-+              const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, dir->tdir_tag);
-               TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
-               "unexpected count for field \"%s\", %u, expected 2; ignored",
--                      _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
-+                      fip ? fip->field_name : "Unknown",
-                       dir->tdir_count);
-               return 0;
-       }
-@@ -1529,11 +1543,14 @@ TIFFFetchAnyArray(TIFF* tif, TIFFDirEntr
-               /* TIFF_NOTYPE */
-               /* TIFF_ASCII */
-               /* TIFF_UNDEFINED */
-+              {
-+              const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, dir->tdir_tag);
-               TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                            "cannot read TIFF_ANY type %d for field \"%s\"",
-                            dir->tdir_type,
--                           _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-+                           fip ? fip->field_name : "Unknown");
-               return (0);
-+              }
-       }
-       return (1);
- }
-@@ -1548,6 +1565,8 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEnt
-       int ok = 0;
-       const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, dp->tdir_tag);
-+      if (fip == NULL)
-+              return (0);
-       if (dp->tdir_count > 1) {               /* array of values */
-               char* cp = NULL;
-@@ -1707,9 +1726,10 @@ TIFFFetchPerSampleShorts(TIFF* tif, TIFF
-             for (i = 1; i < check_count; i++)
-                 if (v[i] != v[0]) {
-+                      const TIFFFieldInfo *fip = _TIFFFieldWithTag(tif, dir->tdir_tag);
-                       TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                 "Cannot handle different per-sample values for field \"%s\"",
--                      _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-+                      fip ? fip->field_name : "Unknown");
-                       goto bad;
-                 }
-             *pl = v[0];
-@@ -1748,9 +1768,10 @@ TIFFFetchPerSampleLongs(TIFF* tif, TIFFD
-                 check_count = samples;
-             for (i = 1; i < check_count; i++)
-                 if (v[i] != v[0]) {
-+                      const TIFFFieldInfo *fip = _TIFFFieldWithTag(tif, dir->tdir_tag);
-                       TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
-                 "Cannot handle different per-sample values for field \"%s\"",
--                      _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-+                      fip ? fip->field_name : "Unknown");
-                       goto bad;
-                 }
-             *pl = v[0];
+ #endif /* !defined(DEFER_STRILE_LOAD) */                        
This page took 0.164228 seconds and 4 git commands to generate.