forked from mirrors/nixpkgs
lomiri.lomiri-terminal-app: Fetch upstream-submitted patches
This commit is contained in:
parent
22aed12dab
commit
6d8373b052
|
@ -1,63 +0,0 @@
|
|||
From b02fd5f9074d449bd0a60ce18c77735643f35e00 Mon Sep 17 00:00:00 2001
|
||||
From: Puna2608 <opna2608@protonmail.com>
|
||||
Date: Tue, 14 Mar 2023 18:11:04 +0100
|
||||
Subject: [PATCH] Drop deprecated qt5_use_modules
|
||||
|
||||
Isn't even getting included correctly here:
|
||||
Unknown CMake command "qt5_use_modules".
|
||||
---
|
||||
app/CMakeLists.txt | 7 ++++++-
|
||||
tests/qtquicktest/CMakeLists.txt | 8 ++++++--
|
||||
2 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
|
||||
index 3570b25..e0a7371 100644
|
||||
--- a/app/CMakeLists.txt
|
||||
+++ b/app/CMakeLists.txt
|
||||
@@ -1,5 +1,10 @@
|
||||
file(GLOB_RECURSE QML_SRCS *.qml *.js *.json *.png)
|
||||
|
||||
+find_package(Qt5Gui REQUIRED)
|
||||
+find_package(Qt5Qml REQUIRED)
|
||||
+find_package(Qt5Quick REQUIRED)
|
||||
+find_package(Qt5Widgets REQUIRED)
|
||||
+
|
||||
set(terminal_SRCS
|
||||
main.cpp
|
||||
fileio.cpp
|
||||
@@ -11,7 +16,7 @@ set(terminal_SRCS
|
||||
|
||||
add_executable(lomiri-terminal-app ${terminal_SRCS})
|
||||
|
||||
-qt5_use_modules(lomiri-terminal-app Gui Qml Quick Widgets)
|
||||
+target_link_libraries(lomiri-terminal-app Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Widgets)
|
||||
target_link_libraries(lomiri-terminal-app stdc++)
|
||||
|
||||
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
diff --git a/tests/qtquicktest/CMakeLists.txt b/tests/qtquicktest/CMakeLists.txt
|
||||
index 3feec36..f370fa1 100644
|
||||
--- a/tests/qtquicktest/CMakeLists.txt
|
||||
+++ b/tests/qtquicktest/CMakeLists.txt
|
||||
@@ -5,7 +5,11 @@
|
||||
#set(XVFB_RUN_CMD ${XVFB_RUN_BIN} -a -s "-screen 0 1024x768x24")
|
||||
|
||||
include(FindPkgConfig)
|
||||
-find_package(Qt5Core)
|
||||
+find_package(Qt5Core REQUIRED)
|
||||
+find_package(Qt5Qml REQUIRED)
|
||||
+find_package(Qt5Quick REQUIRED)
|
||||
+find_package(Qt5Test REQUIRED)
|
||||
+find_package(Qt5QuickTest REQUIRED)
|
||||
|
||||
# copy qml test files to build directory
|
||||
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
@@ -16,5 +20,5 @@ endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
set(QTQUICK_TEST tst_qtquicktest)
|
||||
add_executable(${QTQUICK_TEST} qtquicktest.cpp)
|
||||
-qt5_use_modules(${QTQUICK_TEST} Core Qml Quick Test QuickTest)
|
||||
+target_link_libraries(${QTQUICK_TEST} Qt5::Core Qt5::Qml Qt5::Quick Qt5::Test Qt5::QuickTest)
|
||||
#add_test(${QTQUICK_TEST} ${XVFB_RUN_CMD} ${CMAKE_CURRENT_BINARY_DIR}/${QTQUICK_TEST})
|
||||
--
|
||||
2.39.2
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, gitUpdater
|
||||
, nixosTests
|
||||
, cmake
|
||||
|
@ -27,15 +28,34 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
};
|
||||
|
||||
patches = [
|
||||
# Fix CMake code not using the (intended? correct? working?) mechanism for depending on Qt modules
|
||||
./0001-Drop-deprecated-qt5_use_modules.patch
|
||||
# Stop usage of private qt5_use_modules function, seemingly unavailable in this package
|
||||
# Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/103 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0001-lomiri-terminal-app-Stop-using-qt5_use_modules.patch";
|
||||
url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/db210c74e771a427066aebdc3a99cab6e782d326.patch";
|
||||
hash = "sha256-op4+/eo8rBRMcW6MZ0rOEFReM7JBCck1B+AsgAPyqAI=";
|
||||
})
|
||||
|
||||
# Explicitly bind textdomain, don't rely on hacky workaround in LUITK
|
||||
# Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/104 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0002-lomiri-terminal-app-Call-i18n.bindtextdomain.patch";
|
||||
url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/7f9d419e29043f0d0922d2ac1dce5673e2723a01.patch";
|
||||
hash = "sha256-HfIvGVbIdTasoHAfHysnzFLufQQ4lskym5HTekH+mjk=";
|
||||
})
|
||||
|
||||
# Add more & correct existing usage of GNUInstallDirs variables
|
||||
# Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/105 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0003-lomiri-terminal-app-GNUInstallDirs-usage.patch";
|
||||
url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/fcde1f05bb442c74b1dff95917fd7594f26e97a7.patch";
|
||||
hash = "sha256-umxCMGNjyz0TVmwH0Gl0MpgjLQtkW9cHkUfpNJcoasE=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" '${qtbase.qtQmlPrefix}' \
|
||||
--replace "\''${CMAKE_INSTALL_PREFIX}/\''${DATA_DIR}" "\''${CMAKE_INSTALL_FULL_DATADIR}/lomiri-terminal-app" \
|
||||
--replace 'EXEC "''${APP_NAME}"' 'EXEC "${placeholder "out"}/bin/''${APP_NAME}"'
|
||||
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
|
||||
|
||||
# Tests look abandoned - add_test in CMake code is commented out, refers to old repo structure in import paths
|
||||
sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
|
||||
|
@ -77,6 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
description = "A terminal app for desktop and mobile devices";
|
||||
homepage = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app";
|
||||
license = licenses.gpl3Only;
|
||||
mainProgram = "lomiri-terminal-app";
|
||||
maintainers = teams.lomiri.members;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue