summaryrefslogtreecommitdiff
path: root/dev-ml/cairo-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-ml/cairo-ocaml
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-ml/cairo-ocaml')
-rw-r--r--dev-ml/cairo-ocaml/Manifest9
-rw-r--r--dev-ml/cairo-ocaml/cairo-ocaml-1.2.0.ebuild91
-rw-r--r--dev-ml/cairo-ocaml/files/0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch26
-rw-r--r--dev-ml/cairo-ocaml/files/0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch27
-rw-r--r--dev-ml/cairo-ocaml/files/0003-Fix-FTBFS-on-bytecode-architectures.patch39
-rw-r--r--dev-ml/cairo-ocaml/files/0004-no-automagic.patch25
-rw-r--r--dev-ml/cairo-ocaml/metadata.xml16
7 files changed, 233 insertions, 0 deletions
diff --git a/dev-ml/cairo-ocaml/Manifest b/dev-ml/cairo-ocaml/Manifest
new file mode 100644
index 000000000000..ea59df68b9ee
--- /dev/null
+++ b/dev-ml/cairo-ocaml/Manifest
@@ -0,0 +1,9 @@
+AUX 0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch 769 SHA256 ad6b2ce1f24bbf254c642d27e6192520b9db8bb6faa94573baa6e93803146f72 SHA512 8312d7371ed073def0454ffefb564158ccf009a09e10eca4a272f93c0936731fe887674d94a2687b0cd4c5da28195c5007da6e050b9a509673fc0071debeb178 WHIRLPOOL 0e4884e738b2bc4f1a0ef092c9182e773bd3545915aae5b0307c4a48612aa76d0b03f1b3a73f83238846f168a44a9e07555977533dc12a99553515d09a95149e
+AUX 0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch 742 SHA256 170ced5c9270b4b8cf2fbf4b35fd2722cd37af991091759bc975bdd104c4ecf8 SHA512 8305da294c9e69ac56a9250afc3d70afe70ba9229ecde320767019df51b84fc9c09a753f10f0b189ab537b6e8fc5ef8c17d6179bca51fba3138122ccbae223a3 WHIRLPOOL 1e7cfe0e9d2ad1377da9f1b769c6b7d86b0f9cfb40a56f2516552257a2ab7d0554fe99d2a91e82681579813f8e6925354ac435afa6b8cda157f23563075410d3
+AUX 0003-Fix-FTBFS-on-bytecode-architectures.patch 1135 SHA256 df9384a54ec9570c3a7e6755acc5fb2d3500790b02b6d7be89e08fa1182b53a9 SHA512 e4550c4c9315ce3c2a16361541ad2b3acccaa6d36d922c5361d1c26e1af22491e46713fe58291b6345d832fdf78466a1937c2327acfeaeb070508fddedfdb206 WHIRLPOOL d640e31c966bd822cb48498631b23e11afec5f1dd7e8a19f87a7a0dd06f9d5156777a11ede52918e56f07b7e960626f55b22cb3895e085a889b2fd096276b9e3
+AUX 0004-no-automagic.patch 1041 SHA256 e824710ac23cf62e6c402c1511423afcc694b657723a670a4d0ce86b62b40f1a SHA512 53bfa4cbc40b3725fa40454fb6e8521f21aaf61135dd6da1ec9fd3f1df256ceec1901022aa70dabd568c0291e37008b7c122d1d654856a13fe632f3bf2c271b8 WHIRLPOOL ad14d1a64cbfff7d85aca4aaf63858de04485f904e7fb00c3eab2f2cb57a7db1efc74c5c77b4e2a0e11beb40674866eae533e2ad9e16e75d9ffcc9b820eb80f1
+DIST cairo-ocaml-1.2.0.tar.bz2 44483 SHA256 5f45aa3cc88d274d14c071402e22c5996fadf506fafa266642b3729b02d17554 SHA512 5cac319cf27b94d31e955885ae89b40342c2ae4ffd1aca7c52366f7c3679185f74e513e0c73bd01260f89da29d43bb420dadd059fa1cf5509997db8f935704b4 WHIRLPOOL c166fab0dfec6bddcc7b48b0bc69aac7b5dd8ed831755e0223e374217b2cf89dd73c3f75a4ddbdf8ca8d49b02fb04e0b85682afcae4ed91c20edeb97afdc21fd
+EBUILD cairo-ocaml-1.2.0.ebuild 2108 SHA256 68df426aabd7fd32c24ef9acb1e05c41a7c53ee2b68ada4402dd4ff65d61c843 SHA512 517f11dd6a75c3896f4d76345bd9687ef2961c47d4ebfa6d0ea894965b637d446911b96ebee09bb51b9841e824deff135e38df8319496d3aad7082028a60fdac WHIRLPOOL 364fcf082adb5948011323399358dd204473c452dae30b406f51f3e54daf34a7b19dcf0951927a20ec91f8c6763b528df72e3ff1b1ab9dc6ae52a6e3b498f532
+MISC ChangeLog 4144 SHA256 30796cac66359c97ea76db5d6aaf24193fb3f87f722248c8feaf9ff96a982fd4 SHA512 759102a30494bf7bd7926d42e14ca251a48899d297a8119387df3c16956bd2101499232259bd4b4a377bcecf410476f65dec1f4b34a6ea73439212837ebd7f01 WHIRLPOOL cd5c60f4d4833c82c7a7f9758d7830ef8e63b1df329ac71b225e358e1cecab503fb0d861256d2c4e56dfe279d9fb146c990fbf533e02aaaf60337c87253e428a
+MISC ChangeLog-2015 863 SHA256 032691403040080c831da25033a7cfb236850132e7aeee873472ea8eb79ba711 SHA512 eda861d93868d125ccad84f8943e89129f9eb06ab8bf02c71140ea82e17805f0f4ccf2259507cfd8cbfd61698ac1318f303e255fa0574d51c19aa1349114a414 WHIRLPOOL 2434fbb361e0103826a65093c4fe3691fa8b37b9b37f2a0a3c4d239720d7413eb39378b790b6bbdcfd94a5aba6950251f7af51b3aec6cb3de995d663cf567a72
+MISC metadata.xml 572 SHA256 de6f8f9528dd1185718824f3352064a051783d422c4470a52f1612a1cbd035dc SHA512 7ca7f4c88e7343d1ac5acbacef33cde7a437c5e70df3bede08ee893c7bea317b444585f4d4e9e010509b2ebae9586bbe5d94a5229f656b6ce996cabb895a60d2 WHIRLPOOL 9649309efed13b452cfba11cea384f053ccb2218b113fbd89e0f2b4a50aa1651c46ab82c5dd2dd2c5dbe5b96a5d8ab7403285e80fbb9006cc34d37e50f8ff644
diff --git a/dev-ml/cairo-ocaml/cairo-ocaml-1.2.0.ebuild b/dev-ml/cairo-ocaml/cairo-ocaml-1.2.0.ebuild
new file mode 100644
index 000000000000..159e587f6061
--- /dev/null
+++ b/dev-ml/cairo-ocaml/cairo-ocaml-1.2.0.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils findlib autotools
+
+DESCRIPTION="Ocaml bindings for the cairo vector graphics library"
+HOMEPAGE="http://www.cairographics.org/cairo-ocaml/"
+SRC_URI="https://cgit.freedesktop.org/cairo-ocaml/snapshot/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gtk pango svg"
+
+RDEPEND="dev-lang/ocaml:=
+ x11-libs/cairo
+ gtk? ( dev-ml/lablgtk:2= )
+ pango? ( x11-libs/pango )
+ svg? ( x11-libs/libsvg-cairo )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # 3 patches from debian and one for automagic on libsvg-cairo
+ epatch \
+ "${FILESDIR}"/0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch \
+ "${FILESDIR}"/0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch \
+ "${FILESDIR}"/0003-Fix-FTBFS-on-bytecode-architectures.patch \
+ "${FILESDIR}"/0004-no-automagic.patch
+ AT_M4DIR=support eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with gtk) \
+ $(use_with pango pango-cairo) \
+ $(use_with svg svg-cairo)
+}
+
+src_compile() {
+ emake -j1
+ use doc && emake doc
+}
+
+src_install() {
+ findlib_src_install
+ dodoc README ChangeLog
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins test/*.ml
+ fi
+ # ocamlfind support
+ cat <<-EOF > META
+ name = "${PN}"
+ description = "${DESCRIPTION}"
+ requires = "bigarray"
+ version = "${PV}"
+ archive(byte) = "cairo.cma"
+ archive(native) = "cairo.cmxa"
+ EOF
+ if use gtk; then
+ cat <<-EOF >> META
+ package "lablgtk2" (
+ requires = "cairo lablgtk2"
+ archive(byte) = "cairo_lablgtk.cma"
+ archive(native) = "cairo_lablgtk.cmxa"
+ )
+ EOF
+ fi
+ if use pango; then
+ cat <<-EOF >> META
+ package "pango" (
+ requires = "cairo"
+ archive(byte) = "pango_cairo.cma"
+ archive(native) = "pango_cairo.cmxa"
+ )
+ EOF
+ fi
+ if use svg; then
+ cat <<-EOF >> META
+ package "svg" (
+ requires = "cairo"
+ archive(byte) = "svg_cairo.cma"
+ archive(native) = "svg_cairo.cmxa"
+ )
+ EOF
+ fi
+ insinto /usr/$(get_libdir)/ocaml/cairo
+ doins META
+}
diff --git a/dev-ml/cairo-ocaml/files/0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch b/dev-ml/cairo-ocaml/files/0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch
new file mode 100644
index 000000000000..6b42f6d4fd52
--- /dev/null
+++ b/dev-ml/cairo-ocaml/files/0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch
@@ -0,0 +1,26 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Sun, 27 Feb 2011 13:31:22 +0100
+Subject: Add missing libraries used by the stubs to CAIRO_LIBS
+
+The recent changes in DSO linking highlighted this, and were
+preventing ocaml-melt from building.
+
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6c8c4e9..0cf1f11 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,7 +6,7 @@ AC_CONFIG_AUX_DIR(support)
+ AC_PROG_OCAML()
+
+ # Check for cairo
+-PKG_CHECK_MODULES(CAIRO, cairo >= 1.2 freetype2)
++PKG_CHECK_MODULES(CAIRO, cairo >= 1.2 cairo-ft cairo-fc cairo-ps cairo-pdf freetype2)
+
+ # Optional GTK support (for the X11 backend)
+ AC_ARG_WITH(gtk,
+--
diff --git a/dev-ml/cairo-ocaml/files/0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch b/dev-ml/cairo-ocaml/files/0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch
new file mode 100644
index 000000000000..fcb0f0583227
--- /dev/null
+++ b/dev-ml/cairo-ocaml/files/0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch
@@ -0,0 +1,27 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Tue, 2 Aug 2011 15:34:21 +0200
+Subject: Fix Makefile to avoid recompiling files in /usr
+
+The "-I /path/to/lablgtk2" option should not be used when calling
+ocamldep, otherwise files there are considered as possible targets by
+the build system.
+
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ src/Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 46a62f6..c9c64b7 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -117,7 +117,7 @@ clean :
+
+ .depend : $(wildcard *.ml *.mli)
+ @echo "making deps"
+- @$(OCAMLDEP) $(if $(LABLGTKDIR),-I $(LABLGTKDIR)) $^ > $@
++ @$(OCAMLDEP) $^ > $@
+
+ -include .depend
+ -include .depend_c
+--
diff --git a/dev-ml/cairo-ocaml/files/0003-Fix-FTBFS-on-bytecode-architectures.patch b/dev-ml/cairo-ocaml/files/0003-Fix-FTBFS-on-bytecode-architectures.patch
new file mode 100644
index 000000000000..8882ce0a4da8
--- /dev/null
+++ b/dev-ml/cairo-ocaml/files/0003-Fix-FTBFS-on-bytecode-architectures.patch
@@ -0,0 +1,39 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Tue, 2 Aug 2011 21:35:59 +0200
+Subject: Fix FTBFS on bytecode architectures
+
+The new ocaml.m4 defines OCAMLOPT to "no" (instead of not defining
+it); adapt src/Makefile accordingly.
+
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ src/Makefile | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index c9c64b7..bc223c7 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -14,7 +14,11 @@ ifdef LIBPANGOCAIRO_CFLAGS
+ TARGETS += pangocairo
+ endif
+
+-all : $(TARGETS) $(if $(OCAMLOPT),opt)
++ifneq ($(OCAMLOPT),no)
++OPT_TARGET = opt
++endif
++
++all : $(TARGETS) $(OPT_TARGET)
+ opt : $(addsuffix .opt,$(TARGETS))
+
+ cairo : cairo.cma libmlcairo.a
+@@ -89,7 +93,7 @@ $(call mloptobjs,$(pangocairo_SRC)) : INCFLAGS=-I $(LABLGTKDIR)
+ install: all
+ mkdir -p $(DESTDIR)$(INSTALLDIR) $(DESTDIR)$(OCAMLLIB)/stublibs
+ install -m 644 *.mli *.cmi *.cma lib*.a $(DESTDIR)$(INSTALLDIR)
+-ifdef OCAMLOPT
++ifneq ($(OCAMLOPT),no)
+ install -m644 *.cmxa *.a *.cmx $(DESTDIR)$(INSTALLDIR)
+ endif
+ install -m 755 dll*.so $(DESTDIR)$(INSTALLDIR)
+--
diff --git a/dev-ml/cairo-ocaml/files/0004-no-automagic.patch b/dev-ml/cairo-ocaml/files/0004-no-automagic.patch
new file mode 100644
index 000000000000..46b70013fa3a
--- /dev/null
+++ b/dev-ml/cairo-ocaml/files/0004-no-automagic.patch
@@ -0,0 +1,25 @@
+--- cairo-ocaml-1.2.0/configure.ac.orig 2012-06-17 20:58:38.000000000 +0100
++++ cairo-ocaml-1.2.0/configure.ac 2012-06-17 21:05:49.000000000 +0100
+@@ -27,10 +27,20 @@
+ fi
+
+ # Optional libsvg-cairo support
+-PKG_CHECK_MODULES(LIBSVG_CAIRO, libsvg-cairo, use_libsvg_cairo=yes, use_libsvg_cairo=no)
++AC_ARG_WITH(svg-cairo,
++ AS_HELP_STRING([--with-svg-cairo],[libsvg-cairo support]),
++ use_libsvg_cairo=$withval, use_libsvg_cairo=no)
++if test x$use_libsvg_cairo != xno; then
++ PKG_CHECK_MODULES(LIBSVG_CAIRO, libsvg-cairo, use_libsvg_cairo=yes, use_libsvg_cairo=no)
++fi
+
+ # Optional pango-cairo support
+-PKG_CHECK_MODULES(LIBPANGOCAIRO, pangocairo, use_libpangocairo=yes, use_libpangocairo=no)
++AC_ARG_WITH(pango-cairo,
++ AS_HELP_STRING([--with-pango-cairo],[pangocairo support]),
++ use_libpangocairo=$withval, use_libpangocairo=no)
++if test x$use_libpangocairo != xno; then
++ PKG_CHECK_MODULES(LIBPANGOCAIRO, pangocairo, use_libpangocairo=yes, use_libpangocairo=no)
++ fi
+
+ echo
+ echo " GTK+ support: $use_gtk"
diff --git a/dev-ml/cairo-ocaml/metadata.xml b/dev-ml/cairo-ocaml/metadata.xml
new file mode 100644
index 000000000000..0fedfcd6cbf8
--- /dev/null
+++ b/dev-ml/cairo-ocaml/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+</maintainer>
+<longdescription lang="en">
+ This package contains all the development stuff you need to use Cairo in
+ your OCaml programs. The folowing backends are supported: PostScript,
+ PDF, PNG, In-memory images and X11.
+</longdescription>
+<use>
+ <flag name="pango">Enable support for <pkg>x11-libs/pango</pkg></flag>
+</use>
+</pkgmetadata>