From 6524557d85dfb28dbc0d784b91eeb95b47e361cb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 1 Oct 2010 00:37:05 -0700 Subject: [PATCH] libxcomp_3.3.0-3.bb: Fix compilation errors and dont pass -Wnested-externs to g++ Signed-off-by: Khem Raj --- .../files/use-const-char-pointer.patch | 35 +++++++++++++++++++ recipes/libxcomp/libxcomp_3.3.0-3.bb | 10 ++---- 2 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 recipes/libxcomp/files/use-const-char-pointer.patch diff --git a/recipes/libxcomp/files/use-const-char-pointer.patch b/recipes/libxcomp/files/use-const-char-pointer.patch new file mode 100644 index 0000000000..735e2e3a73 --- /dev/null +++ b/recipes/libxcomp/files/use-const-char-pointer.patch @@ -0,0 +1,35 @@ +Index: nxcomp/Loop.cpp +=================================================================== +--- nxcomp.orig/Loop.cpp ++++ nxcomp/Loop.cpp +@@ -10979,7 +10979,7 @@ int ParsePackOption(const char *opt) + packMethod == PACK_LOSSLESS || + packMethod == PACK_ADAPTIVE) + { +- char *dash = rindex(opt, '-'); ++ const char *dash = rindex(opt, '-'); + + if (dash != NULL && strlen(dash) == 2 && + *(dash + 1) >= '0' && *(dash + 1) <= '9') +Index: nxcomp/configure.in +=================================================================== +--- nxcomp.orig/configure.in ++++ nxcomp/configure.in +@@ -68,7 +68,7 @@ case "${gcc_version}" in + ;; + esac + +-AC_MSG_CHECKING([whether compiler accepts -Wmissing-declarations and -Wnested-externs]) ++AC_MSG_CHECKING([whether compiler accepts -Wmissing-declarations]) + gcc_version=`${CC} --version | grep 'gcc (GCC) [[3-4]].' | head -n 1` + case "${gcc_version}" in + gcc*) +@@ -77,7 +77,7 @@ case "${gcc_version}" in + + *) + AC_MSG_RESULT([yes]) +- CXXFLAGS="$CXXFLAGS -Wmissing-declarations -Wnested-externs" ++ CXXFLAGS="$CXXFLAGS -Wmissing-declarations" + ;; + esac + diff --git a/recipes/libxcomp/libxcomp_3.3.0-3.bb b/recipes/libxcomp/libxcomp_3.3.0-3.bb index e0d7fa6b43..68fc61da07 100644 --- a/recipes/libxcomp/libxcomp_3.3.0-3.bb +++ b/recipes/libxcomp/libxcomp_3.3.0-3.bb @@ -2,14 +2,14 @@ DESCRIPTION = "Compression library for x-protocol from nomachine" HOMEPAGE = "http://www.nomachine.com/" SECTION = "libs" LICENSE = "GPL" -PR = "r0" +PR = "r1" DEPENDS = "virtual/libx11 zlib jpeg libpng" SRC_URI = "http://64.34.161.181/download/3.3.0/sources/nxcomp-${PV}.tar.gz \ + file://use-const-char-pointer.patch \ " - inherit autotools S = "${WORKDIR}/nxcomp" @@ -20,11 +20,5 @@ do_install () { install -m 0644 NX.h ${D}${includedir}/ } - -do_stage () { - oe_libinstall -a -so libXcomp ${STAGING_LIBDIR} - install -m 0644 NX.h ${STAGING_INCDIR}/ -} - SRC_URI[md5sum] = "2327cca8e6116fd6a96345566336d81d" SRC_URI[sha256sum] = "069b3baa000b4a6125b86bddaf67c1b7fcd082eaf14b64113558fc30d6c71dd7" -- 2.39.5