From patchwork Sun Jun 30 11:56:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carsten Schoenert X-Patchwork-Id: 255917 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 7B2EA2C00AA for ; Mon, 1 Jul 2013 05:55:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8C69FA012D; Sun, 30 Jun 2013 19:55:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0UrhY-41okun; Sun, 30 Jun 2013 19:54:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 91BB3A015F; Sun, 30 Jun 2013 19:54:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 12B598F79F for ; Sun, 30 Jun 2013 19:54:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AC2ED90D76 for ; Sun, 30 Jun 2013 19:54:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fo2ZVZVqWZSU for ; Sun, 30 Jun 2013 19:54:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f175.google.com (mail-ea0-f175.google.com [209.85.215.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id D8C6C93906 for ; Sun, 30 Jun 2013 11:56:12 +0000 (UTC) Received: by mail-ea0-f175.google.com with SMTP id z7so1545045eaf.34 for ; Sun, 30 Jun 2013 04:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=Hx8F66YL7MUz7gC9a8bLb5kx1OrDEtSB935ETnyeCDY=; b=XYkfn3q84Ro4akVJCtyX22nB9KFnEv9fi+HNsrVFk09CnhSCsYAk0OMzIiimrIvSk9 5e4VvQfdEJGXYpN5BMi93q9MGxNh+TI85DI/vEBNm97zOtCYI5LD+1dF0y2gacEMpfwu Ix4YfXK0oegQ1xIxl4GeLYaxADkASCHoH2/0GM8F9M0At4QIPnQDunwHpr17BjrE7QyI iXTyVRHbswSSTIHJsuyH1Rdygskto8kP5ZYFsD1gS7EKiP1vyhiH2sjygATUxtexJG6J TUec894tT0d2RSRSON6EyT8VxrJsHpyCliTrzdoISDMsG5/fj0Xgmm2fWHIIIhgZ2XdA J3dw== X-Received: by 10.14.95.135 with SMTP id p7mr17269719eef.16.1372593370660; Sun, 30 Jun 2013 04:56:10 -0700 (PDT) Received: from localhost.localdomain (p5B37B02F.dip0.t-ipconnect.de. [91.55.176.47]) by mx.google.com with ESMTPSA id a4sm22855792eez.0.2013.06.30.04.56.08 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Jun 2013 04:56:09 -0700 (PDT) From: Carsten Schoenert To: buildroot@busybox.net Date: Sun, 30 Jun 2013 13:56:03 +0200 Message-Id: <1372593363-10994-1-git-send-email-c.schoenert@gmail.com> X-Mailer: git-send-email 1.7.10.4 Subject: [Buildroot] [PATCH v2] package/libsvg: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Carsten Schoenert Libsvg provides a library for parsing SVG content in files or buffers. Libsvg does not do any rendering, but instead provides a function-based interface that can be used by various rendering engines. Signed-off-by: Carsten Schoenert --- Changes v2: - reworking the whole patch after suggestions from Peter and Thomas - adding patch to preventing compiler errors while linking against libexpat package/Config.in | 1 + package/libsvg/Config.in | 23 ++++++++++++++ .../libsvg-fix-expat-static-declaration.patch | 33 ++++++++++++++++++++ package/libsvg/libsvg.mk | 23 ++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 package/libsvg/Config.in create mode 100644 package/libsvg/libsvg-fix-expat-static-declaration.patch create mode 100644 package/libsvg/libsvg.mk diff --git a/package/Config.in b/package/Config.in index ebeabeb..7f5714d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -461,6 +461,7 @@ source "package/libpng/Config.in" source "package/libqrencode/Config.in" source "package/libraw/Config.in" source "package/librsvg/Config.in" +source "package/libsvg/Config.in" source "package/libsvgtiny/Config.in" source "package/libungif/Config.in" source "package/opencv/Config.in" diff --git a/package/libsvg/Config.in b/package/libsvg/Config.in new file mode 100644 index 0000000..b25a83d --- /dev/null +++ b/package/libsvg/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_LIBSVG + bool "libsvg" + select BR2_PACKAGE_LIBXML2 if !BR2_PACKAGE_LIBSVG_EXPAT + help + Libsvg provides a parser for SVG content in files or buffers. + Libsvg does not do any rendering, but instead provides a + function-based interface that can be used by various rendering + engines. + + http://cairographics.org/snapshots/ + +if BR2_PACKAGE_LIBSVG + +config BR2_PACKAGE_LIBSVG_EXPAT + bool "use expat XML parser library" + select BR2_PACKAGE_EXPAT + default y + help + Libsvg needs a XML parsing library! + Select expat if you want to use the Expat XML Parser library, + otherwhise the libxml2 library will be used. + +endif # BR2_PACKAGE_LIBSVG diff --git a/package/libsvg/libsvg-fix-expat-static-declaration.patch b/package/libsvg/libsvg-fix-expat-static-declaration.patch new file mode 100644 index 0000000..1900f79 --- /dev/null +++ b/package/libsvg/libsvg-fix-expat-static-declaration.patch @@ -0,0 +1,33 @@ +Newer expat versions use different declarations of the following functions: + +static void _svg_parser_sax_start_element (); +static void _svg_parser_sax_end_element (); +static void _svg_parser_sax_characters (); + +We need to patch the libsvg source to not follow into a build error like + "static declaration of 'foo' follows non-static declaration" +and use the functions from the expat library instead from the libsvg source. + +Patch based on +http://oe-lite.org/redmine/projects/xorg/repository/revisions/c4df7951e846e1be718f37f2455696a1d0861f3d/entry/recipes/cairo/libsvg-0.1.4/gcc4_and_expat.patch + +Signed-off-by: Carsten Schoenert + +diff -bur libsvg-0.1.4~orig/src/svg_parser_expat.c libsvg-0.1.4/src/svg_parser_expat.c +--- libsvg-0.1.4~orig/src/svg_parser_expat.c 2005-02-14 11:26:26.000000000 -0600 ++++ libsvg-0.1.4/src/svg_parser_expat.c 2006-02-10 21:58:20.000000000 -0600 +@@ -30,6 +30,7 @@ + #include "svgint.h" + #include "svg_hash.h" + ++#ifndef LIBSVG_EXPAT + static void + _svg_parser_sax_start_element (void *closure, + const XML_Char *name, +@@ -43,6 +44,7 @@ + _svg_parser_sax_characters (void *closure, + const XML_Char *ch, + int len); ++#endif + + static void + _svg_parser_sax_warning (void *closure, diff --git a/package/libsvg/libsvg.mk b/package/libsvg/libsvg.mk new file mode 100644 index 0000000..d08c0b4 --- /dev/null +++ b/package/libsvg/libsvg.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libsvg +# +################################################################################ + +LIBSVG_VERSION = 0.1.4 +LIBSVG_SITE = http://cairographics.org/snapshots/ +LIBSVG_DEPENDENCIES = host-pkgconf libpng libjpeg +LIBSVG_INSTALL_STAGING = YES +LIBSVG_LICENSE = LGPLv2+ +LIBSVG_LICENSE_FILES = COPYING + +# libsvg needs at last a XML parser +ifeq ($(BR2_PACKAGE_LIBSVG_EXPAT),y) +LIBSVG_CONF_OPT += --with-expat +LIBSVG_DEPENDENCIES += expat +else ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBSVG_CONF_OPT += --with-libxml2 +LIBSVG_DEPENDENCIES += libxml2 +endif + +$(eval $(autotools-package))