From 903e8fb7c602e3367ba8d30e085d7ba69ed81ccd Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 29 Apr 2013 11:37:19 +0200 Subject: [PATCH] Convert grep recipe to an actual recipe * Remove the other non-recipes/patches. * We use the bz2 source archive. The xz URL is included as a comment. Would be nice, if both could be specified and haikuporter would pick one it has an unarchiving tool for. --- sys-apps/grep/grep-2.12.recipe | 35 -------------- sys-apps/grep/grep-2.14-bz2.recipe | 29 ------------ sys-apps/grep/grep-2.14.recipe | 65 ++++++++++++++++++-------- sys-apps/grep/grep-2.5.4.recipe | 29 ------------ sys-apps/grep/grep-2.6.1.recipe | 29 ------------ sys-apps/grep/grep-2.6.3.recipe | 29 ------------ sys-apps/grep/grep-2.7.recipe | 35 -------------- sys-apps/grep/patches/grep-2.12.patch | 14 ------ sys-apps/grep/patches/grep-2.6.1.patch | 20 -------- sys-apps/grep/patches/grep-2.7.patch | 14 ------ 10 files changed, 46 insertions(+), 253 deletions(-) delete mode 100644 sys-apps/grep/grep-2.12.recipe delete mode 100644 sys-apps/grep/grep-2.14-bz2.recipe delete mode 100644 sys-apps/grep/grep-2.5.4.recipe delete mode 100644 sys-apps/grep/grep-2.6.1.recipe delete mode 100644 sys-apps/grep/grep-2.6.3.recipe delete mode 100644 sys-apps/grep/grep-2.7.recipe delete mode 100644 sys-apps/grep/patches/grep-2.12.patch delete mode 100644 sys-apps/grep/patches/grep-2.6.1.patch delete mode 100644 sys-apps/grep/patches/grep-2.7.patch diff --git a/sys-apps/grep/grep-2.12.recipe b/sys-apps/grep/grep-2.12.recipe deleted file mode 100644 index e80283c2b..000000000 --- a/sys-apps/grep/grep-2.12.recipe +++ /dev/null @@ -1,35 +0,0 @@ -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="http://www.gnu.org/software/grep/" -SRC_URI="http://ftpmirror.gnu.org/grep/grep-2.12.tar.xz" -CHECKSUM_MD5="8d2f0346d08b13c18afb81f0e8aa1e2f" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="sys-devel/gettext >= 0.17 - sys-devel/libiconv >= 1.13.1" -BUILD() -{ - cd grep-2.12 - libtoolize --force --copy --install - aclocal -I m4 - autoconf - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - --datarootdir=`finddir B_COMMON_DATA_DIRECTORY` \ - --infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \ - --mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man - make -} - -INSTALL() -{ - cd grep-2.12 - make install -} - -TEST() -{ - cd grep-2.12 - make check -} - -LICENSE="GNU GPL v3" -COPYRIGHT="1992-2012 Free Software Foundation, Inc." diff --git a/sys-apps/grep/grep-2.14-bz2.recipe b/sys-apps/grep/grep-2.14-bz2.recipe deleted file mode 100644 index b2b487fdf..000000000 --- a/sys-apps/grep/grep-2.14-bz2.recipe +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="http://www.gnu.org/software/grep/" -SRC_URI="http://ports-space.haiku-files.org/source/grep-2.14.tar.bz2" -CHECKSUM_MD5="db55b9fc67d8c0895f3c73e94e2aebe3" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="sys-devel/gettext >= 0.17 - sys-devel/libiconv >= 1.13.1" -BUILD() -{ - cd grep-2.14 - - libtoolize --force --copy --install - aclocal -I m4 - autoconf - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - --datarootdir=`finddir B_COMMON_DATA_DIRECTORY` \ - --infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \ - --mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man - make -} - -INSTALL() -{ - cd grep-2.14 - make install -} -LICENSE="GNU GPL v3" -COPYRIGHT="1992-2012 Free Software Foundation, Inc." diff --git a/sys-apps/grep/grep-2.14.recipe b/sys-apps/grep/grep-2.14.recipe index 6a045db54..3ab6e0c1d 100644 --- a/sys-apps/grep/grep-2.14.recipe +++ b/sys-apps/grep/grep-2.14.recipe @@ -1,37 +1,64 @@ -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="http://www.gnu.org/software/grep/" -SRC_URI="http://ftp.gnu.org/pub/gnu/grep/grep-2.14.tar.xz" -CHECKSUM_MD5="d4a3f03849d1e17ce56ab76aa5a24cab" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="sys-devel/gettext >= 0.17 - sys-devel/libiconv >= 1.13.1" +SUMMARY="GNU regular expression matcher" +DESCRIPTION="The grep command searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines." +HOMEPAGE="http://www.gnu.org/software/grep/" +LICENSE="GNU GPL v3" +COPYRIGHT="1992-2012 Free Software Foundation, Inc." +SRC_URI="http://ports-space.haiku-files.org/source/grep-2.14.tar.bz2" +CHECKSUM_MD5="db55b9fc67d8c0895f3c73e94e2aebe3" +# XZ file format: +#SRC_URI="http://ftp.gnu.org/pub/gnu/grep/grep-2.14.tar.xz" +#CHECKSUM_MD5="d4a3f03849d1e17ce56ab76aa5a24cab" +REVISION="2" +ARCHITECTURES="x86_gcc2 ?x86" + +PATCHES="grep-2.14-gcc2.patch" + +PROVIDES=" + grep = $portVersion compat >= 2 + cmd:egrep = $portVersion compat >= 2 + cmd:fgrep = $portVersion compat >= 2 + cmd:grep = $portVersion compat >= 2 + " +REQUIRES=" + haiku >= $haikuVersion + lib:libiconv + " +BUILD_REQUIRES=" + $REQUIRES + gettext + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc + cmd:ld + cmd:libtoolize + cmd:make + " +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + " + +SOURCE_DIR="$portVersionedName" BUILD() { - cd grep-2.14 libtoolize --force --copy --install aclocal -I m4 autoconf - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - --datarootdir=`finddir B_COMMON_DATA_DIRECTORY` \ - --infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \ - --mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \ + runConfigure ./configure \ --disable-perl-regexp - make + make $jobArgs } INSTALL() { - cd grep-2.14 make install + + rm $libDir/charset.alias + rmdir $libDir } TEST() { - cd grep-2.14 make check } - -LICENSE="GNU GPL v3" -COPYRIGHT="1992-2012 Free Software Foundation, Inc." diff --git a/sys-apps/grep/grep-2.5.4.recipe b/sys-apps/grep/grep-2.5.4.recipe deleted file mode 100644 index 995eee96c..000000000 --- a/sys-apps/grep/grep-2.5.4.recipe +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="http://www.gnu.org/software/grep/" -SRC_URI="http://ftp.gnu.org/gnu/grep/grep-2.5.4.tar.bz2" -CHECKSUM_MD5="5650ee2ae6ea4b39e9459d7d0585b315" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="" -BUILD() -{ - cd grep-2.5.4 - libtoolize --force --copy --install - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make -} - -INSTALL() -{ - cd grep-2.5.4 - make install -} - -TEST() -{ - cd grep-2.5.4 - make check -} - -LICENSE="GNU GPL v3" -COPYRIGHT="1992-2010 Free Software Foundation, Inc." diff --git a/sys-apps/grep/grep-2.6.1.recipe b/sys-apps/grep/grep-2.6.1.recipe deleted file mode 100644 index 59fdaac05..000000000 --- a/sys-apps/grep/grep-2.6.1.recipe +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="http://www.gnu.org/software/grep/" -SRC_URI="http://ftp.gnu.org/gnu/grep/grep-2.6.1.tar.gz" -CHECKSUM_MD5="8d1496da11029112a4d0986cbf09e26f" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="" -BUILD() -{ - cd grep-2.6.1 - libtoolize --force --copy --install - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make -} - -INSTALL() -{ - cd grep-2.6.1 - make install -} - -TEST() -{ - cd grep-2.6.1 - make check -} - -LICENSE="GNU GPL v3" -COPYRIGHT="1992-2010 Free Software Foundation, Inc." diff --git a/sys-apps/grep/grep-2.6.3.recipe b/sys-apps/grep/grep-2.6.3.recipe deleted file mode 100644 index b28c35d7b..000000000 --- a/sys-apps/grep/grep-2.6.3.recipe +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="http://www.gnu.org/software/grep/" -SRC_URI="http://ftp.gnu.org/gnu/grep/grep-2.6.3.tar.gz" -CHECKSUM_MD5="3095b57837b312f087c0680559de7f13" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="" -BUILD() -{ - cd grep-2.6.3 - libtoolize --force --copy --install - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make -} - -INSTALL() -{ - cd grep-2.6.3 - make install -} - -TEST() -{ - cd grep-2.6.3 - make check -} - -LICENSE="GNU GPL v3" -COPYRIGHT="1992-2010 Free Software Foundation, Inc." diff --git a/sys-apps/grep/grep-2.7.recipe b/sys-apps/grep/grep-2.7.recipe deleted file mode 100644 index 484684bc3..000000000 --- a/sys-apps/grep/grep-2.7.recipe +++ /dev/null @@ -1,35 +0,0 @@ -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="http://www.gnu.org/software/grep/" -SRC_URI="ftp://mirrors.kernel.org/gnu/grep/grep-2.7.tar.gz" -CHECKSUM_MD5="e848f07e3e79aa7899345d17c7e4115e" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="sys-devel/gettext >= 0.17 - sys-devel/libiconv >= 1.13.1" -BUILD() -{ - cd grep-2.7 - libtoolize --force --copy --install - aclocal -I m4 - autoconf - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - --datarootdir=`finddir B_COMMON_DATA_DIRECTORY` \ - --infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \ - --mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man - make -} - -INSTALL() -{ - cd grep-2.7 - make install -} - -TEST() -{ - cd grep-2.7 - make check -} - -LICENSE="GNU GPL v3" -COPYRIGHT="1992-2010 Free Software Foundation, Inc." diff --git a/sys-apps/grep/patches/grep-2.12.patch b/sys-apps/grep/patches/grep-2.12.patch deleted file mode 100644 index d0f9ce918..000000000 --- a/sys-apps/grep/patches/grep-2.12.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up grep-2.12/src/kwsearch.c.orig grep-2.12/src/kwsearch.c ---- grep-2.12/src/kwsearch.c.orig 2012-02-27 02:35:19.015204352 -0700 -+++ grep-2.12/src/kwsearch.c 2012-05-02 22:46:36.262668288 -0600 -@@ -106,8 +106,9 @@ Fexecute (char const *buf, size_t size, - /* The match was a part of multibyte character, advance at least - one byte to ensure no infinite loop happens. */ - mbstate_t s; -+ size_t mb_len; - memset (&s, 0, sizeof s); -- size_t mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s); -+ mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s); - if (mb_len == (size_t) -2) - goto failure; - beg = mb_start; diff --git a/sys-apps/grep/patches/grep-2.6.1.patch b/sys-apps/grep/patches/grep-2.6.1.patch deleted file mode 100644 index 8a08c6439..000000000 --- a/sys-apps/grep/patches/grep-2.6.1.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -urN grep-2.6.1/src/dfa.c grep-2.6.1-haiku/src/dfa.c ---- grep-2.6.1/src/dfa.c 2010-03-25 06:28:54.056098816 -0700 -+++ grep-2.6.1-haiku/src/dfa.c 2013-02-17 13:32:51.217055232 -0800 -@@ -2775,6 +2775,7 @@ - unsigned char eol = eolbyte; /* Likewise for eolbyte. */ - static int sbit[NOTCHAR]; /* Table for anding with d->success. */ - static int sbit_init; -+ unsigned char saved_end; - - if (! sbit_init) - { -@@ -2792,7 +2793,7 @@ - s = s1 = 0; - p = (unsigned char const *) begin; - trans = d->trans; -- unsigned char saved_end = *(unsigned char *) end; -+ saved_end = *(unsigned char *) end; - *end = eol; - - #ifdef MBS_SUPPORT diff --git a/sys-apps/grep/patches/grep-2.7.patch b/sys-apps/grep/patches/grep-2.7.patch deleted file mode 100644 index 8f4fb7f6d..000000000 --- a/sys-apps/grep/patches/grep-2.7.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN grep-2.7/src/kwsearch.c grep-2.7-haiku/src/kwsearch.c ---- grep-2.7/src/kwsearch.c 2010-08-13 23:36:17.039059456 +0000 -+++ grep-2.7-haiku/src/kwsearch.c 2010-09-22 12:39:11.677642240 +0000 -@@ -111,8 +111,9 @@ - /* The match was a part of multibyte character, advance at least - one byte to ensure no infinite loop happens. */ - mbstate_t s; -+ size_t mb_len; - memset (&s, 0, sizeof s); -- size_t mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s); -+ mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s); - if (mb_len == (size_t) -2) - goto failure; - beg = mb_start;