diff options
author | jaapb <jaapb> | 2014-10-26 13:43:48 +0000 |
---|---|---|
committer | jaapb <jaapb> | 2014-10-26 13:43:48 +0000 |
commit | 4dcb05b1a493cc5532da59ecd3edbd9b7b9277ff (patch) | |
tree | 73fa8a63cc36c19b4c2c40219d418bc44e768b15 | |
parent | e1d4b97951cf3c3ed91ebbbeb3f4bd4fbc7e45fe (diff) | |
download | pkgsrc-4dcb05b1a493cc5532da59ecd3edbd9b7b9277ff.tar.gz |
Added ocamlgraph, an OCaml graph (in the mathematical sense) library.
Partially based on Kamel Derouiche's ocamlgraph package in wip.
-rw-r--r-- | devel/ocamlgraph/DESCR | 3 | ||||
-rw-r--r-- | devel/ocamlgraph/Makefile | 41 | ||||
-rw-r--r-- | devel/ocamlgraph/PLIST | 69 | ||||
-rw-r--r-- | devel/ocamlgraph/buildlink3.mk | 12 | ||||
-rw-r--r-- | devel/ocamlgraph/distinfo | 6 | ||||
-rw-r--r-- | devel/ocamlgraph/options.mk | 21 | ||||
-rw-r--r-- | devel/ocamlgraph/patches/patch-Makefile.in | 77 |
7 files changed, 229 insertions, 0 deletions
diff --git a/devel/ocamlgraph/DESCR b/devel/ocamlgraph/DESCR new file mode 100644 index 00000000000..61a9198729c --- /dev/null +++ b/devel/ocamlgraph/DESCR @@ -0,0 +1,3 @@ +ocamlgraph is a graph library for Objective Caml. It provides an +easy-to-use graph data structure together with several operations +and algorithms over diff --git a/devel/ocamlgraph/Makefile b/devel/ocamlgraph/Makefile new file mode 100644 index 00000000000..259e008c218 --- /dev/null +++ b/devel/ocamlgraph/Makefile @@ -0,0 +1,41 @@ +# $NetBSD: Makefile,v 1.1 2014/10/26 13:43:48 jaapb Exp $ + +DISTNAME= ocamlgraph-1.8.5 +PKGNAME= ${DISTNAME} # avoid prefixing with ocaml- +CATEGORIES= devel +MASTER_SITES= http://ocamlgraph.lri.fr/download/ + +MAINTAINER= jaapb@NetBSD.org +HOMEPAGE= http://ocamlgraph.lri.fr/ +COMMENT= Graph library for OCaml +LICENSE= gnu-lgpl-v2.1 + +GNU_CONFIGURE= yes +USE_TOOLS+= gmake +INSTALL_TARGET= install-findlib +OCAML_USE_FINDLIB= yes + +.include "options.mk" + +MAKE_ENV+= USE_LABLGTK="${USE_LABLGTK}" + +.include "../../mk/ocaml.mk" + +.if ${OCAML_USE_OPT_COMPILER} == "yes" +MAKE_ENV+= OCAMLBEST="opt" +.else +MAKE_ENV+= OCAMLBEST="byte" +.endif + +post-install: +.if ${USE_LABLGTK} == "yes" +.if ${OCAML_USE_OPT_COMPILER} == "yes" + ${INSTALL_PROGRAM} ${WRKSRC}/editor/editor.opt ${DESTDIR}${PREFIX}/bin/graph-editor + ${INSTALL_PROGRAM} ${WRKSRC}/dgraph/dgraph.opt ${DESTDIR}${PREFIX}/bin/graph-viewer +.else + ${INSTALL_PROGRAM} ${WKRSRC}/editor/editor.byte ${DESTDIR}${PREFIX}/bin/graph-editor + ${INSTALL_PROGRAM} ${WKRSRC}/dgraph/dgraph.byte ${DESTDIR}${PREFIX}/bin/graph-viewer +.endif +.endif + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/ocamlgraph/PLIST b/devel/ocamlgraph/PLIST new file mode 100644 index 00000000000..e8f90a0ca8a --- /dev/null +++ b/devel/ocamlgraph/PLIST @@ -0,0 +1,69 @@ +@comment $NetBSD: PLIST,v 1.1 2014/10/26 13:43:48 jaapb Exp $ +${PLIST.lablgtk}bin/graph-editor +${PLIST.lablgtk}bin/graph-viewer +${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/dgraph.cmi +${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/dgraph.cmo +${PLIST.ocaml-opt}${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/dgraph.cmx +${PLIST.ocaml-opt}${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/dgraph.o +${PLIST.ocaml-opt}${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/graph.o +${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/viewgraph.cmi +${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/viewgraph.cmo +${PLIST.ocaml-opt}${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/viewgraph.cmx +${PLIST.ocaml-opt}${PLIST.lablgtk}${OCAML_SITELIB}/ocamlgraph/viewgraph.o +${OCAML_SITELIB}/ocamlgraph/META +${OCAML_SITELIB}/ocamlgraph/builder.mli +${OCAML_SITELIB}/ocamlgraph/classic.mli +${OCAML_SITELIB}/ocamlgraph/cliquetree.mli +${OCAML_SITELIB}/ocamlgraph/coloring.mli +${OCAML_SITELIB}/ocamlgraph/components.mli +${OCAML_SITELIB}/ocamlgraph/contraction.mli +${OCAML_SITELIB}/ocamlgraph/dGraphContainer.mli +${OCAML_SITELIB}/ocamlgraph/dGraphModel.mli +${OCAML_SITELIB}/ocamlgraph/dGraphRandModel.mli +${OCAML_SITELIB}/ocamlgraph/dGraphSubTree.mli +${OCAML_SITELIB}/ocamlgraph/dGraphTreeLayout.mli +${OCAML_SITELIB}/ocamlgraph/dGraphTreeModel.mli +${OCAML_SITELIB}/ocamlgraph/dGraphView.mli +${OCAML_SITELIB}/ocamlgraph/dGraphViewItem.mli +${OCAML_SITELIB}/ocamlgraph/delaunay.mli +${OCAML_SITELIB}/ocamlgraph/dominator.mli +${OCAML_SITELIB}/ocamlgraph/dot.mli +${OCAML_SITELIB}/ocamlgraph/dot_ast.mli +${OCAML_SITELIB}/ocamlgraph/dot_parser.mli +${OCAML_SITELIB}/ocamlgraph/fixpoint.mli +${OCAML_SITELIB}/ocamlgraph/flow.mli +${OCAML_SITELIB}/ocamlgraph/gmap.mli +${OCAML_SITELIB}/ocamlgraph/gml.mli +${PLIST.ocaml-opt}${OCAML_SITELIB}/ocamlgraph/graph.a +${OCAML_SITELIB}/ocamlgraph/graph.cma +${OCAML_SITELIB}/ocamlgraph/graph.cmi +${OCAML_SITELIB}/ocamlgraph/graph.cmo +${PLIST.ocaml-opt}${OCAML_SITELIB}/ocamlgraph/graph.cmx +${PLIST.ocaml-opt}${OCAML_SITELIB}/ocamlgraph/graph.cmxa +${OCAML_SITELIB}/ocamlgraph/graphml.mli +${OCAML_SITELIB}/ocamlgraph/graphviz.mli +${OCAML_SITELIB}/ocamlgraph/imperative.mli +${OCAML_SITELIB}/ocamlgraph/kruskal.mli +${OCAML_SITELIB}/ocamlgraph/leaderlist.mli +${OCAML_SITELIB}/ocamlgraph/mcs_m.mli +${OCAML_SITELIB}/ocamlgraph/md.mli +${OCAML_SITELIB}/ocamlgraph/merge.mli +${OCAML_SITELIB}/ocamlgraph/minsep.mli +${OCAML_SITELIB}/ocamlgraph/nonnegative.mli +${OCAML_SITELIB}/ocamlgraph/oper.mli +${OCAML_SITELIB}/ocamlgraph/pack.mli +${OCAML_SITELIB}/ocamlgraph/path.mli +${OCAML_SITELIB}/ocamlgraph/persistent.mli +${OCAML_SITELIB}/ocamlgraph/prim.mli +${OCAML_SITELIB}/ocamlgraph/rand.mli +${OCAML_SITELIB}/ocamlgraph/sig.mli +${OCAML_SITELIB}/ocamlgraph/sig_pack.mli +${OCAML_SITELIB}/ocamlgraph/strat.mli +${OCAML_SITELIB}/ocamlgraph/topological.mli +${OCAML_SITELIB}/ocamlgraph/traverse.mli +${OCAML_SITELIB}/ocamlgraph/util.mli +${OCAML_SITELIB}/ocamlgraph/viewGraph_core.mli +${OCAML_SITELIB}/ocamlgraph/viewGraph_select.mli +${OCAML_SITELIB}/ocamlgraph/viewGraph_utils.mli +${OCAML_SITELIB}/ocamlgraph/xDot.mli +${OCAML_SITELIB}/ocamlgraph/xDotDraw.mli diff --git a/devel/ocamlgraph/buildlink3.mk b/devel/ocamlgraph/buildlink3.mk new file mode 100644 index 00000000000..aa8515142ca --- /dev/null +++ b/devel/ocamlgraph/buildlink3.mk @@ -0,0 +1,12 @@ +# $NetBSD: buildlink3.mk,v 1.1 2014/10/26 13:43:48 jaapb Exp $ + +BUILDLINK_TREE+= ocamlgraph + +.if !defined(OCAMLGRAPH_BUILDLINK3_MK) +OCAMLGRAPH_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.ocamlgraph+= ocamlgraph>=1.8.5 +BUILDLINK_PKGSRCDIR.ocamlgraph?= ../../devel/ocamlgraph +.endif # OCAMLGRAPH_BUILDLINK3_MK + +BUILDLINK_TREE+= -ocamlgraph diff --git a/devel/ocamlgraph/distinfo b/devel/ocamlgraph/distinfo new file mode 100644 index 00000000000..4b7176b2349 --- /dev/null +++ b/devel/ocamlgraph/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2014/10/26 13:43:48 jaapb Exp $ + +SHA1 (ocamlgraph-1.8.5.tar.gz) = e53a92d50685ab38f2b856eb64d93aa36dc7bcdf +RMD160 (ocamlgraph-1.8.5.tar.gz) = c3b67023bae65f9c8a2d32722d0e90a6a947d4fa +Size (ocamlgraph-1.8.5.tar.gz) = 269438 bytes +SHA1 (patch-Makefile.in) = ce8d401563d37fea0780787dbd81a7e03455c01f diff --git a/devel/ocamlgraph/options.mk b/devel/ocamlgraph/options.mk new file mode 100644 index 00000000000..bb04f15fffc --- /dev/null +++ b/devel/ocamlgraph/options.mk @@ -0,0 +1,21 @@ +# $NetBSD: options.mk,v 1.1 2014/10/26 13:43:48 jaapb Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.ocamlgraph +PKG_SUPPORTED_OPTIONS= lablgtk + +.include "../../mk/bsd.prefs.mk" + +.include "../../mk/bsd.options.mk" + +PLIST_VARS+= lablgtk +### +### Lablgtk support +### +.if !empty(PKG_OPTIONS:Mlablgtk) +PLIST.lablgtk= yes +USE_LABLGTK= yes +INSTALLATION_DIRS+= bin +.include "../../x11/ocaml-lablgtk/buildlink3.mk" +.else +USE_LABLGTK= no +.endif diff --git a/devel/ocamlgraph/patches/patch-Makefile.in b/devel/ocamlgraph/patches/patch-Makefile.in new file mode 100644 index 00000000000..559bb8bbff9 --- /dev/null +++ b/devel/ocamlgraph/patches/patch-Makefile.in @@ -0,0 +1,77 @@ +$NetBSD: patch-Makefile.in,v 1.1 2014/10/26 13:43:48 jaapb Exp $ + +Change configure procedure to use pkgsrc settings rather than detection +--- Makefile.in.orig 2014-04-04 12:45:43.000000000 +0000 ++++ Makefile.in +@@ -33,7 +33,7 @@ OCAMLDOC = @OCAMLDOC@ + OCAMLLEX = @OCAMLLEX@ + OCAMLYACC= @OCAMLYACC@ -v + OCAMLLIB = @OCAMLLIB@ +-OCAMLBEST= @OCAMLBEST@ ++#OCAMLBEST= @OCAMLBEST@ + OCAMLVERSION = @OCAMLVERSION@ + OCAMLWEB = @OCAMLWEB@ + OCAMLWIN32 = @OCAMLWIN32@ +@@ -55,7 +55,7 @@ OFLAGS = $(INCLUDES) + + NAME=ocamlgraph + +-ifeq (@LABLGNOMECANVAS@,yes) ++ifeq ($(USE_LABLGTK),yes) + all: byte $(OCAMLBEST) viewer dgraph editor + else + all: byte $(OCAMLBEST) +@@ -240,7 +240,7 @@ $(DGRAPH_DIR)/dgraph.opt: $(CMXA) $(DGRA + # while graph.cmi may be required at the same time by some .cmo of the + # bytecodes, leading to tentative access to a corrupted graph.cmi. + +-ifeq (@LABLGNOMECANVAS@,yes) ++ifeq (${USE_LABLGTK},yes) + graph.cmx: | $(DGRAPH_DIR)/dgraph.byte \ + $(VIEWER_DIR)/viewgraph.byte \ + $(ED_DIR)/editor.byte +@@ -378,7 +378,7 @@ INSTALL_LIBDIR=$(DESTDIR)$(OCAMLLIB)/oca + + install: install-$(OCAMLBEST) install-byte + mkdir -p $(BINDIR) +-ifeq (@LABLGNOMECANVAS@,yes) ++ifeq (${USE_LABLGTK},yes) + ifeq ($(OCAMLBEST),byte) + cp -f $(BINDIR)/graph-editor.byte $(BINDIR)/graph-editor$(EXE) + cp -f $(BINDIR)/graph-viewer.byte $(BINDIR)/graph-viewer$(EXE) +@@ -392,7 +392,7 @@ install-byte: + mkdir -p $(INSTALL_LIBDIR) + cp -f graph.cmo graph.cmi $(CMA) $(INSTALL_LIBDIR) + cp -f $(SRCDIR)/*.mli $(INSTALL_LIBDIR) +-ifeq (@LABLGNOMECANVAS@,yes) ++ifeq (${USE_LABLGTK},yes) + mkdir -p $(BINDIR) + cp -f $(ED_DIR)/editor.byte $(BINDIR)/graph-editor.byte + cp -f $(VIEWER_CMILIB) $(VIEWER_CMOLIB) $(INSTALL_LIBDIR) +@@ -406,7 +406,7 @@ install-opt: install-byte + cp -f graph$(OBJEXT) graph$(LIBEXT) graph.cmi graph.cmx \ + $(CMXA) $(CMXS) $(INSTALL_LIBDIR) + cp -f $(SRCDIR)/*.mli $(INSTALL_LIBDIR) +-ifeq (@LABLGNOMECANVAS@,yes) ++ifeq (${USE_LABLGTK},yes) + mkdir -p $(BINDIR) + cp -f $(ED_DIR)/editor.opt $(BINDIR)/graph-editor.opt + cp -f $(VIEWER_CMILIB) $(VIEWER_CMXLIB) $(VIEWER_CMXLIB:.cmx=.o) \ +@@ -419,7 +419,7 @@ endif + + install-findlib: META + ifdef OCAMLFIND +-ifeq (@LABLGNOMECANVAS@,yes) ++ifeq (${USE_LABLGTK},yes) + $(OCAMLFIND) install ocamlgraph META \ + $(SRCDIR)/*.mli $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli \ + graph$(OBJEXT) graph$(LIBEXT) graph.cmx graph.cmo graph.cmi \ +@@ -448,7 +448,7 @@ NODOC = blocks dot_parser dot_lexer vers + NODOC := $(patsubst %, $(SRCDIR)/%.cmo, $(NODOC)) + DOC_CMO = $(filter-out $(NODOC) $(LIB), $(CMO)) + DOC_SRC = $(CMI:.cmi=.mli) $(DOC_CMO:.cmo=.mli) $(DOC_CMO:.cmo=.ml) +-ifeq (@LABLGNOMECANVAS@,yes) ++ifeq (${USE_LABLGTK},yes) + DOC_SRC := $(DOC_SRC) $(DGRAPH_CMI:.cmi=.mli) + endif + |