summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-03-05 23:54:49 +0000
committerSam James <sam@gentoo.org>2022-03-05 23:55:02 +0000
commitbc5ec2dee291efe1f8c43082a44418d35544c263 (patch)
treebb4d48493e4915442292a02b8a978bad6831baa1 /dev-ml
parentnet-vpn/libreswan: Stabilize 4.6 x86, #834463 (diff)
downloadgentoo-bc5ec2dee291efe1f8c43082a44418d35544c263.tar.gz
gentoo-bc5ec2dee291efe1f8c43082a44418d35544c263.tar.bz2
gentoo-bc5ec2dee291efe1f8c43082a44418d35544c263.zip
dev-ml/lablgtk: add 2.18.12
Closes: https://bugs.gentoo.org/834484 Thanks-to: Petr Zima <zima@matfyz.cz> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/lablgtk/Manifest1
-rw-r--r--dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch76
-rw-r--r--dev-ml/lablgtk/lablgtk-2.18.12.ebuild78
3 files changed, 155 insertions, 0 deletions
diff --git a/dev-ml/lablgtk/Manifest b/dev-ml/lablgtk/Manifest
index 7e47453703b4..b7942ca5642c 100644
--- a/dev-ml/lablgtk/Manifest
+++ b/dev-ml/lablgtk/Manifest
@@ -1,2 +1,3 @@
DIST lablgtk-2.18.10.tar.gz 1068504 BLAKE2B 8f82cd8b31c136420bfbbeaf78ec2d7913b7c5fc16abd485c508f8de3ab587173b0b5c798cdbe851254b48754929c1f0063cfc9e3c5e0663b7cdebc380ec0e8a SHA512 73705aaa80db433d11a28df5f6f5d10bd282e477e90916152a87e71865ccfcd7dfbdbe77350ecadf61ba2ccc7a188de1c68f1e6385e20c75f167969001e8418d
+DIST lablgtk-2.18.12.tar.gz 1066997 BLAKE2B fcdc74ae444af509b2c95929ac8df556aeea21187a95433a9c67ac3d7a515054d53c4955ea2e908297065fd005099fb5df45d52311cf015f63a72780c11cccb8 SHA512 284a1234ae817c4df49809d28c103ca5e64046da5ec9ff28c6edc0ce999e9d3e6e180dd053f8b1663d4fb3b7ba19570d53b9441c8fa622add924e8d85e41b813
DIST lablgtk3-3.1.1.tbz 854720 BLAKE2B e6a916151fe1ca0746c14c2a66cd178f3b0c051976815a1d13daf801002f16bc76d9f4cb15625353f0cfbdc16b0a218857d72c4e57125050bbcffe67f7096ad0 SHA512 193c340d9941680869eb90bc89f5b27cc5bdf294f4635081a9ba56a99fa2982266c4ee2eb5fd04d3a3f6150082800de5df786def8c72a276a779d843d914e9e3
diff --git a/dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch b/dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch
new file mode 100644
index 000000000000..aeef5c319a6d
--- /dev/null
+++ b/dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch
@@ -0,0 +1,76 @@
+diff -ur lablgtk-2.18.12.orig/src/Makefile lablgtk-2.18.12/src/Makefile
+--- lablgtk-2.18.12.orig/src/Makefile 2021-12-25 02:23:31.000000000 +0100
++++ lablgtk-2.18.12/src/Makefile 2022-03-04 08:12:28.151812474 +0100
+@@ -18,6 +18,7 @@
+
+ include $(CONFIG)
+ #GTKCFLAGS += -Werror -Wno-error=deprecated-declarations
++CFLAGS=
+
+ TARGETS = varcc$(XE) lablgtktop$(XE) lablgtk2$(XB) gdk_pixbuf_mlsource$(XE) \
+ $(THINITOBJS) build.ml
+@@ -45,14 +46,13 @@
+
+ ifdef DEBUG
+ COMPILER += -warn-error A-52-6
+-CFLAGS = -g $(GTKCFLAGS)
++OCAMLCFLAGS = $(GTKCFLAGS)
+ CUSTOM = -custom
+ #MLLINK += -cclib -lcamlrund
+ MLBYTEFLAGS = -g -dtypes
+ else
+-CFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS)
++OCAMLCFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS)
+ ifneq ($(TOOLCHAIN),msvc)
+-CFLAGS += -O
+ endif
+ endif
+
+@@ -65,9 +65,9 @@
+ THLINK = unix.cma threads.cma
+
+ ifdef USE_CC
+-CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(CFLAGS)
++CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(OCAMLCFLAGS) $(CFLAGS)
+ else
+-CCOMPILER = $(CAMLC) -c -ccopt '$(CFLAGS)' -verbose
++CCOMPILER = $(CAMLC) -c -ccopt '$(OCAMLCFLAGS) $(CFLAGS)' -verbose
+ endif
+
+ ifdef USE_GL
+@@ -123,7 +123,7 @@
+ CLIBS += liblablrsvg$(XA)
+ RSVGMLOBJS = rsvg.cmo
+ RSVGCOBJS = ml_rsvg$(XO)
+-$(RSVGCOBJS) : CFLAGS+=$(HAVE_SVGZ)
++$(RSVGCOBJS) : OCAMLCFLAGS+=$(HAVE_SVGZ)
+ endif
+
+ ifdef USE_GTKSPELL
+@@ -140,7 +140,7 @@
+ opt:: lablgtksourceview.cmxs
+ endif
+
+-ml_gtksourceview.o: CFLAGS=$(GTKSOURCEVIEWCFLAGS)
++ml_gtksourceview.o: OCAMLCFLAGS=$(GTKSOURCEVIEWCFLAGS)
+ GTKSOURCEVIEWMLOBJS = gtkSourceView.cmo gSourceView.cmo
+ GTKSOURCEVIEWCOBJS = ml_gtksourceview$(XO)
+ ml_gtksourceview.c: pango_tags.h
+@@ -179,7 +179,7 @@
+ endif
+
+ ifdef USE_GTKQUARTZ
+-CFLAGS += -DHAS_GTKQUARTZ
++OCAMLCFLAGS += -DHAS_GTKQUARTZ
+ endif
+ # Rules
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx .cmxs .cmxa .c $(XO) .d$(XO) .var .h .opt .def .ml4
+@@ -188,7 +188,7 @@
+ .cpp$(XO):
+ $(CCOMPILER) $<
+ .c.d$(XO):
+- $(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(CFLAGS)' $<
++ $(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(OCAMLCFLAGS) $(CFLAGS)' $<
+ .ml.cmo:
+ $(COMPILER) $(PRINCIPAL) $<
+ .mli.cmi:
diff --git a/dev-ml/lablgtk/lablgtk-2.18.12.ebuild b/dev-ml/lablgtk/lablgtk-2.18.12.ebuild
new file mode 100644
index 000000000000..f96bd8719b9c
--- /dev/null
+++ b/dev-ml/lablgtk/lablgtk-2.18.12.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Objective CAML interface for Gtk+2"
+HOMEPAGE="http://lablgtk.forge.ocamlcore.org"
+SRC_URI="https://github.com/garrigue/lablgtk/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1-with-linking-exception examples? ( lablgtk-examples )"
+SLOT="2/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug examples glade gnomecanvas +ocamlopt sourceview spell svg"
+
+DEPEND=">=dev-lang/ocaml-4.05:=[ocamlopt?]
+ dev-ml/camlp4:=
+ x11-libs/gtk+:2
+ glade? ( gnome-base/libglade )
+ gnomecanvas? ( gnome-base/libgnomecanvas )
+ sourceview? ( x11-libs/gtksourceview:2.0 )
+ spell? ( app-text/gtkspell:2 )
+ svg? ( gnome-base/librsvg:2 )"
+RDEPEND="${DEPEND}"
+BDEPEND="dev-ml/findlib
+ virtual/pkgconfig"
+
+DOCS=( CHANGES README CHANGES.API )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cflags.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_with svg rsvg)
+ $(use_with glade)
+ --without-gnomeui
+ --without-panel
+ # relies on EOL gtkglarea
+ --without-gl
+ $(use_with spell gtkspell)
+ --without-gtksourceview
+ $(use_with sourceview gtksourceview2)
+ $(use_with gnomecanvas)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # parallel build crashes
+ emake -j1 all CFLAGS="${CFLAGS}"
+ if use ocamlopt; then
+ emake -j1 opt CFLAGS="${CFLAGS}"
+ fi
+}
+
+src_install() {
+ local destdir="$(ocamlfind printconf destdir || die)"
+ dodir "${destdir}/stublibs"
+ export OCAMLFIND_DESTDIR=${ED}"${destdir}"
+ export OCAMLPATH="${ED}${destdir}"
+ export OCAMLFIND_LDCONF=ignore
+
+ default
+ rm "${ED}/usr/$(get_libdir)/ocaml/ld.conf" || die
+ dosym lablgtk2/liblablgtk2.a \
+ /usr/$(get_libdir)/ocaml/liblablgtk2.a
+ use sourceview && \
+ dosym lablgtk2/liblablgtksourceview2.a \
+ /usr/$(get_libdir)/ocaml/liblablgtksourceview2.a
+
+ if use examples; then
+ dodoc -r examples/
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}