[oe-commits] Jesse Zhang : ghostscript: fix endianness detection
git at git.openembedded.org
git at git.openembedded.org
Fri Feb 8 14:59:39 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: 0a07ec7d13becc7ce87c502e75a006300a7090a5
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0a07ec7d13becc7ce87c502e75a006300a7090a5
Author: Jesse Zhang <sen.zhang at windriver.com>
Date: Sun Jan 6 09:56:19 2013 +0800
ghostscript: fix endianness detection
[ CQID: WIND00394747 ]
The original patch removes endianness detection completely, causing lcms
to be built against the wrong endian. Instead, pass the correct endian
through the recipe using SITEINFO_ENDIANNESS.
Signed-off-by: Jesse Zhang <sen.zhang at windriver.com>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
.../ghostscript-9.05-NOT-check-endian.patch | 40 ++++---------------
.../ghostscript/ghostscript_9.05.bb | 9 ++++-
2 files changed, 17 insertions(+), 32 deletions(-)
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
index ab4326f..c79063f 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
@@ -4,15 +4,14 @@ So remove the check for Yocto.
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang at windriver.com>
+Signed-off-by: Sen Zhang <sen.zhang at windriver.com>
---- ghostscript-9.05/base/configure.ac.orig 2012-03-14 15:28:30.828956872 +0800
-+++ ghostscript-9.05/base/configure.ac 2012-03-14 15:29:05.060957357 +0800
-@@ -1739,25 +1739,25 @@
- dnl check for big/little endian for LCMS
- dnl --------------------------------------------------
+--- ghostscript-9.05/base/configure.ac.orig 2013-01-06 10:02:08.699479511 +0800
++++ ghostscript-9.05/base/configure.ac 2013-01-06 10:01:52.275382106 +0800
+@@ -1741,13 +1741,13 @@
+
+ AC_MSG_CHECKING([for big endian])
--AC_MSG_CHECKING([for big endian])
--
-AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include <stdio.h>], [
- static const int one = 1;
@@ -20,18 +19,6 @@ Signed-off-by: Kang Kai <kai.kang at windriver.com>
- ])],
- [LCMS_BIGENDIAN=1],
- [LCMS_BIGENDIAN=0])
--
--if test "x$LCMS_BIGENDIAN" != "x0"; then
-- LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
-- LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$LCMS_BIGENDIAN"
-- AC_MSG_RESULT(yes)
--else
-- LCMS_ENDIAN=
-- LCMS2_ENDIAN=
-- AC_MSG_RESULT(no)
--fi
-+dnl AC_MSG_CHECKING([for big endian])
-+dnl
+dnl AC_RUN_IFELSE(
+dnl [AC_LANG_PROGRAM([#include <stdio.h>], [
+dnl static const int one = 1;
@@ -39,16 +26,7 @@ Signed-off-by: Kang Kai <kai.kang at windriver.com>
+dnl ])],
+dnl [LCMS_BIGENDIAN=1],
+dnl [LCMS_BIGENDIAN=0])
-+dnl
-+dnl if test "x$LCMS_BIGENDIAN" != "x0"; then
-+dnl LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
-+dnl LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$LCMS_BIGENDIAN"
-+dnl AC_MSG_RESULT(yes)
-+dnl else
-+dnl LCMS_ENDIAN=
-+dnl LCMS2_ENDIAN=
-+dnl AC_MSG_RESULT(no)
-+dnl fi
-
- AC_SUBST(LCMS_ENDIAN)
+ if test "x$LCMS_BIGENDIAN" != "x0"; then
+ LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.05.bb b/meta/recipes-extended/ghostscript/ghostscript_9.05.bb
index 93c503f..9ec5712 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.05.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.05.bb
@@ -15,7 +15,7 @@ SECTION = "console/utils"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c5326026692dbed183f0558f926580f8"
-PR = "r5"
+PR = "r6"
DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
DEPENDS_class-native = ""
@@ -63,6 +63,13 @@ do_configure_prepend () {
if [ -e ${WORKDIR}/objarch.h ]; then
cp ${WORKDIR}/objarch.h obj/arch.h
fi
+ if [ ${SITEINFO_ENDIANNESS} = "le" ]; then
+ export LCMS_BIGENDIAN="0"
+ export LCMS2_BIGENDIAN="0"
+ else
+ export LCMS_BIGENDIAN="1"
+ export LCMS2_BIGENDIAN="1"
+ fi
}
do_configure_append () {
More information about the Openembedded-commits
mailing list