Accepting request 93381 from home:elvigia:branches:multimedia:libs

- Open all fds with O_CLOEXEC
- Use gcc visibility, symbol table shrinks around 50% ...

OBS-URL: https://build.opensuse.org/request/show/93381
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lcms2?expand=0&rev=48
This commit is contained in:
Ismail Dönmez 2011-11-24 07:27:02 +00:00 committed by Git OBS Bridge
parent f33e12969b
commit 64acc883ef
4 changed files with 66 additions and 2 deletions

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

@ -42,6 +42,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
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