Mangle all gtksourceview names, to avoid conflicts with gtksourceview-1
This commit is contained in:
parent
b5ffbbe5e6
commit
adcbc295cd
@ -74,6 +74,7 @@ endif
|
||||
if MOO_ENABLE_TESTS
|
||||
export_flags = -export-symbols-regex ".*"
|
||||
else
|
||||
# export_flags = -export-symbols-regex ".*"
|
||||
export_flags = -export-symbols-regex "^(moo_).*"
|
||||
endif
|
||||
|
||||
|
@ -10,44 +10,63 @@ AM_CFLAGS = \
|
||||
$(MOO_CFLAGS) \
|
||||
$(MOO_DEBUG_CFLAGS)
|
||||
|
||||
EXTRA_DIST = \
|
||||
gtksourcelanguage.c
|
||||
upstream_sources = \
|
||||
upstream/gtksourcecontextengine.c \
|
||||
upstream/gtksourceengine.c \
|
||||
upstream/gtksourceiter.c \
|
||||
upstream/gtksourcelanguage.c \
|
||||
upstream/gtksourcelanguage-parser-1.c \
|
||||
upstream/gtksourcelanguage-parser-2.c \
|
||||
upstream/gtksourcelanguagesmanager.c \
|
||||
upstream/gtksourcestyle.c \
|
||||
upstream/gtksourcestylemanager.c \
|
||||
upstream/gtksourcestylescheme.c \
|
||||
upstream/gtktextregion.c \
|
||||
upstream/gtksourcecontextengine.h \
|
||||
upstream/gtksourceengine.h \
|
||||
upstream/gtksourceiter.h \
|
||||
upstream/gtksourcelanguage.h \
|
||||
upstream/gtksourcelanguage-private.h \
|
||||
upstream/gtksourcelanguagesmanager.h \
|
||||
upstream/gtksourcestyle.h \
|
||||
upstream/gtksourcestylemanager.h \
|
||||
upstream/gtksourcestylescheme.h \
|
||||
upstream/gtktextregion.h
|
||||
|
||||
BUILT_SOURCES = gtksourcelanguage-fixed.c
|
||||
DISTCLEANFILES = gtksourcelanguage-fixed.c
|
||||
gtksourcelanguage-fixed.c: gtksourcelanguage.c
|
||||
echo '/* This file is autogenerated */' > gsl-tmp && \
|
||||
echo '#include "mooedit/moolang.h"' >> gsl-tmp && \
|
||||
echo "#line 1 \"$(srcdir)/gtksourcelanguage.c\"" >> gsl-tmp && \
|
||||
sed s/GTK_TYPE_SOURCE_LANGUAGE/MOO_TYPE_LANG/g $(srcdir)/gtksourcelanguage.c >> gsl-tmp && \
|
||||
mv gsl-tmp gtksourcelanguage-fixed.c
|
||||
mangled_sources = \
|
||||
gtksourcecontextengine-mangled.c \
|
||||
gtksourceengine-mangled.c \
|
||||
gtksourceiter-mangled.c \
|
||||
gtksourcelanguage-mangled.c \
|
||||
gtksourcelanguage-parser-1-mangled.c \
|
||||
gtksourcelanguage-parser-2-mangled.c \
|
||||
gtksourcelanguagesmanager-mangled.c \
|
||||
gtksourcestyle-mangled.c \
|
||||
gtksourcestylemanager-mangled.c \
|
||||
gtksourcestylescheme-mangled.c \
|
||||
gtktextregion-mangled.c \
|
||||
gtksourcecontextengine-mangled.h \
|
||||
gtksourceengine-mangled.h \
|
||||
gtksourceiter-mangled.h \
|
||||
gtksourcelanguage-mangled.h \
|
||||
gtksourcelanguage-private-mangled.h \
|
||||
gtksourcelanguagesmanager-mangled.h \
|
||||
gtksourcestyle-mangled.h \
|
||||
gtksourcestylemanager-mangled.h \
|
||||
gtksourcestylescheme-mangled.h \
|
||||
gtktextregion-mangled.h
|
||||
|
||||
fake_sources = \
|
||||
gtksourcebuffer.h \
|
||||
gtksourceview-i18n.h \
|
||||
gtksourceview-marshal.h \
|
||||
gtksourceview.h
|
||||
EXTRA_DIST = $(upstream_sources) upstream/mangle.sh
|
||||
BUILT_SOURCES = $(mangled_sources)
|
||||
DISTCLEANFILES = $(mangled_sources)
|
||||
|
||||
%-mangled.c: upstream/%.c upstream/mangle.sh
|
||||
$(SHELL) $(srcdir)/upstream/mangle.sh $< > mangled.tmp && \
|
||||
mv mangled.tmp $@
|
||||
%-mangled.h: upstream/%.h upstream/mangle.sh
|
||||
$(SHELL) $(srcdir)/upstream/mangle.sh $< > mangled.tmp && \
|
||||
mv mangled.tmp $@
|
||||
|
||||
libgtksourceview_la_SOURCES = \
|
||||
$(fake_sources) \
|
||||
gtksourcecontextengine.c \
|
||||
gtksourcecontextengine.h \
|
||||
gtksourceengine.c \
|
||||
gtksourceengine.h \
|
||||
gtksourceiter.c \
|
||||
gtksourceiter.h \
|
||||
gtksourcelanguage-fixed.c \
|
||||
gtksourcelanguage.h \
|
||||
gtksourcelanguage-parser-1.c \
|
||||
gtksourcelanguage-parser-2.c \
|
||||
gtksourcelanguage-private.h \
|
||||
gtksourcelanguagesmanager.c \
|
||||
gtksourcelanguagesmanager.h \
|
||||
gtksourcestyle.c \
|
||||
gtksourcestyle.h \
|
||||
gtksourcestylemanager.c \
|
||||
gtksourcestylemanager.h \
|
||||
gtksourcestylescheme.c \
|
||||
gtksourcestylescheme.h \
|
||||
gtktextregion.c \
|
||||
gtktextregion.h
|
||||
$(mangled_sources) \
|
||||
gtksourceview-api.h
|
||||
|
46
moo/mooedit/gtksourceview/gtksourceview-api.h
Normal file
46
moo/mooedit/gtksourceview/gtksourceview-api.h
Normal file
@ -0,0 +1,46 @@
|
||||
#ifndef __GTK_SOURCE_VIEW_API_H__
|
||||
#define __GTK_SOURCE_VIEW_API_H__
|
||||
|
||||
|
||||
#include "mooedit/gtksourceview/gtksourcelanguage-private-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourcelanguagesmanager-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourcestylemanager-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourceiter-mangled.h"
|
||||
|
||||
#define GtkSourceLanguage MooGtkSourceLanguage
|
||||
#define GtkSourceLanguageClass MooGtkSourceLanguageClass
|
||||
#define GtkSourceEngine MooGtkSourceEngine
|
||||
#define GtkSourceLanguagesManager MooGtkSourceLanguagesManager
|
||||
#define GtkSourceLanguagesManagerClass MooGtkSourceLanguagesManagerClass
|
||||
#define GtkSourceStyle MooGtkSourceStyle
|
||||
#define GtkSourceStyleManager MooGtkSourceStyleManager
|
||||
#define GtkSourceStyleManagerClass MooGtkSourceStyleManagerClass
|
||||
#define GtkSourceSearchFlags MooGtkSourceSearchFlags
|
||||
|
||||
#define _gtk_source_language_create_engine _moo_gtk_source_language_create_engine
|
||||
#define _gtk_source_language_get_languages_manager _moo_gtk_source_language_get_languages_manager
|
||||
#define gtk_source_language_get_property _moo_gtk_source_language_get_property
|
||||
#define gtk_source_style_manager_new _moo_gtk_source_style_manager_new
|
||||
#define gtk_source_style_manager_set_search_path _moo_gtk_source_style_manager_set_search_path
|
||||
#define gtk_source_languages_manager_get_available_languages _moo_gtk_source_languages_manager_get_available_languages
|
||||
#define gtk_source_style_manager_list_schemes _moo_gtk_source_style_manager_list_schemes
|
||||
#define gtk_source_languages_manager_get_available_languages _moo_gtk_source_languages_manager_get_available_languages
|
||||
#define _gtk_source_engine_attach_buffer _moo_gtk_source_engine_attach_buffer
|
||||
#define _gtk_source_engine_text_inserted _moo_gtk_source_engine_text_inserted
|
||||
#define _gtk_source_engine_text_deleted _moo_gtk_source_engine_text_deleted
|
||||
#define _gtk_source_engine_attach_buffer _moo_gtk_source_engine_attach_buffer
|
||||
#define _gtk_source_engine_attach_buffer _moo_gtk_source_engine_attach_buffer
|
||||
#define _gtk_source_engine_set_style_scheme _moo_gtk_source_engine_set_style_scheme
|
||||
#define _gtk_source_engine_update_highlight _moo_gtk_source_engine_update_highlight
|
||||
#define _gtk_source_engine_set_style_scheme _moo_gtk_source_engine_set_style_scheme
|
||||
#define gtk_source_iter_forward_search _moo_gtk_source_iter_forward_search
|
||||
#define gtk_source_iter_backward_search _moo_gtk_source_iter_backward_search
|
||||
#define gtk_source_style_free _moo_gtk_source_style_free
|
||||
#define gtk_source_style_scheme_get_id _moo_gtk_source_style_scheme_get_id
|
||||
#define gtk_source_style_scheme_get_name _moo_gtk_source_style_scheme_get_name
|
||||
#define gtk_source_style_scheme_get_style _moo_gtk_source_style_scheme_get_style
|
||||
#define gtk_source_style_free _moo_gtk_source_style_free
|
||||
#define _gtk_source_style_apply _moo_gtk_source_style_apply
|
||||
|
||||
|
||||
#endif /* __GTK_SOURCE_VIEW_API_H__ */
|
@ -1,2 +0,0 @@
|
||||
#include "mooutils/mooi18n.h"
|
||||
#include "mooutils/moocompat.h"
|
@ -1,2 +0,0 @@
|
||||
#include "mooutils/moomarshals.h"
|
||||
#define _gtksourceview_marshal_VOID__VOID _moo_marshal_VOID__VOID
|
51
moo/mooedit/gtksourceview/upstream/mangle.sh
Normal file
51
moo/mooedit/gtksourceview/upstream/mangle.sh
Normal file
@ -0,0 +1,51 @@
|
||||
if test -z "$1"; then
|
||||
echo "usage: $0 <filename>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
base=`basename "$1"`
|
||||
srcdir=`dirname "$1"`
|
||||
|
||||
echo "/* This file is autogenerated from $base */"
|
||||
if test "$base" = "gtksourcelanguage.c"; then
|
||||
echo '#include "mooedit/moolang.h"'
|
||||
lang_cmd="-e s/GTK_TYPE_SOURCE_LANGUAGE/MOO_TYPE_LANG/g"
|
||||
fi
|
||||
echo "#line 1 \"$srcdir/$base\""
|
||||
|
||||
sed -e 's/#include \"gtksourcecontextengine.h\"/#include \"gtksourcecontextengine-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceengine.h\"/#include \"gtksourceengine-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceiter.h\"/#include \"gtksourceiter-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguage.h\"/#include \"gtksourcelanguage-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguage-private.h\"/#include \"gtksourcelanguage-private-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguagesmanager.h\"/#include \"gtksourcelanguagesmanager-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestyle.h\"/#include \"gtksourcestyle-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestylemanager.h\"/#include \"gtksourcestylemanager-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestylescheme.h\"/#include \"gtksourcestylescheme-mangled.h\"/' \
|
||||
-e 's/#include \"gtktextregion.h\"/#include \"gtktextregion-mangled.h\"/' \
|
||||
\
|
||||
-e 's@#include <gtksourceview/gtksourcecontextengine.h>@#include <gtksourceview/gtksourcecontextengine-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourceengine.h>@#include <gtksourceview/gtksourceengine-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourceiter.h>@#include <gtksourceview/gtksourceiter-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguage.h>@#include <gtksourceview/gtksourcelanguage-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguage-private.h>@#include <gtksourceview/gtksourcelanguage-private-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguagesmanager.h>@#include <gtksourceview/gtksourcelanguagesmanager-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestyle.h>@#include <gtksourceview/gtksourcestyle-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestylemanager.h>@#include <gtksourceview/gtksourcestylemanager-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestylescheme.h>@#include <gtksourceview/gtksourcestylescheme-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtktextregion.h>@#include <gtksourceview/gtktextregion-mangled.h>@' \
|
||||
\
|
||||
-e 's@#include \"gtksourceview-marshal.h\"@#include \"mooutils/moomarshals.h\"@' \
|
||||
-e 's/_gtksourceview_marshal_VOID__VOID/_moo_marshal_VOID__VOID/' \
|
||||
-e 's@#include \"gtksourceview-i18n.h\"@#include \"mooutils/mooi18n.h\"@' \
|
||||
-e 's@#include \"gtksourcebuffer.h\"@@' \
|
||||
-e 's@#include \"gtksourceview.h\"@@' \
|
||||
\
|
||||
-e 's/GtkSource/MooGtkSource/g' \
|
||||
-e 's/GtkTextRegion/MooGtkTextRegion/g' \
|
||||
-e 's/\bgtk_source/_moo_gtk_source/g' \
|
||||
-e 's/\b_gtk_source/_moo_gtk_source/g' \
|
||||
-e 's/\bgtk_text_region/_moo_gtk_text_region/g' \
|
||||
-e 's/\b_gtk_text_region/_moo_gtk_text_region/g' \
|
||||
\
|
||||
$lang_cmd "$1" || exit $?
|
@ -18,8 +18,7 @@
|
||||
#ifndef __MOO_LANG_PRIVATE_H__
|
||||
#define __MOO_LANG_PRIVATE_H__
|
||||
|
||||
#include "gtksourceview/gtksourceengine.h"
|
||||
#include "gtksourceview/gtksourcelanguage.h"
|
||||
#include "mooedit/gtksourceview/gtksourceview-api.h"
|
||||
#include "mooedit/moolang.h"
|
||||
#include "mooedit/moolangmgr.h"
|
||||
#include "mooedit/mooeditconfig.h"
|
||||
|
@ -17,7 +17,6 @@
|
||||
#endif
|
||||
#include "mooedit/moolang-private.h"
|
||||
#include "mooutils/mooi18n.h"
|
||||
#include "gtksourceview/gtksourcelanguage-private.h"
|
||||
#include <libxml/xmlreader.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -20,8 +20,7 @@
|
||||
|
||||
#include "mooedit/moolangmgr.h"
|
||||
#include "mooedit/mooeditconfig.h"
|
||||
#include "gtksourceview/gtksourcelanguagesmanager.h"
|
||||
#include "gtksourceview/gtksourcestylemanager.h"
|
||||
#include "mooedit/gtksourceview/gtksourceview-api.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "mooedit/mootextsearch-private.h"
|
||||
#include "gtksourceview/gtksourceiter.h"
|
||||
#include "mooedit/gtksourceview/gtksourceview-api.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "mooedit/mootextstylescheme.h"
|
||||
#include "mooedit/mootextview.h"
|
||||
#include "mooutils/mooi18n.h"
|
||||
#include "gtksourceview/gtksourcestylescheme.h"
|
||||
#include "mooedit/gtksourceview/gtksourceview-api.h"
|
||||
|
||||
#define STYLE_HAS_FOREGROUND(s) ((s) && ((s)->mask & GTK_SOURCE_STYLE_USE_FOREGROUND))
|
||||
#define STYLE_HAS_BACKGROUND(s) ((s) && ((s)->mask & GTK_SOURCE_STYLE_USE_BACKGROUND))
|
||||
|
@ -53,3 +53,5 @@ moo/mooutils/glade/moologwindow.glade
|
||||
|
||||
moo/moopython/plugins/python.ini.desktop.in.in
|
||||
moo/moopython/plugins/python.py
|
||||
moo/moopython/plugins/terminal.ini.desktop.in.in
|
||||
moo/moopython/plugins/terminal.py
|
||||
|
@ -2,10 +2,10 @@ moo/mooutils/newgtk/gmappedfile.c
|
||||
moo/mooutils/newgtk/gtkcolorbutton.c
|
||||
moo/mooutils/newgtk/gtkfontbutton.c
|
||||
|
||||
moo/mooedit/gtksourceview/gtksourcelanguagesmanager.c
|
||||
moo/mooedit/gtksourceview/gtksourcestylescheme.c
|
||||
moo/mooedit/gtksourceview/gtksourcelanguage-parser-2.c
|
||||
moo/mooedit/gtksourceview/gtksourcecontextengine.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcelanguagesmanager.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestylescheme.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcelanguage-parser-2.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcecontextengine.c
|
||||
|
||||
moo/mooedit/language-specs/R.lang
|
||||
moo/mooedit/language-specs/ada.lang
|
||||
@ -63,8 +63,5 @@ moo/moopython/plugins/pyproject/projects/cproj/options.glade
|
||||
moo/moopython/plugins/pyproject/projects/cproj/view.py
|
||||
moo/moopython/plugins/pyproject/projects/latex.py
|
||||
|
||||
moo/moopython/plugins/terminal.ini.desktop.in.in
|
||||
moo/moopython/plugins/terminal.py
|
||||
|
||||
moo/mooterm/mootermparser-yacc.c
|
||||
moo/mooterm/glade/mootermprefs.glade
|
||||
|
Loading…
x
Reference in New Issue
Block a user