From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- dev-ml/cairo-ocaml/Manifest | 7 ++ dev-ml/cairo-ocaml/cairo-ocaml-1.2.0.ebuild | 91 ++++++++++++++++++++++ ...-libraries-used-by-the-stubs-to-CAIRO_LIB.patch | 26 +++++++ ...akefile-to-avoid-recompiling-files-in-usr.patch | 27 +++++++ .../0003-Fix-FTBFS-on-bytecode-architectures.patch | 39 ++++++++++ dev-ml/cairo-ocaml/files/0004-no-automagic.patch | 25 ++++++ dev-ml/cairo-ocaml/metadata.xml | 16 ++++ 7 files changed, 231 insertions(+) create mode 100644 dev-ml/cairo-ocaml/Manifest create mode 100644 dev-ml/cairo-ocaml/cairo-ocaml-1.2.0.ebuild create mode 100644 dev-ml/cairo-ocaml/files/0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch create mode 100644 dev-ml/cairo-ocaml/files/0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch create mode 100644 dev-ml/cairo-ocaml/files/0003-Fix-FTBFS-on-bytecode-architectures.patch create mode 100644 dev-ml/cairo-ocaml/files/0004-no-automagic.patch create mode 100644 dev-ml/cairo-ocaml/metadata.xml (limited to 'dev-ml/cairo-ocaml') diff --git a/dev-ml/cairo-ocaml/Manifest b/dev-ml/cairo-ocaml/Manifest new file mode 100644 index 000000000000..3a8863ea3c7c --- /dev/null +++ b/dev-ml/cairo-ocaml/Manifest @@ -0,0 +1,7 @@ +AUX 0001-Add-missing-libraries-used-by-the-stubs-to-CAIRO_LIB.patch 769 BLAKE2B b41ebc707315f75a552e9e0614f7180bf773bbc4893f01996db08ee366da33852639d4a6b11c35467d28a2e3c3aa71aed005fbcdf18ca3451b4e5c17f7bad65c SHA512 8312d7371ed073def0454ffefb564158ccf009a09e10eca4a272f93c0936731fe887674d94a2687b0cd4c5da28195c5007da6e050b9a509673fc0071debeb178 +AUX 0002-Fix-Makefile-to-avoid-recompiling-files-in-usr.patch 742 BLAKE2B a388b82271137f9d578cde618d63f52ddf93c5901ef892db143ce21469bfd9fcc0c45f4208aca10f6fe4556bec75fc18e4ccbe2782f2d4ba2d9a70f27a814c8c SHA512 8305da294c9e69ac56a9250afc3d70afe70ba9229ecde320767019df51b84fc9c09a753f10f0b189ab537b6e8fc5ef8c17d6179bca51fba3138122ccbae223a3 +AUX 0003-Fix-FTBFS-on-bytecode-architectures.patch 1135 BLAKE2B 90847d27617c1c63e77f294cbcec28c42a923aad1fd24a58f9a46739b23ce49038449e9f4618e608cb7bed721b0d9d3c67e3606c2d545a5a34380bb0b9ae2a4b SHA512 e4550c4c9315ce3c2a16361541ad2b3acccaa6d36d922c5361d1c26e1af22491e46713fe58291b6345d832fdf78466a1937c2327acfeaeb070508fddedfdb206 +AUX 0004-no-automagic.patch 1041 BLAKE2B 8cc95aabf25e768cbb03ea608b74a45aa36f7e86f72da7875bb19973512165a1e6ece9f80093ec887e49ffdbd86df23ae585317d2f65b791c186335b86fc2b50 SHA512 53bfa4cbc40b3725fa40454fb6e8521f21aaf61135dd6da1ec9fd3f1df256ceec1901022aa70dabd568c0291e37008b7c122d1d654856a13fe632f3bf2c271b8 +DIST cairo-ocaml-1.2.0.tar.bz2 44483 BLAKE2B 49a8c811100e3167a8c32ca87a0a6c256862d276c3703082b944aa55f8def7b56d478c0ed44b9d7f5de9194603b688daa5e42949db00417b71daa7376e17410b SHA512 5cac319cf27b94d31e955885ae89b40342c2ae4ffd1aca7c52366f7c3679185f74e513e0c73bd01260f89da29d43bb420dadd059fa1cf5509997db8f935704b4 +EBUILD cairo-ocaml-1.2.0.ebuild 2109 BLAKE2B 93928706aa770aaaed5b4f1d10045b4518c9018239259f44fadb901f5dc4d3343999dd968f1a4bc88260c702ab544a97aa0f6b2361dae480707263cf3aabcde4 SHA512 aace65f2bafa7c4a440e273aa18d56c81bb5539e7cf641e944863bcddc0b444206522dec4976665522569a1e0149fb6afb0a085810e441881c41114f4246554f +MISC metadata.xml 572 BLAKE2B 55d9ae52f939a260daa0e05c073fb0e574a44383414e04274d58ded73bc68ae6713039ed1f51998a307c166313d93755066a9d06f7fea3525a154de856854ad0 SHA512 7ca7f4c88e7343d1ac5acbacef33cde7a437c5e70df3bede08ee893c7bea317b444585f4d4e9e010509b2ebae9586bbe5d94a5229f656b6ce996cabb895a60d2 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..5a13b6957e17 --- /dev/null +++ b/dev-ml/cairo-ocaml/cairo-ocaml-1.2.0.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2018 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="https://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 +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 +--- + 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 +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 +--- + 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 +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 +--- + 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 @@ + + + + + sci@gentoo.org + Gentoo Science Project + + + 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. + + + Enable support for x11-libs/pango + + -- cgit v1.2.3