forked from pool/lcms2
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lcms2?expand=0&rev=59
170 lines
5.0 KiB
Diff
170 lines
5.0 KiB
Diff
Index: include/lcms2.h
|
|
===================================================================
|
|
--- 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
|
|
-
|
|
// Uncomment this one if your compiler/machine does NOT support the
|
|
// "long long" type.
|
|
// #define CMS_DONT_USE_INT64 1
|
|
@@ -173,47 +170,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(__sgi__) || defined(__sgi) || defined(sparc)
|
|
-# define CMS_USE_BIG_ENDIAN 1
|
|
-#endif
|
|
-
|
|
-#if 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
|
|
-
|
|
-#if defined(__powerpc__) || defined(__ppc__) || defined(TARGET_CPU_PPC)
|
|
-# define CMS_USE_BIG_ENDIAN 1
|
|
-# if defined (__GNUC__) && defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN)
|
|
-# if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
-// // Don't use big endian for PowerPC little endian mode
|
|
-# undef CMS_USE_BIG_ENDIAN
|
|
-# endif
|
|
-# endif
|
|
-#endif
|
|
-
|
|
-// WORDS_BIGENDIAN takes precedence
|
|
-#if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN)
|
|
-# define CMS_USE_BIG_ENDIAN 1
|
|
-#endif
|
|
-
|
|
-#ifdef macintosh
|
|
-# ifdef __BIG_ENDIAN__
|
|
-# define CMS_USE_BIG_ENDIAN 1
|
|
-# endif
|
|
-# ifdef __LITTLE_ENDIAN__
|
|
-# undef CMS_USE_BIG_ENDIAN
|
|
-# endif
|
|
-#endif
|
|
-
|
|
// Calling convention -- this is hardly platform and compiler dependent
|
|
#ifdef CMS_IS_WINDOWS_
|
|
# if defined(CMS_DLL) || defined(CMS_DLL_BUILD)
|
|
Index: src/cmsmd5.c
|
|
===================================================================
|
|
--- 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)
|
|
Index: src/cmsplugin.c
|
|
===================================================================
|
|
--- 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;
|
|
Index: testbed/testcms2.c
|
|
===================================================================
|
|
--- testbed/testcms2.c.orig
|
|
+++ testbed/testcms2.c
|
|
@@ -761,15 +761,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;
|
|
}
|
|
|
|
Index: src/lcms2_internal.h
|
|
===================================================================
|
|
--- 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;
|
|
Index: configure.ac
|
|
===================================================================
|
|
--- configure.ac.orig
|
|
+++ configure.ac
|
|
@@ -51,7 +51,8 @@ AM_INIT_AUTOMAKE([foreign 1.7.2 no-defin
|
|
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
|
|
@@ -65,11 +66,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
|