summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2020-05-14 22:30:13 +0200
committerAlfredo Tupone <tupone@gentoo.org>2020-05-14 22:30:13 +0200
commit2d2bdbe30102051df11a309541b172115cfa7f55 (patch)
tree9d4b8d9b5abc1d717bd1d7f54d9b8b9a17a58860
parentgnome-extra/gnome-shell-extension-gsconnect: Avoid repeated notifications (diff)
downloadgentoo-2d2bdbe30102051df11a309541b172115cfa7f55.tar.gz
gentoo-2d2bdbe30102051df11a309541b172115cfa7f55.tar.bz2
gentoo-2d2bdbe30102051df11a309541b172115cfa7f55.zip
dev-ml/lablgtk: uses CFLAGS and fix -fno-common
Closes: https://bugs.gentoo.org/721952 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
-rw-r--r--dev-ml/lablgtk/files/lablgtk-2.18.10-cflags.patch97
-rw-r--r--dev-ml/lablgtk/lablgtk-2.18.10.ebuild8
2 files changed, 103 insertions, 2 deletions
diff --git a/dev-ml/lablgtk/files/lablgtk-2.18.10-cflags.patch b/dev-ml/lablgtk/files/lablgtk-2.18.10-cflags.patch
new file mode 100644
index 00000000000..9cbc94a8a03
--- /dev/null
+++ b/dev-ml/lablgtk/files/lablgtk-2.18.10-cflags.patch
@@ -0,0 +1,97 @@
+--- a/src/Makefile 2020-05-14 22:01:09.565870733 +0200
++++ b/src/Makefile 2020-05-14 22:06:49.081621996 +0200
+@@ -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
+-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:
+--- a/src/ml_gdk.h 2020-05-14 22:19:59.045394874 +0200
++++ b/src/ml_gdk.h 2020-05-14 22:20:06.694277819 +0200
+@@ -102,7 +102,7 @@
+ CAMLexport int OptFlags_GdkModifier_val (value);
+ CAMLexport int Flags_GdkModifier_val (value);
+ CAMLexport int Flags_Event_mask_val (value);
+-CAMLexport lookup_info *ml_table_extension_events;
++extern lookup_info *ml_table_extension_events;
+ #define Extension_events_val(key) ml_lookup_to_c(ml_table_extension_events,key)
+
+ #define GdkDragContext_val(val) check_cast(GDK_DRAG_CONTEXT,val)
+--- a/src/ml_gdk.c 2020-05-14 22:21:39.244861128 +0200
++++ b/src/ml_gdk.c 2020-05-14 22:21:57.571580518 +0200
+@@ -55,6 +55,8 @@
+ #define GDK_WINDOW_TYPE_HINT_DOCK GDK_WINDOW_TYPE_HINT_NORMAL
+ #endif
+
++lookup_info *ml_table_extension_events;
++
+ CAMLprim void ml_raise_gdk (const char *errmsg)
+ {
+ static const value * exn = NULL;
diff --git a/dev-ml/lablgtk/lablgtk-2.18.10.ebuild b/dev-ml/lablgtk/lablgtk-2.18.10.ebuild
index ad3698d27a5..780d515a5e0 100644
--- a/dev-ml/lablgtk/lablgtk-2.18.10.ebuild
+++ b/dev-ml/lablgtk/lablgtk-2.18.10.ebuild
@@ -26,6 +26,10 @@ BDEPEND="dev-ml/findlib
DOCS=( CHANGES README CHANGES.API )
+PATCHES=(
+ "${FILESDIR}"/${P}-cflags.patch
+)
+
src_configure() {
local myeconfargs=(
$(use_enable debug)
@@ -46,9 +50,9 @@ src_configure() {
src_compile() {
# parallel build crashes
- emake -j1 all
+ emake -j1 all CFLAGS="${CFLAGS}"
if use ocamlopt; then
- emake -j1 opt
+ emake -j1 opt CFLAGS="${CFLAGS}"
fi
}