[arch-commits] Commit in libmarble4/trunk (PKGBUILD marble-nowebkit-1508-1.diff)

Antonio Rojas arojas at archlinux.org
Thu Jul 30 18:39:46 UTC 2015


    Date: Thursday, July 30, 2015 @ 20:39:46
  Author: arojas
Revision: 242878

Use 15.08 branch, share libastro and data with main marble package

Added:
  libmarble4/trunk/marble-nowebkit-1508-1.diff
Modified:
  libmarble4/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   41 +++--
 marble-nowebkit-1508-1.diff |  301 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 324 insertions(+), 18 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-07-30 18:25:57 UTC (rev 242877)
+++ PKGBUILD	2015-07-30 18:39:46 UTC (rev 242878)
@@ -2,28 +2,30 @@
 # Maintainer: Antonio Rojas <arojas at archlinux.org>
 
 pkgname=libmarble4
-pkgver=15.04.3
-pkgrel=4
+pkgver=15.07.80
+pkgrel=1
 pkgdesc="KDE4 Marble libraries"
 url="http://kde.org/applications/education/marble/"
 arch=(i686 x86_64)
 license=(GPL LGPL FDL)
-depends=(kdebase-runtime)
+depends=(qtwebkit libastro marble-data)
 makedepends=(cmake automoc4 gpsd libwlocate)
 optdepends=('gpsd: GPS support' 'libwlocate: WLAN based geolocation')
 conflicts=(kdeedu-marble)
 provides=(kdeedu-marble)
-source=("http://download.kde.org/stable/applications/$pkgver/src/marble-$pkgver.tar.xz")
-sha1sums=('34f6bdedb6ff37f49c1e0f1f3cca219a515accb4')
+source=("http://download.kde.org/unstable/applications/$pkgver/src/marble-$pkgver.tar.xz" 'marble-nowebkit-1508-1.diff')
+sha1sums=('8f61030eec2b2c9702150d799e2337867b9743b2'
+          'ebe19afe48153ad9409ac783c42e44c6bb567b6b')
 
 prepare() {
   mkdir -p build
 
-# rename include dir
-  sed -e 's|marble/MarbleModel.h|marble4/MarbleModel.h|' -i marble-$pkgver/FindMarble.cmake
-# hack: change soname to make it coinstallable with 15.08 version
-  sed -e 's|GENERIC_LIB_VERSION "0.17.20"|GENERIC_LIB_VERSION "0.17"|' -e 's|GENERIC_LIB_SOVERSION "1"|GENERIC_LIB_SOVERSION "0"|' \
-   -i marble-$pkgver/src/lib/astro/CMakeLists.txt
+  cd marble-$pkgver
+  patch -p1 -i ../marble-nowebkit-1508-1.diff
+  cd ..
+ 
+# rename include dir 
+  sed -e 's|marble/MarbleModel.h|marble4/MarbleModel.h|' -i marble-$pkgver/FindMarble.cmake.in
 }
 
 build() {
@@ -30,8 +32,10 @@
   cd build
   cmake ../marble-$pkgver \
     -DCMAKE_BUILD_TYPE=Release \
-    -DKDE4_BUILD_TESTS=OFF \
-    -DCMAKE_INSTALL_PREFIX=/usr
+    -DBUILD_MARBLE_TESTS=OFF \
+    -DBUILD_MARBLE_APPS=OFF \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMARBLE_PLUGIN_PATH=/usr/lib/marble4/plugins
   make
 }
 
@@ -39,13 +43,14 @@
   cd build
   make DESTDIR="$pkgdir" install
 
-# remove files provided by libastro and marble
-  rm -r "$pkgdir"/usr/bin
-  rm -r "$pkgdir"/usr/share/applications/kde4/marble-*
+# move cmake file
+  install -Dm644 "$pkgdir"/usr/share/marble/cmake/FindMarble.cmake "$pkgdir"/usr/share/apps/cmake/modules/FindMarble.cmake
+
+# remove files provided by libastro and marble-data
   rm -r "$pkgdir"/usr/include/astro
-  rm -r "$pkgdir"/usr/lib/libastro.so
-  rm -r "$pkgdir"/usr/share/{appdata,config.kcfg,doc,icons}
+  rm -r "$pkgdir"/usr/lib/libastro.*
+  rm -r "$pkgdir"/usr/share/{appdata,applications,icons,marble}
+
 # rename include dir to avoid conflicts with marble
   mv "$pkgdir"/usr/include/marble{,4}
 }
-

