From f0a46ab47c0215d7a84a397a5557d68efda49694 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Feb 23 2015 21:02:39 +0000 Subject: new -astro(-devel), -widget(-data,-devel), -widget-qt5(-devel) subpkgs --- diff --git a/marble-14.12.1-marblewidget.patch b/marble-14.12.1-marblewidget.patch new file mode 100644 index 0000000..fc033f5 --- /dev/null +++ b/marble-14.12.1-marblewidget.patch @@ -0,0 +1,275 @@ +diff -up marble-14.12.1/CMakeLists.txt.marblewidget_soname marble-14.12.1/CMakeLists.txt +--- marble-14.12.1/CMakeLists.txt.marblewidget_soname 2015-02-21 09:59:19.927640302 -0600 ++++ marble-14.12.1/CMakeLists.txt 2015-02-21 10:47:13.305431997 -0600 +@@ -56,6 +56,7 @@ if(QT4_FOUND) + FIND_PACKAGE(QtDeclarative) + include_directories(${QT_QTDECLARATIVE_INCLUDE_DIR}) + ENDIF() ++ set(MARBLEWIDGET marblewidget) + else() + set( QT5BUILD TRUE ) + IF( NOT QTONLY ) +@@ -86,6 +87,7 @@ else() + include_directories( ${Qt5Xml_INCLUDE_DIRS} ) + include_directories( ${Qt5Sql_INCLUDE_DIRS} ) + ++ set(MARBLEWIDGET marblewidget-qt5) + SET(CMAKE_AUTOMOC TRUE) + SET(CMAKE_AUTOMOC_RELAXED_MODE TRUE) + endif() +diff -up marble-14.12.1/src/apps/marble-kde/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/apps/marble-kde/CMakeLists.txt +--- marble-14.12.1/src/apps/marble-kde/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/apps/marble-kde/CMakeLists.txt 2015-02-21 10:50:58.024780816 -0600 +@@ -8,7 +8,7 @@ set(marblepart_SRCS marble_part.cpp) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../marble-ui ${KDE4_INCLUDES}) + kde4_add_kcfg_files(marblepart_SRCS settings.kcfgc) + kde4_add_plugin(marble_part WITH_PREFIX ${marblepart_SRCS}) +-target_link_libraries(marble_part ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF3_LIBS} marbleui marblewidget) ++target_link_libraries(marble_part ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF3_LIBS} marbleui ${MARBLEWIDGET}) + + install(TARGETS marble_part DESTINATION ${PLUGIN_INSTALL_DIR}) + install(FILES marble_part.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +@@ -27,7 +27,7 @@ target_link_libraries ( + ${KDE4_KPARTS_LIBS} + ${KDE4_KNEWSTUFF3_LIBS} + marbleui +- marblewidget ++ ${MARBLEWIDGET} + astro + ) + +diff -up marble-14.12.1/src/apps/marble-mobile/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/apps/marble-mobile/CMakeLists.txt +--- marble-14.12.1/src/apps/marble-mobile/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/apps/marble-mobile/CMakeLists.txt 2015-02-21 10:50:01.358692857 -0600 +@@ -25,7 +25,7 @@ add_definitions(-DMARBLE_MOBILE_VERSION_ + + marble_qt4_automoc( ${marblemobile_SRCS} ) + add_executable( marble-mobile ${marblemobile_SRCS} ) +-target_link_libraries( marble-mobile ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTMAIN_LIBRARY} marbleui marblewidget ) ++target_link_libraries( marble-mobile ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTMAIN_LIBRARY} marbleui ${MARBLEWIDGET}) + install( TARGETS marble-mobile RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) + if(APPS_INSTALL_DIR) + install(PROGRAMS marble-mobile.desktop DESTINATION ${APPS_INSTALL_DIR}) +diff -up marble-14.12.1/src/apps/marble-qt/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/apps/marble-qt/CMakeLists.txt +--- marble-14.12.1/src/apps/marble-qt/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/apps/marble-qt/CMakeLists.txt 2015-02-21 10:51:53.537866986 -0600 +@@ -40,7 +40,7 @@ if (QT4_FOUND) + ${QT_QTSCRIPT_LIBRARY} + ${QT_QTMAIN_LIBRARY} + marbleui +- marblewidget ++ ${MARBLEWIDGET} + astro) + else() + target_link_libraries ( +@@ -53,7 +53,7 @@ else() + ${Qt5WebKitWidgets_LIBRARIES} + ${Qt5WebKit_LIBRARIES} + marbleui +- marblewidget ++ ${MARBLEWIDGET} + astro) + endif() + +diff -up marble-14.12.1/src/apps/marble-touch/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/apps/marble-touch/CMakeLists.txt +--- marble-14.12.1/src/apps/marble-touch/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/apps/marble-touch/CMakeLists.txt 2015-02-21 10:50:25.654730570 -0600 +@@ -25,7 +25,7 @@ qt_add_resources(my_SRCS meego.qrc harma + marble_qt4_automoc( ${my_SRCS} ) + add_executable( marble-touch ${my_SRCS} ) + if (QT4_FOUND) +- target_link_libraries( marble-touch ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTMAIN_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} marblewidget ) ++ target_link_libraries( marble-touch ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTMAIN_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${MARBLEWIDGET} ) + else() + target_link_libraries ( + marble-touch +@@ -34,7 +34,7 @@ else() + ${Qt5Network_LIBRARIES} + ${Qt5WebKitWidgets_LIBRARIES} + ${Qt5WebKit_LIBRARIES} +- marblewidget) ++ ${MARBLEWIDGET}) + endif() + install( TARGETS marble-touch RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) + if(APPS_INSTALL_DIR) +diff -up marble-14.12.1/src/apps/marble-ui/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/apps/marble-ui/CMakeLists.txt +--- marble-14.12.1/src/apps/marble-ui/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/apps/marble-ui/CMakeLists.txt 2015-02-21 10:49:36.702654585 -0600 +@@ -27,7 +27,7 @@ target_link_libraries ( + ${QT_QTNETWORK_LIBRARY} + ${QT_QTSCRIPT_LIBRARY} + ${QT_QTMAIN_LIBRARY} +- marblewidget) ++ ${MARBLEWIDGET}) + else() + target_link_libraries ( + marbleui +@@ -38,7 +38,7 @@ target_link_libraries ( + ${Qt5Network_LIBRARIES} + ${Qt5WebKitWidgets_LIBRARIES} + ${Qt5WebKit_LIBRARIES} +- marblewidget) ++ ${MARBLEWIDGET}) + endif() + + if(WIN32) +diff -up marble-14.12.1/src/bindings/python/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/bindings/python/CMakeLists.txt +--- marble-14.12.1/src/bindings/python/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/bindings/python/CMakeLists.txt 2015-02-21 10:53:55.744056680 -0600 +@@ -17,7 +17,7 @@ FILE(GLOB extra_files_sip sip/*.sip) + set(SIP_EXTRA_FILES_DEPEND ${extra_files_sip}) + + add_sip_python_module(PyKDE4.marble sip/marblemod.sip +- marblewidget ++ ${MARBLEWIDGET} + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} + ${QT_QTUITOOLS_LIBRARY} +diff -up marble-14.12.1/src/lib/marble/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/lib/marble/CMakeLists.txt +--- marble-14.12.1/src/lib/marble/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/lib/marble/CMakeLists.txt 2015-02-21 10:47:35.872467027 -0600 +@@ -342,14 +342,14 @@ qt_add_resources(marblewidget_SRCS libma + qt_wrap_ui(marblewidget_SRCS ${marblewidget_UI}) + marble_qt4_automoc(${marblewidget_SRCS}) + +-ADD_LIBRARY(marblewidget SHARED ${marblewidget_SRCS} ${SOURCES_UI_HDRS}) ++ADD_LIBRARY(${MARBLEWIDGET} SHARED ${marblewidget_SRCS} ${SOURCES_UI_HDRS}) + + # link with libastro +-TARGET_LINK_LIBRARIES (marblewidget astro) ++TARGET_LINK_LIBRARIES (${MARBLEWIDGET} astro) + + # link with release version of Qt libs + if( QT4_FOUND ) +- TARGET_LINK_LIBRARIES (marblewidget ++ TARGET_LINK_LIBRARIES (${MARBLEWIDGET} + ${QT_QTCORE_LIBRARY} + ${QT_QTDBUS_LIBRARY} + ${QT_QTGUI_LIBRARY} +@@ -362,7 +362,7 @@ if( QT4_FOUND ) + ${QT_QTDECLARATIVE_LIBRARY} + ) + else() +- TARGET_LINK_LIBRARIES (marblewidget ++ TARGET_LINK_LIBRARIES (${MARBLEWIDGET} + ${Qt5Core_LIBRARIES} + ${Qt5Xml_LIBRARIES} + ${Qt5Widgets_LIBRARIES} +@@ -376,46 +376,46 @@ endif() + + if( PHONON_FOUND AND NOT QT5BUILD ) + INCLUDE_DIRECTORIES( ${PHONON_INCLUDES} ) +- TARGET_LINK_LIBRARIES(marblewidget ${PHONON_LIBS} ) ++ TARGET_LINK_LIBRARIES(${MARBLEWIDGET} ${PHONON_LIBS} ) + set (HAVE_PHONON TRUE) + endif( PHONON_FOUND AND NOT QT5BUILD ) + + if (APPLE) + #defined in top level makefile +- TARGET_LINK_LIBRARIES(marblewidget ${MAC_EXTRA_LIBS} ) ++ TARGET_LINK_LIBRARIES(${MARBLEWIDGET} ${MAC_EXTRA_LIBS} ) + endif (APPLE) + + if (CMAKE_SYSTEM_NAME MATCHES "SunOS") +- TARGET_LINK_LIBRARIES(marblewidget m) ++ TARGET_LINK_LIBRARIES(${MARBLEWIDGET} m) + endif (CMAKE_SYSTEM_NAME MATCHES "SunOS") + + if(WIN32) +- TARGET_LINK_LIBRARIES(marblewidget ws2_32 imm32 winmm) ++ TARGET_LINK_LIBRARIES(${MARBLEWIDGET} ws2_32 imm32 winmm) + endif(WIN32) + + +-set_target_properties(marblewidget PROPERTIES ++set_target_properties(${MARBLEWIDGET} PROPERTIES + VERSION ${GENERIC_LIB_VERSION} + SOVERSION ${GENERIC_LIB_SOVERSION} + COMPILE_FLAGS "-DKML_LAZY_IMP") + # needed for marble_export.h +-set_target_properties(marblewidget PROPERTIES ++set_target_properties(${MARBLEWIDGET} PROPERTIES + DEFINE_SYMBOL MAKE_MARBLE_LIB + ) + + # choose the correct target install library path + if(WIN32 AND QTONLY) +- install(TARGETS marblewidget RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) ++ install(TARGETS ${MARBLEWIDGET} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) + else(WIN32 AND QTONLY) + if(APPLE AND QTONLY) +- install (TARGETS marblewidget LIBRARY DESTINATION ++ install (TARGETS ${MARBLEWIDGET} LIBRARY DESTINATION + ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) + + else(APPLE AND QTONLY) + if(QTONLY) +- install(TARGETS marblewidget LIBRARY DESTINATION ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}) ++ install(TARGETS ${MARBLEWIDGET} LIBRARY DESTINATION ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + else(QTONLY) +- install(TARGETS marblewidget ${INSTALL_TARGETS_DEFAULT_ARGS}) ++ install(TARGETS ${MARBLEWIDGET} ${INSTALL_TARGETS_DEFAULT_ARGS}) + endif(QTONLY) + endif(APPLE AND QTONLY) + endif(WIN32 AND QTONLY) +diff -up marble-14.12.1/src/plasmarunner/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/plasmarunner/CMakeLists.txt +--- marble-14.12.1/src/plasmarunner/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/plasmarunner/CMakeLists.txt 2015-02-21 10:52:33.529929064 -0600 +@@ -12,7 +12,7 @@ set(plasmaRunner_SRCS + kde4_add_plugin(plasma_runner_marble ${plasmaRunner_SRCS}) + target_link_libraries(plasma_runner_marble + ${KDE4_PLASMA_LIBS} +- marblewidget ++ ${MARBLEWIDGET} + ) + + install(TARGETS plasma_runner_marble DESTINATION ${PLUGIN_INSTALL_DIR}) +diff -up marble-14.12.1/src/plasmoid/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/plasmoid/CMakeLists.txt +--- marble-14.12.1/src/plasmoid/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/plasmoid/CMakeLists.txt 2015-02-21 10:52:18.762906142 -0600 +@@ -20,7 +20,7 @@ kde4_add_ui_files( worldclock_SRCS world + kde4_add_plugin(plasma_applet_worldclock ${worldclock_SRCS}) + target_link_libraries(plasma_applet_worldclock + ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} +- marblewidget ) ++ ${MARBLEWIDGET} ) + + install(TARGETS plasma_applet_worldclock + DESTINATION ${PLUGIN_INSTALL_DIR}) +diff -up marble-14.12.1/src/plugins/designer/latloneditwidget/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/plugins/designer/latloneditwidget/CMakeLists.txt +--- marble-14.12.1/src/plugins/designer/latloneditwidget/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/plugins/designer/latloneditwidget/CMakeLists.txt 2015-02-21 10:53:28.549014466 -0600 +@@ -12,7 +12,7 @@ ELSE() + INCLUDE_DIRECTORIES(${Qt5Designer_INCLUDE_DIRS}) + ENDIF() + +-#target_link_libraries( marblewidget ) ++#target_link_libraries( ${MARBLEWIDGET} ) + + set( latloneditplugin_SRCS LatLonEditPlugin.cpp ) + +diff -up marble-14.12.1/src/plugins/designer/marblewidget/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/plugins/designer/marblewidget/CMakeLists.txt +diff -up marble-14.12.1/src/plugins/runner/gpx/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/plugins/runner/gpx/CMakeLists.txt +--- marble-14.12.1/src/plugins/runner/gpx/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/plugins/runner/gpx/CMakeLists.txt 2015-02-21 10:44:50.278209985 -0600 +@@ -72,7 +72,7 @@ if( BUILD_MARBLE_TESTS ) + ${QT_QTGUI_LIBRARY} + ${QT_QTTEST_LIBRARY} + ${Qt5Test_LIBRARIES} +- marblewidget ) ++ ${MARBLEWIDGET} ) + set_target_properties( TestTrack PROPERTIES + COMPILE_FLAGS "-DDATA_PATH=\"\\\"${DATA_PATH}\\\"\" -DPLUGIN_PATH=\"\\\"${PLUGIN_PATH}\\\"\"" ) + add_test( TestTrack TestTrack ) +diff -up marble-14.12.1/src/thumbnailer/CMakeLists.txt.marblewidget_soname marble-14.12.1/src/thumbnailer/CMakeLists.txt +--- marble-14.12.1/src/thumbnailer/CMakeLists.txt.marblewidget_soname 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/thumbnailer/CMakeLists.txt 2015-02-21 10:54:17.048089749 -0600 +@@ -10,7 +10,7 @@ set(marblethumbnail_SRCS + ) + kde4_add_plugin(marblethumbnail ${marblethumbnail_SRCS}) + target_link_libraries(marblethumbnail +- marblewidget ++ ${MARBLEWIDGET} + ${KDE4_KIO_LIBS} + ) + install(TARGETS marblethumbnail DESTINATION ${PLUGIN_INSTALL_DIR}) diff --git a/marble-14.12.1-opencachingcom_Qt5WebKitWidgets.patch b/marble-14.12.1-opencachingcom_Qt5WebKitWidgets.patch new file mode 100644 index 0000000..8c0f58f --- /dev/null +++ b/marble-14.12.1-opencachingcom_Qt5WebKitWidgets.patch @@ -0,0 +1,12 @@ +diff -up marble-14.12.1/src/plugins/render/opencachingcom/CMakeLists.txt.qtwebkit marble-14.12.1/src/plugins/render/opencachingcom/CMakeLists.txt +--- marble-14.12.1/src/plugins/render/opencachingcom/CMakeLists.txt.qtwebkit 2015-01-01 11:29:24.000000000 -0600 ++++ marble-14.12.1/src/plugins/render/opencachingcom/CMakeLists.txt 2015-02-21 12:04:46.509980061 -0600 +@@ -6,6 +6,8 @@ INCLUDE_DIRECTORIES( + ) + if( QT4_FOUND ) + INCLUDE(${QT_USE_FILE}) ++else() ++ INCLUDE_DIRECTORIES(${Qt5WebKitWidgets_INCLUDE_DIRS}) + endif() + + SET( my_SRCS diff --git a/marble.spec b/marble.spec index aa63c47..40cb0c0 100644 --- a/marble.spec +++ b/marble.spec @@ -3,12 +3,14 @@ #global python 1 ## enable designer plugin %global designer 1 +## libmarblewidget-qt5 build (for subsurface) +%global qt5 1 Name: marble Summary: Virtual globe and world atlas Epoch: 1 Version: 14.12.1 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ #URL: https://projects.kde.org/projects/kde/kdeedu/marble @@ -31,6 +33,10 @@ Patch0: marble-4.11.90-qextserialport.patch #qrc:/main.qml:13:1: Type MarbleWindow unavailable #qrc:/MarbleWindow.qml:11:1: module "com.nokia.meego" is not installed Patch50: marble-4.12.0-app_versions.patch +# support parallel-installable qt4/qt5 libmarblewidget +Patch51: marble-14.12.1-marblewidget.patch +# fix FTBFS with Qt5 +Patch52: marble-14.12.1-opencachingcom_Qt5WebKitWidgets.patch ## upstream patches @@ -47,6 +53,20 @@ BuildRequires: pykde4-devel >= 4.14 BuildRequires: qextserialport-devel BuildRequires: quazip-devel BuildRequires: shapelib-devel +%if 0%{?qt5} +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Xml) +BuildRequires: pkgconfig(Qt5Network) +BuildRequires: pkgconfig(Qt5Test) +BuildRequires: pkgconfig(Qt5Script) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5Quick) +BuildRequires: pkgconfig(Qt5WebKitWidgets) +BuildRequires: pkgconfig(Qt5Svg) +BuildRequires: pkgconfig(Qt5Sql) +BuildRequires: pkgconfig(Qt5Concurrent) +BuildRequires: pkgconfig(Qt5PrintSupport) +%endif # TODO: The following are not packaged in Fedora: # * liblocation , position information on Maemo 5 devices , # position information via GPS/WLAN for the Nokia N900 smartphone @@ -116,18 +136,19 @@ BuildArch: noarch %package libs Summary: Runtime files for %{name} -Requires: %{name}-common = %{epoch}:%{version}-%{release} +Requires: %{name}-astro%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-widget%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: kdeedu-marble-libs < 4.7.0-10 Provides: kdeedu-marble-libs = %{version}-%{release} %description libs %{summary}. %package devel -Summary: Development files for %{name} +Summary: Development files for %{name} +Requires: %{name}-astro%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-widget%{?_isa} = %{epoch}:%{version}-%{release} # when split occurred Conflicts: kdeedu-devel < 4.7.0-10 -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} -Requires: kdelibs4-devel %description devel %{summary}. @@ -139,15 +160,76 @@ Requires: pykde4 %description -n python-marble %{summary}. +%package astro +Summary: Marble Astro Library +Requires: %{name}-common = %{epoch}:%{version}-%{release} +%description astro +%{summary}. + +%package astro-devel +Summary: Development files for Marble Astro Library +Requires: %{name}-astro%{?_isa} = %{epoch}:%{version}-%{release} +%description astro-devel +%{summary}. + +%package widget +Summary: Marble Widget Library +Requires: %{name}-widget-data = %{epoch}:%{version}-%{release} +%description widget +%{summary}. + +%package widget-data +Summary: Marble Widget data +Requires: %{name}-common = %{epoch}:%{version}-%{release} +BuildArch: noarch +%description widget-data +%{summary}. + +%package widget-devel +Summary: Development files for Marble Widget +Requires: %{name}-widget%{?_isa} = %{epoch}:%{version}-%{release} +%description widget-devel +%{summary}. + +%package widget-qt5 +Summary: Marble Widget Library +Requires: %{name}-widget-data = %{epoch}:%{version}-%{release} +%description widget-qt5 +%{summary}. + +%package widget-qt5-devel +Summary: Development files for Qt5 Marble Widget +Requires: %{name}-widget-qt5%{?_isa} = %{epoch}:%{version}-%{release} +%description widget-qt5-devel +%{summary}. + %prep %setup -q %patch0 -p1 -b .qextserialport %patch50 -p1 -b .app_versions +%patch51 -p1 -b .marblewidget +%patch52 -p1 -b .opencachingcom_Qt5WebKitWidgets %build +%if 0%{?qt5} +mkdir %{_target_platform}-qt5 +pushd %{_target_platform}-qt5 +%{cmake} .. \ + -DBUILD_MARBLE_APPS=OFF \ + -DBUILD_MARBLE_TESTS=OFF \ + -DBUILD_TESTING=OFF \ + -DBUILD_WITH_DBUS=OFF \ + -DMOBILE=OFF \ + -DQTONLY=ON -DQT5BUILD=ON \ + -DWITH_DESIGNER_PLUGIN=OFF + +make %{?_smp_mflags} +popd +%endif + mkdir %{_target_platform} pushd %{_target_platform} %{cmake_kde4} .. \ @@ -159,10 +241,32 @@ make %{?_smp_mflags} -C %{_target_platform} %install +%if 0%{?qt5} +make install/fast DESTDIR=%{buildroot} -C %{_target_platform}-qt5 +%endif + make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %find_lang %{name} --with-kde --without-mo +%if 0%{?qt5} +# hardlink common/shared data +cp -alf %{buildroot}%{_kde4_appsdir}/marble/data/* \ + %{buildroot}%{_datadir}/marble/data/ + +# munge FindMarble.cmake (FIXME: make upstreamable patch to do the same) +mv %{buildroot}%{_datadir}/marble/cmake/FindMarble.cmake \ + %{buildroot}%{_datadir}/marble/cmake/FindMarbleQt5.cmake +sed -i -e "s|marblewidget |marblewidget-qt5 |g" \ + %{buildroot}%{_datadir}/marble/cmake/FindMarbleQt5.cmake + +## unpackaged files +rm -fv %{buildroot}%{_datadir}/applications/marble_{gpx,kml,kmz,osm,shp}.desktop +# unpackaged for now, cause runtime crashes (at least when used with subsurface) +# looks like at least missing linkage and undefined symbols -- rex +rm -frv %{buildroot}%{_libdir}/marble/plugins/ +%endif + %check desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/marble.desktop @@ -183,6 +287,9 @@ update-desktop-database -q &> /dev/null ||: %files -f %{name}.lang %{_kde4_bindir}/marble +%{_kde4_appsdir}/marble/marble.knsrc +%{_kde4_appsdir}/marble/marble_part.rc +%{_kde4_appsdir}/marble/marbleui.rc %{_kde4_datadir}/appdata/marble.appdata.xml %{_kde4_datadir}/applications/kde4/marble.desktop %{_kde4_datadir}/applications/kde4/marble_geo.desktop @@ -232,9 +339,10 @@ fi %files common %doc LICENSE.txt %doc CREDITS MANIFESTO.txt TODO USECASES -%{_kde4_appsdir}/marble/ %{_kde4_iconsdir}/hicolor/*/*/marble.* %{_kde4_datadir}/mime/packages/geo.xml +%dir %{_kde4_appsdir}/marble/ +%dir %{_datadir}/marble/ %files mobile %{_kde4_bindir}/marble-mobile @@ -250,25 +358,40 @@ fi %{_kde4_datadir}/applications/kde4/marble-touch.desktop %endif -%post libs -p /sbin/ldconfig -%postun libs -p /sbin/ldconfig - %files libs -%{_kde4_libdir}/libastro.so.1* -%{_kde4_libdir}/libastro.so.0.17.* -%{_kde4_libdir}/libmarblewidget.so.20 -%{_kde4_libdir}/libmarblewidget.so.0.19.* -%{_kde4_libdir}/kde4/plugins/marble/ %if 0%{?designer} %{_kde4_libdir}/kde4/plugins/designer/*.so %endif %files devel %doc docs/* -%{_kde4_appsdir}/cmake/modules/FindMarble.cmake + +%post astro -p /sbin/ldconfig +%postun astro -p /sbin/ldconfig + +%files astro +%{_kde4_libdir}/libastro.so.1* +%{_kde4_libdir}/libastro.so.0.17.* + +%files astro-devel %{_includedir}/astro/ -%{_includedir}/marble/ %{_kde4_libdir}/libastro.so + +%post widget -p /sbin/ldconfig +%postun widget -p /sbin/ldconfig + +%files widget +%{_kde4_libdir}/libmarblewidget.so.20 +%{_kde4_libdir}/libmarblewidget.so.0.19.* +%{_kde4_libdir}/kde4/plugins/marble/ + +%files widget-data +%{_kde4_appsdir}/marble/data/ +%{_datadir}/marble/data/ + +%files widget-devel +%{_kde4_appsdir}/cmake/modules/FindMarble.cmake +%{_includedir}/marble/ %{_kde4_libdir}/libmarblewidget.so %if 0%{?python} @@ -276,8 +399,24 @@ fi %{python_sitearch}/PyKDE4/marble.so %endif +%if 0%{?qt5} +%files widget-qt5 +%{_libdir}/libmarblewidget-qt5.so.20 +%{_libdir}/libmarblewidget-qt5.so.0.19.* +#{_libdir}/marble/plugins/ + +%files widget-qt5-devel +%{_includedir}/marble/ +%{_libdir}/libmarblewidget-qt5.so +%dir %{_datadir}/marble/cmake/ +%{_datadir}/marble/cmake/FindMarbleQt5.cmake +%endif + %changelog +* Mon Feb 23 2015 Rex Dieter - 1:14.12.1-2 +- new -astro(-devel), -widget(-data,-devel), -widget-qt5(-devel) subpkgs + * Fri Jan 16 2015 Rex Dieter - 1:14.12.1-1 - 14.12.1