Skip to content
Snippets Groups Projects
Commit bc551647 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

Merge branch 'feature/david/gtk3-update' into 'master'

Makes frama-c compile with the lablgtk3 beta4 package

See merge request frama-c/frama-c!2153
parents 537007f4 261d8850
No related branches found
No related tags found
No related merge requests found
......@@ -684,7 +684,7 @@ STARTUP_CMX=$(STARTUP_CMO:.cmo=.cmx)
WTOOLKIT= \
wutil widget wbox wfile wpane wpalette wtext wtable
ifeq ($(strip $(GTKSOURCEVIEW)),lablgtk3.sourceview3)
ifeq ("$(LABLGTK_VERSION)","3")
src/plugins/gui/GSourceView.ml: src/plugins/gui/GSourceView3.ml.in
$(CP) $< $@
......@@ -1299,7 +1299,7 @@ bin/viewer.byte$(EXE): $(filter-out $(GRAPH_GUICMO),$(ALL_GUI_CMO)) \
$(GEN_BYTE_LIBS) \
$(PLUGIN_DYN_CMO_LIST) $(PLUGIN_DYN_GUI_CMO_LIST)
$(PRINT_LINKING) $@
$(OCAMLC) $(BLINKFLAGS) -o $@ $(BYTE_LIBS) \
$(OCAMLC) $(BLINKFLAGS) $(THREAD) -o $@ $(BYTE_LIBS) \
$(CMO) \
$(filter-out \
$(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\
......@@ -1313,7 +1313,7 @@ bin/viewer.opt$(EXE): $(filter-out $(GRAPH_GUICMX),$(ALL_GUI_CMX)) \
$(PLUGIN_DYN_CMX_LIST) $(PLUGIN_DYN_GUI_CMX_LIST) \
$(PLUGIN_CMX_LIST) $(PLUGIN_GUI_CMX_LIST)
$(PRINT_LINKING) $@
$(OCAMLOPT) $(OLINKFLAGS) -o $@ $(OPT_LIBS) \
$(OCAMLOPT) $(OLINKFLAGS) $(THREAD) -o $@ $(OPT_LIBS) \
$(CMX) \
$(filter-out \
$(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\
......
......@@ -940,12 +940,17 @@ REQUIRE_LABLGTK="$REQUIRE_LABLGTK$REQUIRE_GNOMECANVAS"
USE_LABLGTK="$USE_LABLGTK$USE_GNOMECANVAS"
LABLGTK_PATH=""
SOURCEVIEW_PATH=""
if test "$ENABLE_LABLGTK3" = "yes"; then
LABLGTK_PATH=`ocamlfind query lablgtk3 | tr -d '\\r\\n'`;
fi
if test "$LABLGTK_PATH" = ""; then
if test "$LABLGTK_PATH" != ""; then
SOURCEVIEW_PATH=`ocamlfind query lablgtk3-sourceview3 | tr -d '\\r\\n'`;
fi
if test "$SOURCEVIEW_PATH" = ""; then
LABLGTK_VERSION=2
LABLGTK_PATH=`ocamlfind query lablgtk2 | tr -d '\\r\\n'`
if test "$LABLGTK_PATH" = "" -o \
......@@ -957,6 +962,7 @@ if test "$LABLGTK_PATH" = ""; then
echo "Ocamlfind -> using $LABLGTK_PATH"
LABLGTKPATH_FOR_CONFIGURE=$LABLGTK_PATH
fi;
SOURCEVIEW_PATH=$LABLGTK_PATH;
else
LABLGTK_VERSION=3
echo "ocamlfind -> using $LABLGTK_PATH"
......@@ -964,8 +970,8 @@ else
fi
configure_library([GTKSOURCEVIEW],
[$LABLGTKPATH_FOR_CONFIGURE/lablgtksourceview2.$LIB_SUFFIX,
$LABLGTKPATH_FOR_CONFIGURE/lablgtksourceview3.$LIB_SUFFIX],
[$SOURCEVIEW_PATH/lablgtksourceview2.$LIB_SUFFIX,
$SOURCEVIEW_PATH/lablgtk3_sourceview3.$LIB_SUFFIX],
[lablgtksourceview not found],
no)
......@@ -975,7 +981,8 @@ configure_library([GNOMECANVAS],
no)
configure_library([LABLGTK],
[$LABLGTKPATH_FOR_CONFIGURE/lablgtk.$LIB_SUFFIX],
[$LABLGTKPATH_FOR_CONFIGURE/lablgtk.$LIB_SUFFIX,
$LABLGTKPATH_FOR_CONFIGURE/lablgtk3.$LIB_SUFFIX],
[$LABLGTKPATH_FOR_CONFIGURE/lablgtk.$LIB_SUFFIX not found.],
no)
......
......@@ -66,7 +66,8 @@ build: [
["autoconf"] {pinned}
["./configure" "--prefix" prefix
"--disable-gui" { !conf-gtksourceview:installed |
!conf-gnomecanvas:installed }
( !conf-gnomecanvas:installed &
!lablgtk3:installed) }
"--mandir=%{man}%"
]
[make "-j%{jobs}%"]
......@@ -88,9 +89,9 @@ depends: [
"ocamlfind" # needed beyond build stage, used by -load-module
"zarith"
"conf-autoconf" { build }
"lablgtk" { >= "2.18.2" } #for ocaml >= 4.02.1
( ( "lablgtk" { >= "2.18.2" } & "conf-gnomecanvas" )
| ( "lablgtk3" { >= "3.0.beta4" } & "lablgtk3-sourceview3"))
"conf-gtksourceview"
"conf-gnomecanvas"
"alt-ergo"
"conf-graphviz" { post }
]
......
......@@ -109,8 +109,13 @@ LABLGTK ?= lablgtk@LABLGTK_VERSION@
# lablgtksourceview
HAS_GTKSOURCEVIEW ?=@HAS_GTKSOURCEVIEW@
GTKSOURCEVIEW:=\
$(patsubst lablgtk%,$(LABLGTK).%,$(basename $(notdir @GTKSOURCEVIEW@)))
LABLGTK_VERSION ?=@LABLGTK_VERSION@
ifeq ("$(LABLGTK_VERSION)","3")
GTKSOURCEVIEW:=lablgtk3-sourceview3
else
GTKSOURCEVIEW:=\
$(patsubst lablgtk%,$(LABLGTK).%,$(basename $(notdir @GTKSOURCEVIEW@)))
endif
# lablgnomecanvas
HAS_GNOMECANVAS ?=@HAS_GNOMECANVAS@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment