- 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
This commit is contained in:
parent
2ff02e0b1d
commit
faee54d009
@ -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) \
|
13
tiff-4.0.1-seek.patch
Normal file
13
tiff-4.0.1-seek.patch
Normal file
@ -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) \
|
@ -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
|
@ -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
|
||||
|
||||
|
32
tiff.spec
32
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user