Build the symbol-db plugin using a patch from FreeBSD.
missing functionnality reported by John Tate.
This commit is contained in:
parent
73ca52b733
commit
f81f9eb545
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.50 2011/11/21 10:37:24 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.51 2011/11/21 15:21:33 ajacoutot Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -6,6 +6,7 @@ COMMENT= versatile IDE for GNOME
|
||||
|
||||
GNOME_PROJECT= anjuta
|
||||
GNOME_VERSION= 3.2.2
|
||||
REVISION= 0
|
||||
|
||||
SHARED_LIBS += anjuta-3 0.0 # 0.0
|
||||
|
||||
@ -41,14 +42,10 @@ WANTLIB += svn_ra-1 svn_ra_local-1 svn_ra_neon-1 svn_ra_svn-1
|
||||
WANTLIB += svn_repos-1 svn_subr-1 svn_wc-1 util vala-0.14 vte2_90
|
||||
WANTLIB += webkitgtk-3.0 xcb xcb-render xcb-shm xml2 xslt z
|
||||
WANTLIB += dbus-1 dbus-glib-1 javascriptcoregtk-3.0 magic
|
||||
WANTLIB += ${MODPY_WANTLIB}
|
||||
WANTLIB += gcrypt gda-5.0 gnome-keyring gpg-error ${MODPY_WANTLIB}
|
||||
|
||||
BUILD_DEPENDS= devel/autogen>=5.6.5 \
|
||||
devel/bison
|
||||
# libgda is needed by the symbol-db plugin, which we don't build on OpenBSD.
|
||||
# though GDA_CFLAGS is used in various Makefile's. So instead of changing
|
||||
# dozens of files, we just drop the LIB_DEPENDS and keep the BUILD_DEPENDS.
|
||||
BUILD_DEPENDS+= x11/gnome/libgda
|
||||
RUN_DEPENDS= misc/shared-mime-info
|
||||
LIB_DEPENDS= ${MODPY_LIB_DEPENDS} \
|
||||
devel/glade \
|
||||
@ -58,7 +55,8 @@ LIB_DEPENDS= ${MODPY_LIB_DEPENDS} \
|
||||
textproc/icu4c \
|
||||
x11/gnome/devhelp \
|
||||
x11/gnome/gdl \
|
||||
x11/gtksourceview3
|
||||
x11/gtksourceview3 \
|
||||
x11/gnome/libgda
|
||||
|
||||
# needed by plugins/class-gen/plugin.c
|
||||
RUN_DEPENDS += devel/autogen
|
||||
@ -71,7 +69,8 @@ MODGNOME_TOOLS= goi vala yelp
|
||||
AUTOCONF_VERSION= 2.68
|
||||
|
||||
CONFIGURE_STYLE= autoconf gnu
|
||||
CONFIGURE_ARGS+= --enable-plugin-subversion
|
||||
CONFIGURE_ARGS+= --enable-plugin-subversion \
|
||||
--with-symbol-db-shm=/tmp
|
||||
|
||||
# adds dependency on libgnomeui
|
||||
CONFIGURE_ARGS+= --disable-graphviz
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.2 2011/09/18 19:26:52 jasper Exp $
|
||||
$OpenBSD: patch-configure_ac,v 1.3 2011/11/21 15:21:33 ajacoutot Exp $
|
||||
--- configure.ac.orig Sun Sep 18 15:14:26 2011
|
||||
+++ configure.ac Sun Sep 18 17:44:15 2011
|
||||
@@ -80,10 +80,7 @@ AC_PROG_LEX
|
||||
@ -13,15 +13,3 @@ $OpenBSD: patch-configure_ac,v 1.2 2011/09/18 19:26:52 jasper Exp $
|
||||
AC_LANG([C])
|
||||
AC_LANG([C++])
|
||||
AC_PROG_CXX
|
||||
@@ -294,10 +291,7 @@ fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_PYTHON, [test x$have_python = xyes])
|
||||
|
||||
-PKG_CHECK_MODULES([PLUGIN_SYMBOL_DB],
|
||||
- [libgda-5.0 >= $GDA5_REQUIRED],,
|
||||
- [PKG_CHECK_MODULES([PLUGIN_SYMBOL_DB],
|
||||
- [libgda-4.0 >= $GDA4_REQUIRED])])
|
||||
+PKG_CHECK_MODULES([PLUGIN_SYMBOL_DB], [])
|
||||
|
||||
dnl Disable packagekit support
|
||||
dnl -----------------------------------
|
||||
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-plugins_Makefile_in,v 1.10 2011/11/21 10:37:24 jasper Exp $
|
||||
|
||||
Disable the symbol-db plugin, OpenBSD lacks shm_open().
|
||||
|
||||
--- plugins/Makefile.in.orig Fri Nov 18 21:44:05 2011
|
||||
+++ plugins/Makefile.in Mon Nov 21 11:10:04 2011
|
||||
@@ -389,7 +389,6 @@ SUBDIRS = . \
|
||||
sourceview \
|
||||
starter \
|
||||
subversion \
|
||||
- symbol-db \
|
||||
terminal \
|
||||
tools
|
||||
|
@ -0,0 +1,75 @@
|
||||
$OpenBSD: patch-plugins_symbol-db_symbol-db-engine-core_c,v 1.1 2011/11/21 15:21:33 ajacoutot Exp $
|
||||
|
||||
Do not use shm_open() which OpenBSD lacks (from FreeBSD ports).
|
||||
|
||||
--- plugins/symbol-db/symbol-db-engine-core.c.orig Sun Nov 13 13:29:17 2011
|
||||
+++ plugins/symbol-db/symbol-db-engine-core.c Mon Nov 21 15:32:45 2011
|
||||
@@ -1069,7 +1069,7 @@ sdb_engine_ctags_output_thread (gpointer data, gpointe
|
||||
|
||||
/* found out a new marker */
|
||||
marker_ptr = strstr (marker_ptr + len_marker, CTAGS_MARKER);
|
||||
- } while (remaining_chars + len_marker < len_chars || marker_ptr != NULL);
|
||||
+ } while (remaining_chars > 0 || marker_ptr != NULL);
|
||||
}
|
||||
|
||||
SDB_UNLOCK(priv);
|
||||
@@ -1517,8 +1517,8 @@ sdb_engine_scan_files_1 (SymbolDBEngine * dbe, const G
|
||||
gint i = 0;
|
||||
while (TRUE)
|
||||
{
|
||||
- temp_file = g_strdup_printf ("/anjuta-%d_%ld%d.tags", getpid (),
|
||||
- time (NULL), i++);
|
||||
+ temp_file = g_strdup_printf ("%s/anjuta-%d_%ld%d.tags", SHARED_MEMORY_PREFIX, getpid (),
|
||||
+ (long) time (NULL), i++);
|
||||
gchar *test;
|
||||
test = g_strconcat (SHARED_MEMORY_PREFIX, temp_file, NULL);
|
||||
if (g_file_test (test, G_FILE_TEST_EXISTS) == TRUE)
|
||||
@@ -1538,12 +1538,12 @@ sdb_engine_scan_files_1 (SymbolDBEngine * dbe, const G
|
||||
priv->shared_mem_str = temp_file;
|
||||
|
||||
if ((priv->shared_mem_fd =
|
||||
- shm_open (temp_file, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR)) < 0)
|
||||
+ open (temp_file, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR)) < 0)
|
||||
{
|
||||
g_warning ("Error while trying to open a shared memory file. Be"
|
||||
"sure to have "SHARED_MEMORY_PREFIX" mounted with tmpfs");
|
||||
}
|
||||
-
|
||||
+
|
||||
priv->shared_mem_file = fdopen (priv->shared_mem_fd, "a+b");
|
||||
|
||||
/* no need to free temp_file (alias shared_mem_str). It will be freed on plugin finalize */
|
||||
@@ -2044,7 +2044,7 @@ sdb_engine_init (SymbolDBEngine * object)
|
||||
static void
|
||||
sdb_engine_unlink_shared_files (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
- shm_unlink (key);
|
||||
+ unlink (key);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2137,7 +2137,7 @@ sdb_engine_finalize (GObject * object)
|
||||
|
||||
if (priv->shared_mem_str)
|
||||
{
|
||||
- shm_unlink (priv->shared_mem_str);
|
||||
+ unlink (priv->shared_mem_str);
|
||||
g_free (priv->shared_mem_str);
|
||||
priv->shared_mem_str = NULL;
|
||||
}
|
||||
@@ -5519,12 +5519,12 @@ symbol_db_engine_update_buffer_symbols (SymbolDBEngine
|
||||
* target buffer one */
|
||||
base_filename = g_filename_display_basename (relative_path);
|
||||
|
||||
- shared_temp_file = g_strdup_printf ("/anjuta-%d-%ld-%s", getpid (),
|
||||
- time (NULL), base_filename);
|
||||
+ shared_temp_file = g_strdup_printf ("%s/anjuta-%d-%ld-%s", SHARED_MEMORY_PREFIX, getpid (),
|
||||
+ (long) time (NULL), base_filename);
|
||||
g_free (base_filename);
|
||||
|
||||
if ((buffer_mem_fd =
|
||||
- shm_open (shared_temp_file, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR)) < 0)
|
||||
+ open (shared_temp_file, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR)) < 0)
|
||||
{
|
||||
g_warning ("Error while trying to open a shared memory file. Be"
|
||||
"sure to have "SHARED_MEMORY_PREFIX" mounted with tmpfs");
|
@ -1,8 +1,9 @@
|
||||
@comment $OpenBSD: PLIST,v 1.17 2011/11/21 10:37:24 jasper Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.18 2011/11/21 15:21:33 ajacoutot Exp $
|
||||
@conflict gnome-build-*
|
||||
@pkgpath x11/gnome/build
|
||||
@bin bin/anjuta
|
||||
@bin bin/anjuta-launcher
|
||||
@bin bin/anjuta-tags
|
||||
include/libanjuta-3.0/
|
||||
include/libanjuta-3.0/libanjuta/
|
||||
include/libanjuta-3.0/libanjuta/anjuta-async-command.h
|
||||
@ -202,6 +203,8 @@ lib/anjuta/libanjuta-sourceview.so
|
||||
lib/anjuta/libanjuta-starter.so
|
||||
@comment lib/anjuta/libanjuta-subversion.la
|
||||
lib/anjuta/libanjuta-subversion.so
|
||||
@comment lib/anjuta/libanjuta-symbol-db.la
|
||||
lib/anjuta/libanjuta-symbol-db.so
|
||||
@comment lib/anjuta/libanjuta-terminal.la
|
||||
lib/anjuta/libanjuta-terminal.so
|
||||
@comment lib/anjuta/libanjuta-tools.la
|
||||
@ -223,6 +226,7 @@ lib/anjuta/libpython_plugin.so
|
||||
lib/anjuta/mk-project.plugin
|
||||
lib/anjuta/python-plugin.plugin
|
||||
lib/anjuta/sourceview.plugin
|
||||
lib/anjuta/symbol-db.plugin
|
||||
lib/girepository-1.0/Anjuta-3.0.typelib
|
||||
lib/girepository-1.0/IAnjuta-3.0.typelib
|
||||
@comment lib/glade/modules/libgladeanjuta.la
|
||||
@ -262,6 +266,7 @@ share/anjuta/glade/anjuta-message-manager-plugin.ui
|
||||
share/anjuta/glade/anjuta-project-wizard.ui
|
||||
share/anjuta/glade/anjuta-run-program.ui
|
||||
share/anjuta/glade/anjuta-subversion.ui
|
||||
share/anjuta/glade/anjuta-symbol-db.ui
|
||||
share/anjuta/glade/anjuta-terminal-plugin.ui
|
||||
share/anjuta/glade/anjuta-tools.ui
|
||||
share/anjuta/glade/applogo.png
|
||||
@ -485,6 +490,7 @@ share/anjuta/project/xlib/src/main.c
|
||||
share/anjuta/snippets-global-variables.xml
|
||||
share/anjuta/snippets.anjuta-snippets
|
||||
share/anjuta/sources.list
|
||||
share/anjuta/tables.sql
|
||||
share/anjuta/tools/
|
||||
share/anjuta/tools/find-fixmes.pl
|
||||
share/anjuta/tools/prepare-changelog.pl
|
||||
@ -506,6 +512,7 @@ share/anjuta/ui/anjuta-patch.xml
|
||||
share/anjuta/ui/anjuta-project-manager.xml
|
||||
share/anjuta/ui/anjuta-run-program.xml
|
||||
share/anjuta/ui/anjuta-subversion.xml
|
||||
share/anjuta/ui/anjuta-symbol-db-plugin.xml
|
||||
share/anjuta/ui/anjuta-terminal-plugin.xml
|
||||
share/anjuta/ui/anjuta-tools.xml
|
||||
share/anjuta/ui/anjuta.xml
|
||||
@ -544,6 +551,7 @@ share/glib-2.0/schemas/org.gnome.anjuta.python.gschema.xml
|
||||
share/glib-2.0/schemas/org.gnome.anjuta.run.gschema.xml
|
||||
share/glib-2.0/schemas/org.gnome.anjuta.snippets.gschema.xml
|
||||
share/glib-2.0/schemas/org.gnome.anjuta.sourceview.gschema.xml
|
||||
share/glib-2.0/schemas/org.gnome.anjuta.symbol-db.gschema.xml
|
||||
share/glib-2.0/schemas/org.gnome.anjuta.terminal.gschema.xml
|
||||
share/glib-2.0/schemas/org.gnome.anjuta.tools.gschema.xml
|
||||
share/gnome/help/anjuta-build-tutorial/
|
||||
@ -1748,6 +1756,9 @@ share/pixmaps/anjuta/anjuta-subversion-plugin-48.png
|
||||
share/pixmaps/anjuta/anjuta-subversion-plugin.svg
|
||||
share/pixmaps/anjuta/anjuta-swap-16.png
|
||||
share/pixmaps/anjuta/anjuta-swap-24.png
|
||||
share/pixmaps/anjuta/anjuta-symbol-db-plugin-16.png
|
||||
share/pixmaps/anjuta/anjuta-symbol-db-plugin-48.png
|
||||
share/pixmaps/anjuta/anjuta-symbol-db-plugin.svg
|
||||
share/pixmaps/anjuta/anjuta-terminal-plugin-48.png
|
||||
share/pixmaps/anjuta/anjuta-terminal-plugin.svg
|
||||
share/pixmaps/anjuta/anjuta-tools-plugin-48.png
|
||||
@ -1762,6 +1773,28 @@ share/pixmaps/anjuta/code-analyzer.png
|
||||
share/pixmaps/anjuta/dir-project-plugin-48.png
|
||||
share/pixmaps/anjuta/directory-accept.png
|
||||
share/pixmaps/anjuta/directory.png
|
||||
share/pixmaps/anjuta/element-class-16.png
|
||||
share/pixmaps/anjuta/element-delegate-16.png
|
||||
share/pixmaps/anjuta/element-enumeration-16.png
|
||||
share/pixmaps/anjuta/element-event-16.png
|
||||
share/pixmaps/anjuta/element-field-16.png
|
||||
share/pixmaps/anjuta/element-interface-16.png
|
||||
share/pixmaps/anjuta/element-interface-24.png
|
||||
share/pixmaps/anjuta/element-interface-private-16.png
|
||||
share/pixmaps/anjuta/element-interface-protected-16.png
|
||||
share/pixmaps/anjuta/element-interface-public-16.png
|
||||
share/pixmaps/anjuta/element-literal-16.png
|
||||
share/pixmaps/anjuta/element-method-16.png
|
||||
share/pixmaps/anjuta/element-method-24.png
|
||||
share/pixmaps/anjuta/element-method-private-16.png
|
||||
share/pixmaps/anjuta/element-method-protected-16.png
|
||||
share/pixmaps/anjuta/element-method-public-16.png
|
||||
share/pixmaps/anjuta/element-namespace-16.png
|
||||
share/pixmaps/anjuta/element-property-16.png
|
||||
share/pixmaps/anjuta/element-property-private-16.png
|
||||
share/pixmaps/anjuta/element-property-protected-16.png
|
||||
share/pixmaps/anjuta/element-property-public-16.png
|
||||
share/pixmaps/anjuta/element-structure-16.png
|
||||
share/pixmaps/anjuta/gbf-build.png
|
||||
share/pixmaps/anjuta/gbf-install.png
|
||||
share/pixmaps/anjuta/js_debugger.png
|
||||
|
Loading…
x
Reference in New Issue
Block a user