diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-19 14:39:08 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-19 14:39:08 +0100 |
commit | fc7e841956ae3cc385629bf33433de23a6d04db6 (patch) | |
tree | 48882d11ff725a7df862343487d339fdaae1c604 /sci-astronomy/stellarium/files/stellarium-0.22.2-unbundle-qtcompress.patch | |
parent | dbb637a643576bbb9286907cd6c73e3cda3ca1f6 (diff) |
gentoo auto-resync : 19:07:2022 - 14:39:08
Diffstat (limited to 'sci-astronomy/stellarium/files/stellarium-0.22.2-unbundle-qtcompress.patch')
-rw-r--r-- | sci-astronomy/stellarium/files/stellarium-0.22.2-unbundle-qtcompress.patch | 208 |
1 files changed, 208 insertions, 0 deletions
diff --git a/sci-astronomy/stellarium/files/stellarium-0.22.2-unbundle-qtcompress.patch b/sci-astronomy/stellarium/files/stellarium-0.22.2-unbundle-qtcompress.patch new file mode 100644 index 000000000000..47643b797992 --- /dev/null +++ b/sci-astronomy/stellarium/files/stellarium-0.22.2-unbundle-qtcompress.patch @@ -0,0 +1,208 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -614,6 +614,8 @@ ELSE(ENABLE_GPS) + MESSAGE(STATUS "GPS: disabled.") + ENDIF(ENABLE_GPS) + ++find_package(Qt5Compress REQUIRED) ++ + IF(USE_QTOPENGL) + # QtOpenGL module is deprecated. After merging the QOpenGLWidget branch, we don't use this module directly anymore, + # but the QtMultimediaWidgets module requires it internally, so we still have to package it. +--- a/plugins/Satellites/src/CMakeLists.txt ++++ b/plugins/Satellites/src/CMakeLists.txt +@@ -55,7 +55,7 @@ IF(ENABLE_TESTING) + ENDIF(ENABLE_TESTING) + + ADD_LIBRARY(Satellites-static STATIC ${Satellites_SRCS} ${Satellites_RES_CXX} ${SatellitesDialog_UIS_H}) +-TARGET_LINK_LIBRARIES(Satellites-static Qt5::Core Qt5::Network Qt5::Widgets) ++TARGET_LINK_LIBRARIES(Satellites-static Qt5::Core Qt5::Network Qt5::Widgets Qt5::Compress) + # The library target "Satellites-static" has a default OUTPUT_NAME of "Satellites-static", so change it. + SET_TARGET_PROPERTIES(Satellites-static PROPERTIES OUTPUT_NAME "Satellites") + IF(MSVC) +--- a/plugins/Satellites/src/Satellites.cpp ++++ b/plugins/Satellites/src/Satellites.cpp +@@ -43,7 +43,7 @@ + #include "StelUtils.hpp" + #include "StelActionMgr.hpp" + +-#include "external/qtcompress/qzipreader.h" ++#include "qzipreader.h" + + #include <QNetworkAccessManager> + #include <QNetworkReply> +@@ -1639,12 +1639,12 @@ void Satellites::saveDownloadedUpdate(QNetworkReply* reply) + QString archive = zip.fileName(); + QByteArray data; + +- Stel::QZipReader reader(archive); +- if (reader.status() != Stel::QZipReader::NoError) ++ QZipReader reader(archive); ++ if (reader.status() != QZipReader::NoError) + qWarning() << "[Satellites] Unable to open as a ZIP archive"; + else + { +- QList<Stel::QZipReader::FileInfo> infoList = reader.fileInfoList(); ++ QList<QZipReader::FileInfo> infoList = reader.fileInfoList(); + for (const auto& info : qAsConst(infoList)) + { + // qWarning() << "[Satellites] Processing:" << info.filePath; +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -479,7 +479,7 @@ IF(ENABLE_SPOUT AND SPOUT_LIBRARY_DLL) + CONFIGURE_FILE(${SPOUT_LIBRARY_DLL} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) + ENDIF() + +-SET(STELMAIN_DEPS ${ZLIB_LIBRARIES} qtcompress_stel glues_stel qxlsx_stel ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} ${STELLARIUM_QT_LIBRARIES} ${SPOUT_LIBRARY}) ++SET(STELMAIN_DEPS ${ZLIB_LIBRARIES} Qt5::Compress glues_stel qxlsx_stel ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} ${STELLARIUM_QT_LIBRARIES} ${SPOUT_LIBRARY}) + IF(ENABLE_LIBGPS) + SET(STELMAIN_DEPS ${STELMAIN_DEPS} ${GPS_LIBRARY}) + ENDIF() +--- a/src/core/modules/LandscapeMgr.cpp ++++ b/src/core/modules/LandscapeMgr.cpp +@@ -1331,8 +1331,8 @@ QString LandscapeMgr::installLandscapeFromArchive(QString sourceFilePath, const + } + QDir destinationDir (parentDestinationDir.absoluteFilePath("landscapes")); + +- Stel::QZipReader reader(sourceFilePath); +- if (reader.status() != Stel::QZipReader::NoError) ++ QZipReader reader(sourceFilePath); ++ if (reader.status() != QZipReader::NoError) + { + qWarning() << "LandscapeMgr: Unable to open as a ZIP archive:" << QDir::toNativeSeparators(sourceFilePath); + emit errorNotArchive(); +@@ -1341,7 +1341,7 @@ QString LandscapeMgr::installLandscapeFromArchive(QString sourceFilePath, const + + //Detect top directory + QString topDir, iniPath; +- const QList<Stel::QZipReader::FileInfo> infoList = reader.fileInfoList(); ++ const QList<QZipReader::FileInfo> infoList = reader.fileInfoList(); + for (const auto& info : infoList) + { + QFileInfo fileInfo(info.filePath); +--- a/src/external/CMakeLists.txt ++++ b/src/external/CMakeLists.txt +@@ -70,6 +70,7 @@ target_include_directories(zlib_stel PUBLIC zlib) + set_target_properties(zlib_stel PROPERTIES AUTOMOC 0)
+ SET_TARGET_PROPERTIES(zlib_stel PROPERTIES FOLDER "src/external")
+
++if(0)
+ set(qtcompress_SRCS
+ qtcompress/qzip.cpp
+ qtcompress/qzipreader.h
+@@ -82,6 +83,7 @@ target_link_libraries(qtcompress_stel ${ZLIB_LIBRARIES} Qt5::Core) + #turn off automoc, not needed here
+ set_target_properties(qtcompress_stel PROPERTIES AUTOMOC 0)
+ SET_TARGET_PROPERTIES(qtcompress_stel PROPERTIES FOLDER "src/external")
++endif()
+
+ # QCustomPlot should not be unbundled, because upstream uses GPL 3, and
+ # Stellarium uses GPL 2. Author of QCustomPlot has agreed for GPL 2+ for this.
+@@ -180,7 +182,7 @@ SET(qxlsx_SRCS + qxlsx/xlsxcelllocation.h
+ )
+ add_library(qxlsx_stel STATIC EXCLUDE_FROM_ALL ${qxlsx_SRCS})
+-target_link_libraries(qxlsx_stel Qt5::Core Qt5::Gui qtcompress_stel)
++target_link_libraries(qxlsx_stel Qt5::Core Qt5::Gui Qt5::Compress)
+ set_target_properties(qxlsx_stel PROPERTIES FOLDER "src/external")
+
+ ################################# INDI ################################
+--- a/src/external/qxlsx/xlsxzipreader.cpp ++++ b/src/external/qxlsx/xlsxzipreader.cpp +@@ -5,13 +5,13 @@ + QT_BEGIN_NAMESPACE_XLSX + + ZipReader::ZipReader(const QString &filePath) : +- m_reader(new Stel::QZipReader(filePath)) ++ m_reader(new QZipReader(filePath)) + { + init(); + } + + ZipReader::ZipReader(QIODevice *device) : +- m_reader(new Stel::QZipReader(device)) ++ m_reader(new QZipReader(device)) + { + init(); + } +@@ -23,8 +23,8 @@ ZipReader::~ZipReader() + + void ZipReader::init() + { +- QList<Stel::QZipReader::FileInfo> allFiles = m_reader->fileInfoList(); +- for (const Stel::QZipReader::FileInfo &fi : allFiles) { ++ QList<QZipReader::FileInfo> allFiles = m_reader->fileInfoList(); ++ for (const QZipReader::FileInfo &fi : allFiles) { + if (fi.isFile || (!fi.isDir && !fi.isFile && !fi.isSymLink)) + m_filePaths.append(fi.filePath); + } +--- a/src/external/qxlsx/xlsxzipreader_p.h ++++ b/src/external/qxlsx/xlsxzipreader_p.h +@@ -8,7 +8,7 @@ + #include <QIODevice> + + #include "xlsxglobal.h" +-#include "external/qtcompress/qzipreader.h" ++#include "qzipreader.h" + + #if QT_VERSION >= 0x050600 + #include <QVector> +@@ -31,7 +31,7 @@ public: + private: + Q_DISABLE_COPY(ZipReader) + void init(); +- QScopedPointer<Stel::QZipReader> m_reader; ++ QScopedPointer<QZipReader> m_reader; + QStringList m_filePaths; + }; + +--- a/src/external/qxlsx/xlsxzipwriter.cpp ++++ b/src/external/qxlsx/xlsxzipwriter.cpp +@@ -10,14 +10,14 @@ QT_BEGIN_NAMESPACE_XLSX + + ZipWriter::ZipWriter(const QString &filePath) + { +- m_writer = new Stel::QZipWriter(filePath, QIODevice::WriteOnly); +- m_writer->setCompressionPolicy(Stel::QZipWriter::AutoCompress); ++ m_writer = new QZipWriter(filePath, QIODevice::WriteOnly); ++ m_writer->setCompressionPolicy(QZipWriter::AutoCompress); + } + + ZipWriter::ZipWriter(QIODevice *device) + { +- m_writer = new Stel::QZipWriter(device); +- m_writer->setCompressionPolicy(Stel::QZipWriter::AutoCompress); ++ m_writer = new QZipWriter(device); ++ m_writer->setCompressionPolicy(QZipWriter::AutoCompress); + } + + ZipWriter::~ZipWriter() +@@ -27,7 +27,7 @@ ZipWriter::~ZipWriter() + + bool ZipWriter::error() const + { +- return m_writer->status() != Stel::QZipWriter::NoError; ++ return m_writer->status() != QZipWriter::NoError; + } + + void ZipWriter::addFile(const QString &filePath, QIODevice *device) +--- a/src/external/qxlsx/xlsxzipwriter_p.h ++++ b/src/external/qxlsx/xlsxzipwriter_p.h +@@ -8,7 +8,7 @@ + #include <QIODevice> + + #include "xlsxglobal.h" +-#include "external/qtcompress/qzipwriter.h" ++#include "qzipwriter.h" + + class QZipWriter; + +@@ -27,7 +27,7 @@ public: + void close(); + + private: +- Stel::QZipWriter *m_writer; ++ QZipWriter *m_writer; + }; + + QT_END_NAMESPACE_XLSX |