Joshua Judson Rosen <[email protected]> writes:
>
> So, it looks like osm-gps-map would mostly be a pretty good fit to
> FoxtrotGPS.
>
> There are a few things that initially scared me but have turned out to
> be non-issues and a few minor nits for which I'm preparing some patches
> foryour review, but also a couple of other items that are still bothering me
> and for which I don't have a solution on-hand.
... and the nits are, which patches attached at the end...:
* The pkg-config probes for GLib and Cairo appear to demand
unnecessarily-high revisions of both packages; the versions in
Debian's current stable release seem to work fine (the `mapviewer'
demo app seems to build and work fine on my laptop).
* The way that the pkg-config probes are combined & labelled makes
the output from ./configure confusing (as well as the error
when the list of prerequisites is unsatisfied, which made me go
`What do you mean it failed when looking for OPENSTREETMAP_GPS_MAP!?
Isn't that what I'm building? Oh...').
* `./configure && make install' doesn't work in a dedicated build-tree
(outside of the source-tree).
* The using a funky trick with the linker where you `backdoor'
in past libtool, which I *think* is unnecessary and may lead
to problems (or at least confusion) for someone some day.
--
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."
>From 10c16a35c74e1e0cefccfa0d6988de8aeb00e5ef Mon Sep 17 00:00:00 2001
From: Joshua Judson Rosen <[email protected]>
Date: Sun, 16 May 2010 20:05:31 -0400
Subject: [PATCH] It looks like GLib 2.16 and Cairo 1.6 are actually sufficient.
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index ad09dab..86c0ab3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ AM_PROG_LIBTOOL
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-PKG_CHECK_MODULES(OPENSTREETMAP_GPS_MAP, [gtk+-2.0 glib-2.0 >= 2.18 cairo >= 1.8])
+PKG_CHECK_MODULES(OPENSTREETMAP_GPS_MAP, [gtk+-2.0 glib-2.0 >= 2.16 cairo >= 1.6])
PKG_CHECK_MODULES(SOUP24, libsoup-2.4,
soup_ver=2.4, [
--
1.5.6.5
>From 13438cf4e9d351b39cc0a87aab55912c589f59bd Mon Sep 17 00:00:00 2001
From: Joshua Judson Rosen <[email protected]>
Date: Sun, 16 May 2010 21:23:25 -0400
Subject: [PATCH] Simplified build-relationship between mapviewer and libosmgpsmap.la.
---
src/Makefile.am | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index f4cfab0..47fed91 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,13 +16,11 @@ bin_PROGRAMS = mapviewer
mapviewer_SOURCES = \
main.c
-mapviewer_DEPENDENCIES = \
- libosmgpsmap.la
-
mapviewer_LDFLAGS = \
- -losmgpsmap -lgthread-2.0
+ -lgthread-2.0
mapviewer_LDADD = \
+ libosmgpsmap.la \
$(OPENSTREETMAP_GPS_MAP_LIBS)
lib_LTLIBRARIES = \
--
1.5.6.5
>From 67cfbc1f34ff50e1577ba0de07f322880d964872 Mon Sep 17 00:00:00 2001
From: Joshua Judson Rosen <[email protected]>
Date: Sun, 16 May 2010 23:52:20 -0400
Subject: [PATCH] Don't backdoor in through .libs--just let libtool do its thing.
---
python/configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/python/configure.ac b/python/configure.ac
index e057bd0..8d52d77 100644
--- a/python/configure.ac
+++ b/python/configure.ac
@@ -52,7 +52,7 @@ if test -f ../src/libosmgpsmap.la; then
#and we must link to the local lib
OSMGPSMAP_CFLAGS="$OSMGPSMAP_CFLAGS -I../src/"
- OSMGPSMAP_LIBS="$OSMGPSMAP_LIBS -L../src/.libs/ -losmgpsmap"
+ OSMGPSMAP_LIBS="$OSMGPSMAP_LIBS ../src/libosmgpsmap.la"
else
PKG_CHECK_MODULES(OSMGPSMAP, osmgpsmap)
fi
--
1.5.6.5
>From 866daf1dc9b50d7787d870f7461a5671761255e8 Mon Sep 17 00:00:00 2001
From: Joshua Judson Rosen <[email protected]>
Date: Mon, 17 May 2010 00:04:50 -0400
Subject: [PATCH] Support building outside the source-tree.
---
python/configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/configure.ac b/python/configure.ac
index 8d52d77..e79cf47 100644
--- a/python/configure.ac
+++ b/python/configure.ac
@@ -51,8 +51,8 @@ if test -f ../src/libosmgpsmap.la; then
PKG_CHECK_MODULES(OSMGPSMAP, [gtk+-2.0 libsoup-2.4])
#and we must link to the local lib
- OSMGPSMAP_CFLAGS="$OSMGPSMAP_CFLAGS -I../src/"
- OSMGPSMAP_LIBS="$OSMGPSMAP_LIBS ../src/libosmgpsmap.la"
+ OSMGPSMAP_CFLAGS="$OSMGPSMAP_CFLAGS -I\$(top_srcdir)/../src/"
+ OSMGPSMAP_LIBS="$OSMGPSMAP_LIBS \$(top_builddir)/../src/libosmgpsmap.la"
else
PKG_CHECK_MODULES(OSMGPSMAP, osmgpsmap)
fi
--
1.5.6.5
>From 2274e6ac44cf90b683d028a5956e0f8432850fd3 Mon Sep 17 00:00:00 2001
From: Joshua Judson Rosen <[email protected]>
Date: Tue, 18 May 2010 23:48:12 -0400
Subject: [PATCH] Split pkg-config probes for less confusing ./configure output & errors.
---
configure.ac | 10 +++-------
python/Makefile.am | 3 ++-
python/configure.ac | 7 ++++---
src/Makefile.am | 15 +++++++++++----
4 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/configure.ac b/configure.ac
index 86c0ab3..95234ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,9 @@ AM_PROG_LIBTOOL
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-PKG_CHECK_MODULES(OPENSTREETMAP_GPS_MAP, [gtk+-2.0 glib-2.0 >= 2.16 cairo >= 1.6])
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.16])
+PKG_CHECK_MODULES(GTK, [gtk+-2.0])
+PKG_CHECK_MODULES(CAIRO, [cairo >= 1.6])
PKG_CHECK_MODULES(SOUP24, libsoup-2.4,
soup_ver=2.4, [
@@ -25,12 +27,6 @@ PKG_CHECK_MODULES(SOUP24, libsoup-2.4,
AC_DEFINE(USE_LIBSOUP22, 1, Use libsoup 2.2 instead of libsoup-2.4 to download tiles)],
AC_ERROR([libsoup-2.4 (preferred) or libsoup-2.2 not found]))])
-OPENSTREETMAP_GPS_MAP_CFLAGS="$OPENSTREETMAP_GPS_MAP_CFLAGS $SOUP24_CFLAGS $SOUP22_CFLAGS"
-OPENSTREETMAP_GPS_MAP_LIBS="$OPENSTREETMAP_GPS_MAP_LIBS $SOUP24_LIBS $SOUP22_LIBS"
-
-AC_SUBST(OPENSTREETMAP_GPS_MAP_CFLAGS)
-AC_SUBST(OPENSTREETMAP_GPS_MAP_LIBS)
-
AC_MSG_CHECKING([for Win32])
case "$host" in
*-*-mingw*)
diff --git a/python/Makefile.am b/python/Makefile.am
index e9c1e34..48ebb45 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -3,6 +3,7 @@ defs_DATA = osmgpsmap.defs
INCLUDES = \
$(OSMGPSMAP_CFLAGS) \
+ $(SOUP24_CFLAGS) \
$(GTK_CFLAGS) \
$(PYGTK_CFLAGS) \
$(PYTHON_INCLUDES)
@@ -12,7 +13,7 @@ pkgpyexecdir = $(pyexecdir)/gtk-2.0
pkgpyexec_LTLIBRARIES = osmgpsmap.la
osmgpsmap_la_LDFLAGS = -module -avoid-version -export-symbols-regex initosmgpsmap
-osmgpsmap_la_LIBADD = $(OSMGPSMAP_LIBS) $(GTK_LIBS) $(PYGTK_LIBS)
+osmgpsmap_la_LIBADD = $(OSMGPSMAP_LIBS) $(SOUP24_LIBS) $(GTK_LIBS) $(PYGTK_LIBS)
osmgpsmap_la_SOURCES = osmgpsmapmodule.c osmgpsmap.c
#nodist_osmgpsmap_la_SOURCES = osmgpsmap.c
diff --git a/python/configure.ac b/python/configure.ac
index e79cf47..75e48f8 100644
--- a/python/configure.ac
+++ b/python/configure.ac
@@ -48,11 +48,12 @@ AC_MSG_RESULT($PYGTK_H2DEF)
if test -f ../src/libosmgpsmap.la; then
#Because we are building against a non installed lib, the pkgconfig
#file cannot tell us to also include/link gtk/soup, so we must manually do it
- PKG_CHECK_MODULES(OSMGPSMAP, [gtk+-2.0 libsoup-2.4])
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0])
+ PKG_CHECK_MODULES(SOUP24, [libsoup-2.4])
#and we must link to the local lib
- OSMGPSMAP_CFLAGS="$OSMGPSMAP_CFLAGS -I\$(top_srcdir)/../src/"
- OSMGPSMAP_LIBS="$OSMGPSMAP_LIBS \$(top_builddir)/../src/libosmgpsmap.la"
+ OSMGPSMAP_CFLAGS="-I\$(top_srcdir)/../src/"
+ OSMGPSMAP_LIBS="\$(top_builddir)/../src/libosmgpsmap.la"
else
PKG_CHECK_MODULES(OSMGPSMAP, osmgpsmap)
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 47fed91..0abbcfc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,11 @@
AM_CPPFLAGS = \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
- -DPACKAGE_DATA_DIR=\""$(datadir)"\" $(OPENSTREETMAP_GPS_MAP_CFLAGS)
+ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+ $(GLIB_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(CAIRO_CFLAGS) \
+ $(SOUP22_CFLAGS) $(SOUP24_CFLAGS)
AM_CFLAGS =\
-Wall\
@@ -20,8 +24,8 @@ mapviewer_LDFLAGS = \
-lgthread-2.0
mapviewer_LDADD = \
- libosmgpsmap.la \
- $(OPENSTREETMAP_GPS_MAP_LIBS)
+ $(GTK_LIBS) \
+ libosmgpsmap.la
lib_LTLIBRARIES = \
libosmgpsmap.la
@@ -45,7 +49,10 @@ libosmgpsmap_la_LDFLAGS = \
$(no_undefined)
libosmgpsmap_la_LIBADD = \
- $(OPENSTREETMAP_GPS_MAP_LIBS)
+ $(GLIB_LIBS) \
+ $(GTK_LIBS) \
+ $(CAIRO_LIBS) \
+ $(SOUP22_LIBS) $(SOUP24_LIBS)
libosmgpsmapincdir = $(includedir)/osmgpsmap
libosmgpsmapinc_HEADERS = \
--
1.5.6.5
_______________________________________________
This message is sent to you from [email protected] mailing list.
Visit http://lists.osgeo.org/mailman/listinfo/foss-gps to manage your
subscription
For more information, check http://wiki.osgeo.org/wiki/FOSS-GPS