Added: marble-nowebkit-1508-1.diff
===================================================================
--- marble-nowebkit-1508-1.diff	                        (rev 0)
+++ marble-nowebkit-1508-1.diff	2015-07-30 18:39:46 UTC (rev 242878)
@@ -0,0 +1,301 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c83158..560647e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -81,6 +81,10 @@ if(ANDROID)
+ else()
+    find_package(Qt5WebKitWidgets)
+    find_package(Qt5DBus)
++
++   if ( NOT Qt5Webkit_FOUND )
++     set ( MARBLE_NO_WEBKIT TRUE )
++   endif()
+ endif()
+ 
+ find_package(Qt5Core)
+@@ -146,6 +150,9 @@ else()
+     FIND_PACKAGE(QtDeclarative)
+     include_directories(${QT_QTDECLARATIVE_INCLUDE_DIR})
+   endif()
++  if ( NOT QT_QTWEBKIT_FOUND )
++    set ( MARBLE_NO_WEBKIT TRUE )
++  endif()
+ endif()
+ 
+ SET(CMAKE_AUTOMOC TRUE)
+diff --git a/src/apps/marble-mobile/MobileMainWindow.cpp b/src/apps/marble-mobile/MobileMainWindow.cpp
+index 89db918..d17dde4 100644
+--- a/src/apps/marble-mobile/MobileMainWindow.cpp
++++ b/src/apps/marble-mobile/MobileMainWindow.cpp
+@@ -97,7 +97,9 @@ MainWindow::MainWindow( const QString &marbleDataPath, const QVariantMap &cmdLin
+ 
+     // prevent triggering of network requests under Maemo, presumably due to qrc: URLs
+     m_networkAccessManager.setNetworkAccessible( QNetworkAccessManager::NotAccessible );
++#ifndef MARBLE_NO_WEBKIT
+     m_legendBrowser->page()->setNetworkAccessManager( &m_networkAccessManager );
++#endif
+ 
+     QString selectedPath = marbleDataPath.isEmpty() ? readMarbleDataPath() : marbleDataPath;
+     if ( !selectedPath.isEmpty() )
+diff --git a/src/lib/marble/CMakeLists.txt b/src/lib/marble/CMakeLists.txt
+index 78f5395..26eda3e 100644
+--- a/src/lib/marble/CMakeLists.txt
++++ b/src/lib/marble/CMakeLists.txt
+@@ -52,8 +52,8 @@ if( QT5BUILD )
+     set(marblequick_SRCS MarbleQuickItem.cpp)
+ endif()
+ 
+-if(QT_NO_WEBKIT)
+-add_definitions(-DQT_NO_WEBKIT)
++if(MARBLE_NO_WEBKIT)
++add_definitions(-DMARBLE_NO_WEBKIT)
+ endif()
+ 
+ set(marblewidget_SRCS
+@@ -293,7 +293,7 @@ set(marblewidget_SRCS
+ )
+ 
+ 
+-if (QT_NO_WEBKIT)
++if (MARBLE_NO_WEBKIT)
+     LIST(APPEND marblewidget_SRCS
+         NullMarbleWebView.cpp
+         NullTinyWebBrowser.cpp
+@@ -352,7 +352,7 @@ set (marblewidget_UI
+     FormattedTextWidget.ui
+     ElevationWidget.ui
+ )
+-if (QT_NO_WEBKIT)
++if (MARBLE_NO_WEBKIT)
+     LIST(APPEND marblewidget_UI
+         NullLegendWidget.ui
+         NullWebPopupWidget.ui
+@@ -448,7 +448,7 @@ if( QT5BUILD )
+     set(marblequick_HDRS MarbleQuickItem.h)
+ endif()
+ 
+-if (QT_NO_WEBKIT)
++if (MARBLE_NO_WEBKIT)
+     set(marble_WebKit
+         NullMarbleWebView.h
+         NullTinyWebBrowser.h
+diff --git a/src/lib/marble/LegendWidget.cpp b/src/lib/marble/LegendWidget.cpp
+index 7399e57..9fbd1fb 100644
+--- a/src/lib/marble/LegendWidget.cpp
++++ b/src/lib/marble/LegendWidget.cpp
+@@ -16,7 +16,7 @@
+ 
+ using namespace Marble;
+ // Ui
+-#ifdef QT_NO_WEBKIT
++#ifdef MARBLE_NO_WEBKIT
+ #include "ui_NullLegendWidget.h"
+ #else
+ #include "ui_LegendWidget.h"
+diff --git a/src/lib/marble/MarbleLegendBrowser.cpp b/src/lib/marble/MarbleLegendBrowser.cpp
+index 3af1f80..04a3588 100644
+--- a/src/lib/marble/MarbleLegendBrowser.cpp
++++ b/src/lib/marble/MarbleLegendBrowser.cpp
+@@ -28,7 +28,7 @@
+ #include <QStyleOptionButton>
+ #include <QRegExp>
+ 
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+ #include <QWebFrame>
+ #include <QWebElement>
+ #endif
+@@ -76,7 +76,7 @@ MarbleLegendBrowser::MarbleLegendBrowser( QWidget *parent )
+     d->m_suppressSelection = false;
+ #endif // Q_WS_MAEMO_5
+ 
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     QWebFrame *frame = page()->mainFrame();
+     connect(frame, SIGNAL(javaScriptWindowObjectCleared()),
+             this, SLOT(injectCheckBoxChecker()));
+@@ -133,7 +133,7 @@ void MarbleLegendBrowser::initTheme()
+ 
+ void MarbleLegendBrowser::loadLegend()
+ {
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     if (d->m_currentThemeId != d->m_marbleModel->mapThemeId()) {
+         d->m_currentThemeId = d->m_marbleModel->mapThemeId();
+     } else {
+@@ -185,7 +185,7 @@ void MarbleLegendBrowser::loadLegend()
+ 
+ void MarbleLegendBrowser::injectCheckBoxChecker()
+ {
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     QWebFrame *frame = page()->mainFrame();
+     frame->addToJavaScriptWindowObject( "Marble", this );
+ #endif
+@@ -384,7 +384,7 @@ QString MarbleLegendBrowser::generateSectionsHtml()
+ 
+ void MarbleLegendBrowser::setCheckedProperty( const QString& name, bool checked )
+ {
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     QWebElement box = page()->mainFrame()->findFirstElement("input[name="+name+']');
+     if (!box.isNull()) {
+         if (checked != d->m_checkBoxMap[name]) {
+@@ -399,7 +399,7 @@ void MarbleLegendBrowser::setCheckedProperty( const QString& name, bool checked
+ 
+ void MarbleLegendBrowser::setRadioCheckedProperty( const QString& value, const QString& name , bool checked )
+ {
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     QWebElement box = page()->mainFrame()->findFirstElement("input[value="+value+']');
+     QWebElementCollection boxes = page()->mainFrame()->findAllElements("input[name="+name+']');
+     QString currentValue="";
+diff --git a/src/lib/marble/MarbleLegendBrowser.h b/src/lib/marble/MarbleLegendBrowser.h
+index 936eedb..bbc2de1 100644
+--- a/src/lib/marble/MarbleLegendBrowser.h
++++ b/src/lib/marble/MarbleLegendBrowser.h
+@@ -20,7 +20,7 @@
+ 
+ #include <QString>
+ 
+-#ifdef QT_NO_WEBKIT
++#ifdef MARBLE_NO_WEBKIT
+ #include "NullMarbleWebView.h"
+ #else
+ #include "MarbleWebView.h"
+diff --git a/src/lib/marble/PopupItem.cpp b/src/lib/marble/PopupItem.cpp
+index 41e108a..c2c81f9 100644
+--- a/src/lib/marble/PopupItem.cpp
++++ b/src/lib/marble/PopupItem.cpp
+@@ -14,7 +14,7 @@
+ #include "PopupItem.h"
+ #include "MarbleWidget.h"
+ 
+-#ifdef QT_NO_WEBKIT
++#ifdef MARBLE_NO_WEBKIT
+ #include "NullMarbleWebView.h"
+ #else
+ #include <QWebView>
+@@ -68,7 +68,7 @@ PopupItem::PopupItem( QObject* parent ) :
+     QPalette palette = m_ui.webView->palette();
+     palette.setBrush(QPalette::Base, Qt::transparent);
+     m_ui.webView->setPalette(palette);
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     m_ui.webView->page()->setPalette(palette);
+ #endif
+     m_ui.webView->setAttribute(Qt::WA_OpaquePaintEvent, false);
+@@ -78,7 +78,7 @@ PopupItem::PopupItem( QObject* parent ) :
+     connect( m_ui.webView, SIGNAL(urlChanged(QUrl)), this, SLOT(updateBackButton()) );
+     connect( m_ui.hideButton, SIGNAL(clicked()), this, SIGNAL(hide()) );
+ 
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     // Update the popupitem on changes while loading the webpage
+     connect( m_ui.webView->page(), SIGNAL(repaintRequested(QRect)), this, SLOT(requestUpdate()) );
+ #endif
+@@ -107,7 +107,7 @@ void PopupItem::setUrl( const QUrl &url )
+     QPalette palette = m_ui.webView->palette();
+     palette.setBrush(QPalette::Base, Qt::transparent);
+     m_ui.webView->setPalette(palette);
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     m_ui.webView->page()->setPalette(palette);
+ #endif
+     m_ui.webView->setAttribute(Qt::WA_OpaquePaintEvent, false);
+@@ -119,7 +119,7 @@ void PopupItem::setContent( const QString &html, const QUrl &baseUrl )
+ {
+     m_content = html;
+     m_baseUrl = baseUrl;
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     m_ui.webView->setHtml( html, baseUrl );
+ #endif
+ 
+@@ -344,7 +344,7 @@ void PopupItem::clearHistory()
+ {
+     m_content.clear();
+     m_ui.webView->setUrl( QUrl( "about:blank" ) );
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     m_ui.webView->history()->clear();
+ #endif
+ }
+@@ -358,7 +358,7 @@ void PopupItem::requestUpdate()
+ void PopupItem::printContent() const
+ {
+ #ifndef QT_NO_PRINTER
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     QPrinter printer;
+     QPointer<QPrintDialog> dialog = new QPrintDialog(&printer);
+     if (dialog->exec() == QPrintDialog::Accepted) {
+@@ -371,7 +371,7 @@ void PopupItem::printContent() const
+ 
+ void PopupItem::updateBackButton()
+ {
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     bool const hasHistory = m_ui.webView->history()->count() > 1;
+     bool const previousIsHtml = !m_content.isEmpty() && m_ui.webView->history()->currentItemIndex() == 1;
+     bool const atStart = m_ui.webView->history()->currentItemIndex() <= 1;
+@@ -382,7 +382,7 @@ void PopupItem::updateBackButton()
+ 
+ void PopupItem::goBack()
+ {
+-#ifndef QT_NO_WEBKIT
++#ifndef MARBLE_NO_WEBKIT
+     if ( m_ui.webView->history()->currentItemIndex() == 1 && !m_content.isEmpty() ) {
+         m_ui.webView->setHtml( m_content, m_baseUrl );
+     } else {
+diff --git a/src/lib/marble/PopupItem.h b/src/lib/marble/PopupItem.h
+index 9947a78..56fd7c0 100644
+--- a/src/lib/marble/PopupItem.h
++++ b/src/lib/marble/PopupItem.h
+@@ -19,7 +19,7 @@
+ 
+ #include "BillboardGraphicsItem.h"
+ 
+-#ifdef QT_NO_WEBKIT
++#ifdef MARBLE_NO_WEBKIT
+ #include "ui_NullWebPopupWidget.h"
+ #else
+ #include "ui_WebPopupWidget.h"
+diff --git a/src/lib/marble/cloudsync/RouteItemDelegate.cpp b/src/lib/marble/cloudsync/RouteItemDelegate.cpp
+index 03be997..ffc4a2d 100644
+--- a/src/lib/marble/cloudsync/RouteItemDelegate.cpp
++++ b/src/lib/marble/cloudsync/RouteItemDelegate.cpp
+@@ -2,7 +2,7 @@
+ 
+ #include <QPainter>
+ 
+-#ifdef QT_NO_WEBKIT
++#ifdef MARBLE_NO_WEBKIT
+ #include <QWidget>
+ #else
+ #include <QWebView>
+diff --git a/src/lib/marble/routing/RoutingInputWidget.cpp b/src/lib/marble/routing/RoutingInputWidget.cpp
+index 2ec32f0..00aa0e7 100644
+--- a/src/lib/marble/routing/RoutingInputWidget.cpp
++++ b/src/lib/marble/routing/RoutingInputWidget.cpp
+@@ -15,7 +15,7 @@
+ #include "MarblePlacemarkModel.h"
+ #include "RouteRequest.h"
+ 
+-#ifdef QT_NO_WEBKIT
++#ifdef MARBLE_NO_WEBKIT
+ #include "NullTinyWebBrowser.h"
+ #else
+ #include "TinyWebBrowser.h"
+diff --git a/src/plugins/render/CMakeLists.txt b/src/plugins/render/CMakeLists.txt
+index 9f7126c..bdfc085 100644
+--- a/src/plugins/render/CMakeLists.txt
++++ b/src/plugins/render/CMakeLists.txt
+@@ -51,4 +51,4 @@ marble_set_package_properties( Perl PROPERTIES URL "http://www.perl.org" )
+ marble_set_package_properties( Perl PROPERTIES TYPE OPTIONAL PURPOSE "generation of sources in the APRS plugin" )
+ if( PERL_FOUND )
+     add_subdirectory( aprs )
+-endif()
+\ No newline at end of file
++endif()
+



More information about the arch-commits mailing list