Skip to content

Commit

Permalink
pcre: add rbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Mar 13, 2012
1 parent cebdd0a commit e3cc04e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
4 changes: 4 additions & 0 deletions library/development/pcre/pcre-8.30.rbuild
@@ -0,0 +1,4 @@
arch '~x86', '~amd64'
kernel 'linux'
compiler 'gcc'
libc 'glibc'
@@ -1,11 +1,13 @@
maintainer 'meh. <meh@paranoici.org>'

name 'libpcre'
name 'pcre'
tags 'library', 'development'

description 'Perl-Compatible Regular Expression library'
homepage 'http://www.pcre.org'
licene 'BSD'
license 'BSD'

source 'ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-#{version}.tar.bz2'

flavor {
needs 'vanilla || static || shared'
Expand All @@ -31,19 +33,41 @@ flavor {
}

features {
cxx { enabled!
bits { enabled!; default_value '8,16'
before :configure do |conf|
conf.enable 'cpp', enabled?
next unless enabled?

conf.enable 'pcre8', value.split(',').include?('8')
conf.enable 'pcre16', value.split(',').include?('16')
end
}

recursion_limit { enabled!; default_value '8192'
before :configure do |conf|
conf.with 'match-limit-recursion', value if enabled?
end
}

unicode { enabled!
before :configure do |conf|
conf.enable 'utf8', enabled?
conf.enable 'utf', enabled?
conf.enable 'unicode-properties', enabled?
end
}

jit { enabled!
before :configure do |conf|
conf.enable 'jit', enabled?
conf.enable 'pcregrep-jit', enabled?
end
}

cxx { enabled!
before :configure do |conf|
conf.enable 'cpp', enabled?
end
}

zlib {
describe 'Add zlib support to pcregrep'

Expand Down

0 comments on commit e3cc04e

Please sign in to comment.