1 |
commit: bc5ec2dee291efe1f8c43082a44418d35544c263 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 5 23:54:49 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 5 23:55:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc5ec2de |
7 |
|
8 |
dev-ml/lablgtk: add 2.18.12 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/834484 |
11 |
Thanks-to: Petr Zima <zima <AT> matfyz.cz> |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
dev-ml/lablgtk/Manifest | 1 + |
15 |
dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch | 76 ++++++++++++++++++++++ |
16 |
dev-ml/lablgtk/lablgtk-2.18.12.ebuild | 78 +++++++++++++++++++++++ |
17 |
3 files changed, 155 insertions(+) |
18 |
|
19 |
diff --git a/dev-ml/lablgtk/Manifest b/dev-ml/lablgtk/Manifest |
20 |
index 7e47453703b4..b7942ca5642c 100644 |
21 |
--- a/dev-ml/lablgtk/Manifest |
22 |
+++ b/dev-ml/lablgtk/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST lablgtk-2.18.10.tar.gz 1068504 BLAKE2B 8f82cd8b31c136420bfbbeaf78ec2d7913b7c5fc16abd485c508f8de3ab587173b0b5c798cdbe851254b48754929c1f0063cfc9e3c5e0663b7cdebc380ec0e8a SHA512 73705aaa80db433d11a28df5f6f5d10bd282e477e90916152a87e71865ccfcd7dfbdbe77350ecadf61ba2ccc7a188de1c68f1e6385e20c75f167969001e8418d |
25 |
+DIST lablgtk-2.18.12.tar.gz 1066997 BLAKE2B fcdc74ae444af509b2c95929ac8df556aeea21187a95433a9c67ac3d7a515054d53c4955ea2e908297065fd005099fb5df45d52311cf015f63a72780c11cccb8 SHA512 284a1234ae817c4df49809d28c103ca5e64046da5ec9ff28c6edc0ce999e9d3e6e180dd053f8b1663d4fb3b7ba19570d53b9441c8fa622add924e8d85e41b813 |
26 |
DIST lablgtk3-3.1.1.tbz 854720 BLAKE2B e6a916151fe1ca0746c14c2a66cd178f3b0c051976815a1d13daf801002f16bc76d9f4cb15625353f0cfbdc16b0a218857d72c4e57125050bbcffe67f7096ad0 SHA512 193c340d9941680869eb90bc89f5b27cc5bdf294f4635081a9ba56a99fa2982266c4ee2eb5fd04d3a3f6150082800de5df786def8c72a276a779d843d914e9e3 |
27 |
|
28 |
diff --git a/dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch b/dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch |
29 |
new file mode 100644 |
30 |
index 000000000000..aeef5c319a6d |
31 |
--- /dev/null |
32 |
+++ b/dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch |
33 |
@@ -0,0 +1,76 @@ |
34 |
+diff -ur lablgtk-2.18.12.orig/src/Makefile lablgtk-2.18.12/src/Makefile |
35 |
+--- lablgtk-2.18.12.orig/src/Makefile 2021-12-25 02:23:31.000000000 +0100 |
36 |
++++ lablgtk-2.18.12/src/Makefile 2022-03-04 08:12:28.151812474 +0100 |
37 |
+@@ -18,6 +18,7 @@ |
38 |
+ |
39 |
+ include $(CONFIG) |
40 |
+ #GTKCFLAGS += -Werror -Wno-error=deprecated-declarations |
41 |
++CFLAGS= |
42 |
+ |
43 |
+ TARGETS = varcc$(XE) lablgtktop$(XE) lablgtk2$(XB) gdk_pixbuf_mlsource$(XE) \ |
44 |
+ $(THINITOBJS) build.ml |
45 |
+@@ -45,14 +46,13 @@ |
46 |
+ |
47 |
+ ifdef DEBUG |
48 |
+ COMPILER += -warn-error A-52-6 |
49 |
+-CFLAGS = -g $(GTKCFLAGS) |
50 |
++OCAMLCFLAGS = $(GTKCFLAGS) |
51 |
+ CUSTOM = -custom |
52 |
+ #MLLINK += -cclib -lcamlrund |
53 |
+ MLBYTEFLAGS = -g -dtypes |
54 |
+ else |
55 |
+-CFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS) |
56 |
++OCAMLCFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS) |
57 |
+ ifneq ($(TOOLCHAIN),msvc) |
58 |
+-CFLAGS += -O |
59 |
+ endif |
60 |
+ endif |
61 |
+ |
62 |
+@@ -65,9 +65,9 @@ |
63 |
+ THLINK = unix.cma threads.cma |
64 |
+ |
65 |
+ ifdef USE_CC |
66 |
+-CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(CFLAGS) |
67 |
++CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(OCAMLCFLAGS) $(CFLAGS) |
68 |
+ else |
69 |
+-CCOMPILER = $(CAMLC) -c -ccopt '$(CFLAGS)' -verbose |
70 |
++CCOMPILER = $(CAMLC) -c -ccopt '$(OCAMLCFLAGS) $(CFLAGS)' -verbose |
71 |
+ endif |
72 |
+ |
73 |
+ ifdef USE_GL |
74 |
+@@ -123,7 +123,7 @@ |
75 |
+ CLIBS += liblablrsvg$(XA) |
76 |
+ RSVGMLOBJS = rsvg.cmo |
77 |
+ RSVGCOBJS = ml_rsvg$(XO) |
78 |
+-$(RSVGCOBJS) : CFLAGS+=$(HAVE_SVGZ) |
79 |
++$(RSVGCOBJS) : OCAMLCFLAGS+=$(HAVE_SVGZ) |
80 |
+ endif |
81 |
+ |
82 |
+ ifdef USE_GTKSPELL |
83 |
+@@ -140,7 +140,7 @@ |
84 |
+ opt:: lablgtksourceview.cmxs |
85 |
+ endif |
86 |
+ |
87 |
+-ml_gtksourceview.o: CFLAGS=$(GTKSOURCEVIEWCFLAGS) |
88 |
++ml_gtksourceview.o: OCAMLCFLAGS=$(GTKSOURCEVIEWCFLAGS) |
89 |
+ GTKSOURCEVIEWMLOBJS = gtkSourceView.cmo gSourceView.cmo |
90 |
+ GTKSOURCEVIEWCOBJS = ml_gtksourceview$(XO) |
91 |
+ ml_gtksourceview.c: pango_tags.h |
92 |
+@@ -179,7 +179,7 @@ |
93 |
+ endif |
94 |
+ |
95 |
+ ifdef USE_GTKQUARTZ |
96 |
+-CFLAGS += -DHAS_GTKQUARTZ |
97 |
++OCAMLCFLAGS += -DHAS_GTKQUARTZ |
98 |
+ endif |
99 |
+ # Rules |
100 |
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx .cmxs .cmxa .c $(XO) .d$(XO) .var .h .opt .def .ml4 |
101 |
+@@ -188,7 +188,7 @@ |
102 |
+ .cpp$(XO): |
103 |
+ $(CCOMPILER) $< |
104 |
+ .c.d$(XO): |
105 |
+- $(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(CFLAGS)' $< |
106 |
++ $(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(OCAMLCFLAGS) $(CFLAGS)' $< |
107 |
+ .ml.cmo: |
108 |
+ $(COMPILER) $(PRINCIPAL) $< |
109 |
+ .mli.cmi: |
110 |
|
111 |
diff --git a/dev-ml/lablgtk/lablgtk-2.18.12.ebuild b/dev-ml/lablgtk/lablgtk-2.18.12.ebuild |
112 |
new file mode 100644 |
113 |
index 000000000000..f96bd8719b9c |
114 |
--- /dev/null |
115 |
+++ b/dev-ml/lablgtk/lablgtk-2.18.12.ebuild |
116 |
@@ -0,0 +1,78 @@ |
117 |
+# Copyright 1999-2022 Gentoo Authors |
118 |
+# Distributed under the terms of the GNU General Public License v2 |
119 |
+ |
120 |
+EAPI=8 |
121 |
+ |
122 |
+DESCRIPTION="Objective CAML interface for Gtk+2" |
123 |
+HOMEPAGE="http://lablgtk.forge.ocamlcore.org" |
124 |
+SRC_URI="https://github.com/garrigue/lablgtk/archive/${PV}.tar.gz -> ${P}.tar.gz" |
125 |
+ |
126 |
+LICENSE="LGPL-2.1-with-linking-exception examples? ( lablgtk-examples )" |
127 |
+SLOT="2/${PV}" |
128 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
129 |
+IUSE="debug examples glade gnomecanvas +ocamlopt sourceview spell svg" |
130 |
+ |
131 |
+DEPEND=">=dev-lang/ocaml-4.05:=[ocamlopt?] |
132 |
+ dev-ml/camlp4:= |
133 |
+ x11-libs/gtk+:2 |
134 |
+ glade? ( gnome-base/libglade ) |
135 |
+ gnomecanvas? ( gnome-base/libgnomecanvas ) |
136 |
+ sourceview? ( x11-libs/gtksourceview:2.0 ) |
137 |
+ spell? ( app-text/gtkspell:2 ) |
138 |
+ svg? ( gnome-base/librsvg:2 )" |
139 |
+RDEPEND="${DEPEND}" |
140 |
+BDEPEND="dev-ml/findlib |
141 |
+ virtual/pkgconfig" |
142 |
+ |
143 |
+DOCS=( CHANGES README CHANGES.API ) |
144 |
+ |
145 |
+PATCHES=( |
146 |
+ "${FILESDIR}"/${P}-cflags.patch |
147 |
+) |
148 |
+ |
149 |
+src_configure() { |
150 |
+ local myeconfargs=( |
151 |
+ $(use_enable debug) |
152 |
+ $(use_with svg rsvg) |
153 |
+ $(use_with glade) |
154 |
+ --without-gnomeui |
155 |
+ --without-panel |
156 |
+ # relies on EOL gtkglarea |
157 |
+ --without-gl |
158 |
+ $(use_with spell gtkspell) |
159 |
+ --without-gtksourceview |
160 |
+ $(use_with sourceview gtksourceview2) |
161 |
+ $(use_with gnomecanvas) |
162 |
+ ) |
163 |
+ |
164 |
+ econf "${myeconfargs[@]}" |
165 |
+} |
166 |
+ |
167 |
+src_compile() { |
168 |
+ # parallel build crashes |
169 |
+ emake -j1 all CFLAGS="${CFLAGS}" |
170 |
+ if use ocamlopt; then |
171 |
+ emake -j1 opt CFLAGS="${CFLAGS}" |
172 |
+ fi |
173 |
+} |
174 |
+ |
175 |
+src_install() { |
176 |
+ local destdir="$(ocamlfind printconf destdir || die)" |
177 |
+ dodir "${destdir}/stublibs" |
178 |
+ export OCAMLFIND_DESTDIR=${ED}"${destdir}" |
179 |
+ export OCAMLPATH="${ED}${destdir}" |
180 |
+ export OCAMLFIND_LDCONF=ignore |
181 |
+ |
182 |
+ default |
183 |
+ rm "${ED}/usr/$(get_libdir)/ocaml/ld.conf" || die |
184 |
+ dosym lablgtk2/liblablgtk2.a \ |
185 |
+ /usr/$(get_libdir)/ocaml/liblablgtk2.a |
186 |
+ use sourceview && \ |
187 |
+ dosym lablgtk2/liblablgtksourceview2.a \ |
188 |
+ /usr/$(get_libdir)/ocaml/liblablgtksourceview2.a |
189 |
+ |
190 |
+ if use examples; then |
191 |
+ dodoc -r examples/ |
192 |
+ docompress -x /usr/share/doc/${PF}/examples |
193 |
+ fi |
194 |
+} |