diff --git a/devel/ragel/Makefile b/devel/ragel/Makefile new file mode 100644 index 00000000000..2a6c876a904 --- /dev/null +++ b/devel/ragel/Makefile @@ -0,0 +1,32 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2011/11/15 16:35:15 jeremy Exp $ + +COMMENT = state machine compiler + +DISTNAME = ragel-6.7 +CATEGORIES = devel + +HOMEPAGE = http://www.complang.org/ragel/ + +# GPLv2 +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes +PERMIT_DISTFILES_CDROM = Yes +PERMIT_DISTFILES_FTP = Yes + +MASTER_SITES = ${HOMEPAGE} + +WANTLIB = c m stdc++ +BUILD_DEPENDS = lang/ruby/1.8,-main + +USE_GMAKE = Yes + +CONFIGURE_STYLE = gnu +CONFIGURE_ENV = ac_cv_prog_RUBY=ruby18 + +REGRESS_DEPENDS = shells/bash \ + textproc/gdiff + +do-regress: + cd ${WRKBUILD}/test && ${LOCALBASE}/bin/bash ./runtests + +.include diff --git a/devel/ragel/distinfo b/devel/ragel/distinfo new file mode 100644 index 00000000000..cee4bbf72df --- /dev/null +++ b/devel/ragel/distinfo @@ -0,0 +1,5 @@ +MD5 (ragel-6.7.tar.gz) = 9EI+DYplON1OYUmPz6087A== +RMD160 (ragel-6.7.tar.gz) = ADopEhvUTNzd3QchUk/pDPQhwF0= +SHA1 (ragel-6.7.tar.gz) = vxK2NPWiXlujBe3+5ZpFUGntOwo= +SHA256 (ragel-6.7.tar.gz) = Rt+OPxF6cw+IlgYcleqOj1PpeJywU8LuoEeDNyT9ejA= +SIZE (ragel-6.7.tar.gz) = 1182734 diff --git a/devel/ragel/patches/patch-test_runtests_in b/devel/ragel/patches/patch-test_runtests_in new file mode 100644 index 00000000000..0da35e8a01c --- /dev/null +++ b/devel/ragel/patches/patch-test_runtests_in @@ -0,0 +1,22 @@ +$OpenBSD: patch-test_runtests_in,v 1.1.1.1 2011/11/15 16:35:15 jeremy Exp $ + +Fix bug not respecting ruby version you pass to configure. + +Use gdiff since our diff doesn't implement --strip-trailing-cr. + +--- test/runtests.in.orig Mon Nov 14 16:38:12 2011 ++++ test/runtests.in Mon Nov 14 16:41:51 2011 +@@ -118,11 +118,11 @@ function run_test() + + exec_cmd=./$binary + [ $lang = java ] && exec_cmd="java ${root}" +- [ $lang = ruby ] && exec_cmd="ruby ${code_src}" ++ [ $lang = ruby ] && exec_cmd="${ruby_engine} ${code_src}" + [ $lang = csharp ] && [ "$csharp_compiler" = gmcs ] && exec_cmd="mono ${exec_cmd}" + + $exec_cmd 2>&1 > $output; +- if diff --strip-trailing-cr $expected_out $output > /dev/null; then ++ if gdiff --strip-trailing-cr $expected_out $output > /dev/null; then + echo "passed"; + else + echo "FAILED"; diff --git a/devel/ragel/pkg/DESCR b/devel/ragel/pkg/DESCR new file mode 100644 index 00000000000..9dff7953b79 --- /dev/null +++ b/devel/ragel/pkg/DESCR @@ -0,0 +1,6 @@ +Ragel compiles executable finite state machines from regular languages. +It targets C, C++, and Ruby. Ragel state machines can not only recognize +byte sequences as regular expression machines do, but can also execute +code at arbitrary points in the recognition of a regular language. Code +embedding is done using inline operators that do not disrupt the regular +language syntax. diff --git a/devel/ragel/pkg/PLIST b/devel/ragel/pkg/PLIST new file mode 100644 index 00000000000..3e91fafa911 --- /dev/null +++ b/devel/ragel/pkg/PLIST @@ -0,0 +1,6 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2011/11/15 16:35:15 jeremy Exp $ +@bin bin/ragel +@man man/man1/ragel.1 +share/doc/ragel/ +share/doc/ragel/CREDITS +share/doc/ragel/ChangeLog