From: Pierre-Luc Beaudoin Date: Thu, 21 Aug 2008 12:47:36 +0000 (-0400) Subject: Improve library install X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=625365956c6b09fcf63bc4a98021f11e27165508;p=libchamplain Improve library install --- diff --git a/champlain.pc.in b/champlain.pc.in index de926d5..4eb2d34 100644 --- a/champlain.pc.in +++ b/champlain.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${exec_prefix}/include +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ Name: Champlain Description: Map View for Gtk+ diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 07112c5..d4d0f62 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -19,7 +19,7 @@ SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS=--rebuild-types +SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml @@ -36,8 +36,8 @@ FIXXREF_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c -HFILE_GLOB=$(top_srcdir)/src/*.h -CFILE_GLOB=$(top_srcdir)/src/*.h +HFILE_GLOB= +CFILE_GLOB= # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h @@ -61,8 +61,8 @@ expand_content_files= # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) -GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(DEPS_CFLAGS) +GTKDOC_LIBS= # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/docs/reference/libchamplain.types b/docs/reference/libchamplain.types index e69de29..4fb903b 100644 --- a/docs/reference/libchamplain.types +++ b/docs/reference/libchamplain.types @@ -0,0 +1,3 @@ +#include + +champlain_view_get_type diff --git a/src/Makefile.am b/src/Makefile.am index f5a5942..816bc8c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,26 +10,16 @@ CHAMPLAIN_MARSHAL_LIST = champlain-marshal.list lib_LTLIBRARIES = libchamplain-1.0.la -bin_PROGRAMS = launcher - -nodist_libchamplain_1_0_la_SOURCES = \ - $(BUILT_SOURCES) - -launcher_SOURCES = launcher.c -launcher_LDADD = $(DEPS_LIBS) libchamplain-1.0.la - libchamplain_1_0_la_SOURCES = $(CHAMPLAIN_MARSHAL_LIST) \ + $(BUILT_SOURCES) \ champlainview.c \ map.c \ zoomlevel.c \ tile.c \ sources/openstreetmap.c \ sources/debugmap.c - libchamplain_1_0_la_LIBADD = $(DEPS_LIBS) ../tidy/libtidy-1.0.la -AM_CPPFLAGS = $(DEPS_CFLAGS) -I../tidy - EXTRA_DIST = $(CHAMPLAIN_MARSHAL_LIST) @@ -39,3 +29,20 @@ champlain-marshal.h: $(CHAMPLAIN_MARSHAL_LIST) champlain-marshal.c: $(CHAMPLAIN_MARSHAL_LIST) @GLIB_GENMARSHAL@ --body --prefix=champlain_marshal $< > $(CHAMPLAIN_MARSHAL).c +libchamplain_includedir=$(includedir)/libchamplain-1.0/champlain +libchamplain_include_HEADERS = champlain.h + +libchamplain_configdir = $(libdir)/libchamplain-1.0/champlain +libchamplain_config_DATA = ../config.h + +RELEASE=0:1:0 +LIBRARY_VERSION=0:1:0 + +libchamplain_1_0_la_LDFLAGS= -version-info $(LIBRARY_VERSION) -release $(RELEASE) + +noinst_PROGRAMS = launcher + +AM_CPPFLAGS = $(DEPS_CFLAGS) -I../tidy +AM_LDFLAGS = $(DEPS_LIBS) -export-dynamic +SOURCES = launcher.c +LDADD = $(DEPS_LIBS) $(top_builddir)/src/libchamplain-1.0.la diff --git a/src/champlainview.c b/src/champlainview.c index d9bcff3..bb8b2ad 100644 --- a/src/champlainview.c +++ b/src/champlainview.c @@ -40,7 +40,6 @@ enum { /* normal signals */ - TBD, LAST_SIGNAL }; @@ -165,7 +164,6 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass) objectClass->get_property = champlain_view_get_property; objectClass->set_property = champlain_view_set_property; - /** * ChamplainView:longitude: * @@ -238,7 +236,8 @@ champlain_view_init (ChamplainView *champlainView) ChamplainViewPrivate *priv = CHAMPLAIN_VIEW_GET_PRIVATE (champlainView); } -void viewport_x_changed_cb(GObject *gobject, +static void +viewport_x_changed_cb(GObject *gobject, GParamSpec *arg1, ChamplainView *champlainView) { @@ -257,6 +256,9 @@ void viewport_x_changed_cb(GObject *gobject, priv->viewportSize.y = rect.y; map_load_visible_tiles (priv->map, priv->viewportSize); + + g_object_notify(G_OBJECT(champlainView), "longitude"); + g_object_notify(G_OBJECT(champlainView), "latitude"); } static void @@ -370,6 +372,9 @@ champlain_view_center_on (ChamplainView *champlainView, gdouble longitude, gdoub y = priv->map->latitude_to_y(priv->map, latitude, priv->map->current_level->level); tidy_viewport_set_origin(TIDY_VIEWPORT(priv->viewport), x - priv->viewportSize.width/2.0, y - priv->viewportSize.height/2.0, 0); + + g_object_notify(G_OBJECT(champlainView), "longitude"); + g_object_notify(G_OBJECT(champlainView), "latitude"); } /** @@ -400,6 +405,8 @@ champlain_view_zoom_in (ChamplainView *champlainView) clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport), priv->map->current_level->group); tidy_viewport_set_origin(TIDY_VIEWPORT(priv->viewport), x - priv->viewportSize.width/2.0, y - priv->viewportSize.height/2.0, 0); + + g_object_notify(G_OBJECT(champlainView), "zoom-level"); } } @@ -431,5 +438,7 @@ champlain_view_zoom_out (ChamplainView *champlainView) clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport), priv->map->current_level->group); tidy_viewport_set_origin(TIDY_VIEWPORT(priv->viewport), x - priv->viewportSize.width/2.0, y - priv->viewportSize.height/2.0, 0); + + g_object_notify(G_OBJECT(champlainView), "zoom-level"); } } diff --git a/src/champlainview.h b/src/champlainview.h index 94508a3..3ddebb5 100644 --- a/src/champlainview.h +++ b/src/champlainview.h @@ -62,4 +62,6 @@ CHAMPLAIN_API void champlain_view_center_on (ChamplainView *view, gdouble longit CHAMPLAIN_API void champlain_view_zoom_in (ChamplainView *champlainView); +CHAMPLAIN_API void champlain_view_zoom_out (ChamplainView *champlainView); + #endif diff --git a/tidy/Makefile.am b/tidy/Makefile.am index 67a5161..661c905 100644 --- a/tidy/Makefile.am +++ b/tidy/Makefile.am @@ -83,8 +83,9 @@ tidy-enum-types.c: stamp-tidy-enum-types.h tidy-enum-types.c.in $(source_h) ) >> xgen-tetc && \ cp xgen-tetc tidy-enum-types.c && \ rm -f xgen-tetc - -lib_LTLIBRARIES = libtidy-1.0.la + +noinst_libdir = $(top_srcdir)/tidy +noinst_LTLIBRARIES = libtidy-1.0.la libtidy_1_0_la_LIBADD = $(DEPS_LIBS) libtidy_1_0_la_SOURCES = \ @@ -95,16 +96,8 @@ libtidy_1_0_la_SOURCES = \ $(NULL) libtidy_1_0_la_LDFLAGS = $(TIDY_LT_LDFLAGS) -tidyincludedir = $(includedir)/tidy-1.0/tidy -tidyinclude_DATA = \ - $(source_h) \ - $(top_srcdir)/tidy/tidy-enum-types.h \ - $(NULL) - CLEANFILES = $(STAMP_FILES) $(BUILT_SOURCES) -DISTCLEANFILES = tidy-version.h - EXTRA_DIST = \ tidy-enum-types.h.in \ tidy-enum-types.c.in \