Accepting request 93388 from multimedia:libs

- Open all fds with O_CLOEXEC
- Use gcc visibility, symbol table shrinks around 50% ... (forwarded request 93381 from elvigia)

OBS-URL: https://build.opensuse.org/request/show/93388
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lcms2?expand=0&rev=14
This commit is contained in:
Stephan Kulow 2011-11-25 10:12:04 +00:00 committed by Git OBS Bridge
commit fb49755f1e
6 changed files with 70 additions and 6 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42f1cb1a8c6194d422a30f21691c1417659856db8e63bf0056d2c15d2871db56
size 4133856

3
lcms2-2.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b6f2a1be1a2b7ca54bfab69b32242d383a176637f161eeeaef451bd9fc1195cc
size 4193353

38
lcms2-ocloexec.patch Normal file
View File

@ -0,0 +1,38 @@
--- src/cmscgats.c.orig
+++ src/cmscgats.c
@@ -835,7 +835,7 @@ void InSymbol(cmsIT8* it8)
return;
}
- FileNest->Stream = fopen(FileNest->FileName, "rt");
+ FileNest->Stream = fopen(FileNest->FileName, "rte");
if (FileNest->Stream == NULL) {
SynError(it8, "File %s not found", FileNest->FileName);
@@ -1669,7 +1669,7 @@ cmsBool CMSEXPORT cmsIT8SaveToFile(cmsHA
memset(&sd, 0, sizeof(sd));
- sd.stream = fopen(cFileName, "wt");
+ sd.stream = fopen(cFileName, "wte");
if (!sd.stream) return FALSE;
WriteStr(&sd, it8->SheetType);
@@ -2142,7 +2142,7 @@ cmsBool IsMyFile(const char* FileName)
cmsUInt32Number Size;
cmsUInt8Number Ptr[133];
- fp = fopen(FileName, "rt");
+ fp = fopen(FileName, "rte");
if (!fp) {
cmsSignalError(0, cmsERROR_FILE, "File '%s' not found", FileName);
return FALSE;
@@ -2220,7 +2220,7 @@ cmsHANDLE CMSEXPORT cmsIT8LoadFromFile(
if (!hIT8) return NULL;
- it8 ->FileStack[0]->Stream = fopen(cFileName, "rt");
+ it8 ->FileStack[0]->Stream = fopen(cFileName, "rte");
if (!it8 ->FileStack[0]->Stream) {
cmsIT8Free(hIT8);

16
lcms2-visibility.patch Normal file
View File

@ -0,0 +1,16 @@
--- src/lcms2_internal.h.orig
+++ src/lcms2_internal.h
@@ -37,6 +37,7 @@
// assert macro is part of C99 as per 7.2
#include <assert.h>
+#pragma GCC visibility push(hidden)
// Some needed constants
#ifndef M_PI
# define M_PI 3.14159265358979323846
@@ -625,4 +626,5 @@ cmsBool _cmsBuildRGB2XYZtransferMatrix
#define _lcms_internal_H
+#pragma GCC visibility pop
#endif

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Nov 24 02:12:00 UTC 2011 - crrodriguez@opensuse.org
- Open all fds with O_CLOEXEC
- Use gcc visibility, symbol table shrinks around 50% ...
-------------------------------------------------------------------
Fri Jun 10 23:36:41 UTC 2011 - mrdocs@opensuse.org

View File

@ -39,9 +39,11 @@ BuildRequires: gcc libjpeg-devel libtiff-devel pkgconfig zlib-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
Source0: http://sourceforge.net/projects/lcms/files/lcms/%{version}/%{name}-%{version}.tar.gz
Source1: baselibs.conf
Patch: lcms-endian.patch
Patch1: lcms2-ocloexec.patch
Patch2: lcms2-visibility.patch
%description
Littlecms is a small speed optimized color management engine.
@ -84,11 +86,13 @@ This package contains user and developer documentation for lcms2.
%prep
%setup -q
%patch
%patch1
%patch2
chmod a-x doc/* COPYING AUTHORS
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
#export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
#export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --disable-static