summaryrefslogtreecommitdiff
path: root/devel/menhir
diff options
context:
space:
mode:
authorjaapb <jaapb@pkgsrc.org>2014-08-17 14:37:23 +0000
committerjaapb <jaapb@pkgsrc.org>2014-08-17 14:37:23 +0000
commit9d1d9c973f44461e5f45365f0958711063cdf3d8 (patch)
treed196afbb5a65dd6307c53860e56cd06e7f3866ce /devel/menhir
parentb27c7e27a84fb45ef3a1135e7a26d1bc533723b8 (diff)
downloadpkgsrc-9d1d9c973f44461e5f45365f0958711063cdf3d8.tar.gz
Updated package to newest version, 20140422. Changes include:
In the Coq backend, use ' instead of _ as separator in identifiers. Also, correct a serious bug that was inadvertently introduced on 2013/03/01 (r319). Lexer fix so as to support an open variant type [> ...] within a %type<...> declaration. Updated the Makefile so that install no longer depends on all. Updated the demos so that the lexer does not invoke "exit 0" when encoutering eof. (This should be more intuitive.) Fixed a newline conversion problem that would prevent Menhir from building on Windows when using ocaml 4.01. Switched to ocamlbuild. Many thanks to Daniel Weil for offering very useful guidance. "menhir --depend" was broken since someone added new whitespace in the output of ocamldep. Fixed. Fixed a compilation problem that would arise when a file produced by Menhir on a 64-bit platform was compiled by ocaml on a 32-bit platform. Performance improvements in the computation of various information about the automaton (module [Invariant]). The improvements will be noticeable only for very large automata. The option --log-grammar 3 (and above) now causes the FOLLOW sets for *terminal* symbols to be computed and displayed. Added the flag --canonical, which causes Menhir to produce a canonical LR(1) automaton in the style of Knuth. This means that no merging of states takes place during the construction of the automaton, and that no default reductions are allowed. I also modified the package to use the ocaml.mk infrastructure.
Diffstat (limited to 'devel/menhir')
-rw-r--r--devel/menhir/Makefile29
-rw-r--r--devel/menhir/PLIST6
-rw-r--r--devel/menhir/distinfo10
-rw-r--r--devel/menhir/patches/patch-Makefile31
4 files changed, 33 insertions, 43 deletions
diff --git a/devel/menhir/Makefile b/devel/menhir/Makefile
index 24cdd022ee7..70522cb08d3 100644
--- a/devel/menhir/Makefile
+++ b/devel/menhir/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2013/11/01 11:30:21 jaapb Exp $
+# $NetBSD: Makefile,v 1.10 2014/08/17 14:37:23 jaapb Exp $
#
-DISTNAME= menhir-20120123
-PKGREVISION= 2
+DISTNAME= menhir-20140422
CATEGORIES= devel
MASTER_SITES= http://cristal.inria.fr/~fpottier/menhir/
@@ -11,28 +10,20 @@ HOMEPAGE= http://cristal.inria.fr/~fpottier/menhir/
COMMENT= LR(1) parser generator in OCaml
LICENSE= qpl-v1.0
-MAKE_JOBS_SAFE= no
-
USE_TOOLS+= gmake
+MAKE_JOBS_SAFE= no
-BUILD_DEPENDS+= ocaml-findlib-[0-9]*:../../devel/ocaml-findlib
-
-EGDIR= ${PREFIX}/share/examples/${PKGBASE}
-MAKE_ENV= EGDIR=${EGDIR:Q}
+.include "../../mk/ocaml.mk"
-PLIST_VARS= opt
-.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \
- (${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "x86_64") || \
- (${MACHINE_ARCH} == "arm")
-PLIST.opt= yes
+OCAML_USE_FINDLIB= yes
+.if ${OCAML_USE_OPT_COMPILER} == "yes"
+MAKE_ENV+= TARGET=native
.else
MAKE_ENV+= TARGET=byte
.endif
-INSTALLATION_DIRS= lib/ocaml/site-lib/menhirLib
-
-post-extract:
- ${RM} ${WRKSRC}/demos/calc/.omakedb*
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
+MAKE_ENV+= EGDIR=${EGDIR:Q} USE_OCAMLFIND=true \
+ OCAML_SITELIBDIR=${OCAML_SITELIBDIR}
-.include "../../lang/ocaml/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/menhir/PLIST b/devel/menhir/PLIST
index 083cea7eb28..4b85cc73297 100644
--- a/devel/menhir/PLIST
+++ b/devel/menhir/PLIST
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.4 2012/10/08 15:18:21 jaapb Exp $
+@comment $NetBSD: PLIST,v 1.5 2014/08/17 14:37:23 jaapb Exp $
bin/menhir
lib/ocaml/site-lib/menhirLib/META
lib/ocaml/site-lib/menhirLib/menhirLib.cmi
lib/ocaml/site-lib/menhirLib/menhirLib.cmo
-${PLIST.opt}lib/ocaml/site-lib/menhirLib/menhirLib.cmx
+${PLIST.ocaml-opt}lib/ocaml/site-lib/menhirLib/menhirLib.cmx
lib/ocaml/site-lib/menhirLib/menhirLib.o
share/doc/menhir/demos/Makefile
share/doc/menhir/demos/Makefile.auto
@@ -29,9 +29,7 @@ share/doc/menhir/demos/calc-two/reverse.mly
share/doc/menhir/demos/calc-two/tokens.mly
share/doc/menhir/demos/calc/Makefile
share/doc/menhir/demos/calc/OMakefile
-share/doc/menhir/demos/calc/OMakefile.omc
share/doc/menhir/demos/calc/OMakeroot
-share/doc/menhir/demos/calc/OMakeroot.omc
share/doc/menhir/demos/calc/README
share/doc/menhir/demos/calc/calc.ml
share/doc/menhir/demos/calc/lexer.mll
diff --git a/devel/menhir/distinfo b/devel/menhir/distinfo
index fceb4a1e5df..7657ee5df68 100644
--- a/devel/menhir/distinfo
+++ b/devel/menhir/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2012/10/29 09:11:22 jaapb Exp $
+$NetBSD: distinfo,v 1.4 2014/08/17 14:37:23 jaapb Exp $
-SHA1 (menhir-20120123.tar.gz) = 6d521cfb1203ae640ecf0672b7a6c4ead9e76786
-RMD160 (menhir-20120123.tar.gz) = 7991cae05cc8246ff81f8f193ca6a8ba6d4d3d7b
-Size (menhir-20120123.tar.gz) = 398871 bytes
-SHA1 (patch-Makefile) = 9c2847029e842bc7bb0c1d8b801d05fccc6e6e0e
+SHA1 (menhir-20140422.tar.gz) = 1f8980f1436f162c8abed990ade51f0e9433f7a2
+RMD160 (menhir-20140422.tar.gz) = 853424f43ded78922ab7c4dcbd63e542ee54ca46
+Size (menhir-20140422.tar.gz) = 549129 bytes
+SHA1 (patch-Makefile) = 7ad5387d4d8df2fba43ab42b1d041aeb32137104
diff --git a/devel/menhir/patches/patch-Makefile b/devel/menhir/patches/patch-Makefile
index fb7769a410b..2c04f806fb8 100644
--- a/devel/menhir/patches/patch-Makefile
+++ b/devel/menhir/patches/patch-Makefile
@@ -1,11 +1,11 @@
-$NetBSD: patch-Makefile,v 1.1 2012/10/29 09:11:23 jaapb Exp $
+$NetBSD: patch-Makefile,v 1.2 2014/08/17 14:37:23 jaapb Exp $
-Change installation procedure to conform with pkgsrc (install, destdir)
---- Makefile.orig 2012-01-23 10:57:40.000000000 +0000
+Use correct install locations
+--- Makefile.orig 2014-04-22 08:04:21.000000000 +0000
+++ Makefile
-@@ -34,10 +34,10 @@ ifndef PREFIX
- $(error Please define PREFIX)
- endif
+@@ -48,10 +48,10 @@ endif
+ # ----------------------------------------------------------------------------
+ # Installation paths.
-bindir := ${PREFIX}/bin
-docdir := ${PREFIX}/share/doc/menhir
@@ -18,21 +18,22 @@ Change installation procedure to conform with pkgsrc (install, destdir)
MANS := menhir.1
DOCS := manual.pdf demos
MLYLIB := src/standard.mly
-@@ -79,13 +79,14 @@ install: all
+@@ -95,13 +95,15 @@ install:
mkdir -p $(libdir)
mkdir -p $(docdir)
mkdir -p $(mandir)
-- install src/$(MENHIREXE) $(bindir)
+- install $(BUILDDIR)/menhir.native $(bindir)/$(MENHIREXE)
- install -m 644 $(MLYLIB) $(libdir)
-+ ${BSD_INSTALL_PROGRAM} src/$(MENHIREXE) $(bindir)
-+ ${BSD_INSTALL_DATA} $(MLYLIB) $(libdir)
++ ${BSD_INSTALL_PROGRAM} $(BUILDDIR)/menhir.native $(bindir)/$(MENHIREXE)
++ ${BSD_INSTALL_DATA} -m 644 $(MLYLIB) $(libdir)
cp -r $(DOCS) $(docdir)
cp -r $(MANS) $(mandir)
- @cd src && if $(USE_OCAMLFIND) ; then \
+ @if $(USE_OCAMLFIND) ; then \
echo Installing MenhirLib via ocamlfind. ; \
-- ocamlfind install menhirLib META $(MENHIRLIB) ; \
-+ ocamlfind install -destdir ${DESTDIR}${PREFIX}/lib/ocaml/site-lib \
-+ -ldconf ignore menhirLib META $(MENHIRLIB) ; \
+- ocamlfind install menhirLib src/META $(patsubst %,$(BUILDDIR)/%,$(MENHIRLIB)) ; \
++ ocamlfind install -destdir ${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR} \
++ -ldconf ignore \
++ menhirLib src/META $(patsubst %,$(BUILDDIR)/%,$(MENHIRLIB)) ; \
else \
echo Installing MenhirLib manually. ; \
- install -m 644 $(MENHIRLIB) $(libdir) ; \
+ install -m 644 $(patsubst %,$(BUILDDIR)/%,$(MENHIRLIB)) $(libdir) ; \