diff --git a/kde-base/kstars/kstars-2.9.4.recipe b/kde-base/kstars/kstars-2.9.5.recipe similarity index 96% rename from kde-base/kstars/kstars-2.9.4.recipe rename to kde-base/kstars/kstars-2.9.5.recipe index e72b427c1..e76fcbf98 100644 --- a/kde-base/kstars/kstars-2.9.4.recipe +++ b/kde-base/kstars/kstars-2.9.5.recipe @@ -8,14 +8,14 @@ For students and teachers, it supports adjustable simulation speeds in order to phenomena that happen over long timescales, the KStars Astrocalculator to predict \ conjunctions, and many common astronomical calculations." HOMEPAGE="https://edu.kde.org/kstars" -COPYRIGHT="2010-2017 KDE Organisation" +COPYRIGHT="2010-2018 KDE Organisation" LICENSE="GNU LGPL v2" REVISION="1" SOURCE_URI="https://github.com/KDE/kstars/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="693358877d58e8eaa347841b442059edd5f49e5c91aac8b087b8abe946a5b258" +CHECKSUM_SHA256="1885ded911bfd3c56df3d551b903b7d1435a4760be5fceee0eefbf9405330f59" PATCHES="kstars-$portVersion.patchset" ADDITIONAL_FILES="kstars.rdef.in" - + ARCHITECTURES="?x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86" @@ -124,6 +124,7 @@ BUILD_REQUIRES=" BUILD_PREREQUIRES=" cmd:cmake cmd:g++$secondaryArchSuffix + cmd:pkg_config$secondaryArchSuffix cmd:make cmd:python2 " @@ -134,6 +135,7 @@ BUILD() cd build cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$appsDir/KStars \ -DCMAKE_INSTALL_DATAROOTDIR=$dataDir \ -DSHARE_INSTALL_PREFIX=$dataDir \ @@ -144,7 +146,7 @@ BUILD() INSTALL() { cd build - make install + make install/strip mv $appsDir/KStars/bin/kstars $appsDir/KStars/KStars rm -rf $appsDir/KStars/bin \ diff --git a/kde-base/kstars/patches/kstars-2.9.4.patchset b/kde-base/kstars/patches/kstars-2.9.5.patchset similarity index 60% rename from kde-base/kstars/patches/kstars-2.9.4.patchset rename to kde-base/kstars/patches/kstars-2.9.5.patchset index acfd29cf7..40e91dfdd 100644 --- a/kde-base/kstars/patches/kstars-2.9.4.patchset +++ b/kde-base/kstars/patches/kstars-2.9.5.patchset @@ -1,29 +1,34 @@ -From 6e22b19ec334ed332da4809fc8ee9b164f47d4af Mon Sep 17 00:00:00 2001 +From 46929274bb54d893e3642feca39b0fe8561957d4 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Mon, 20 Nov 2017 22:44:37 +1000 +Date: Wed, 9 May 2018 20:50:37 +1000 Subject: Fix build for Haiku diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7349373..c5d9066 100644 +index 096c597..019caee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -247,6 +247,14 @@ if (UNIX) +@@ -247,6 +247,19 @@ if (UNIX) endif(UNIX) # Add security (hardening flags) +IF (HAIKU) -+ SET(SEC_COMP_FLAGS "-D_FORTIFY_SOURCE=2 -Wcast-align -fPIE -Wa,--noexecstack") -+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SEC_COMP_FLAGS}") -+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEC_COMP_FLAGS}") -+ SET(SEC_LINK_FLAGS "-Wl,-z,nodump -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -pie") -+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SEC_LINK_FLAGS}") -+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SEC_LINK_FLAGS}") ++ SET(SEC_COMP_FLAGS "-D_FORTIFY_SOURCE=2 -Wcast-align -Wa,--noexecstack") ++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SEC_COMP_FLAGS}") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEC_COMP_FLAGS}") ++ SET(SEC_LINK_FLAGS "-Wl,-z,nodump -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now") ++ IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") ++ MESSAGE("++ 64 bit architecture") ++ SET(SEC_LINK_FLAGS "${SEC_LINK_FLAGS} -pie") ++ SET(SEC_COMP_FLAGS "${SEC_COMP_FLAGS} -fPIE") ++ ENDIF() ++ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SEC_LINK_FLAGS}") ++ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SEC_LINK_FLAGS}") +ELSE () IF (UNIX OR APPLE OR ANDROID) SET(SEC_COMP_FLAGS "-D_FORTIFY_SOURCE=2 -fstack-protector-all -Wcast-align -fPIE") IF (NOT ANDROID AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT APPLE) -@@ -264,6 +272,7 @@ IF (UNIX OR APPLE OR ANDROID) +@@ -264,6 +277,7 @@ IF (UNIX OR APPLE OR ANDROID) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SEC_LINK_FLAGS}") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SEC_LINK_FLAGS}") ENDIF () @@ -31,26 +36,16 @@ index 7349373..c5d9066 100644 # Clang Format support IF (UNIX OR APPLE) -@@ -374,7 +383,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kstars/version.h.cmake +@@ -374,7 +388,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kstars/version.h.cmake # let our config.h be found first in any case include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +IF (NOT HAIKU) add_subdirectory(doc) -+ENDIF() ++ENDIF () add_subdirectory(kstars) add_subdirectory(datahandlers) -@@ -387,7 +398,9 @@ IF (NOT ANDROID) - ki18n_install("${CMAKE_CURRENT_BINARY_DIR}/po") - ENDIF () - -+IF (NOT HAIKU) - install(FILES org.kde.kstars.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) -+ENDIF() - - feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) - diff --git a/kstars/htmesh/SkipListElement.h b/kstars/htmesh/SkipListElement.h index f8187e4..a14cd7d 100644 --- a/kstars/htmesh/SkipListElement.h @@ -81,22 +76,89 @@ index 450119e..4c822d0 100644 2.16.2 -From deab5c36302e44b24a95ecdeca7d362070d89e97 Mon Sep 17 00:00:00 2001 +From 3f9a1566406f46e614fe80a4143d52ae321b5b6f Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 22 Apr 2018 23:12:55 +1000 -Subject: Fix crash on start +Date: Wed, 9 May 2018 20:51:23 +1000 +Subject: Native Haiku style for Default theme + + +diff --git a/kstars/auxiliary/thememanager.cpp b/kstars/auxiliary/thememanager.cpp +index 4520c6b..9a2b788 100644 +--- a/kstars/auxiliary/thememanager.cpp ++++ b/kstars/auxiliary/thememanager.cpp +@@ -158,9 +158,11 @@ void Manager::slotChangePalette() + + if (theme == "Macintosh" || theme == "White Balance" || theme == "High Key" || (theme == "Default" && currentDesktopdefaultTheme().contains("Dark") == false)) + themeIconType = BREEZE_THEME; +- ++#if defined(Q_OS_HAIKU) ++ if (theme == "Default") ++ themeIconType = SYSTEM_THEME; + setIconTheme(themeIconType); +- ++#endif + QString filename = d->themeMap.value(theme); + KSharedConfigPtr config = KSharedConfig::openConfig(filename); + // hint for the style to synchronize the color scheme with the window manager/compositor +@@ -182,6 +184,10 @@ void Manager::slotChangePalette() + + if(theme == "Macintosh") + qApp->setStyle(QStyleFactory::create("macintosh")); ++#if defined(Q_OS_HAIKU) ++ else if(theme == "Default") ++ qApp->setStyle(QStyleFactory::create("haiku")); ++#endif + else + qApp->setStyle(QStyleFactory::create("Fusion")); + +@@ -407,6 +413,12 @@ void Manager::setIconTheme(IconTheme theme) + themeSearchPaths = themeSearchPaths << QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory); + QString resourcePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory) + QDir::separator() + iconTheme + QDir::separator() + rccFile; + QResource::registerResource(resourcePath, "/icons/" + iconTheme); ++ #elif defined(Q_OS_HAIKU) ++ if (theme == SYSTEM_THEME) ++ iconTheme = "haiku"; ++ themeSearchPaths = themeSearchPaths << QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory); ++ QString resourcePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory) + QDir::separator() + iconTheme + QDir::separator() + rccFile; ++ QResource::registerResource(resourcePath, "/icons/" + iconTheme); + #else + //TODO On Linux on non-KDE Distros, find out if the themes are installed or not and perhaps warn the user + #endif +diff --git a/kstars/auxiliary/thememanager.h b/kstars/auxiliary/thememanager.h +index 0b08063..57904c1 100644 +--- a/kstars/auxiliary/thememanager.h ++++ b/kstars/auxiliary/thememanager.h +@@ -48,7 +48,7 @@ class Manager : public QObject + + public: + +- typedef enum { BREEZE_THEME, BREEZE_DARK_THEME } IconTheme; ++ typedef enum { BREEZE_THEME, BREEZE_DARK_THEME, SYSTEM_THEME } IconTheme; + + ~Manager(); + static Manager* instance(); +-- +2.16.2 + + +From 8cda7d619e4cc0c4bcbb7c7aa71ee3bc70abc82b Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 10 May 2018 20:24:54 +1000 +Subject: Fix strange bug in Haiku x64 diff --git a/datahandlers/catalogdb.cpp b/datahandlers/catalogdb.cpp -index 81c09cc..0b01238 100644 +index 81c09cc..18bf328 100644 --- a/datahandlers/catalogdb.cpp +++ b/datahandlers/catalogdb.cpp -@@ -848,6 +848,9 @@ void CatalogDB::GetAllObjects(const QString &catalog, QList &sky_li +@@ -848,6 +848,11 @@ void CatalogDB::GetAllObjects(const QString &catalog, QList &sky_li // qWarning() << get_query.lastError(); // qWarning() << FindCatalog(catalog); ++#if defined(__x86_64__) && defined(__HAIKU__) + if (FindCatalog(catalog) < 0) + return; ++#endif + if (!get_query.exec()) { @@ -104,64 +166,3 @@ index 81c09cc..0b01238 100644 -- 2.16.2 - -From 51649630e61e13f03ff621d3469ea6710e654e2b Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 22 Apr 2018 23:14:03 +1000 -Subject: Native Haiku style by default - - -diff --git a/kstars/auxiliary/thememanager.cpp b/kstars/auxiliary/thememanager.cpp -index ed9da21..8c5d8ed 100644 ---- a/kstars/auxiliary/thememanager.cpp -+++ b/kstars/auxiliary/thememanager.cpp -@@ -155,7 +155,10 @@ void ThemeManager::slotChangePalette() - - if (theme == "Macintosh" || theme == "White Balance" || theme == "High Key" || (theme == "Default" && currentDesktopdefaultTheme().contains("Dark") == false)) - themeIconType = BREEZE_THEME; -- -+ -+ if (theme == "Default") -+ themeIconType = SYSTEM_THEME; -+ - setIconTheme(themeIconType); - - QString filename = d->themeMap.value(theme); -@@ -179,6 +182,8 @@ void ThemeManager::slotChangePalette() - - if(theme == "Macintosh") - qApp->setStyle(QStyleFactory::create("macintosh")); -+ else if(theme == "Default") -+ qApp->setStyle(QStyleFactory::create("haiku")); - else - qApp->setStyle(QStyleFactory::create("Fusion")); - -@@ -404,6 +409,12 @@ void ThemeManager::setIconTheme(IconTheme theme) - themeSearchPaths = themeSearchPaths << QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory); - QString resourcePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory) + QDir::separator() + iconTheme + QDir::separator() + rccFile; - QResource::registerResource(resourcePath, "/icons/" + iconTheme); -+ #elif defined(Q_OS_HAIKU) -+ if (theme == SYSTEM_THEME) -+ iconTheme = "haiku"; -+ themeSearchPaths = themeSearchPaths << QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory); -+ QString resourcePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory) + QDir::separator() + iconTheme + QDir::separator() + rccFile; -+ QResource::registerResource(resourcePath, "/icons/" + iconTheme); - #else - //TODO On Linux on non-KDE Distros, find out if the themes are installed or not and perhaps warn the user - #endif -diff --git a/kstars/auxiliary/thememanager.h b/kstars/auxiliary/thememanager.h -index 1eac5ad..2d4e909 100644 ---- a/kstars/auxiliary/thememanager.h -+++ b/kstars/auxiliary/thememanager.h -@@ -48,7 +48,7 @@ class ThemeManager : public QObject - - public: - -- typedef enum { BREEZE_THEME, BREEZE_DARK_THEME } IconTheme; -+ typedef enum { BREEZE_THEME, BREEZE_DARK_THEME, SYSTEM_THEME } IconTheme; - - ~ThemeManager(); - static ThemeManager* instance(); --- -2.16.2 -