Accepting request 99532 from home:elvigia:branches:graphics
- remove libjpeg-devel and zlib-devel from libtiff-devel requires as they are _not_ required to use the library. Now, this _will_ break packages with wrong buildrequires for good. - Hide private symbols using gcc visibility, this has been applied only to functions that the source code clearly states that are internal to the library. - Run spec cleaner OBS-URL: https://build.opensuse.org/request/show/99532 OBS-URL: https://build.opensuse.org/package/show/graphics/tiff?expand=0&rev=35
This commit is contained in:
parent
aaadf64353
commit
0c5e91f27a
119
tiff-visibility.patch
Normal file
119
tiff-visibility.patch
Normal file
@ -0,0 +1,119 @@
|
||||
--- 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
|
16
tiff.changes
16
tiff.changes
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 10 01:21:45 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
||||
- remove libjpeg-devel and zlib-devel from libtiff-devel
|
||||
requires as they are _not_ required to use the library.
|
||||
Now, this _will_ break packages with wrong buildrequires
|
||||
for good.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 10 00:55:53 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
||||
- Hide private symbols using gcc visibility, this has been
|
||||
applied only to functions that the source code clearly states
|
||||
that are internal to the library.
|
||||
- Run spec cleaner
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 23 09:31:16 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
57
tiff.spec
57
tiff.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package tiff
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -18,25 +18,32 @@
|
||||
|
||||
|
||||
Name: tiff
|
||||
BuildRequires: gcc-c++ libjpeg-devel libtool zlib-devel
|
||||
License: PERMISSIVE-OSI-COMPLIANT ; MIT License (or similar)
|
||||
Group: Productivity/Graphics/Convertors
|
||||
AutoReqProv: on
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: zlib-devel
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: tiff-64bit
|
||||
%endif
|
||||
#
|
||||
Url: http://www.remotesensing.org/libtiff/
|
||||
Version: 3.9.5
|
||||
Release: 6
|
||||
Summary: Tools for Converting from and to the Tiff Format
|
||||
#
|
||||
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
|
||||
@ -46,19 +53,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
This package contains the library and support programs for the TIFF
|
||||
image format.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Sam Leffler <sam@engr.sgi.com>
|
||||
|
||||
%package -n libtiff3
|
||||
License: PERMISSIVE-OSI-COMPLIANT ; MIT License (or similar)
|
||||
Summary: The Tiff Library (with JPEG and compression support)
|
||||
Group: System/Libraries
|
||||
Provides: libtiff = %{version}
|
||||
Obsoletes: libtiff < %{version}
|
||||
AutoReqProv: on
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: libtiff-64bit
|
||||
@ -70,17 +70,13 @@ 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.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Sam Leffler <sam@engr.sgi.com>
|
||||
|
||||
%package -n libtiff-devel
|
||||
License: PERMISSIVE-OSI-COMPLIANT
|
||||
Summary: Development Tools for Programs which will use the libtiff Library
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libtiff3 = %{version} libjpeg-devel zlib-devel libstdc++-devel glibc-devel
|
||||
Requires: glibc-devel
|
||||
Requires: libstdc++-devel
|
||||
Requires: libtiff3 = %{version}
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: tiff-devel-64bit
|
||||
@ -92,13 +88,12 @@ This package contains the header files and static libraries for
|
||||
developing programs which will manipulate TIFF format image files using
|
||||
the libtiff library.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q
|
||||
%patch2
|
||||
%patch3 -p1
|
||||
%patch9 -p1
|
||||
%patch10
|
||||
find -type d -name "CVS" | xargs rm -rfv
|
||||
find -type d | xargs chmod 755
|
||||
|
||||
@ -109,17 +104,17 @@ autoreconf --force --install -v
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/{%{_mandir}/{man1,man3},usr/{bin,lib,include}}
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
for f in `find $RPM_BUILD_ROOT/%{_mandir} -type f -print ` ; do
|
||||
mkdir -p %{buildroot}/{%{_mandir}/{man1,man3},usr/{bin,lib,include}}
|
||||
%make_install
|
||||
for f in `find %{buildroot}/%{_mandir} -type f -print ` ; do
|
||||
if [ `wc -l <$f` -eq 1 ] && grep -q "^\.so " $f ; then
|
||||
linkto=`sed -e "s|^\.so ||" $f`
|
||||
[ -f "`dirname $f`/$linkto" ] && ln -sf "$linkto" $f
|
||||
fi
|
||||
done
|
||||
cp %{S:2} .
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/doc/tiff*
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
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
|
||||
@ -127,11 +122,11 @@ find html -name "Makefile*" | xargs rm
|
||||
%postun -n libtiff3 -p /sbin/ldconfig
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/bin/*
|
||||
%{_bindir}/*
|
||||
%doc html
|
||||
%doc README COPYRIGHT VERSION ChangeLog TODO RELEASE-DATE
|
||||
%doc %{_mandir}/man1/*
|
||||
@ -143,7 +138,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -n libtiff-devel
|
||||
%defattr(-,root,root)
|
||||
/usr/include/*
|
||||
%{_includedir}/*
|
||||
%{_libdir}/*.so
|
||||
%doc %{_mandir}/man3/*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user