aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan-Christofer Demay <jcdemay@gmail.com>2009-09-08 19:32:25 +0000
committerJonathan-Christofer Demay <jcdemay@gmail.com>2009-09-08 19:32:25 +0000
commit564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1 (patch)
tree3966c57ba2cd91eb6c84c472d1ee05efb4cd6b7a /dev-ml/ocamlgraph
parentNew package, ebuild written by me (diff)
downloadsci-564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1.tar.gz
sci-564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1.tar.bz2
sci-564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1.zip
Various updates related to sci-mathematics/frama-c
Diffstat (limited to 'dev-ml/ocamlgraph')
-rw-r--r--dev-ml/ocamlgraph/Manifest3
-rw-r--r--dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch152
-rw-r--r--dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild52
3 files changed, 207 insertions, 0 deletions
diff --git a/dev-ml/ocamlgraph/Manifest b/dev-ml/ocamlgraph/Manifest
new file mode 100644
index 000000000..f62c106c2
--- /dev/null
+++ b/dev-ml/ocamlgraph/Manifest
@@ -0,0 +1,3 @@
+AUX ocamlgraph-1.1-makefile.patch 5379 RMD160 e97ef8d3b70bd470f419ea5fd0d18a77c8f1df8a SHA1 f9b1236890d7372b19f17489ced2ccf86c5397d9 SHA256 53efa9874769339eca9adefc09ad40ea0abc28a8fe248d7443df71c50f18d054
+DIST ocamlgraph-1.1.tar.gz 195045 RMD160 f48af8e9c1c681bf6ee42ea22267ce022777db57 SHA1 70152127fd05aa97006434614441425182e87471 SHA256 955e0bfbfda83e055b0cf0527af0b706c8f4a14f680d3a77be1e1e725e1cfb3f
+EBUILD ocamlgraph-1.1.ebuild 1005 RMD160 31ce50aa3fdf5c98986ceae5b2e5684a956df22f SHA1 575d1b50fc6c1f6aed30f4ad2eae1d86fee7ff47 SHA256 e98c0a4509a55bf95cc2fddd0f8549e8197213774745ed10049fe6cfb4d287cf
diff --git a/dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch b/dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch
new file mode 100644
index 000000000..91444f1d9
--- /dev/null
+++ b/dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch
@@ -0,0 +1,152 @@
+diff -Naur ocamlgraph-1.1-orig/Makefile.in ocamlgraph-1.1-ptch/Makefile.in
+--- ocamlgraph-1.1-orig/Makefile.in 2009-06-23 13:05:21.000000000 +0000
++++ ocamlgraph-1.1-ptch/Makefile.in 2009-07-20 17:31:08.000000000 +0000
+@@ -143,10 +143,13 @@
+
+ viewer: $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.$(OCAMLBEST)
+
++ifeq (@LABLGNOMECANVAS@,yes)
+ VIEWER_CMO=viewGraph viewGraph_select viewGraph_utils viewGraph_test
+ VIEWER_CMO:=$(patsubst %,$(VIEWER_DIR)/%.cmo, $(VIEWER_CMO))
++endif
+ VIEWER_CMX=$(VIEWER_CMO:.cmo=.cmx)
+ VIEWER_CMI=$(VIEWER_CMO:.cmo=.cmi)
++VIEWER_O=$(VIEWER_CMO:.cmo=.o)
+
+ VIEWER_INCLUDES= @INCLUDEGTK2@ -I $(VIEWER_DIR) $(INCLUDES) -I .
+
+@@ -240,49 +243,38 @@
+
+ DESTDIR =
+
+-install: install-$(OCAMLBEST) install-byte
+-ifeq (@LABLGNOMECANVAS@,yes)
+-ifeq ($(OCAMLBEST),byte)
+- cp -f $(BINDIR)/graph-editor.byte $(BINDIR)/graph-editor$(EXE)
+- cp -f $(BINDIR)/graph-viewer.byte $(BINDIR)/graph-viewer$(EXE)
++ifdef OCAMLFIND
++install-findlib: META install-bin
++ mkdir -p $(DESTDIR)/$(OCAMLLIB)
++ifeq ($(OCAMLBEST),opt)
++ $(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) ocamlgraph META $(SRCDIR)/*.mli view_graph/*.mli view_graph/viewGraph_test.ml \
++ graph$(LIBEXT) graph.cmx graph.o graph.cmo graph.cmi $(CMA) $(CMXA) \
++ $(VIEWER_CMX) $(VIEWER_CMO) $(VIEWER_CMI) $(VIEWER_O)
+ else
+- cp -f $(BINDIR)/graph-editor.opt $(BINDIR)/graph-editor$(EXE)
+- cp -f $(BINDIR)/graph-viewer.opt $(BINDIR)/graph-viewer$(EXE)
++ $(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) ocamlgraph META $(SRCDIR)/*.mli view_graph/*.mli \
++ graph.cmo graph.cmi $(CMA) view_graph/viewGraph_test.ml \
++ $(VIEWER_CMO) $(VIEWER_CMI)
+ endif
+ endif
+
+-install-byte:
+- cp -f graph.cmo graph.cmi $(CMA) "$(DESTDIR)$(OCAMLLIB)"
+-ifeq (@LABLGNOMECANVAS@,yes)
+- cp -f $(ED_DIR)/editor.byte $(BINDIR)/graph-editor.byte
+- cp -f $(VIEWER_CMO) "$(DESTDIR)$(OCAMLLIB)"
+- cp -f $(VIEWER_DIR)/viewgraph.byte $(BINDIR)/graph-viewer.byte
+-endif
+-
+-install-opt: install-byte
+- cp -f graph$(LIBEXT) graph.cmx $(CMXA) "$(DESTDIR)$(OCAMLLIB)"
+-ifeq (@LABLGNOMECANVAS@,yes)
+- cp -f $(ED_DIR)/editor.opt $(BINDIR)/graph-editor.opt
+- cp -f $(VIEWER_CMX) "$(DESTDIR)$(OCAMLLIB)"
+- cp -f $(VIEWER_DIR)/viewgraph.opt $(BINDIR)/graph-viewer.opt
+-endif
++META: META.in Makefile
++ sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ \
++ $@.in > $@
+
+-install-findlib: META
+-ifdef OCAMLFIND
++install-bin:
+ ifeq (@LABLGNOMECANVAS@,yes)
+- $(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
+- graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA) \
+- $(VIEWER_CMX) $(VIEWER_CMO)
++ mkdir -p $(DESTDIR)/$(BINDIR)
++ cp -f $(ED_DIR)/editor.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-editor.byte
++ cp -f $(VIEWER_DIR)/viewgraph.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer.byte
++ifeq ($(OCAMLBEST),opt)
++ cp -f $(ED_DIR)/editor.opt $(DESTDIR)/$(BINDIR)/ocamlgraph-editor$(EXE)
++ cp -f $(VIEWER_DIR)/viewgraph.opt $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer$(EXE)
+ else
+- $(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
+- graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA)
++ mv -f $(DESTDIR)/$(BINDIR)/ocamlgraph-editor.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-editor$(EXE)
++ mv -f $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer$(EXE)
+ endif
+ endif
+
+-META: META.in Makefile
+- sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ \
+- $@.in > $@
+-
+ # documentation
+ ###############
+
+@@ -298,7 +290,7 @@
+ mkdir -p doc
+ rm -f doc/*
+ $(OCAMLDOC) -d doc -html $(INCLUDES) $(DOC_SRC)
+- $(MAKE) -C $(VIEWER_DIR) doc
++ #$(MAKE) -C $(VIEWER_DIR) doc
+
+ # literate programming
+ $(NAME).tex: $(DOC_SRC)
+@@ -336,7 +328,7 @@
+
+ export: source export-doc export-web export-delaunay
+
+-source:
++source: svn-clean
+ mkdir -p export
+ cd export; rm -rf $(EXPORTDIR)
+ mkdir -p export/$(EXPORTDIR)/bin
+@@ -345,10 +337,10 @@
+ cp export/$(TAR).gz $(FTP)
+ cp README FAQ CREDITS COPYING LICENSE CHANGES $(EXAMPLES) $(FTP)
+
+-# Build and install the .tar.gz requiered by Frama-C
++# Build and install the .tar.gz required by Frama-C
+ framac: EXPORTDIR=ocamlgraph
+ framac: FTP=$$HOME/frama-c
+-framac:
++framac: svn-clean
+ mkdir -p export
+ cd export; rm -rf $(EXPORTDIR)
+ mkdir -p export/$(EXPORTDIR)/bin
+@@ -441,20 +433,22 @@
+ #######
+
+ clean:
+- rm -f *~
++ -$(RM) *~
+ for d in $(SRCDIR) $(LIBDIR) $(ED_DIR) $(VIEWER_DIR) tests examples; \
+ do \
+- rm -f $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~; \
++ $(RM) $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~; \
+ done
+- rm -f $(GENERATED) $(SRCDIR)/dot_parser.output
+- rm -f graph.*a graph.cm* graph.o graph$(LIBEXT)
+- rm -f $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt
+- rm -f $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt
+- rm -f *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES)
+- rm -f $(EXAMPLESBIN)
++ -$(RM) $(GENERATED) $(SRCDIR)/dot_parser.output
++ -$(RM) graph.*a graph.cm* graph.o graph$(LIBEXT)
++ -$(RM) $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt
++ -$(RM) $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt
++ -$(RM) *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES)
++ -$(RM) $(EXAMPLESBIN)
+
+ dist-clean distclean:: clean
+- rm -f Makefile config.cache config.log config.status *.byte *.opt
++ -$(RM) Makefile config.cache config.log config.status *.byte *.opt
++ -$(RM) src/version.ml
++ -$(RM) .depend
+
+ svnclean svn-clean:: dist-clean
+ rm -f config.* configure configure.lineno
diff --git a/dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild b/dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild
new file mode 100644
index 000000000..c1efe4a48
--- /dev/null
+++ b/dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: Exp $
+
+inherit eutils
+
+DESCRIPTION="A graph library for Objective Caml"
+HOMEPAGE="http://ocamlgraph.lri.fr/"
+SRC_URI="http://ocamlgraph.lri.fr/download/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+RDEPEND=">=dev-lang/ocaml-3.10.2"
+
+DEPEND="${RDEPEND}
+ gtk? ( >=dev-ml/lablgtk-2.6 )
+ ocamlopt? ( dev-lang/ocaml[ocamlopt] )"
+
+IUSE="doc examples gtk +ocamlopt"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch "${FILESDIR}/${P}-makefile.patch"
+}
+
+src_compile() {
+ econf || die "econf failed"
+ emake DESTDIR="/" || die "emake failed"
+
+ if use doc; then
+ emake doc || die "emake doc failed"
+ fi
+}
+
+src_install() {
+ emake install-bin install-findlib DESTDIR="${D}" || die "emake install failed"
+ dodoc CHANGES COPYING CREDITS FAQ README
+
+ if use doc; then
+ dohtml doc/*
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
+