Patchwork [meta-oe] fbida 2.09: cleanups and use PACKAGECONFIG

login
register
mail settings
Submitter Matthieu CRAPET
Date Feb. 28, 2014, 1:04 p.m.
Message ID <1393592670-3088-1-git-send-email-Matthieu.Crapet@ingenico.com>
Download mbox | patch
Permalink /patch/67709/
State Superseded, archived
Headers show

Comments

Matthieu CRAPET - Feb. 28, 2014, 1:04 p.m.
There are now 3 packageconfig variables: gif, png, tiff.

Changes:
- fix missing $ for STAGING_INCDIR (jpeg version detection)
- use TABS for (shell) indentation
- add DESCRIPTION
- no more QA warnings
Use this to reveal:
sed -i -e '/^verbose/s/no/yes/' ${S}/mk/Autoconf.mk

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 meta-oe/recipes-graphics/fbida/fbida_2.09.bb | 39 +++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 6 deletions(-)
Martin Jansa - Feb. 28, 2014, 1:26 p.m.
On Fri, Feb 28, 2014 at 02:04:30PM +0100, Matthieu Crapet wrote:
> There are now 3 packageconfig variables: gif, png, tiff.
> 
> Changes:
> - fix missing $ for STAGING_INCDIR (jpeg version detection)
> - use TABS for (shell) indentation

Please don't.

meta-oe layers are using consistent indentation with 4 spaces and no
tabs.

> - add DESCRIPTION
> - no more QA warnings
> Use this to reveal:
> sed -i -e '/^verbose/s/no/yes/' ${S}/mk/Autoconf.mk
> 
> Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
> ---
>  meta-oe/recipes-graphics/fbida/fbida_2.09.bb | 39 +++++++++++++++++++++++-----
>  1 file changed, 33 insertions(+), 6 deletions(-)
> 
> diff --git a/meta-oe/recipes-graphics/fbida/fbida_2.09.bb b/meta-oe/recipes-graphics/fbida/fbida_2.09.bb
> index 32f376f..a3abf8f 100644
> --- a/meta-oe/recipes-graphics/fbida/fbida_2.09.bb
> +++ b/meta-oe/recipes-graphics/fbida/fbida_2.09.bb
> @@ -1,27 +1,54 @@
> +SUMMARY = "Framebuffer image and doc viewer tools"
> +DESCRIPTION = "The fbida project contains a few applications for viewing and editing images, \
> +               with the main focus being photos."
>  HOMEPAGE = "http://linux.bytesex.org/fbida/"
> -SUMMARY = "frame buffer image and doc viewer tools"
>  AUTHOR = "Gerd Hoffmann"
>  SECTION = "utils"
>  
>  LICENSE = "GPLv2"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
>  
> -DEPENDS = "virtual/libiconv libpng jpeg fontconfig freetype libexif curl libungif tiff"
> +DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif curl"
>  
> +PR = "r1"
> +
> +# Note: SRCREV is 3 revisions ahead of 2.09
>  SRC_URI = "git://git.kraxel.org/fbida"
>  SRCREV = "cb0ce5fa5f42bfaea4f8f326bcd8914dd14e782d"
>  S = "${WORKDIR}/git"
>  
>  EXTRA_OEMAKE = "STRIP="
>  
> +PACKAGECONFIG ??= "gif png"
> +PACKAGECONFIG[gif] = ",,libungif"
> +PACKAGECONFIG[png] = ",,libpng"
> +PACKAGECONFIG[tiff] = ",,tiff"
> +
>  do_compile() {
> -    sed -i -e 's: cpp: ${TARGET_PREFIX}cpp -I{STAGING_INCDIR}:g' GNUmakefile
> -    oe_runmake
> +	sed -i -e 's:/sbin/ldconfig:echo x:' ${S}/mk/Autoconf.mk
> +	sed -i -e 's: cpp: ${TARGET_PREFIX}cpp -I${STAGING_INCDIR}:' ${S}/GNUmakefile
> +
> +	if [ -z "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" ]; then
> +		sed -i -e '/^HAVE_MOTIF/s/:=.*$/:= no/' ${S}/GNUmakefile
> +	fi
> +
> +	# Be sure to respect preferences (force to "no")
> +	# Also avoid issues when ${BUILD_ARCH} == ${HOST_ARCH}
> +	if [ -z "${@base_contains('PACKAGECONFIG', 'gif', 'gif', '', d)}" ]; then
> +		sed -i -e '/^HAVE_LIBUNGIF/s/:=.*$/:= no/' ${S}/GNUmakefile
> +	fi
> +	if [ -z "${@base_contains('PACKAGECONFIG', 'png', 'png', '', d)}" ]; then
> +		sed -i -e '/^HAVE_LIBPNG/s/:=.*$/:= no/' ${S}/GNUmakefile
> +	fi
> +	if [ -z "${@base_contains('PACKAGECONFIG', 'tiff', 'tiff', '', d)}" ]; then
> +		sed -i -e '/^HAVE_LIBTIFF/s/:=.*$/:= no/' ${S}/GNUmakefile
> +	fi
> +
> +	oe_runmake
>  }
>  
>  do_install() {
> -    oe_runmake 'DESTDIR=${D}' install
> +	oe_runmake 'DESTDIR=${D}' install
>  }
>  
>  RDEPENDS_${PN} = "ttf-dejavu-sans-mono"
> -
> -- 
> 1.8.5.4
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/recipes-graphics/fbida/fbida_2.09.bb b/meta-oe/recipes-graphics/fbida/fbida_2.09.bb
index 32f376f..a3abf8f 100644
--- a/meta-oe/recipes-graphics/fbida/fbida_2.09.bb
+++ b/meta-oe/recipes-graphics/fbida/fbida_2.09.bb
@@ -1,27 +1,54 @@ 
+SUMMARY = "Framebuffer image and doc viewer tools"
+DESCRIPTION = "The fbida project contains a few applications for viewing and editing images, \
+               with the main focus being photos."
 HOMEPAGE = "http://linux.bytesex.org/fbida/"
-SUMMARY = "frame buffer image and doc viewer tools"
 AUTHOR = "Gerd Hoffmann"
 SECTION = "utils"
 
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
 
-DEPENDS = "virtual/libiconv libpng jpeg fontconfig freetype libexif curl libungif tiff"
+DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif curl"
 
+PR = "r1"
+
+# Note: SRCREV is 3 revisions ahead of 2.09
 SRC_URI = "git://git.kraxel.org/fbida"
 SRCREV = "cb0ce5fa5f42bfaea4f8f326bcd8914dd14e782d"
 S = "${WORKDIR}/git"
 
 EXTRA_OEMAKE = "STRIP="
 
+PACKAGECONFIG ??= "gif png"
+PACKAGECONFIG[gif] = ",,libungif"
+PACKAGECONFIG[png] = ",,libpng"
+PACKAGECONFIG[tiff] = ",,tiff"
+
 do_compile() {
-    sed -i -e 's: cpp: ${TARGET_PREFIX}cpp -I{STAGING_INCDIR}:g' GNUmakefile
-    oe_runmake
+	sed -i -e 's:/sbin/ldconfig:echo x:' ${S}/mk/Autoconf.mk
+	sed -i -e 's: cpp: ${TARGET_PREFIX}cpp -I${STAGING_INCDIR}:' ${S}/GNUmakefile
+
+	if [ -z "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" ]; then
+		sed -i -e '/^HAVE_MOTIF/s/:=.*$/:= no/' ${S}/GNUmakefile
+	fi
+
+	# Be sure to respect preferences (force to "no")
+	# Also avoid issues when ${BUILD_ARCH} == ${HOST_ARCH}
+	if [ -z "${@base_contains('PACKAGECONFIG', 'gif', 'gif', '', d)}" ]; then
+		sed -i -e '/^HAVE_LIBUNGIF/s/:=.*$/:= no/' ${S}/GNUmakefile
+	fi
+	if [ -z "${@base_contains('PACKAGECONFIG', 'png', 'png', '', d)}" ]; then
+		sed -i -e '/^HAVE_LIBPNG/s/:=.*$/:= no/' ${S}/GNUmakefile
+	fi
+	if [ -z "${@base_contains('PACKAGECONFIG', 'tiff', 'tiff', '', d)}" ]; then
+		sed -i -e '/^HAVE_LIBTIFF/s/:=.*$/:= no/' ${S}/GNUmakefile
+	fi
+
+	oe_runmake
 }
 
 do_install() {
-    oe_runmake 'DESTDIR=${D}' install
+	oe_runmake 'DESTDIR=${D}' install
 }
 
 RDEPENDS_${PN} = "ttf-dejavu-sans-mono"
-