From d30ef8dfe73589d84e4048a213fe8ccd4522643b Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 8 Apr 2016 11:13:24 +0200 Subject: [PATCH 1/5] libxslt: add support for host build Signed-off-by: Stephan Raue --- packages/textproc/libxslt/package.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/textproc/libxslt/package.mk b/packages/textproc/libxslt/package.mk index b4378cbfb8..a1d25ae91f 100644 --- a/packages/textproc/libxslt/package.mk +++ b/packages/textproc/libxslt/package.mk @@ -23,6 +23,7 @@ PKG_ARCH="any" PKG_LICENSE="MIT" PKG_SITE="http://xmlsoft.org/xslt/" PKG_URL="ftp://xmlsoft.org/libxml2/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS_HOST="toolchain libxml2:host" PKG_DEPENDS_TARGET="toolchain libxml2" PKG_PRIORITY="optional" PKG_SECTION="textproc" @@ -32,6 +33,13 @@ PKG_LONGDESC="libxslt" PKG_IS_ADDON="no" PKG_AUTORECONF="yes" +PKG_CONFIGURE_OPTS_HOST=" ac_cv_header_ansidecl_h=no \ + --enable-static \ + --disable-shared \ + --without-python \ + --with-libxml-prefix=$ROOT/$TOOLCHAIN \ + --without-crypto" + PKG_CONFIGURE_OPTS_TARGET="ac_cv_header_ansidecl_h=no \ --enable-static \ --disable-shared \ From bdf41762dba3c9d8e607bb9831e3c17e67bdc92f Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 8 Apr 2016 11:14:10 +0200 Subject: [PATCH 2/5] new package: add package 'xmlstarlet' Signed-off-by: Stephan Raue --- packages/textproc/xmlstarlet/package.mk | 62 +++++++++++++++++++ ...sage2c.awk-fix-wrong-basename-regexp.patch | 37 +++++++++++ 2 files changed, 99 insertions(+) create mode 100644 packages/textproc/xmlstarlet/package.mk create mode 100644 packages/textproc/xmlstarlet/patches/xmlstarlet-0001-usage2c.awk-fix-wrong-basename-regexp.patch diff --git a/packages/textproc/xmlstarlet/package.mk b/packages/textproc/xmlstarlet/package.mk new file mode 100644 index 0000000000..d4d1ec33dc --- /dev/null +++ b/packages/textproc/xmlstarlet/package.mk @@ -0,0 +1,62 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# OpenELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC. If not, see . +################################################################################ + +PKG_NAME="xmlstarlet" +PKG_VERSION="1.6.1" +PKG_REV="0" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://xmlstar.sourceforge.net" +PKG_URL="http://netcologne.dl.sourceforge.net/project/xmlstar/$PKG_NAME/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS_HOST="toolchain libxml2:host libxslt:host" +PKG_DEPENDS_TARGET="toolchain libxml2 libxslt" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="XMLStarlet is a command-line XML utility which allows the modification and validation of XML documents" +PKG_LONGDESC="XMLStarlet is a command line XML toolkit which can be used to transform,query, validate, and edit XML documents and files using simple set of shellcommands in similar way it is done for plain text files using grep/sed/awk/tr/diff/patch." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_HOST=" ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + --enable-static-libs \ + LIBXML_CONFIG=$ROOT/$TOOLCHAIN/bin/xml2-config \ + LIBXSLT_CONFIG=$ROOT/$TOOLCHAIN/bin/xslt-config \ + --with-libxml-include-prefix=$ROOT/$TOOLCHAIN/include/libxml2 \ + --with-libxml-libs-prefix=$ROOT/$TOOLCHAIN/lib \ + --with-libxslt-include-prefix=$ROOT/$TOOLCHAIN/include \ + --with-libxslt-libs-prefix=$ROOT/$TOOLCHAIN/lib" + +PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + --enable-static-libs \ + LIBXML_CONFIG=$SYSROOT_PREFIX/usr/bin/xml2-config \ + LIBXSLT_CONFIG=$SYSROOT_PREFIX/usr/bin/xslt-config \ + --with-libxml-include-prefix=$SYSROOT_PREFIX/usr/include/libxml2 \ + --with-libxml-libs-prefix=$SYSROOT_PREFIX/usr/lib \ + --with-libxslt-include-prefix=$SYSROOT_PREFIX/usr/include \ + --with-libxslt-libs-prefix=$SYSROOT_PREFIX/usr/lib" + +post_makeinstall_host() { + ln -sf xml $ROOT/$TOOLCHAIN/bin/xmlstarlet +} + +post_makeinstall_target() { + ln -sf xml $INSTALL/usr/bin/xmlstarlet +} diff --git a/packages/textproc/xmlstarlet/patches/xmlstarlet-0001-usage2c.awk-fix-wrong-basename-regexp.patch b/packages/textproc/xmlstarlet/patches/xmlstarlet-0001-usage2c.awk-fix-wrong-basename-regexp.patch new file mode 100644 index 0000000000..24b187f2ac --- /dev/null +++ b/packages/textproc/xmlstarlet/patches/xmlstarlet-0001-usage2c.awk-fix-wrong-basename-regexp.patch @@ -0,0 +1,37 @@ +Upstream-Status: Submitted [sourceforge] + +From 75d789d0ea9716c9a9ae72f42a2fcfa907cf4a12 Mon Sep 17 00:00:00 2001 +From: Matthieu Crapet +Date: Mon, 30 Jun 2014 13:52:25 +0200 +Subject: [PATCH] usage2c.awk: fix wrong basename regexp + +Previously not matching with filename argument with absolute path. + +Signed-off-by: Matthieu Crapet +--- + usage2c.awk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usage2c.awk b/usage2c.awk +index 94b897a..9aea212 100755 +--- a/usage2c.awk ++++ b/usage2c.awk +@@ -6,13 +6,13 @@ BEGIN { + } + + # text in src/foo-bar.txt results in +-# static const char foo_text[] = { ++# static const char foo_bar[] = { + # 't', 'h', 'e', ' ', 't', 'e', 'x', 't', ... + # } + length(command_name) == 0 { + command_name = FILENAME; + sub(/\.txt$/, "", command_name); +- sub(/^([^\/]+\/)*/, "", command_name); ++ sub(/^.*\//, "", command_name); + gsub(/-/, "_", command_name); + printf("static const char %s[] = {\n", command_name); + progs = 0; +-- +2.0.0 + From 3941195143065b6807acffbb1d00534cfc9bc791 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 8 Apr 2016 11:26:11 +0200 Subject: [PATCH 3/5] kodi: depends on xmlstarlet:host Signed-off-by: Stephan Raue --- packages/mediacenter/kodi/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mediacenter/kodi/package.mk b/packages/mediacenter/kodi/package.mk index fa49b8a36f..4a79ab5a15 100644 --- a/packages/mediacenter/kodi/package.mk +++ b/packages/mediacenter/kodi/package.mk @@ -23,7 +23,7 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.kodi.tv" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS_TARGET="toolchain kodi:host libsquish boost Python zlib bzip2 systemd pciutils lzo pcre swig:host libass curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libogg libcdio libmpeg2 taglib libxml2 libxslt yajl sqlite libvorbis ffmpeg crossguid giflib" +PKG_DEPENDS_TARGET="toolchain kodi:host xmlstarlet:host libsquish boost Python zlib bzip2 systemd pciutils lzo pcre swig:host libass curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libogg libcdio libmpeg2 taglib libxml2 libxslt yajl sqlite libvorbis ffmpeg crossguid giflib" PKG_DEPENDS_HOST="lzo:host libpng:host libjpeg-turbo:host giflib:host" PKG_PRIORITY="optional" PKG_SECTION="mediacenter" From 17fc077579e9d14334bcbcbbac800c80547a4e82 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 8 Apr 2016 11:26:32 +0200 Subject: [PATCH 4/5] mediacenter: install package 'xmlstarlet' Signed-off-by: Stephan Raue --- packages/virtual/mediacenter/package.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/virtual/mediacenter/package.mk b/packages/virtual/mediacenter/package.mk index 1f38482861..72eb96ba6e 100644 --- a/packages/virtual/mediacenter/package.mk +++ b/packages/virtual/mediacenter/package.mk @@ -41,6 +41,7 @@ if [ "$MEDIACENTER" = "kodi" ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET Pillow" PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET simplejson" PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET pycrypto" + PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET xmlstarlet" # other packages PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET LibreELEC-settings" From 0260255dff72696a257e7d70156c1287c238a47a Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 8 Apr 2016 11:30:43 +0200 Subject: [PATCH 5/5] scripts/checkdeps: we build our own 'xmlstarlet' Signed-off-by: Stephan Raue --- scripts/checkdeps | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkdeps b/scripts/checkdeps index cfb48fa0ee..b8dbf964fb 100755 --- a/scripts/checkdeps +++ b/scripts/checkdeps @@ -28,8 +28,8 @@ if [ -f /etc/os-release ]; then DISTRO=$(grep ^ID= /etc/os-release | cut -d "=" -f 2 | tr A-Z a-z) fi -deps="wget bash bc gcc sed patch tar bzip2 gzip perl gawk gperf zip unzip diff makeinfo xmlstarlet" -deps_pkg="wget bash bc gcc sed patch tar bzip2 gzip perl gawk gperf zip unzip diffutils texinfo xmlstarlet" +deps="wget bash bc gcc sed patch tar bzip2 gzip perl gawk gperf zip unzip diff makeinfo" +deps_pkg="wget bash bc gcc sed patch tar bzip2 gzip perl gawk gperf zip unzip diffutils texinfo" files="/usr/include/stdio.h /usr/include/ncurses.h" files_pkg="libc6-dev libncurses5-dev"