mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
supercell-wx: 0.5.3 -> 0.6.1
https://github.com/dpaulat/supercell-wx/releases#release-v0.6.1-release
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
gcc14Stdenv,
|
||||
fetchFromGitHub,
|
||||
replaceVars,
|
||||
tracy,
|
||||
@@ -17,13 +16,16 @@
|
||||
bzip2,
|
||||
geos,
|
||||
geographiclib,
|
||||
glew,
|
||||
glm,
|
||||
gtest,
|
||||
howard-hinnant-date,
|
||||
libsm,
|
||||
libcpr,
|
||||
libGLU,
|
||||
libjpeg,
|
||||
libpng,
|
||||
libtiff,
|
||||
libzip,
|
||||
onetbb,
|
||||
openssl,
|
||||
python3,
|
||||
@@ -34,7 +36,11 @@
|
||||
zlib,
|
||||
}:
|
||||
let
|
||||
buildStdenv = if stdenv.cc.isGNU then gcc14Stdenv else stdenv;
|
||||
libtiffWithCxx = libtiff.overrideAttrs (old: {
|
||||
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
|
||||
"-Dcxx=ON"
|
||||
];
|
||||
});
|
||||
|
||||
gtestSkip = [
|
||||
# Skip tests requiring network access
|
||||
@@ -57,16 +63,16 @@ let
|
||||
"MarkerModelTest.*"
|
||||
];
|
||||
in
|
||||
buildStdenv.mkDerivation (finalAttrs: {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "supercell-wx";
|
||||
version = "0.5.3";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dpaulat";
|
||||
repo = "supercell-wx";
|
||||
tag = "v${finalAttrs.version}-release";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-1n1WXBLco2TpyhS8KA1tk6HzRIXLqS6YV3aYagoQiTM=";
|
||||
hash = "sha256-wvtLu5K0bz0X7WzUCUH4/vAYtJsHJ2UOv5Q06uMMlyw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -78,13 +84,14 @@ buildStdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
# Prevents using some Qt scripts that seemed to break the install step. Fixes missing link to some targets.
|
||||
./patches/fix-cmake-install.patch
|
||||
# libtiff with C++ support is required
|
||||
./patches/libtiff-cxx.patch
|
||||
# }}}
|
||||
|
||||
# These may be or already are submitted upstream {{{
|
||||
./patches/explicit-link-aws-crt.patch # fix missing symbols from aws-crt-cpp
|
||||
./patches/fix-qt-6.10.patch
|
||||
./patches/fix-find-opengl.patch
|
||||
# }}}
|
||||
./patches/boost-1.89-compat.patch
|
||||
];
|
||||
|
||||
# This also may be submitted upstream to maplibre-native-qt, which is currently vendored
|
||||
@@ -96,6 +103,7 @@ buildStdenv.mkDerivation (finalAttrs: {
|
||||
env = {
|
||||
CXXFLAGS = lib.concatStringsSep " " [
|
||||
"-Wno-error=deprecated-declarations"
|
||||
"-Wno-error=free-nonheap-object"
|
||||
"-Wno-error=maybe-uninitialized"
|
||||
"-Wno-error=restrict"
|
||||
"-Wno-error=stringop-overflow"
|
||||
@@ -105,6 +113,9 @@ buildStdenv.mkDerivation (finalAttrs: {
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
# v0.6.1 Release Date
|
||||
(lib.cmakeFeature "SCWX_RELEASE_DATE" "2026-07-18")
|
||||
|
||||
# CMake Error at external/aws-sdk-cpp/crt/aws-crt-cpp/cmake/EnforceSubmoduleVersions.cmake:18 (message):
|
||||
# ENFORCE_SUBMODULE_VERSIONS is ON but Git was not found.
|
||||
(lib.cmakeBool "ENFORCE_SUBMODULE_VERSIONS" false)
|
||||
@@ -127,13 +138,16 @@ buildStdenv.mkDerivation (finalAttrs: {
|
||||
bzip2
|
||||
geos
|
||||
geographiclib
|
||||
glew
|
||||
glm
|
||||
gtest
|
||||
howard-hinnant-date
|
||||
libsm
|
||||
libcpr
|
||||
libGLU
|
||||
libjpeg
|
||||
libpng
|
||||
libtiffWithCxx
|
||||
libzip
|
||||
onetbb
|
||||
openssl
|
||||
(python3.withPackages (ps: [
|
||||
@@ -167,7 +181,7 @@ buildStdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://supercell-wx.rtfd.io";
|
||||
homepage = "https://supercellwx.net/";
|
||||
downloadPage = "https://github.com/dpaulat/supercell-wx/releases";
|
||||
description = "Live visualization of NEXRAD weather data and alerts";
|
||||
changelog = "https://github.com/dpaulat/supercell-wx/releases/tag/${finalAttrs.src.tag}";
|
||||
@@ -184,6 +198,9 @@ buildStdenv.mkDerivation (finalAttrs: {
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
maintainers = with lib.maintainers; [ aware70 ];
|
||||
maintainers = with lib.maintainers; [
|
||||
aware70
|
||||
dpaulat
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
12
pkgs/by-name/su/supercell-wx/patches/boost-1.89-compat.patch
Normal file
12
pkgs/by-name/su/supercell-wx/patches/boost-1.89-compat.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/wxdata/source/scwx/provider/nws_level3_behavior.cpp b/wxdata/source/scwx/provider/nws_level3_behavior.cpp
|
||||
index 378c98d4..f95b6d80 100644
|
||||
--- a/wxdata/source/scwx/provider/nws_level3_behavior.cpp
|
||||
+++ b/wxdata/source/scwx/provider/nws_level3_behavior.cpp
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
#include <boost/unordered/unordered_flat_map.hpp>
|
||||
+#include <boost/url/parse.hpp>
|
||||
#include <boost/url/url.hpp>
|
||||
#include <cpr/cpr.h>
|
||||
#include <range/v3/range/conversion.hpp>
|
||||
@@ -1,12 +1,12 @@
|
||||
diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake
|
||||
index 36911947..451efc13 100644
|
||||
index 0624971d..1df079de 100644
|
||||
--- a/wxdata/wxdata.cmake
|
||||
+++ b/wxdata/wxdata.cmake
|
||||
@@ -320,6 +320,7 @@ endif()
|
||||
@@ -363,6 +363,7 @@ endif()
|
||||
|
||||
target_link_libraries(wxdata PUBLIC aws-cpp-sdk-core
|
||||
aws-cpp-sdk-s3
|
||||
+ aws-crt-cpp
|
||||
cpr::cpr
|
||||
LibXml2::LibXml2
|
||||
OpenSSL::Crypto
|
||||
libzip::zip
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
|
||||
index 648b6578..4833b9c2 100644
|
||||
index ed40e428..8743b2ab 100644
|
||||
--- a/scwx-qt/scwx-qt.cmake
|
||||
+++ b/scwx-qt/scwx-qt.cmake
|
||||
@@ -776,6 +776,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
@@ -859,6 +859,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Boost::timer
|
||||
Boost::atomic
|
||||
QMapLibre::Core
|
||||
+ QMapLibre::Widgets
|
||||
OpenGL::GLU
|
||||
$<$<CXX_COMPILER_ID:MSVC>:opengl32>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:SetupAPI>
|
||||
Fontconfig::Fontconfig
|
||||
@@ -793,18 +794,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
target_link_libraries(supercell-wx PRIVATE scwx-qt
|
||||
wxdata)
|
||||
@@ -891,18 +892,7 @@ if (WIN32)
|
||||
COMMENT "Running windeployqt for supercell-wx...")
|
||||
endif()
|
||||
|
||||
-if (LINUX)
|
||||
- # Set DT_RUNPATH for Linux targets
|
||||
@@ -29,7 +29,7 @@ index 648b6578..4833b9c2 100644
|
||||
RUNTIME
|
||||
COMPONENT supercell-wx
|
||||
BUNDLE
|
||||
@@ -819,24 +809,6 @@ install(TARGETS supercell-wx
|
||||
@@ -917,24 +907,6 @@ install(TARGETS supercell-wx
|
||||
COMPONENT supercell-wx
|
||||
OPTIONAL)
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
|
||||
index 648b6578..3f1d8070 100644
|
||||
--- a/scwx-qt/scwx-qt.cmake
|
||||
+++ b/scwx-qt/scwx-qt.cmake
|
||||
@@ -18,7 +18,7 @@ find_package(Fontconfig)
|
||||
find_package(geographiclib)
|
||||
find_package(geos)
|
||||
find_package(glm)
|
||||
-find_package(OpenGL)
|
||||
+find_package(OpenGL REQUIRED)
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
find_package(SQLite3)
|
||||
|
||||
@@ -759,12 +759,7 @@ if (LINUX)
|
||||
target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::WaylandClient)
|
||||
endif()
|
||||
|
||||
-if (LINUX)
|
||||
- find_package(mesa-glu REQUIRED)
|
||||
- target_link_libraries(scwx-qt PUBLIC mesa-glu::mesa-glu)
|
||||
-else()
|
||||
- target_link_libraries(scwx-qt PUBLIC OpenGL::GLU)
|
||||
-endif()
|
||||
+target_link_libraries(scwx-qt PUBLIC OpenGL::GLU)
|
||||
|
||||
target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::OpenGLWidgets
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/external/qt6ct.cmake b/external/qt6ct.cmake
|
||||
index 665b5368..9e6ed0e9 100644
|
||||
--- a/external/qt6ct.cmake
|
||||
+++ b/external/qt6ct.cmake
|
||||
@@ -5,7 +5,7 @@ find_package(QT NAMES Qt6
|
||||
COMPONENTS Gui Widgets
|
||||
REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR}
|
||||
- COMPONENTS Gui Widgets
|
||||
+ COMPONENTS Gui Widgets WidgetsPrivate
|
||||
REQUIRED)
|
||||
|
||||
#extract version from qt6ct.h
|
||||
22
pkgs/by-name/su/supercell-wx/patches/libtiff-cxx.patch
Normal file
22
pkgs/by-name/su/supercell-wx/patches/libtiff-cxx.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
|
||||
index 8743b2ab..afa7c407 100644
|
||||
--- a/scwx-qt/scwx-qt.cmake
|
||||
+++ b/scwx-qt/scwx-qt.cmake
|
||||
@@ -23,7 +23,7 @@ find_package(OpenGL REQUIRED)
|
||||
find_package(PNG)
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
find_package(SQLite3)
|
||||
-find_package(TIFF)
|
||||
+find_package(Tiff CONFIG REQUIRED)
|
||||
|
||||
find_package(QT NAMES Qt6
|
||||
COMPONENTS Gui
|
||||
@@ -875,7 +875,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
qt6ct-widgets
|
||||
SQLite::SQLite3
|
||||
PNG::PNG
|
||||
- TIFF::TIFF
|
||||
+ TIFF::tiffxx
|
||||
wxdata)
|
||||
|
||||
target_link_libraries(scwx-qt INTERFACE Boost::program_options)
|
||||
@@ -1,5 +1,38 @@
|
||||
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
|
||||
index ed40e428..5d5676ad 100644
|
||||
--- a/scwx-qt/scwx-qt.cmake
|
||||
+++ b/scwx-qt/scwx-qt.cmake
|
||||
@@ -642,6 +642,12 @@ else()
|
||||
set(SCWX_BUILD_NUM 0)
|
||||
endif()
|
||||
|
||||
+if (NOT SCWX_RELEASE_DATE)
|
||||
+ message(FATAL_ERROR
|
||||
+ "SCWX_RELEASE_DATE must be set to YYYY-MM-DD "
|
||||
+ "(e.g. -DSCWX_RELEASE_DATE=2026-07-18)")
|
||||
+endif()
|
||||
+
|
||||
if (WIN32)
|
||||
add_custom_command(OUTPUT ${VERSIONS_HEADER}
|
||||
${RESOURCE_OUTPUT}
|
||||
@@ -655,6 +661,7 @@ if (WIN32)
|
||||
-i ${VERSIONS_INPUT}
|
||||
-o ${VERSIONS_HEADER}
|
||||
-b ${SCWX_BUILD_NUM}
|
||||
+ --release-date ${SCWX_RELEASE_DATE}
|
||||
--input-resource ${RESOURCE_INPUT}
|
||||
--output-resource ${RESOURCE_OUTPUT}
|
||||
--input-metainfo ${METAINFO_INPUT}
|
||||
@@ -671,6 +678,7 @@ else()
|
||||
-i ${VERSIONS_INPUT}
|
||||
-o ${VERSIONS_HEADER}
|
||||
-b ${SCWX_BUILD_NUM}
|
||||
+ --release-date ${SCWX_RELEASE_DATE}
|
||||
--input-metainfo ${METAINFO_INPUT}
|
||||
--output-metainfo ${METAINFO_OUTPUT})
|
||||
endif()
|
||||
diff --git a/scwx-qt/tools/generate_versions.py b/scwx-qt/tools/generate_versions.py
|
||||
index c6c94020..000f6e6e 100644
|
||||
index 61b7cc1f..32ec482e 100644
|
||||
--- a/scwx-qt/tools/generate_versions.py
|
||||
+++ b/scwx-qt/tools/generate_versions.py
|
||||
@@ -1,6 +1,5 @@
|
||||
@@ -9,26 +42,42 @@ index c6c94020..000f6e6e 100644
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
@@ -110,27 +109,23 @@ def ParseArguments():
|
||||
@@ -64,6 +63,13 @@ kKeys_ = [Keys.BuildNumber,
|
||||
Keys.VersionCommas,
|
||||
Keys.VersionString]
|
||||
|
||||
+def ParseReleaseDate(value: str) -> str:
|
||||
+ try:
|
||||
+ return datetime.date.fromisoformat(value).strftime("%Y-%m-%d")
|
||||
+ except ValueError as ex:
|
||||
+ raise argparse.ArgumentTypeError(
|
||||
+ f"invalid release date '{value}'; expected YYYY-MM-DD") from ex
|
||||
+
|
||||
def ParseArguments():
|
||||
parser = argparse.ArgumentParser(description='Generate versions')
|
||||
parser.add_argument("-c", "--cache",
|
||||
@@ -126,6 +132,12 @@ def ParseArguments():
|
||||
dest = "version_",
|
||||
type = str,
|
||||
required = True)
|
||||
+ parser.add_argument("--release-date",
|
||||
+ metavar = "YYYY-MM-DD",
|
||||
+ help = "release date (YYYY-MM-DD)",
|
||||
+ dest = "releaseDate_",
|
||||
+ type = ParseReleaseDate,
|
||||
+ required = True)
|
||||
return parser.parse_args()
|
||||
|
||||
+def GetYearFromLicense(license_file: pathlib.Path):
|
||||
+ import re
|
||||
+ for line in license_file.read_text().splitlines():
|
||||
+ m = re.search(r'^\s*Copyright \(c\) 2021-(\d{4,})', line)
|
||||
+ if m is not None:
|
||||
+ return int(m.group(1))
|
||||
+ raise RuntimeError(f"Could not find copyright year in {license_file}")
|
||||
+
|
||||
def CollectVersionInfo(args):
|
||||
print("Collecting version info")
|
||||
@@ -133,24 +145,12 @@ def CollectVersionInfo(args):
|
||||
|
||||
versionInfo = VersionInfo()
|
||||
|
||||
- repo = git.Repo(args.gitRepo_, search_parent_directories = True)
|
||||
-
|
||||
- commitString = str(repo.head.commit)[:10]
|
||||
- releaseDate = datetime.datetime.fromtimestamp(
|
||||
- repo.head.commit.committed_date, tz=datetime.timezone.utc).strftime("%Y-%m-%d")
|
||||
-
|
||||
- if not repo.is_dirty(submodules = False):
|
||||
- copyrightYear = datetime.datetime.fromtimestamp(repo.head.commit.committed_date).year
|
||||
@@ -36,15 +85,15 @@ index c6c94020..000f6e6e 100644
|
||||
- commitString = commitString + "+dirty"
|
||||
- copyrightYear = datetime.date.today().year
|
||||
-
|
||||
- resourceDir = str(args.gitRepo_).replace("\\", "\\\\")
|
||||
-
|
||||
resourceDir = str(args.gitRepo_).replace("\\", "\\\\")
|
||||
|
||||
versionInfo.buildNumber_ = args.buildNumber_
|
||||
- versionInfo.commitString_ = commitString
|
||||
- versionInfo.copyrightYear_ = copyrightYear
|
||||
- versionInfo.resourceDir_ = resourceDir
|
||||
- versionInfo.releaseDate_ = releaseDate
|
||||
+ versionInfo.commitString_ = "@rev@"
|
||||
+ versionInfo.copyrightYear_ = GetYearFromLicense(args.gitRepo_ / "LICENSE.txt")
|
||||
+ versionInfo.resourceDir_ = str(args.gitRepo_).replace("\\", "\\\\")
|
||||
+ versionInfo.copyrightYear_ = datetime.date.fromisoformat(args.releaseDate_).year
|
||||
+ versionInfo.releaseDate_ = args.releaseDate_
|
||||
versionInfo.resourceDir_ = resourceDir
|
||||
versionInfo.versionString_ = args.version_
|
||||
|
||||
versionInfo.Calculate()
|
||||
|
||||
@@ -22,37 +22,36 @@ index 570af425..f2e7b2c8 100644
|
||||
-set(STB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stb PARENT_SCOPE)
|
||||
+# Nix: set STB_INCLUDE_DIR in cmake flags
|
||||
diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake
|
||||
index 4833b9c2..641fc637 100644
|
||||
index f73d70da..ed40e428 100644
|
||||
--- a/scwx-qt/scwx-qt.cmake
|
||||
+++ b/scwx-qt/scwx-qt.cmake
|
||||
@@ -13,14 +13,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
@@ -13,13 +13,14 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
OPTION(SCWX_DISABLE_CONSOLE "Disables the Windows console in release mode" ON)
|
||||
|
||||
-find_package(Boost)
|
||||
+find_package(Boost REQUIRED COMPONENTS json timer atomic)
|
||||
+find_package(Boost REQUIRED COMPONENTS json timer atomic program_options)
|
||||
find_package(Fontconfig)
|
||||
-find_package(geographiclib)
|
||||
+find_package(GeographicLib)
|
||||
find_package(geos)
|
||||
find_package(glm)
|
||||
find_package(OpenGL)
|
||||
find_package(JPEG)
|
||||
find_package(OpenGL REQUIRED)
|
||||
+find_package(PNG)
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
find_package(SQLite3)
|
||||
+find_package(PNG)
|
||||
|
||||
find_package(QT NAMES Qt6
|
||||
COMPONENTS Gui
|
||||
@@ -789,6 +790,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
find_package(TIFF)
|
||||
@@ -872,6 +873,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
qt6ct-common
|
||||
qt6ct-widgets
|
||||
SQLite::SQLite3
|
||||
+ PNG::PNG
|
||||
TIFF::TIFF
|
||||
wxdata)
|
||||
|
||||
target_link_libraries(supercell-wx PRIVATE scwx-qt
|
||||
diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake
|
||||
index 451efc13..86cbb42b 100644
|
||||
index 07fe8464..0624971d 100644
|
||||
--- a/wxdata/wxdata.cmake
|
||||
+++ b/wxdata/wxdata.cmake
|
||||
@@ -4,7 +4,8 @@ project(scwx-data)
|
||||
@@ -60,8 +59,8 @@ index 451efc13..86cbb42b 100644
|
||||
include(CheckCXXSymbolExists)
|
||||
|
||||
-find_package(Boost)
|
||||
+find_package(Boost REQUIRED COMPONENTS iostreams)
|
||||
+find_package(Boost REQUIRED COMPONENTS iostreams url)
|
||||
+find_package(BZip2)
|
||||
find_package(cpr)
|
||||
find_package(LibXml2)
|
||||
find_package(OpenSSL)
|
||||
find_package(libzip)
|
||||
|
||||
Reference in New Issue
Block a user