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.
This commit is contained in:
Ingo Weinhold
2013-04-29 11:37:19 +02:00
parent 80154ad209
commit 903e8fb7c6
10 changed files with 46 additions and 253 deletions

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."

View File

@@ -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;

View File

@@ -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

View File

@@ -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;