1SUMMARY="Perl5 Compatible Regular Expressions"
2DESCRIPTION="
3	The PCRE library is a set of functions that implement regular expression
4	pattern matching using the same syntax and semantics as Perl 5. PCRE has
5	its own native API, as well as a set of wrapper functions that correspond
6	to the POSIX regular expression API. The PCRE library is free, even for
7	building proprietary software.
8	This package contains the native API.
9	"
10HOMEPAGE="http://www.pcre.org/"
11LICENSE="PCRE"
12COPYRIGHT="
13	1997-2011 University of Cambridge
14	2007-2011, Google Inc. All rights reserved.
15	"
16SOURCE_URI="http://sourceforge.net/projects/pcre/files/pcre/8.21/pcre-8.21.tar.bz2"
17CHECKSUM_SHA256="a4b8509d11fc2764fb4e1415b764ad2c214459edc011ce48aeeb6bbe1ac599e3"
18REVISION="6"
19ARCHITECTURES="all"
20SECONDARY_ARCHITECTURES="x86 x86_gcc2"
21
22PROVIDES="
23	libpcre${secondaryArchSuffix} = $portVersion
24	lib:libpcre${secondaryArchSuffix} = 0.0.1 compat >= 0
25	lib:libpcrecpp${secondaryArchSuffix} = 0.0.1 compat >= 0
26	lib:libpcreposix${secondaryArchSuffix} = 0.0.1 compat >= 0
27	"
28
29if [ -z "$secondaryArchSuffix" ];then
30PROVIDES="$PROVIDES
31	cmd:pcregrep = $portVersion compat >= 8
32	cmd:pcretest = $portVersion compat >= 8
33	"
34fi
35
36REQUIRES="
37	haiku$secondaryArchSuffix
38	"
39BUILD_REQUIRES="
40	"
41BUILD_PREREQUIRES="
42	haiku${secondaryArchSuffix}_devel
43	cmd:aclocal
44	cmd:autoconf
45	cmd:automake
46	cmd:gcc$secondaryArchSuffix
47	cmd:make
48	cmd:ld$secondaryArchSuffix
49	cmd:libtoolize$secondaryArchSuffix
50	"
51
52SOURCE_DIR="pcre-$portVersion"
53
54BUILD()
55{
56	libtoolize --force --copy --install
57	aclocal
58	autoconf
59	automake --add-missing
60	runConfigure ./configure \
61		--enable-utf8 \
62		--enable-unicode-properties \
63		--with-pic
64	make $jobArgs
65}
66
67INSTALL()
68{
69	make install
70
71	# prepare develop/lib
72	prepareInstalledDevelLibs libpcre libpcrecpp libpcreposix
73	fixPkgconfig
74
75	# fix pcre-config
76	fixDevelopLibDirReferences $binDir/pcre-config
77
78	# devel package
79	packageEntries devel \
80		$binDir/pcre-config \
81		$developDir \
82		$manDir/man3
83}
84
85TEST()
86{
87	make check
88}
89
90# ----- devel package -------------------------------------------------------
91
92PROVIDES_devel="
93	libpcre${secondaryArchSuffix}_devel = $portVersion
94	cmd:pcre_config = $portVersion compat >= 8
95	devel:libpcre$secondaryArchSuffix = 0.0.1 compat >= 0
96	devel:libpcrecpp$secondaryArchSuffix = 0.0.1 compat >= 0
97	devel:libpcreposix$secondaryArchSuffix = 0.0.1 compat >= 0
98	"
99REQUIRES_devel="
100	libpcre$secondaryArchSuffix == $portVersion base
101	"
102