[gnome-builder] build: install libide-1.0.so to a private directory



commit 901e6ffb602ae1c87d6a7a28908ee55689a4f1e0
Author: Christian Hergert <christian hergert me>
Date:   Mon May 11 17:31:46 2015 -0700

    build: install libide-1.0.so to a private directory
    
    libide-1.0.so isn't really a public ready library (definitely not from
    an API/ABI standpoint). So let's install it and the typelib to a private
    library directory controlled by Builder.
    
    This should also help people who have installed it into non-standard
    locations like /usr/local.

 data/libide-1.0.pc.in |    2 +-
 libide/Makefile.am    |    6 ++++--
 libide/ide.c          |    4 ++++
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/data/libide-1.0.pc.in b/data/libide-1.0.pc.in
index ba961e7..e0b5afc 100644
--- a/data/libide-1.0.pc.in
+++ b/data/libide-1.0.pc.in
@@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
 Name: LibIDE
 Description: IDE components of GNOME Builder.
 Version: @VERSION@
-Libs: -L${libdir} -lide-1.0
+Libs: -L${libdir}/gnome-builder -lide-1.0
 Cflags: -I${includedir}/ide-1.0
 Requires: gio-2.0 gtk+-3.0 gtksourceview-3.0
diff --git a/libide/Makefile.am b/libide/Makefile.am
index fcaf482..642f542 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -3,7 +3,8 @@ DISTCLEANFILES =
 BUILT_SOURCES =
 EXTRA_DIST =
 
-lib_LTLIBRARIES = libide-1.0.la
+pkglibdir = $(libdir)/gnome-builder
+pkglib_LTLIBRARIES = libide-1.0.la
 
 libide_1_0_la_public_sources = \
        autotools/ide-autotools-build-system.c \
@@ -320,6 +321,7 @@ libide_1_0_la_SOURCES = \
 libide_1_0_la_includes = \
        $(DEBUG_CFLAGS) \
        $(CLANG_CFLAGS) \
+       -DLIBDIR="\"$(libdir)\"" \
        -I$(top_builddir)/libide \
        -I$(top_srcdir)/contrib/egg \
        -I$(top_srcdir)/contrib/libeditorconfig \
@@ -446,7 +448,7 @@ INTROSPECTION_GIRS += Ide-1.0.gir
 girdir = $(datadir)/gir-1.0
 gir_DATA = $(INTROSPECTION_GIRS)
 
-typelibdir = $(libdir)/girepository-1.0
+typelibdir = $(pkglibdir)/girepository-1.0
 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
 CLEANFILES += $(gir_DATA) $(typelib_DATA)
diff --git a/libide/ide.c b/libide/ide.c
index a06b454..473166c 100644
--- a/libide/ide.c
+++ b/libide/ide.c
@@ -16,6 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <girepository.h>
 #include <glib/gi18n.h>
 #include <libgit2-glib/ggit.h>
 #include <stdlib.h>
@@ -87,6 +88,9 @@ ide_init_ctor (void)
 {
   GgitFeatureFlags ggit_flags;
 
+  g_irepository_prepend_search_path (LIBDIR"/gnome-builder/girepository-1.0");
+  g_irepository_prepend_library_path (LIBDIR);
+
   g_type_ensure (IDE_TYPE_CONTEXT);
   g_type_ensure (IDE_TYPE_BUILD_SYSTEM);
   g_type_ensure (IDE_TYPE_VCS);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]