Corrected contents of patch directory; minor modifications to build

mechanism to keep pkglint happy.
This commit is contained in:
jaapb 2012-10-29 09:11:22 +00:00
parent 1c43345bc5
commit 98c2072bd0
4 changed files with 43 additions and 60 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2012/10/08 15:18:21 jaapb Exp $
# $NetBSD: Makefile,v 1.7 2012/10/29 09:11:22 jaapb Exp $
#
DISTNAME= menhir-20120123
@ -31,11 +31,10 @@ PLIST.opt= yes
MAKE_ENV+= TARGET=byte
.endif
INSTALLATION_DIRS= lib/ocaml/site-lib/menhirLib
post-extract:
${RM} ${WRKSRC}/demos/calc/.omakedb*
pre-install:
${MKDIR} ${DESTDIR}${PREFIX}/lib/ocaml/site-lib/menhirLib
.include "../../lang/ocaml/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.2 2012/10/08 15:18:21 jaapb Exp $
$NetBSD: distinfo,v 1.3 2012/10/29 09:11:22 jaapb Exp $
SHA1 (menhir-20120123.tar.gz) = 6d521cfb1203ae640ecf0672b7a6c4ead9e76786
RMD160 (menhir-20120123.tar.gz) = 7991cae05cc8246ff81f8f193ca6a8ba6d4d3d7b
Size (menhir-20120123.tar.gz) = 398871 bytes
SHA1 (patch-Makefile) = bc736eb58bc87e0bb11b0b2b483f2ebbd82573b2
SHA1 (patch-Makefile) = 9c2847029e842bc7bb0c1d8b801d05fccc6e6e0e

View file

@ -0,0 +1,38 @@
$NetBSD: patch-Makefile,v 1.1 2012/10/29 09:11:23 jaapb Exp $
Change installation procedure to conform with pkgsrc (install, destdir)
--- Makefile.orig 2012-01-23 10:57:40.000000000 +0000
+++ Makefile
@@ -34,10 +34,10 @@ ifndef PREFIX
$(error Please define PREFIX)
endif
-bindir := ${PREFIX}/bin
-docdir := ${PREFIX}/share/doc/menhir
-libdir := ${PREFIX}/share/menhir
-mandir := ${PREFIX}/share/man/man1
+bindir := ${DESTDIR}${PREFIX}/bin
+docdir := ${DESTDIR}${PREFIX}/share/doc/menhir
+libdir := ${DESTDIR}${PREFIX}/share/menhir
+mandir := ${DESTDIR}${PKGMANDIR}/man1
MANS := menhir.1
DOCS := manual.pdf demos
MLYLIB := src/standard.mly
@@ -79,13 +79,14 @@ install: all
mkdir -p $(libdir)
mkdir -p $(docdir)
mkdir -p $(mandir)
- install src/$(MENHIREXE) $(bindir)
- install -m 644 $(MLYLIB) $(libdir)
+ ${BSD_INSTALL_PROGRAM} src/$(MENHIREXE) $(bindir)
+ ${BSD_INSTALL_DATA} $(MLYLIB) $(libdir)
cp -r $(DOCS) $(docdir)
cp -r $(MANS) $(mandir)
@cd src && 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) ; \
else \
echo Installing MenhirLib manually. ; \
install -m 644 $(MENHIRLIB) $(libdir) ; \

View file

@ -1,54 +0,0 @@
$NetBSD: patch-aa,v 1.1.1.1 2008/10/13 22:45:03 bjs Exp $
Support destdir installation, and use ocamlfind to
set ${libdir} properly.
--- Makefile.orig 2008-09-12 07:58:19.000000000 -0400
+++ Makefile
@@ -30,10 +30,10 @@ endif
bindir := ${PREFIX}/bin
docdir := ${PREFIX}/share/doc/menhir
-libdir := ${PREFIX}/share/menhir
-mandir := ${PREFIX}/share/man/man1
+libdir := `ocamlfind printconf destdir`
+mandir := ${PREFIX}/${PKGMANDIR}/man1
MANS := menhir.1
-DOCS := manual.pdf demos
+DOCS := manual.pdf
MLYLIB := src/standard.mly
MENHIRLIB := menhirLib.cmi menhirLib.cmo menhirLib.cmx menhirLib.o
@@ -62,20 +62,22 @@ src/installation.ml:
# Installation.
install: src/menhir
- mkdir -p $(bindir)
- mkdir -p $(libdir)
- mkdir -p $(docdir)
- mkdir -p $(mandir)
- install src/menhir $(bindir)
- install -m 644 $(MLYLIB) $(libdir)
- cp -r $(DOCS) $(docdir)
- cp -r $(MANS) $(mandir)
+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(bindir)
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(libdir)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(docdir)
+ $(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(mandir)
+ install src/menhir $(DESTDIR)$(bindir)
+ $(BSD_INSTALL_LIB) $(MLYLIB) $(DESTDIR)$(libdir)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)${EGDIR}
+ $(BSD_INSTALL_DATA) $(DOCS) $(DESTDIR)$(docdir)
+ $(BSD_INSTALL_MAN) $(MANS) $(DESTDIR)$(mandir)
+ cp -r demos $(DESTDIR)${EGDIR}
@cd src && if $(USE_OCAMLFIND) ; then \
echo Installing MenhirLib via ocamlfind. ; \
- ocamlfind install menhirLib META $(MENHIRLIB) ; \
+ ocamlfind install -destdir $(DESTDIR)$(libdir) menhirLib META $(MENHIRLIB) ; \
else \
echo Installing MenhirLib manually. ; \
- install -m 644 $(MENHIRLIB) $(libdir) ; \
+ install -m 644 $(MENHIRLIB) $(DESTDIR)$(libdir) ; \
fi
uninstall: