From bb8f5e0a310e1e3aeee944c851b0a970d18cc677913beb96bb392a68b9a68afa Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Mon, 6 Jan 2014 16:04:18 +0000 Subject: [PATCH] Accepting request 212886 from home:elvigia:branches:multimedia:libs - Correct lcms-endian.patch to rely on autoconf only, no extra arch specific preprocessor hackery. OBS-URL: https://build.opensuse.org/request/show/212886 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lcms2?expand=0&rev=57 --- lcms-endian.patch | 144 +++++++++++++++++++++++++++++++++++++++++++--- lcms2.changes | 6 ++ lcms2.spec | 5 +- 3 files changed, 145 insertions(+), 10 deletions(-) diff --git a/lcms-endian.patch b/lcms-endian.patch index 5ed2d20..56c655a 100644 --- a/lcms-endian.patch +++ b/lcms-endian.patch @@ -1,15 +1,143 @@ ---- include/lcms2.h.orig 2010-05-18 16:11:48.852037802 +0200 -+++ include/lcms2.h 2010-05-18 16:12:22.116041439 +0200 -@@ -30,8 +30,10 @@ +--- include/lcms2.h.orig ++++ include/lcms2.h +@@ -30,9 +30,6 @@ // ********** Configuration toggles **************************************** -// Uncomment this one if you are using big endian machines -// #define CMS_USE_BIG_ENDIAN 1 -+#include -+#if __BYTE_ORDER == __BIG_ENDIAN -+#define USE_BIG_ENDIAN 1 -+#endif - +- // Uncomment this one if your compiler/machine does NOT support the // "long long" type. + // #define CMS_DONT_USE_INT64 1 +@@ -170,33 +167,6 @@ typedef int cmsBool; + # define CMS_IS_WINDOWS_ 1 + #endif + +-// Try to detect big endian platforms. This list can be endless, so only some checks are performed over here. +-// you can pass this toggle to the compiler by using -DCMS_USE_BIG_ENDIAN or something similar +- +-#if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN) +-# define CMS_USE_BIG_ENDIAN 1 +-#endif +- +-#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(sparc) +-# define CMS_USE_BIG_ENDIAN 1 +-#endif +- +-#if defined(__ppc__) || defined(__s390__) || defined(__s390x__) +-# define CMS_USE_BIG_ENDIAN 1 +-#endif +- +-#ifdef TARGET_CPU_PPC +-# if TARGET_CPU_PPC +-# define CMS_USE_BIG_ENDIAN 1 +-# endif +-#endif +- +-#ifdef macintosh +-# ifdef __BIG_ENDIAN__ +-# define CMS_USE_BIG_ENDIAN 1 +-# endif +-#endif +- + // Calling convention -- this is hardly platform and compiler dependent + #ifdef CMS_IS_WINDOWS_ + # if defined(CMS_DLL) || defined(CMS_DLL_BUILD) +--- src/cmsmd5.c.orig ++++ src/cmsmd5.c +@@ -26,7 +26,7 @@ + + #include "lcms2_internal.h" + +-#ifdef CMS_USE_BIG_ENDIAN ++#ifdef WORDS_BIGENDIAN + + static + void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs) +--- src/cmsplugin.c.orig ++++ src/cmsplugin.c +@@ -36,7 +36,7 @@ + // Adjust a word value after being readed/ before being written from/to an ICC profile + cmsUInt16Number CMSEXPORT _cmsAdjustEndianess16(cmsUInt16Number Word) + { +-#ifndef CMS_USE_BIG_ENDIAN ++#ifndef WORDS_BIGENDIAN + + cmsUInt8Number* pByte = (cmsUInt8Number*) &Word; + cmsUInt8Number tmp; +@@ -57,7 +57,7 @@ cmsUInt16Number CMSEXPORT _cmsAdjustEnd + + cmsUInt32Number CMSEXPORT _cmsAdjustEndianess32(cmsUInt32Number DWord) + { +-#ifndef CMS_USE_BIG_ENDIAN ++#ifndef WORDS_BIGENDIAN + + cmsUInt8Number* pByte = (cmsUInt8Number*) &DWord; + cmsUInt8Number temp1; +@@ -79,7 +79,7 @@ cmsUInt32Number CMSEXPORT _cmsAdjustEnd + void CMSEXPORT _cmsAdjustEndianess64(cmsUInt64Number* Result, cmsUInt64Number* QWord) + { + +-#ifndef CMS_USE_BIG_ENDIAN ++#ifndef WORDS_BIGENDIAN + + cmsUInt8Number* pIn = (cmsUInt8Number*) QWord; + cmsUInt8Number* pOut = (cmsUInt8Number*) Result; +--- testbed/testcms2.c.orig ++++ testbed/testcms2.c +@@ -719,15 +719,15 @@ cmsInt32Number CheckEndianess(void) + u.l = 1; + BigEndian = (u.c[sizeof (long) - 1] == 1); + +-#ifdef CMS_USE_BIG_ENDIAN ++#ifdef WORDS_BIGENDIAN + IsOk = BigEndian; + #else + IsOk = !BigEndian; + #endif + + if (!IsOk) { +- Fail("\nOOOPPSS! You have CMS_USE_BIG_ENDIAN toggle misconfigured!\n\n" +- "Please, edit lcms2.h and %s the CMS_USE_BIG_ENDIAN toggle.\n", BigEndian? "uncomment" : "comment"); ++ Fail("\nOOOPPSS! You have WORDS_BIGENDIAN toggle misconfigured!\n\n" ++ "Please, edit lcms2.h and %s the WORDS_BIGENDIAN toggle.\n", BigEndian? "uncomment" : "comment"); + return 0; + } + +--- src/lcms2_internal.h.orig ++++ src/lcms2_internal.h +@@ -140,7 +140,7 @@ cmsINLINE int _cmsQuickFloor(cmsFloat64N + + temp.val = val + _lcms_double2fixmagic; + +-#ifdef CMS_USE_BIG_ENDIAN ++#ifdef WORDS_BIGENDIAN + return temp.halves[1] >> 16; + #else + return temp.halves[0] >> 16; +--- configure.ac.orig ++++ configure.ac +@@ -65,7 +65,8 @@ AC_ARG_WITH(zlib, + AC_PROG_CC_STDC + AC_PROG_CPP + AC_PROG_CXX +- ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + #AM_PROG_LD + #AC_SUBST(LD) + #AC_PROG_INSTALL +@@ -79,11 +80,7 @@ AC_EXEEXT + AC_OBJEXT + + # Configure libtool +-AC_ENABLE_SHARED +-AC_ENABLE_STATIC +-AC_LIBTOOL_WIN32_DLL +-AC_LIBTOOL_SETUP +-AC_PROG_LIBTOOL ++LT_INIT([disable-static pic-only win32-dll]) + AC_SUBST(LIBTOOL_DEPS) + + # Add configure option --enable-maintainer-mode which enables dependency diff --git a/lcms2.changes b/lcms2.changes index 13830f1..b8d0dbf 100644 --- a/lcms2.changes +++ b/lcms2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 6 06:02:04 UTC 2014 - crrodriguez@opensuse.org + +- Correct lcms-endian.patch to rely on autoconf only, no + extra arch specific preprocessor hackery. + ------------------------------------------------------------------- Wed Jul 3 02:42:52 UTC 2013 - mrdocs@opensuse.org diff --git a/lcms2.spec b/lcms2.spec index 82d7bbe..a176728 100644 --- a/lcms2.spec +++ b/lcms2.spec @@ -1,7 +1,7 @@ # # spec file for package lcms2 # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 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 @@ -27,6 +27,7 @@ Release: 0 %if 0%{?suse_version} BuildRequires: libjpeg-devel BuildRequires: libtiff-devel +BuildRequires: libtool BuildRequires: pkg-config BuildRequires: zlib-devel %endif @@ -100,7 +101,7 @@ chmod a-x doc/* COPYING AUTHORS %build #export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" #export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" - +autoreconf -fiv %configure --disable-static make %{?_smp_flags}