From: Martin Jansa Date: Sun, 6 Dec 2009 10:46:35 +0000 (+0100) Subject: navit: change to INC_PR, bump srcrev, split icons and config for navit_svn X-Git-Tag: Release-2010-05/1~1408^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bfd1a4e9122d62521bfe71b33579019ba95640d;p=openembedded.git navit: change to INC_PR, bump srcrev, split icons and config for navit_svn * xpm stuff is updated maybe about 6 times a year, sources are updated few times every day * with navit-icons in separate package we don't need to download 3,5MB package, every time we bump SRCREV because of software fix * navit-icons SRCREV will be changed only if there is new icon needed for newer navit SRCREV * big package was installed by opkg really slow * provide 2 desktop icons one with Display blanking disabled ie for car navigation, second with only CPU requested ie if you're using navit on foot or bike and want longer battery life * splitted configs are easier to modify, also provide better defaults for freerunner layout Signed-off-by: Martin Jansa --- diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc index ac8be08ced..17c896ef51 100644 --- a/conf/distro/include/sane-srcrevs.inc +++ b/conf/distro/include/sane-srcrevs.inc @@ -185,7 +185,8 @@ SRCREV_pn-mplayer-maemo ?= "342" SRCREV_pn-msn-pecan ?= "e795b33b29d792f19fcf699275eb966dc68be257" SRCREV_pn-multitap-pad ?= "373" SRCREV_pn-mux ?= "72460e890dbb15edbf7dc193116be0dcf9794a8b" -SRCREV_pn-navit ?= "1096" +SRCREV_pn-navit ?= "2846" +SRCREV_pn-navit-icons ?= "2618" SRCREV_pn-neod ?= "4617" SRCREV_pn-neomis ?= "6" SRCREV_pn-net-snmp ?= "17367" diff --git a/recipes/navit/files/maps.xml b/recipes/navit/files/maps.xml new file mode 100644 index 0000000000..6f59f20c39 --- /dev/null +++ b/recipes/navit/files/maps.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/navit/files/navit.desktop b/recipes/navit/files/navit.desktop index 085c8c9238..05ecc1d4ee 100644 --- a/recipes/navit/files/navit.desktop +++ b/recipes/navit/files/navit.desktop @@ -2,7 +2,7 @@ Name=Navit Comment=GPS Navigation Exec=navit -Icon=navit.png +Icon=navit Terminal=false Type=Application Categories=GTK; diff --git a/recipes/navit/files/navit.xml b/recipes/navit/files/navit.xml new file mode 100644 index 0000000000..cce85aaf2f --- /dev/null +++ b/recipes/navit/files/navit.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/navit/files/osd.xml b/recipes/navit/files/osd.xml new file mode 100644 index 0000000000..2d0f9ffdf4 --- /dev/null +++ b/recipes/navit/files/osd.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/recipes/navit/files/shr/navit.desktop b/recipes/navit/files/shr/navit.desktop new file mode 100644 index 0000000000..d313d6a63e --- /dev/null +++ b/recipes/navit/files/shr/navit.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Navit +Comment=GPS Navigation +Exec=fsoraw -r CPU,GPS -- navit +Icon=navit +Terminal=false +Type=Application +Categories=GTK; +MimeType=text/x-vcard; +StartupNotify=true diff --git a/recipes/navit/files/shr/navit.launcher b/recipes/navit/files/shr/navit.launcher new file mode 100644 index 0000000000..68baaeb956 --- /dev/null +++ b/recipes/navit/files/shr/navit.launcher @@ -0,0 +1,57 @@ +#! /bin/sh +# +# Copyright Matthias Hentges (c) 2008 +# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) +# +# Filename: navit.launcher +# Date: 20080105 (YMD) +# +################################################################################# +# +# 20080105 - v0.0.1 - Initial release +# 20090818 - - Zoff addons and fixes +# 20091025 - - Zoff check if navit already running +# 20091122 - - Zoff use fsoraw, use correct LANG setting +# +# +################################################################################# + +# On devices with low memory (< 512Mb?) Navit will segfault on start. +# This can be worked around by doing +# "echo 1 > /proc/sys/vm/overcommit_memory" + +# check if navit already running: +pgrep '^navit$' +not_running=$? + +if [ $not_running == 0 ]; then + echo "navit already running !!" +else + echo "ok starting navit ..." + + # HINT: to get correct LANG setting + . /etc/profile + + # HINT: we need that for streetname search + export LC_ALL='' + unset LC_ALL + + # HINT: that should be set in illume, but atm its not + # export LANG=de_AT.utf8 + + if test "`cat /proc/meminfo | grep ^MemTotal | awk '{print $2}'`" -lt "500000" + then + if test "$USER" = "root" + then + echo "Enabling low-mem workaround..." + OLD=`cat /proc/sys/vm/overcommit_memory` + echo 1 > /proc/sys/vm/overcommit_memory + navit.real $* + echo ${OLD} > /proc/sys/vm/overcommit_memory + exit + else + echo "I need root-privs to enable the low-mem workaround!" + fi + fi + navit.real $* +fi diff --git a/recipes/navit/files/shr/navit.png b/recipes/navit/files/shr/navit.png new file mode 100644 index 0000000000..76156d0334 Binary files /dev/null and b/recipes/navit/files/shr/navit.png differ diff --git a/recipes/navit/files/shr/navitD.desktop b/recipes/navit/files/shr/navitD.desktop new file mode 100644 index 0000000000..9a2378a3ea --- /dev/null +++ b/recipes/navit/files/shr/navitD.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=NavitD +Comment=GPS Navigation Display blanking disabled +Exec=fsoraw -r CPU,GPS,Display -- navit +Icon=navitD +Terminal=false +Type=Application +Categories=GTK; +MimeType=text/x-vcard; +StartupNotify=true diff --git a/recipes/navit/files/shr/navitD.png b/recipes/navit/files/shr/navitD.png new file mode 100644 index 0000000000..a23ba5ce03 Binary files /dev/null and b/recipes/navit/files/shr/navitD.png differ diff --git a/recipes/navit/files/shr/osd.xml b/recipes/navit/files/shr/osd.xml new file mode 100644 index 0000000000..a8a97d74c9 --- /dev/null +++ b/recipes/navit/files/shr/osd.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/navit/files/speech.xml b/recipes/navit/files/speech.xml new file mode 100644 index 0000000000..28c49906d9 --- /dev/null +++ b/recipes/navit/files/speech.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/recipes/navit/navit-icons/configure.in b/recipes/navit/navit-icons/configure.in new file mode 100644 index 0000000000..25259007e8 --- /dev/null +++ b/recipes/navit/navit-icons/configure.in @@ -0,0 +1,69 @@ +AC_INIT(navit, 0.2.0) +SOURCE_MODE=svn + +AM_INIT_AUTOMAKE +AM_CONFIG_HEADER(config.h) + +AC_SUBST(SOURCE_MODE) +AM_CONDITIONAL(SOURCE_MODE_SVN, [test "x${SOURCE_MODE}" = "xsvn"]) + +if test "x${SOURCE_MODE}" = "xsvn" ; then + USE_MAINTAINER_MODE=yes +else + USE_MAINTAINER_MODE=no +fi + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is enabled by default (reason of inclusion of this function) + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +AM_MAINTAINER_MODE + +# svg +AC_ARG_ENABLE(svg, [ --disable-svg disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes) +AC_ARG_ENABLE(svg2png, [ --disable-svg2png disable conversion of svgs to pngs], enable_svg2png=$enableval, enable_svg2png=yes) +AC_ARG_ENABLE(svg2png-scaling, [ --enable-svg2png-scaling enable conversion of svgs to pngs with specified sizes], SVG2PNG_SCALES=$enableval, SVG2PNG_SCALES="8 16 32 48 96") +AC_ARG_ENABLE(svg2png-scaling-flag, [ --enable-svg2png-scaling-flag enable conversion of flag svgs to pngs with specified sizes], SVG2PNG_SCALES_FLAG=$enableval, SVG2PNG_SCALES_FLAG="8 16 32 48 96") +AC_ARG_ENABLE(svg2png-scaling-nav, [ --enable-svg2png-scaling-nav enable conversion of nav svgs to pngs with specified sizes], SVG2PNG_SCALES_NAV=$enableval, SVG2PNG_SCALES_NAV="8 16 32 48 96") +AC_ARG_WITH(svg2png-use-convert, [ --with-svg2png-use-convert use imagemagick's convert for png creation], SVG2PNG_CONVERTER="convert") +AC_ARG_WITH(svg2png-use-rsvg-convert, [ --with-svg2png-use-rsvg-convert use librsvg's rsvg-convert for png creation], SVG2PNG_CONVERTER="rsvg-convert") +AC_ARG_WITH(svg2png-use-inkscape, [ --with-svg2png-use-inkscape use inkscapes internal convert routines for png creation], SVG2PNG_CONVERTER="inkscape") +AC_ARG_WITH(svg2png-use-ksvgtopng4, [ --with-svg2png-use-ksvgtopng4 use kde4's ksvgtopng4 for png creation], SVG2PNG_CONVERTER="ksvgtopng4") +AC_ARG_WITH(svg2png-use-ksvgtopng, [ --with-svg2png-use-ksvgtopng use kde3's convert for png creation], SVG2PNG_CONVERTER="ksvgtopng") +if test "x${enable_svg2png}" = "xyes" ; then + if test "x${SVG2PNG_CONVERTER}" = "x"; then + SVG2PNG_CONVERTER="ksvgtopng ksvgtopng4 rsvg-convert inkscape convert" + fi + AC_PATH_PROGS([SVG2PNG], ${SVG2PNG_CONVERTER}, [none]) + if test "x${SVG2PNG}" = "xnone"; then + enable_svg2png="no" + fi +fi +AC_SUBST(SVG2PNG) +AC_SUBST(SVG2PNG_SCALES) +AC_SUBST(SVG2PNG_SCALES_FLAG) +AC_SUBST(SVG2PNG_SCALES_NAV) +AM_CONDITIONAL(USE_SVG2PNG_SCALES, test "x${SVG2PNG_SCALES}" != "xyes" -a "x${SVG2PNG_SCALES}" != "x") +AM_CONDITIONAL(USE_SVG2PNG_SCALES_FLAG, test "x${SVG2PNG_SCALES_FLAG}" != "xyes" -a "x${SVG2PNG_SCALES_FLAG}" != "x") +AM_CONDITIONAL(USE_SVG2PNG_SCALES_NAV, test "x${SVG2PNG_SCALES_NAV}" != "xyes" -a "x${SVG2PNG_SCALES_NAV}" != "x") +AM_CONDITIONAL(USE_SVG2PNG, test "x${enable_svg2png}" = "xyes") +AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes") + +AC_CONFIG_FILES([ +Makefile +]) + +AC_OUTPUT + diff --git a/recipes/navit/navit-icons_svn.bb b/recipes/navit/navit-icons_svn.bb new file mode 100644 index 0000000000..09961deb7c --- /dev/null +++ b/recipes/navit/navit-icons_svn.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Navit is a car navigation system with routing engine." +LICENSE = "GPL" +SECTION = "x11/applications" +DEPENDS = "glib-2.0 gtk+" +RRECOMMENDS = "gpsd espeak flite" + +PV = "0.1.0+svnr${SRCPV}" +PR = "r0" + +DEPENDS_shr += " librsvg-native" +EXTRA_OECONF = "--disable-binding-python --disable-gui-sdl --disable-samplemap --enable-avoid-float --enable-avoid-unaligned --enable-svg2png-scaling-flag=32 --disable-speech-speech-dispatcher" + +S = "${WORKDIR}/xpm" + +inherit autotools + +FILES_${PN} = " /usr/share/navit/xpm/" + +#use different URL than navit_svn doest, to prevent upgrade/downgrade cycle in downloads dir +SRC_URI = "svn://anonymous@navit.svn.sourceforge.net/svnroot/navit/trunk/navit/navit;module=xpm;proto=https \ + file://configure.in" + +do_configure_prepend() { + cp ${WORKDIR}/configure.in ${S}/ + # replace include with just xpmdir variable + sed -i 's#.*Makefile.inc.*#xpmdir=$(pkgdatadir)/xpm#g' ${S}/Makefile.am + # don't install desktopfile and icons + sed -i 's/^\(EXTRADIST.*\) $(DESKTOPFILE_DATA) $(ICON128_DATA) $(ICON22_DATA) \(.*\)$/\1\2/g' ${S}/Makefile.am +} diff --git a/recipes/navit/navit.inc b/recipes/navit/navit.inc index fa250ffac9..0b0c36470d 100644 --- a/recipes/navit/navit.inc +++ b/recipes/navit/navit.inc @@ -4,6 +4,9 @@ SECTION = "x11/applications" DEPENDS = "glib-2.0 gtk+" RRECOMMENDS = "gpsd speechd flite" +PE = "1" +INC_PR = "r4" + inherit autotools EXTRA_OECONF = "--disable-binding-python --disable-gui-sdl --disable-samplemap --enable-avoid-float --enable-avoid-unaligned" diff --git a/recipes/navit/navit_svn.bb b/recipes/navit/navit_svn.bb index 833eb4714e..3323611210 100644 --- a/recipes/navit/navit_svn.bb +++ b/recipes/navit/navit_svn.bb @@ -1,12 +1,61 @@ require navit.inc -PV = "0.1.0+svnrev${SRCREV}" -PR = "r2" +PV = "0.1.0+svnr${SRCPV}" +PR = "${INC_PR}.0" DEFAULT_PREFERENCE = "-1" +DEFAULT_PREFERENCE_shr = "1" S = "${WORKDIR}/navit" +# use espeak instead speechd +RRECOMMENDS = "gpsd espeak flite" + +EXTRA_OECONF += "--enable-avoid-unaligned --enable-svg2png-scaling-flag=32 --disable-speech-speech-dispatcher" + SRC_URI = "svn://anonymous@navit.svn.sourceforge.net/svnroot/navit/trunk;module=navit;proto=https" EXTRA_AUTORECONF = " -I m4" + +FILES_${PN} += " ${datadir}/dbus-1/services/ " + +CONFFILES_${PN} += "${datadir}/navit/navit.default.xml \ + ${datadir}/navit/navit.xml \ + ${datadir}/navit/maps.xml \ + ${datadir}/navit/osd.xml \ + ${datadir}/navit/speech.xml \ + " + +SRC_URI += "file://navit.xml \ + file://maps.xml \ + file://osd.xml \ + file://speech.xml \ + " + +#Second launcher for shr +SRC_URI_append_shr = "file://navitD.desktop \ + file://navitD.png \ + " + +DEPENDS_append_shr = " gypsy" +RDEPENDS_append_shr = " fsoraw" + +do_configure_prepend() { + #Remove xpm building, replaced by icons in own package + sed -i 's/\(.*SUBDIRS.*\) xpm\( \|$\)\(.*\)/\1\2\3/g' ${S}/navit/Makefile.am +} + +do_install_append() { + #Use split config + mv ${D}${datadir}/navit/navit.xml ${D}${datadir}/navit/navit.default.xml + install -m 0644 ${WORKDIR}/navit.xml ${D}${datadir}/navit/navit.xml + install -m 0644 ${WORKDIR}/maps.xml ${D}${datadir}/navit/maps.xml + install -m 0644 ${WORKDIR}/osd.xml ${D}${datadir}/navit/osd.xml + install -m 0644 ${WORKDIR}/speech.xml ${D}${datadir}/navit/speech.xml +} + +do_install_append_shr() { + #Install second launcher for shr + install -m 0644 ${WORKDIR}/navitD.desktop ${D}${datadir}/applications/ + install -m 0644 ${WORKDIR}/navitD.png ${D}${datadir}/pixmaps/ +}