diff mbox

[oe,meta-oe] libsdl-image: use pkg-config for libSDL detection

Message ID 1403176782-30997-1-git-send-email-koen.kooi@linaro.org
State New
Headers show

Commit Message

Koen Kooi June 19, 2014, 11:19 a.m. UTC
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
 ...igure-use-pkg-config-for-libSDL-detection.patch | 38 ++++++++++++++++++++++
 .../libsdl-image/libsdl-image_1.2.12.bb            |  6 ++--
 2 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-multimedia/libsdl-image/libsdl-image/0001-configure-use-pkg-config-for-libSDL-detection.patch

Comments

Richard Purdie June 20, 2014, 12:53 p.m. UTC | #1
On Thu, 2014-06-19 at 13:19 +0200, Koen Kooi wrote:
> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> ---
>  ...igure-use-pkg-config-for-libSDL-detection.patch | 38 ++++++++++++++++++++++
>  .../libsdl-image/libsdl-image_1.2.12.bb            |  6 ++--
>  2 files changed, 41 insertions(+), 3 deletions(-)
>  create mode 100644 meta-oe/recipes-multimedia/libsdl-image/libsdl-image/0001-configure-use-pkg-config-for-libSDL-detection.patch

I have a better proposal here for OE-Core:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=15cad4f3a989141bc8b310142762374fe6177919

which fixes this one at source.

Cheers,

Richard
diff mbox

Patch

diff --git a/meta-oe/recipes-multimedia/libsdl-image/libsdl-image/0001-configure-use-pkg-config-for-libSDL-detection.patch b/meta-oe/recipes-multimedia/libsdl-image/libsdl-image/0001-configure-use-pkg-config-for-libSDL-detection.patch
new file mode 100644
index 0000000..192ee16
--- /dev/null
+++ b/meta-oe/recipes-multimedia/libsdl-image/libsdl-image/0001-configure-use-pkg-config-for-libSDL-detection.patch
@@ -0,0 +1,38 @@ 
+From 644ec4d18eb83a0ca826001ebfb7f4782cb8db0f Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen.kooi@linaro.org>
+Date: Thu, 19 Jun 2014 13:16:21 +0200
+Subject: [PATCH] configure: use pkg-config for libSDL detection
+
+Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
+---
+ configure.in | 14 ++++++--------
+ 1 file changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index e7010e9..cbb536d 100644
+--- a/configure.in
++++ b/configure.in
+@@ -113,14 +113,12 @@ find_lib()
+ }
+ 
+ dnl Check for SDL
+-SDL_VERSION=1.2.10
+-AC_SUBST(SDL_VERSION)
+-AM_PATH_SDL($SDL_VERSION,
+-            :,
+-           AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
+-)
+-CFLAGS="$CFLAGS $SDL_CFLAGS"
+-LIBS="$LIBS $SDL_LIBS"
++PKG_CHECK_MODULES([LIBSDL], [sdl > 1.2.10], [
++  CFLAGS="$CFLAGS $LIBSDL_CFLAGS"
++  LIBS="$LIBS $LIBSDL_LIBS"
++], [
++  AC_MSG_ERROR([$LIBXML_PKG_ERRORS])
++])
+ saved_LIBS="$LIBS"
+ 
+ dnl Check command-line options
+-- 
+1.9.3
+
diff --git a/meta-oe/recipes-multimedia/libsdl-image/libsdl-image_1.2.12.bb b/meta-oe/recipes-multimedia/libsdl-image/libsdl-image_1.2.12.bb
index 4c5fe29..bc49ff8 100644
--- a/meta-oe/recipes-multimedia/libsdl-image/libsdl-image_1.2.12.bb
+++ b/meta-oe/recipes-multimedia/libsdl-image/libsdl-image_1.2.12.bb
@@ -6,7 +6,9 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=613734b7586e1580ef944961c6d62227"
 
 DEPENDS = "tiff zlib libpng jpeg virtual/libsdl"
 
-SRC_URI = "http://www.libsdl.org/projects/SDL_image/release/SDL_image-${PV}.tar.gz"
+SRC_URI = "http://www.libsdl.org/projects/SDL_image/release/SDL_image-${PV}.tar.gz \
+           file://0001-configure-use-pkg-config-for-libSDL-detection.patch \
+          "
 SRC_URI[md5sum] = "a0f9098ebe5400f0bdc9b62e60797ecb"
 SRC_URI[sha256sum] = "0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699"
 
@@ -14,8 +16,6 @@  S = "${WORKDIR}/SDL_image-${PV}"
 
 inherit autotools
 
-export SDL_CONFIG = "${STAGING_BINDIR_CROSS}/sdl-config"
-
 # Disable the run-time loading of the libs and bring back the soname dependencies.
 EXTRA_OECONF += "--disable-jpg-shared --disable-png-shared -disable-tif-shared"