From 2ff02e0b1da6224c4a521016a711ae3323c3cf223e480bb7a558edafdc8dfce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 29 Mar 2012 09:41:00 +0000 Subject: [PATCH 1/3] Accepting request 111622 from home:MargueriteSu:submission-to-devel-repository - change package name libtiff4 to libtiff5. library number is 5 actually. - 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. OBS-URL: https://build.opensuse.org/request/show/111622 OBS-URL: https://build.opensuse.org/package/show/graphics/tiff?expand=0&rev=39 --- baselibs.conf | 4 +- tiff-3.9.5-dont-fancy-upsampling.patch | 12 -- tiff-3.9.5.tar.bz2 | 3 - tiff-4.0.1-dont-fancy-upsampling.patch | 11 ++ ....patch => tiff-4.0.1-tiff2pdf-colors.patch | 8 +- tiff-4.0.1.tar.bz2 | 3 + tiff-visibility.patch | 127 +++++++++--------- tiff.changes | 24 ++++ tiff.spec | 32 +++-- 9 files changed, 126 insertions(+), 98 deletions(-) delete mode 100644 tiff-3.9.5-dont-fancy-upsampling.patch delete mode 100644 tiff-3.9.5.tar.bz2 create mode 100644 tiff-4.0.1-dont-fancy-upsampling.patch rename tiff-3.9.5-tiff2pdf-colors.patch => tiff-4.0.1-tiff2pdf-colors.patch (57%) create mode 100644 tiff-4.0.1.tar.bz2 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.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-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 index 6ac7461..8499064 100644 --- a/tiff-visibility.patch +++ b/tiff-visibility.patch @@ -1,7 +1,28 @@ ---- libtiff/tiffiop.h.orig -+++ libtiff/tiffiop.h -@@ -70,6 +70,8 @@ typedef TIFF_UINT64_T uint64; - #include "tiffio.h" +diff -urN tiff-4.0.1.orig/libtiff/tif_dir.h tiff-4.0.1/libtiff/tif_dir.h +--- tiff-4.0.1.orig/libtiff/tif_dir.h 2012-03-29 01:03:15.682848263 +0800 ++++ tiff-4.0.1/libtiff/tif_dir.h 2012-03-29 01:19:58.342313294 +0800 +@@ -30,6 +30,8 @@ + * ``Library-private'' Directory-related Definitions. + */ + ++#pragma GCC visibility push(hidden) ++ + typedef struct { + const TIFFField *info; + int count; +@@ -295,6 +297,7 @@ + #if defined(__cplusplus) + } + #endif ++#pragma GCC visibility pop + #endif /* _TIFFDIR_ */ + + /* vim: set ts=8 sts=8 sw=8 noet: */ +diff -urN tiff-4.0.1.orig/libtiff/tiffiop.h tiff-4.0.1/libtiff/tiffiop.h +--- tiff-4.0.1.orig/libtiff/tiffiop.h 2012-03-29 01:03:15.680848289 +0800 ++++ tiff-4.0.1/libtiff/tiffiop.h 2012-03-29 01:15:56.229340123 +0800 +@@ -61,6 +61,8 @@ + #include "tif_dir.h" +#pragma GCC visibility push(hidden) @@ -9,7 +30,7 @@ #ifndef STRIP_SIZE_DEFAULT # define STRIP_SIZE_DEFAULT 8192 #endif -@@ -341,6 +343,7 @@ extern TIFFCodec _TIFFBuiltinCODECS[]; +@@ -354,6 +356,7 @@ #if defined(__cplusplus) } #endif @@ -17,8 +38,9 @@ #endif /* _TIFFIOP_ */ /* vim: set ts=8 sts=8 sw=8 noet: */ ---- libtiff/tif_predict.h.orig -+++ libtiff/tif_predict.h +diff -urN tiff-4.0.1.orig/libtiff/tif_predict.h tiff-4.0.1/libtiff/tif_predict.h +--- tiff-4.0.1.orig/libtiff/tif_predict.h 2012-03-29 01:03:15.680848289 +0800 ++++ tiff-4.0.1/libtiff/tif_predict.h 2012-03-29 01:17:30.841157313 +0800 @@ -30,6 +30,8 @@ * ``Library-private'' Support for the Predictor Tag */ @@ -28,7 +50,7 @@ /* * 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*); +@@ -65,6 +67,7 @@ #if defined(__cplusplus) } #endif @@ -36,28 +58,42 @@ #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. +diff -urN tiff-4.0.1.orig/port/dummy.c tiff-4.0.1/port/dummy.c +--- tiff-4.0.1.orig/port/dummy.c 2012-03-29 01:03:15.677848325 +0800 ++++ tiff-4.0.1/port/dummy.c 2012-03-29 01:23:33.815619509 +0800 +@@ -4,6 +4,8 @@ + * Dummy function, just to be ensure that the library always will be created. */ -- -+#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 ++__attribute__ ((visibility ("hidden"))) ++ + void + libport_dummy_function() + { +diff -urN tiff-4.0.1.orig/port/libport.h tiff-4.0.1/port/libport.h +--- tiff-4.0.1.orig/port/libport.h 2012-03-29 01:03:15.677848325 +0800 ++++ tiff-4.0.1/port/libport.h 2012-03-29 01:24:41.197777115 +0800 +@@ -26,12 +26,16 @@ + #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 -urN tiff-4.0.1.orig/tools/Makefile.am tiff-4.0.1/tools/Makefile.am +--- tiff-4.0.1.orig/tools/Makefile.am 2012-03-29 01:03:15.657848575 +0800 ++++ tiff-4.0.1/tools/Makefile.am 2012-03-29 01:22:55.593097355 +0800 +@@ -62,6 +62,8 @@ AM_LDFLAGS = $(LIBDIR) endif @@ -66,7 +102,7 @@ bmp2tiff_SOURCES = bmp2tiff.c bmp2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -@@ -86,7 +88,9 @@ ras2tiff_LDADD = $(LIBTIFF) $(LIBPORT) +@@ -86,7 +88,9 @@ raw2tiff_SOURCES = raw2tiff.c raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT) @@ -77,11 +113,10 @@ rgb2ycbcr_LDADD = $(LIBTIFF) $(LIBPORT) thumbnail_SOURCES = thumbnail.c -@@ -100,8 +104,9 @@ tiff2pdf_LDADD = $(LIBTIFF) $(LIBPORT) - +@@ -101,7 +105,9 @@ tiff2ps_SOURCES = tiff2ps.c tiff2ps_LDADD = $(LIBTIFF) $(LIBPORT) -- + -tiff2rgba_SOURCES = tiff2rgba.c +# Uses private functions +tiff2rgba_CFLAGS = -fno-whole-program @@ -89,31 +124,3 @@ 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..20b1fbc 100644 --- a/tiff.changes +++ b/tiff.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +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..9243016 100644 --- a/tiff.spec +++ b/tiff.spec @@ -15,8 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: tiff License: HPND Group: Productivity/Graphics/Convertors @@ -24,20 +22,22 @@ BuildRequires: gcc-c++ BuildRequires: libjpeg-devel BuildRequires: libtool BuildRequires: zlib-devel +BuildRequires: pkg-config # 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: 1 +Summary: Tools for Converting from and to the Tiff Format # -Url: http://www.remotesensing.org/libtiff/ +Url: http://www.remotesensing.org/libtiff Source: tiff-%{version}.tar.bz2 Source2: README.SUSE Source3: baselibs.conf +# FYI I think this is fixed by upstream, but please check. # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch2: tiff-%{version}-seek.patch +#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 @@ -53,7 +53,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build This package contains the library and support programs for the TIFF image format. -%package -n libtiff3 +%package -n libtiff5 License: HPND Summary: The Tiff Library (with JPEG and compression support) Group: System/Libraries @@ -65,7 +65,7 @@ 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. @@ -90,10 +90,10 @@ the libtiff library. %prep %setup -q -%patch2 +#%patch2 %patch3 -p1 %patch9 -p1 -%patch10 +%patch10 -p1 find -type d -name "CVS" | xargs rm -rfv find -type d | xargs chmod 755 @@ -117,12 +117,9 @@ rm -rf %{buildroot}%{_datadir}/doc/tiff* rm -f %{buildroot}/%{_libdir}/*.la find html -name "Makefile*" | xargs rm -%post -n libtiff3 -p /sbin/ldconfig +%post -n libtiff5 -p /sbin/ldconfig -%postun -n libtiff3 -p /sbin/ldconfig - -%clean -rm -rf %{buildroot} +%postun -n libtiff5 -p /sbin/ldconfig %files %defattr(-,root,root) @@ -131,7 +128,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 +137,7 @@ rm -rf %{buildroot} %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc %doc %{_mandir}/man3/* %changelog From faee54d009287d2d4ddead209d716209dc50ce797a8715cf0da9b812723b23fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 29 Mar 2012 09:52:36 +0000 Subject: [PATCH 2/3] - Add lzma support - Implement %check - Drop visibility patch because it breaks compilation OBS-URL: https://build.opensuse.org/package/show/graphics/tiff?expand=0&rev=40 --- tiff-3.9.5-seek.patch | 13 ----- tiff-4.0.1-seek.patch | 13 +++++ tiff-visibility.patch | 126 ------------------------------------------ tiff.changes | 7 +++ tiff.spec | 32 +++++------ 5 files changed, 33 insertions(+), 158 deletions(-) delete mode 100644 tiff-3.9.5-seek.patch create mode 100644 tiff-4.0.1-seek.patch delete mode 100644 tiff-visibility.patch 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-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-visibility.patch b/tiff-visibility.patch deleted file mode 100644 index 8499064..0000000 --- a/tiff-visibility.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -urN tiff-4.0.1.orig/libtiff/tif_dir.h tiff-4.0.1/libtiff/tif_dir.h ---- tiff-4.0.1.orig/libtiff/tif_dir.h 2012-03-29 01:03:15.682848263 +0800 -+++ tiff-4.0.1/libtiff/tif_dir.h 2012-03-29 01:19:58.342313294 +0800 -@@ -30,6 +30,8 @@ - * ``Library-private'' Directory-related Definitions. - */ - -+#pragma GCC visibility push(hidden) -+ - typedef struct { - const TIFFField *info; - int count; -@@ -295,6 +297,7 @@ - #if defined(__cplusplus) - } - #endif -+#pragma GCC visibility pop - #endif /* _TIFFDIR_ */ - - /* vim: set ts=8 sts=8 sw=8 noet: */ -diff -urN tiff-4.0.1.orig/libtiff/tiffiop.h tiff-4.0.1/libtiff/tiffiop.h ---- tiff-4.0.1.orig/libtiff/tiffiop.h 2012-03-29 01:03:15.680848289 +0800 -+++ tiff-4.0.1/libtiff/tiffiop.h 2012-03-29 01:15:56.229340123 +0800 -@@ -61,6 +61,8 @@ - - #include "tif_dir.h" - -+#pragma GCC visibility push(hidden) -+ - #ifndef STRIP_SIZE_DEFAULT - # define STRIP_SIZE_DEFAULT 8192 - #endif -@@ -354,6 +356,7 @@ - #if defined(__cplusplus) - } - #endif -+#pragma GCC visibility pop - #endif /* _TIFFIOP_ */ - - /* vim: set ts=8 sts=8 sw=8 noet: */ -diff -urN tiff-4.0.1.orig/libtiff/tif_predict.h tiff-4.0.1/libtiff/tif_predict.h ---- tiff-4.0.1.orig/libtiff/tif_predict.h 2012-03-29 01:03:15.680848289 +0800 -+++ tiff-4.0.1/libtiff/tif_predict.h 2012-03-29 01:17:30.841157313 +0800 -@@ -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 @@ - #if defined(__cplusplus) - } - #endif -+#pragma GCC visibility pop - #endif /* _TIFFPREDICT_ */ - - /* vim: set ts=8 sts=8 sw=8 noet: */ -diff -urN tiff-4.0.1.orig/port/dummy.c tiff-4.0.1/port/dummy.c ---- tiff-4.0.1.orig/port/dummy.c 2012-03-29 01:03:15.677848325 +0800 -+++ tiff-4.0.1/port/dummy.c 2012-03-29 01:23:33.815619509 +0800 -@@ -4,6 +4,8 @@ - * Dummy function, just to be ensure that the library always will be created. - */ - -+__attribute__ ((visibility ("hidden"))) -+ - void - libport_dummy_function() - { -diff -urN tiff-4.0.1.orig/port/libport.h tiff-4.0.1/port/libport.h ---- tiff-4.0.1.orig/port/libport.h 2012-03-29 01:03:15.677848325 +0800 -+++ tiff-4.0.1/port/libport.h 2012-03-29 01:24:41.197777115 +0800 -@@ -26,12 +26,16 @@ - #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 -urN tiff-4.0.1.orig/tools/Makefile.am tiff-4.0.1/tools/Makefile.am ---- tiff-4.0.1.orig/tools/Makefile.am 2012-03-29 01:03:15.657848575 +0800 -+++ tiff-4.0.1/tools/Makefile.am 2012-03-29 01:22:55.593097355 +0800 -@@ -62,6 +62,8 @@ - AM_LDFLAGS = $(LIBDIR) - endif - -+AM_CFLAGS = -fwhole-program -+ - bmp2tiff_SOURCES = bmp2tiff.c - bmp2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - -@@ -86,7 +88,9 @@ - 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 -@@ -101,7 +105,9 @@ - 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 diff --git a/tiff.changes b/tiff.changes index 20b1fbc..7575933 100644 --- a/tiff.changes +++ b/tiff.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +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 diff --git a/tiff.spec b/tiff.spec index 9243016..b2ef0d4 100644 --- a/tiff.spec +++ b/tiff.spec @@ -15,35 +15,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + 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 -BuildRequires: pkg-config # bug437293 %ifarch ppc64 Obsoletes: tiff-64bit %endif Version: 4.0.1 -Release: 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 Source: tiff-%{version}.tar.bz2 Source2: README.SUSE Source3: baselibs.conf -# FYI I think this is fixed by upstream, but please check. -# 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 +Patch2: tiff-%{version}-seek.patch 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 @@ -54,7 +50,6 @@ This package contains the library and support programs for the TIFF image format. %package -n libtiff5 -License: HPND Summary: The Tiff Library (with JPEG and compression support) Group: System/Libraries Provides: libtiff = %{version} @@ -71,7 +66,6 @@ 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 @@ -90,16 +84,11 @@ the libtiff library. %prep %setup -q -#%patch2 +%patch2 -p1 %patch3 -p1 %patch9 -p1 -%patch10 -p1 -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,11 +101,16 @@ 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 +%check +cd test +make %{?_smp_mflags} check + %post -n libtiff5 -p /sbin/ldconfig %postun -n libtiff5 -p /sbin/ldconfig From 0a497295f10291db80c19bbcfd71270512a7f5e0435b85cb8bb84dbce270f90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 2 Apr 2012 08:31:28 +0000 Subject: [PATCH 3/3] Fix -devel dependency OBS-URL: https://build.opensuse.org/package/show/graphics/tiff?expand=0&rev=41 --- tiff.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiff.spec b/tiff.spec index b2ef0d4..dbef2c3 100644 --- a/tiff.spec +++ b/tiff.spec @@ -70,7 +70,7 @@ Summary: Development Tools for Programs which will use the libtiff Librar 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