[tyndur-devel] [PATCH] + grep: Neuer lbuild
Arne Hasselbring ·
Signed-off-by: Arne Hasselbring <arne.hasselbring at googlemail.com> --- lbuilds/grep/2.7/files/all.patch | 25 ++++++++++++++++ lbuilds/grep/2.7/files/configure.patch | 39 +++++++++++++++++++++++++ lbuilds/grep/2.7/grep-2.7.lbuild | 50 ++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 0 deletions(-) create mode 100644 lbuilds/grep/2.7/files/all.patch create mode 100644 lbuilds/grep/2.7/files/configure.patch create mode 100644 lbuilds/grep/2.7/grep-2.7.lbuild diff --git a/lbuilds/grep/2.7/files/all.patch b/lbuilds/grep/2.7/files/all.patch new file mode 100644 index 0000000..d09ce1d --- /dev/null +++ b/lbuilds/grep/2.7/files/all.patch @@ -0,0 +1,25 @@ +Index: grep-2.7/lib/inttypes.in.h +=================================================================== +--- grep-2.7.orig/lib/inttypes.in.h ++++ grep-2.7/lib/inttypes.in.h +@@ -46,5 +46,5 @@ #include <limits.h> + +-#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) +-# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib at gnu.org>." +-#endif ++//#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) ++//# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib at gnu.org>." ++//#endif + +Index: grep-2.7/lib/error.c +=================================================================== +--- grep-2.7.orig/lib/error.c ++++ grep-2.7/lib/error.c +@@ -126,5 +126,5 @@ # else + +-# ifndef F_GETFL +-# error Please port fcntl to your platform +-# endif ++//# ifndef F_GETFL ++//# error Please port fcntl to your platform ++//# endif diff --git a/lbuilds/grep/2.7/files/configure.patch b/lbuilds/grep/2.7/files/configure.patch new file mode 100644 index 0000000..4646bfb --- /dev/null +++ b/lbuilds/grep/2.7/files/configure.patch @@ -0,0 +1,39 @@ +Index: grep-2.7/configure +=================================================================== +--- grep-2.7.orig/configure ++++ grep-2.7/configure +@@ -3668,35 +3668,4 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +-$as_echo_n "checking host system type... " >&6; } +-if ${ac_cv_host+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test "x$host_alias" = x; then +- ac_cv_host=$ac_cv_build +-else +- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || +- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +-fi +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +-$as_echo "$ac_cv_host" >&6; } +-case $ac_cv_host in +-*-*-*) ;; +-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +-esac +-host=$ac_cv_host +-ac_save_IFS=$IFS; IFS='-' +-set x $ac_cv_host +-shift +-host_cpu=$1 +-host_vendor=$2 +-shift; shift +-# Remember, the first character of IFS is used to create $*, +-# except with old shells: +-host_os=$* +-IFS=$ac_save_IFS +-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + diff --git a/lbuilds/grep/2.7/grep-2.7.lbuild b/lbuilds/grep/2.7/grep-2.7.lbuild new file mode 100644 index 0000000..200310e --- /dev/null +++ b/lbuilds/grep/2.7/grep-2.7.lbuild @@ -0,0 +1,50 @@ +include lutils +include toolchain + +DESCRIPTION="" +HOMEPAGE="http://lowlevel.brainsware.org/wiki/index.php/LOST/Pakete/Grep" +SRC_URI="http://ftp.gnu.org/gnu/grep/grep-2.7.tar.gz" + +LICENSE="GPL" + +RUN_DEPEND="" +BUILD_DEPEND="" + +MY_S="${S}/${P}" + +src_unpack() { + lunpack ${P}.tar.gz + cd ${MY_S} + + ln -s ${F} patches + [ -f ${F}/series ] && ln -s ${F}/series series + for i in ${F}/*.patch; do + [ -L series ] || echo `basename $i` >> series + (which quilt > /dev/null 2>&1) || (patch -p1 < $i) || die "Fehler beim Anwenden von $i" + done + (which quilt > /dev/null 2>&1) && quilt push -a || die "Fehler beim Anwenden der Patches" +} + +src_configure() { + cd ${MY_S} + + ./configure \ + CC=`tc-cc` \ + --build=`tc-build` \ + --target=`tc-host` \ + --host=`tc-host` \ + --prefix="${R}" \ + --disable-nls \ + || die "configure failed" +} + +src_compile() { + cd ${MY_S} + lmake +} + +src_install() { + cd ${MY_S} + lmake -j1 DESTDIR="${D}" install || die "make install failed" +} + -- 1.7.1