summaryrefslogtreecommitdiff
path: root/package/gpsd
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-02-17 20:10:15 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-02-17 20:10:15 +0100
commitf9011c1275b13f39e4ab4552173bfb91b2ffae56 (patch)
tree6a6cc8e0762a2da326e1657bda7308d6ffd3dc42 /package/gpsd
parentdc06fc81176cf7bd6024e6bfc0666abdd0207fbf (diff)
fix build on OpenBSD host
- add a wrapper script for autoconf and autoreconf to avoid ifdef gluecode for every OS/autoconf combination - need to add more autoconf version for NetBSD/MirBSD
Diffstat (limited to 'package/gpsd')
-rw-r--r--package/gpsd/Makefile4
-rw-r--r--package/gpsd/patches/patch-configure_ac95
-rw-r--r--package/gpsd/patches/patch-contrib_motosend_c8
-rw-r--r--package/gpsd/patches/patch-driver_garmin_txt_c8
-rw-r--r--package/gpsd/patches/patch-driver_sirf_c6
-rw-r--r--package/gpsd/patches/patch-hex_c6
-rw-r--r--package/gpsd/patches/patch-sirfflash_c6
7 files changed, 115 insertions, 18 deletions
diff --git a/package/gpsd/Makefile b/package/gpsd/Makefile
index 8b88305da..c1b7dd382 100644
--- a/package/gpsd/Makefile
+++ b/package/gpsd/Makefile
@@ -21,6 +21,8 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,GPSD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,GPSD_CLIENTS,gpsd-clients,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION}))
+AUTOTOOL_STYLE:= autoconf
+
CONFIGURE_ENV+= EGREP="grep -E" \
CPP="$(TARGET_CC) -E" \
ac_cv_func_strlcpy=no \
@@ -39,7 +41,7 @@ TLDFLAGS+= -shared
endif
post-extract:
- @find ${WRKBUILD} -name *.rej -delete
+ @find ${WRKBUILD} -name *.rej -exec rm {} \;
ifeq (${ADK_COMPILE_GPSD_WITH_UCLIBCXX},y)
# add workaround because libtool tries to link libstdc++
diff --git a/package/gpsd/patches/patch-configure_ac b/package/gpsd/patches/patch-configure_ac
new file mode 100644
index 000000000..c6b538e08
--- /dev/null
+++ b/package/gpsd/patches/patch-configure_ac
@@ -0,0 +1,95 @@
+--- gpsd-2.39.orig/configure.ac Wed Mar 18 22:09:27 2009
++++ gpsd-2.39/configure.ac Tue Feb 16 21:44:35 2010
+@@ -5,84 +5,6 @@ dnl AC_PREFIX_PROGRAM(gcc)
+ AM_CONFIG_HEADER(gpsd_config.h)
+ AC_LANG([C])
+
+-AC_ARG_ENABLE(python,
+- AC_HELP_STRING([--disable-python],
+- [disable python scripts and library bindings]),
+- [try_python="$enableval"], [try_python="yes"])
+-if test "x$try_python" = "xyes"; then
+- AM_PATH_PYTHON
+- ac_python=yes
+- if test "x$PYTHON" = "x"; then
+- AC_PATH_PROG(PYTHON, python, none)
+- fi
+-
+- if test "x$PYTHON" = "xnone"; then
+- AC_MSG_WARN([*** Python interpreter not found, Python support disabled.])
+- ac_python=no
+- fi
+-
+- if test "x$ac_python" = "xyes"; then
+- AC_MSG_CHECKING(Python version and location)
+- PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
+- PYTHON_VERSION_MAJOR=[`$PYTHON -c "import sys; print '%d' % (sys.version_info[0]);"`]
+- PYTHON_VERSION_MINOR=[`$PYTHON -c "import sys; print '%d' % (sys.version_info[1]);"`]
+- PYTHON_VERSION="${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
+- AC_MSG_RESULT([$PYTHON, $PYTHON_VERSION, $PYTHON_PREFIX])
+-
+- AC_MSG_CHECKING(whether Python is at least 2.4)
+- if test $PYTHON_VERSION_MAJOR -lt 2 -o $PYTHON_VERSION_MAJOR -eq 2 -a $PYTHON_VERSION_MINOR -lt 3; then
+- AC_MSG_RESULT(no)
+- AC_MSG_WARN([*** GPSD requires at least Python 2.3, Python support disabled.])
+- ac_python=no
+- fi
+- if test "x$ac_python" = "xyes"; then
+- AC_MSG_RESULT(yes)
+-
+- PYTHON_CFLAGS="-DHAVE_PYTHON -I$PYTHON_PREFIX/include/python$PYTHON_VERSION"
+-
+- OLD_CPPFLAGS="$CPPFLAGS"
+- OLD_CXXFLAGS="$CXXFLAGS"
+- CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
+- CXXFLAGS="$CXXFLAGS $PYTHON_CFLAGS"
+-
+- AC_CHECK_HEADERS([Python.h],
+- [],
+- [AC_MSG_WARN([*** Python include files not found! You should install the Python development package. Python support disabled]); ac_python=no])
+- CPPFLAGS="$OLD_CPPFLAGS"
+- CXXFLAGS="$OLD_CXXFLAGS"
+-
+- if test "x$ac_python" = "xyes"; then
+- AC_SUBST([PYTHON_CFLAGS])
+-
+- ac_python=no
+- for pylibpath in '/usr/lib' $PYTHON_PREFIX/lib $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config; do
+- eval `echo unset ac_cv_lib_python$PYTHON_VERSION'___'Py_Finalize | tr '.' '_'`
+-
+- save_LIBS=$LIBS
+- LIBS="$LIBS -L$pylibpath $PYTHON_LIBS"
+- AC_CHECK_LIB(python$PYTHON_VERSION, Py_Finalize, PYTHON_LIBS="-L$pylibpath -lpython$PYTHON_VERSION $PYTHON_DEPS"; ac_python=yes,,$PYTHON_DEPS)
+- LIBS=$save_LIBS
+- if test "x$ac_python" = "xyes"; then
+- break
+- fi
+- done
+-
+- if test "x$ac_python" != "xyes"; then
+- AC_MSG_WARN(*** Python development libraries required, Python support disabled)
+- fi
+- AC_SUBST([PYTHON_LIBS])
+-
+- AC_SUBST(pkgpythondir)
+- if test "x$python_install" = "xyes"; then
+- pkgpythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION"/site-packages/gpsd"
+- fi
+-
+- fi
+- fi
+- fi
+-fi
+-AM_CONDITIONAL([HAVE_PYTHON], [test x"$ac_python" = xyes])
+-
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+@@ -943,7 +865,6 @@ echo " Client Features"
+ echo " ---------------"
+ echo "Build ncurses programs : $ac_ncurses"
+ echo "Enable X11 support : $ac_x"
+-echo "Enable Python support : $ac_python"
+ echo "------------------------------------------"
+
+ if test "xdummy" = "xdummy" -a \
diff --git a/package/gpsd/patches/patch-contrib_motosend_c b/package/gpsd/patches/patch-contrib_motosend_c
index c5f1b0162..e2db10a74 100644
--- a/package/gpsd/patches/patch-contrib_motosend_c
+++ b/package/gpsd/patches/patch-contrib_motosend_c
@@ -1,5 +1,5 @@
---- gpsd-2.39.orig/contrib/motosend.c 2008-06-26 21:08:36.000000000 +0200
-+++ gpsd-2.39/contrib/motosend.c 2009-06-13 09:12:46.000000000 +0200
+--- gpsd-2.39.orig/contrib/motosend.c Thu Jun 26 21:08:36 2008
++++ gpsd-2.39/contrib/motosend.c Tue Feb 16 21:33:16 2010
@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
t = 0; n = 0;
while (1){
@@ -9,7 +9,7 @@
if ((l = read(fd, buf, BSIZ)) == -1)
if (!(EINTR == errno || EAGAIN == errno))
err(1, "read");
-@@ -119,7 +119,7 @@ static int moto_send(int fd, char *type,
+@@ -119,7 +119,7 @@ static int moto_send(int fd, char *type, char *body )
if ((buf = malloc(l+7)) == NULL)
return -1;
@@ -18,7 +18,7 @@
buf[0] = '@'; buf[1] = '@';
buf[2] = type[0]; buf[3] = type[1];
-@@ -171,7 +171,7 @@ int gpsd_hexpack(char *src, char *dst, i
+@@ -171,7 +171,7 @@ int gpsd_hexpack(char *src, char *dst, int len){
if ((l < 1) || (l > len))
return -1;
diff --git a/package/gpsd/patches/patch-driver_garmin_txt_c b/package/gpsd/patches/patch-driver_garmin_txt_c
index 604e103b0..64a146e58 100644
--- a/package/gpsd/patches/patch-driver_garmin_txt_c
+++ b/package/gpsd/patches/patch-driver_garmin_txt_c
@@ -1,6 +1,6 @@
---- gpsd-2.39.orig/driver_garmin_txt.c 2009-03-03 12:39:57.000000000 +0100
-+++ gpsd-2.39/driver_garmin_txt.c 2009-06-13 09:13:23.000000000 +0200
-@@ -167,7 +167,7 @@ static int gar_decode(const char *data,
+--- gpsd-2.39.orig/driver_garmin_txt.c Tue Mar 3 12:39:57 2009
++++ gpsd-2.39/driver_garmin_txt.c Tue Feb 16 21:33:16 2010
+@@ -167,7 +167,7 @@ static int gar_decode(const char *data, const size_t l
return -1;
}
@@ -9,7 +9,7 @@
(void) strncpy(buf, data, length);
gpsd_report(LOG_RAW, "Decoded string: %s\n", buf);
-@@ -230,7 +230,7 @@ static int gar_int_decode(const char *da
+@@ -230,7 +230,7 @@ static int gar_int_decode(const char *data, const size
return -1;
}
diff --git a/package/gpsd/patches/patch-driver_sirf_c b/package/gpsd/patches/patch-driver_sirf_c
index 1e44cee91..2fbdaef1e 100644
--- a/package/gpsd/patches/patch-driver_sirf_c
+++ b/package/gpsd/patches/patch-driver_sirf_c
@@ -1,6 +1,6 @@
---- gpsd-2.39.orig/driver_sirf.c 2009-03-07 16:30:58.000000000 +0100
-+++ gpsd-2.39/driver_sirf.c 2009-06-13 09:13:42.000000000 +0200
-@@ -238,7 +238,7 @@ static gps_mask_t sirf_msg_debug(unsigne
+--- gpsd-2.39.orig/driver_sirf.c Sat Mar 7 16:30:58 2009
++++ gpsd-2.39/driver_sirf.c Tue Feb 16 21:33:16 2010
+@@ -238,7 +238,7 @@ static gps_mask_t sirf_msg_debug(unsigned char *buf, s
char msgbuf[MAX_PACKET_LENGTH*3 + 2];
int i;
diff --git a/package/gpsd/patches/patch-hex_c b/package/gpsd/patches/patch-hex_c
index ebb2e1697..ad6b2e981 100644
--- a/package/gpsd/patches/patch-hex_c
+++ b/package/gpsd/patches/patch-hex_c
@@ -1,6 +1,6 @@
---- gpsd-2.39.orig/hex.c 2009-03-18 18:37:56.000000000 +0100
-+++ gpsd-2.39/hex.c 2009-06-13 09:13:58.000000000 +0200
-@@ -61,7 +61,7 @@ int gpsd_hexpack(char *src, char *dst, s
+--- gpsd-2.39.orig/hex.c Wed Mar 18 18:37:56 2009
++++ gpsd-2.39/hex.c Tue Feb 16 21:33:16 2010
+@@ -61,7 +61,7 @@ int gpsd_hexpack(char *src, char *dst, size_t len){
if ((l < 1) || ((size_t)l > len))
return -2;
diff --git a/package/gpsd/patches/patch-sirfflash_c b/package/gpsd/patches/patch-sirfflash_c
index 979793a56..f83306d34 100644
--- a/package/gpsd/patches/patch-sirfflash_c
+++ b/package/gpsd/patches/patch-sirfflash_c
@@ -1,6 +1,6 @@
---- gpsd-2.39.orig/sirfflash.c 2009-01-28 21:53:47.000000000 +0100
-+++ gpsd-2.39/sirfflash.c 2010-01-16 09:27:49.000000000 +0100
-@@ -193,7 +193,7 @@ sirfSetProto(int pfd, struct termios *te
+--- gpsd-2.39.orig/sirfflash.c Wed Jan 28 21:53:47 2009
++++ gpsd-2.39/sirfflash.c Tue Feb 16 21:33:16 2010
+@@ -193,7 +193,7 @@ sirfSetProto(int pfd, struct termios *term, unsigned i
sirf[7] = sirf[6] = (unsigned char)proto;
/*@i@*/i = htonl(speed); /* borrow "i" to put speed into proper byte order */