[oe-commits] Martin Jansa : libgphoto2: add configure option for gd and add PACKAGECONFIG

git at git.openembedded.org git at git.openembedded.org
Thu Aug 22 07:40:46 UTC 2013


Module: meta-openembedded.git
Branch: dylan-next
Commit: 135cbe81bbb2b468eef6b96f6a06dadb2da7a136
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=135cbe81bbb2b468eef6b96f6a06dadb2da7a136

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Sat Jul 13 16:05:39 2013 +0200

libgphoto2: add configure option for gd and add PACKAGECONFIG

* it's autodetected and pulls couple of other dependencies
  freetype gd libpng lockdev zlib

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../libgphoto2-2.4.11/allow.to.disable.gd.patch    |   33 ++++++++++++++++++++
 .../recipes-graphics/gphoto2/libgphoto2_2.4.11.bb  |    6 +++-
 2 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.4.11/allow.to.disable.gd.patch b/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.4.11/allow.to.disable.gd.patch
new file mode 100644
index 0000000..aa1a124
--- /dev/null
+++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.4.11/allow.to.disable.gd.patch
@@ -0,0 +1,33 @@
+--- libgphoto2-2.4.11.orig/configure.ac	2013-07-19 21:59:10.857223729 +0200
++++ libgphoto2-2.4.11/configure.ac	2013-07-19 22:06:13.873233928 +0200
+@@ -270,15 +270,21 @@
+ dnl ---------------------------------------------------------------------------
+ dnl check for libgd
+ dnl ---------------------------------------------------------------------------
+-LIBGD=""
+-libgd_msg="no"
+-AC_SUBST(LIBGD)
+-AC_CHECK_LIB(gd,gdImageCreateTrueColor,[
+-	AC_CHECK_HEADER(gd.h,[
+-		AC_DEFINE(HAVE_GD,1,[define if we have LIBGD and its headers])
+-		LIBGD="-lgd"
+-		libgd_msg="yes"
+-	])
++AC_ARG_ENABLE([gd],
++[AS_HELP_STRING([--enable-gd],
++                [enable gd support])],[
++        LIBGD=""
++        libgd_msg="no"
++        AC_SUBST(LIBGD)
++        if test "x$enableval" != "xno"; then
++                AC_CHECK_LIB(gd,gdImageCreateTrueColor,[
++                        AC_CHECK_HEADER(gd.h,[
++                                AC_DEFINE(HAVE_GD,1,[define if we have LIBGD and its headers])
++                                LIBGD="-lgd"
++                                libgd_msg="yes"
++                        ])
++                ])
++        fi
+ ])
+ GP_CONFIG_MSG([GD conversion support],[${libgd_msg}])
+ 
diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.4.11.bb b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.4.11.bb
index fd547d9..ae783b8 100644
--- a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.4.11.bb
+++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.4.11.bb
@@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2
            file://10-camera-libgphoto2.fdi \
            file://40-libgphoto2.rules \
            file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
+           file://allow.to.disable.gd.patch \
 "
 
 SRC_URI[libgphoto2.md5sum] = "16a22b9739e45a95980ed62705fe7333"
@@ -25,6 +26,9 @@ inherit autotools pkgconfig gettext lib_package
 
 EXTRA_OECONF = " --with-drivers=all udevscriptdir=/lib/udev ac_cv_lib_ltdl_lt_dlcaller_register=yes"
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gd] = "--enable-gd,--disable-gd,gd"
+
 do_configure_append() {
     cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
     cd ${S}/libgphoto2_port/
@@ -44,7 +48,7 @@ PACKAGES =+ "libgphotoport libgphoto2-camlibs"
 FILES_libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*"
 RRECOMMENDS_${PN} = "libgphoto2-camlibs"
 
-FILES_libgphotoport = "${libdir}/libgphoto2_port.so.*" 
+FILES_libgphotoport = "${libdir}/libgphoto2_port.so.*"
 
 FILES_${PN} += "${base_libdir}/udev/* ${datadir}/hal"
 FILES_${PN}-dbg += "${libdir}/*/*/.debug"



More information about the Openembedded-commits mailing list