summaryrefslogtreecommitdiff
path: root/extra/kdeedu-marble
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-08-02 04:35:55 +0000
committerroot <root@rshg054.dnsready.net>2011-08-02 04:35:55 +0000
commitbf35116f9d203dcafce808a6c7b3dd5a0db8afbc (patch)
treef9551a1d3c67d2113cc5fc5c3f8816bcbaad0540 /extra/kdeedu-marble
parent1173ff2dba7d0fd3c45f170a5e353a76b7a5da2f (diff)
Tue Aug 2 04:35:55 UTC 2011
Diffstat (limited to 'extra/kdeedu-marble')
-rw-r--r--extra/kdeedu-marble/PKGBUILD36
-rw-r--r--extra/kdeedu-marble/gpsd-2.96.patch41
-rw-r--r--extra/kdeedu-marble/kdeedu-marble.install12
3 files changed, 89 insertions, 0 deletions
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 <andrea@archlinux.org>
+
+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
+}