From bf35116f9d203dcafce808a6c7b3dd5a0db8afbc Mon Sep 17 00:00:00 2001 From: root Date: Tue, 2 Aug 2011 04:35:55 +0000 Subject: Tue Aug 2 04:35:55 UTC 2011 --- extra/kdeedu-marble/PKGBUILD | 36 +++++++++++++++++++++++++++ extra/kdeedu-marble/gpsd-2.96.patch | 41 +++++++++++++++++++++++++++++++ extra/kdeedu-marble/kdeedu-marble.install | 12 +++++++++ 3 files changed, 89 insertions(+) create mode 100644 extra/kdeedu-marble/PKGBUILD create mode 100644 extra/kdeedu-marble/gpsd-2.96.patch create mode 100644 extra/kdeedu-marble/kdeedu-marble.install (limited to 'extra/kdeedu-marble') diff --git a/extra/kdeedu-marble/PKGBUILD b/extra/kdeedu-marble/PKGBUILD new file mode 100644 index 000000000..519a8d9a0 --- /dev/null +++ b/extra/kdeedu-marble/PKGBUILD @@ -0,0 +1,36 @@ +# $Id: PKGBUILD 132583 2011-07-25 00:12:54Z andrea $ +# Maintainer: Andrea Scarpino + +pkgname=kdeedu-marble +pkgver=4.7.0 +pkgrel=1 +pkgdesc="Desktop Globe" +url="http://kde.org/applications/education/marble/" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL' 'FDL') +groups=('kde' 'kdeedu') +depends=('kdebase-runtime' 'gpsd') +makedepends=('cmake' 'automoc4') +install=${pkgname}.install +source=("http://download.kde.org/stable/${pkgver}/src/marble-${pkgver}.tar.bz2" + 'gpsd-2.96.patch') +sha1sums=('bbe08a57a33e06fceea3a51aed1406bc71ee02a9' + 'f44dfd3bb384e631d59b93d7dda3413795da8183') + +build() { + cd "${srcdir}"/marble-${pkgver} + patch -p1 -i "${srcdir}"/gpsd-2.96.patch + + cd "${srcdir}" + mkdir build + cd build + cmake ../marble-${pkgver} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd "${srcdir}"/build + make DESTDIR="${pkgdir}" install +} diff --git a/extra/kdeedu-marble/gpsd-2.96.patch b/extra/kdeedu-marble/gpsd-2.96.patch new file mode 100644 index 000000000..e27702181 --- /dev/null +++ b/extra/kdeedu-marble/gpsd-2.96.patch @@ -0,0 +1,41 @@ +--- marble-4.6.80/src/plugins/positionprovider/gpsd/GpsdConnection.cpp ++++ marble-4.6.80/src/plugins/positionprovider/gpsd/GpsdConnection.cpp +@@ -18,6 +18,9 @@ using namespace Marble; + + GpsdConnection::GpsdConnection( QObject* parent ) + : QObject( parent ), ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ m_gpsd("localhost", DEFAULT_GPSD_PORT), ++#endif + m_timer( 0 ) + { + connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) ); +@@ -26,7 +29,11 @@ GpsdConnection::GpsdConnection( QObject* + void GpsdConnection::initialize() + { + m_timer.stop(); ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ gps_data_t* data; ++#else + gps_data_t* data = m_gpsd.open(); ++#endif + if ( data ) { + m_status = PositionProviderStatusAcquiring; + emit statusChanged( m_status ); +@@ -73,8 +80,16 @@ void GpsdConnection::initialize() + void GpsdConnection::update() + { + #if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET ) ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ if ( m_gpsd.waiting(0) ) { ++#else + if ( m_gpsd.waiting() ) { ++#endif ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ gps_data_t* data = m_gpsd.read(); ++#else + gps_data_t* data = m_gpsd.poll(); ++#endif + if ( data && data->set & PACKET_SET ) { + emit gpsdInfo( *data ); + } diff --git a/extra/kdeedu-marble/kdeedu-marble.install b/extra/kdeedu-marble/kdeedu-marble.install new file mode 100644 index 000000000..81ce5c4b0 --- /dev/null +++ b/extra/kdeedu-marble/kdeedu-marble.install @@ -0,0 +1,12 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null + update-desktop-database -q +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} -- cgit v1.2.3-54-g00ecf