diff --git a/baselibs.conf b/baselibs.conf index 4831d8e..676cb56 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,6 +1,6 @@ -libtiff3 +libtiff5 obsoletes "libtiff- <= " provides "libtiff- = " libtiff-devel requires -libtiff- - requires "libtiff3- = " + requires "libtiff5- = " diff --git a/tiff-3.9.5-dont-fancy-upsampling.patch b/tiff-3.9.5-dont-fancy-upsampling.patch deleted file mode 100644 index 8e84e9c..0000000 --- a/tiff-3.9.5-dont-fancy-upsampling.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: tiff-3.9.4/libtiff/tif_jpeg.c -=================================================================== ---- tiff-3.9.4.orig/libtiff/tif_jpeg.c -+++ tiff-3.9.4/libtiff/tif_jpeg.c -@@ -850,6 +850,7 @@ JPEGPreDecode(TIFF* tif, tsample_t s) - if (downsampled_output) { - /* Need to use raw-data interface to libjpeg */ - sp->cinfo.d.raw_data_out = TRUE; -+ sp->cinfo.d.do_fancy_upsampling = FALSE; - tif->tif_decoderow = JPEGDecodeRaw; - tif->tif_decodestrip = JPEGDecodeRaw; - tif->tif_decodetile = JPEGDecodeRaw; diff --git a/tiff-3.9.5-seek.patch b/tiff-3.9.5-seek.patch deleted file mode 100644 index 674cd81..0000000 --- a/tiff-3.9.5-seek.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libtiff/tiffiop.h -=================================================================== ---- libtiff/tiffiop.h.orig -+++ libtiff/tiffiop.h -@@ -209,7 +209,7 @@ struct tiff { - #define TIFFWriteFile(tif, buf, size) \ - ((*(tif)->tif_writeproc)((tif)->tif_clientdata,buf,size)) - #define TIFFSeekFile(tif, off, whence) \ -- ((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence)) -+ ((tif)->tif_seekproc?((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence)):0) - #define TIFFCloseFile(tif) \ - ((*(tif)->tif_closeproc)((tif)->tif_clientdata)) - #define TIFFGetFileSize(tif) \ diff --git a/tiff-3.9.5.tar.bz2 b/tiff-3.9.5.tar.bz2 deleted file mode 100644 index 6264343..0000000 --- a/tiff-3.9.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:69d6692ca085662b33aee0775efcd29a7d92c073289949142e2359787bd7c469 -size 1180957 diff --git a/tiff-4.0.1-dont-fancy-upsampling.patch b/tiff-4.0.1-dont-fancy-upsampling.patch new file mode 100644 index 0000000..4cd551b --- /dev/null +++ b/tiff-4.0.1-dont-fancy-upsampling.patch @@ -0,0 +1,11 @@ +diff -urN tiff-4.0.1.orig/libtiff/tif_jpeg.c tiff-4.0.1/libtiff/tif_jpeg.c +--- tiff-4.0.1.orig/libtiff/tif_jpeg.c 2012-03-29 01:03:15.680848289 +0800 ++++ tiff-4.0.1/libtiff/tif_jpeg.c 2012-03-29 01:09:09.212428534 +0800 +@@ -1175,6 +1175,7 @@ + if (downsampled_output) { + /* Need to use raw-data interface to libjpeg */ + sp->cinfo.d.raw_data_out = TRUE; ++ sp->cinfo.d.do_fancy_upsampling = FALSE; + tif->tif_decoderow = DecodeRowError; + tif->tif_decodestrip = JPEGDecodeRaw; + tif->tif_decodetile = JPEGDecodeRaw; diff --git a/tiff-4.0.1-seek.patch b/tiff-4.0.1-seek.patch new file mode 100644 index 0000000..ac122ed --- /dev/null +++ b/tiff-4.0.1-seek.patch @@ -0,0 +1,13 @@ +Index: tiff-4.0.1/libtiff/tiffiop.h +=================================================================== +--- tiff-4.0.1.orig/libtiff/tiffiop.h ++++ tiff-4.0.1/libtiff/tiffiop.h +@@ -213,7 +213,7 @@ struct tiff { + #define TIFFWriteFile(tif, buf, size) \ + ((*(tif)->tif_writeproc)((tif)->tif_clientdata,(buf),(size))) + #define TIFFSeekFile(tif, off, whence) \ +- ((*(tif)->tif_seekproc)((tif)->tif_clientdata,(off),(whence))) ++ ((tif)->tif_seekproc?((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence)):0) + #define TIFFCloseFile(tif) \ + ((*(tif)->tif_closeproc)((tif)->tif_clientdata)) + #define TIFFGetFileSize(tif) \ diff --git a/tiff-3.9.5-tiff2pdf-colors.patch b/tiff-4.0.1-tiff2pdf-colors.patch similarity index 57% rename from tiff-3.9.5-tiff2pdf-colors.patch rename to tiff-4.0.1-tiff2pdf-colors.patch index 0cb342b..805a034 100644 --- a/tiff-3.9.5-tiff2pdf-colors.patch +++ b/tiff-4.0.1-tiff2pdf-colors.patch @@ -1,6 +1,7 @@ ---- tiff-3.9.2_/tools/tiff2pdf.c 2009-01-01 01:10:43.000000000 +0100 -+++ tiff-3.9.2/tools/tiff2pdf.c 2010-04-24 17:39:00.000000000 +0200 -@@ -5072,7 +5072,7 @@ +diff -urN tiff-4.0.1.orig/tools/tiff2pdf.c tiff-4.0.1/tools/tiff2pdf.c +--- tiff-4.0.1.orig/tools/tiff2pdf.c 2012-03-29 01:03:15.656848587 +0800 ++++ tiff-4.0.1/tools/tiff2pdf.c 2012-03-29 01:03:27.591699381 +0800 +@@ -4991,7 +4991,7 @@ if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR) { written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13); @@ -9,4 +10,3 @@ } break; #endif - diff --git a/tiff-4.0.1.tar.bz2 b/tiff-4.0.1.tar.bz2 new file mode 100644 index 0000000..7d8b57d --- /dev/null +++ b/tiff-4.0.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a13fffb5be5f6333cd06b514c62ae6a004ec1486ff1f479eb17706a48744338c +size 1669981 diff --git a/tiff-visibility.patch b/tiff-visibility.patch deleted file mode 100644 index 6ac7461..0000000 --- a/tiff-visibility.patch +++ /dev/null @@ -1,119 +0,0 @@ ---- libtiff/tiffiop.h.orig -+++ libtiff/tiffiop.h -@@ -70,6 +70,8 @@ typedef TIFF_UINT64_T uint64; - #include "tiffio.h" - #include "tif_dir.h" - -+#pragma GCC visibility push(hidden) -+ - #ifndef STRIP_SIZE_DEFAULT - # define STRIP_SIZE_DEFAULT 8192 - #endif -@@ -341,6 +343,7 @@ extern TIFFCodec _TIFFBuiltinCODECS[]; - #if defined(__cplusplus) - } - #endif -+#pragma GCC visibility pop - #endif /* _TIFFIOP_ */ - - /* vim: set ts=8 sts=8 sw=8 noet: */ ---- libtiff/tif_predict.h.orig -+++ libtiff/tif_predict.h -@@ -30,6 +30,8 @@ - * ``Library-private'' Support for the Predictor Tag - */ - -+#pragma GCC visibility push(hidden) -+ - /* - * Codecs that want to support the Predictor tag must place - * this structure first in their private state block so that -@@ -65,6 +67,7 @@ extern int TIFFPredictorCleanup(TIFF*); - #if defined(__cplusplus) - } - #endif -+#pragma GCC visibility pop - #endif /* _TIFFPREDICT_ */ - - /* vim: set ts=8 sts=8 sw=8 noet: */ ---- libtiff/tif_dir.h.orig -+++ libtiff/tif_dir.h -@@ -29,7 +29,7 @@ - /* - * ``Library-private'' Directory-related Definitions. - */ -- -+#pragma GCC visibility push(hidden) - /* - * Internal format of a TIFF directory entry. - */ -@@ -199,6 +199,7 @@ extern TIFFFieldInfo* _TIFFCreateAnonFi - #if defined(__cplusplus) - } - #endif -+#pragma GCC visibility pop - #endif /* _TIFFDIR_ */ - - /* vim: set ts=8 sts=8 sw=8 noet: */ ---- tools/Makefile.am.orig -+++ tools/Makefile.am -@@ -62,6 +62,8 @@ if HAVE_RPATH - AM_LDFLAGS = $(LIBDIR) - endif - -+AM_CFLAGS = -fwhole-program -+ - bmp2tiff_SOURCES = bmp2tiff.c - bmp2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - -@@ -86,7 +88,9 @@ ras2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - raw2tiff_SOURCES = raw2tiff.c - raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - --rgb2ycbcr_SOURCES = rgb2ycbcr.c -+#uses private functions. -+rgb2ycbcr_CFLAGS = -fno-whole-program -+rgb2ycbcr_SOURCES = rgb2ycbcr.c $(top_srcdir)/libtiff/tif_aux.c - rgb2ycbcr_LDADD = $(LIBTIFF) $(LIBPORT) - - thumbnail_SOURCES = thumbnail.c -@@ -100,8 +104,9 @@ tiff2pdf_LDADD = $(LIBTIFF) $(LIBPORT) - - tiff2ps_SOURCES = tiff2ps.c - tiff2ps_LDADD = $(LIBTIFF) $(LIBPORT) -- --tiff2rgba_SOURCES = tiff2rgba.c -+# Uses private functions -+tiff2rgba_CFLAGS = -fno-whole-program -+tiff2rgba_SOURCES = tiff2rgba.c $(top_srcdir)/libtiff/tif_aux.c - tiff2rgba_LDADD = $(LIBTIFF) $(LIBPORT) - - tiffcmp_SOURCES = tiffcmp.c ---- port/dummy.c.orig -+++ port/dummy.c -@@ -4,6 +4,7 @@ - * Dummy function, just to be ensure that the library always will be created. - */ - -+__attribute__ ((visibility ("hidden"))) - void - libport_dummy_function() - { ---- port/libport.h.orig -+++ port/libport.h -@@ -25,13 +25,13 @@ - - #ifndef _LIBPORT_ - #define _LIBPORT_ -- -+__attribute__ ((visibility ("hidden"))) - int getopt(int argc, char * const argv[], const char *optstring); - extern char *optarg; - extern int opterr; - extern int optind; - extern int optopt; -- -+__attribute__ ((visibility ("hidden"))) - int strcasecmp(const char *s1, const char *s2); - - #ifndef HAVE_GETOPT diff --git a/tiff.changes b/tiff.changes index b79c815..7575933 100644 --- a/tiff.changes +++ b/tiff.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Thu Mar 29 09:51:49 UTC 2012 - idonmez@suse.com + +- Add lzma support +- Implement %check +- Drop visibility patch because it breaks compilation + +------------------------------------------------------------------- +Wed Mar 28 18:06:34 UTC 2012 - i@marguerite.su + +- change package name libtiff4 to libtiff5. + library number is 5 actually. + +------------------------------------------------------------------- +Wed Mar 28 17:29:16 UTC 2012 - i@marguerite.su + +- Update to 4.0.1 + * configure.ac + - Add libtiff private dependency on -llzma for pkg-config + - Add support for using library symbol versioning on + ELF systems with the GNU linker. + * libtiff/tif_win32.c: Eliminate some minor 64-bit warnings in + tif_win32.c + * libtiff/tif_jpeg.c: Extra caution for case where sp is NULL. + * libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around + assumption tag fetching is always successful. + * libtiff/tiffio.h: Use double-underbar syntax in GCC printf + attribute specification to lessen the risk of accidental macro + substitution. + * Update automake used to 1.11.3. + ------------------------------------------------------------------- Wed Mar 28 12:12:23 UTC 2012 - cfarrell@suse.com diff --git a/tiff.spec b/tiff.spec index c1a4cbd..dbef2c3 100644 --- a/tiff.spec +++ b/tiff.spec @@ -16,34 +16,30 @@ # - Name: tiff -License: HPND -Group: Productivity/Graphics/Convertors BuildRequires: gcc-c++ BuildRequires: libjpeg-devel BuildRequires: libtool +BuildRequires: lzma-devel +BuildRequires: pkg-config BuildRequires: zlib-devel # bug437293 %ifarch ppc64 Obsoletes: tiff-64bit %endif -Version: 3.9.5 -Release: 6 -Summary: Tools for Converting from and to the Tiff Format +Version: 4.0.1 +Release: 0 +Summary: Tools for Converting from and to the Tiff Format +License: HPND +Group: Productivity/Graphics/Convertors # -Url: http://www.remotesensing.org/libtiff/ +Url: http://www.remotesensing.org/libtiff Source: tiff-%{version}.tar.bz2 Source2: README.SUSE Source3: baselibs.conf -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch2: tiff-%{version}-seek.patch -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch3: tiff-%{version}-tiff2pdf-colors.patch -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch9: tiff-%{version}-dont-fancy-upsampling.patch -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch10: tiff-visibility.patch # FYI: this issue is solved another way # http://bugzilla.maptools.org/show_bug.cgi?id=1985#c1 # Patch9: tiff-%{version}-lzw-CVE-2009-2285.patch @@ -53,8 +49,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build This package contains the library and support programs for the TIFF image format. -%package -n libtiff3 -License: HPND +%package -n libtiff5 Summary: The Tiff Library (with JPEG and compression support) Group: System/Libraries Provides: libtiff = %{version} @@ -65,18 +60,17 @@ Obsoletes: libtiff-64bit %endif # -%description -n libtiff3 +%description -n libtiff5 This package includes the tiff libraries. To link a program with libtiff, you will have to add -ljpeg and -lz to include the necessary libjpeg and libz in the linking process. %package -n libtiff-devel -License: HPND Summary: Development Tools for Programs which will use the libtiff Library Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: libstdc++-devel -Requires: libtiff3 = %{version} +Requires: libtiff5 = %{version} # bug437293 %ifarch ppc64 Obsoletes: tiff-devel-64bit @@ -90,16 +84,11 @@ the libtiff library. %prep %setup -q -%patch2 +%patch2 -p1 %patch3 -p1 %patch9 -p1 -%patch10 -find -type d -name "CVS" | xargs rm -rfv -find -type d | xargs chmod 755 %build -rm m4/ltversion.m4 m4/ltsugar.m4 m4/ltoptions.m4 m4/libtool.m4 -autoreconf --force --install -v %configure --disable-static --with-pic make %{?_smp_mflags} @@ -112,17 +101,19 @@ for f in `find %{buildroot}/%{_mandir} -type f -print ` ; do [ -f "`dirname $f`/$linkto" ] && ln -sf "$linkto" $f fi done + cp %{SOURCE2} . rm -rf %{buildroot}%{_datadir}/doc/tiff* rm -f %{buildroot}/%{_libdir}/*.la find html -name "Makefile*" | xargs rm -%post -n libtiff3 -p /sbin/ldconfig +%check +cd test +make %{?_smp_mflags} check -%postun -n libtiff3 -p /sbin/ldconfig +%post -n libtiff5 -p /sbin/ldconfig -%clean -rm -rf %{buildroot} +%postun -n libtiff5 -p /sbin/ldconfig %files %defattr(-,root,root) @@ -131,7 +122,7 @@ rm -rf %{buildroot} %doc README COPYRIGHT VERSION ChangeLog TODO RELEASE-DATE %doc %{_mandir}/man1/* -%files -n libtiff3 +%files -n libtiff5 %defattr(-,root,root) %doc README COPYRIGHT README.SUSE %{_libdir}/*.so.* @@ -140,6 +131,7 @@ rm -rf %{buildroot} %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc %doc %{_mandir}/man3/* %changelog