Merge pull request #275529 from moni-dz/contour

contour: 0.3.12.262 -> 0.4.0.6245
This commit is contained in:
Peder Bergebakken Sundt
2024-01-13 23:46:45 +01:00
committed by GitHub
8 changed files with 83 additions and 55 deletions
@@ -1,20 +0,0 @@
diff --git a/src/contour/display/CMakeLists.txt b/src/contour/display/CMakeLists.txt
index e2e9768c..fc1ea72f 100644
--- a/src/contour/display/CMakeLists.txt
+++ b/src/contour/display/CMakeLists.txt
@@ -1,5 +1,5 @@
if(CONTOUR_QT_VERSION EQUAL "6")
- find_package(Qt6 COMPONENTS Core Gui OpenGLWidgets Widgets REQUIRED)
+ find_package(Qt6 COMPONENTS Core Gui OpenGLWidgets Widgets Multimedia REQUIRED)
else()
find_package(Qt5 COMPONENTS Gui Widgets REQUIRED) # apt install qtbase5-dev libqt5gui5
endif()
@@ -31,7 +31,7 @@ endif()
target_include_directories(ContourTerminalDisplay PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../..")
target_link_libraries(ContourTerminalDisplay vtrasterizer)
if(CONTOUR_QT_VERSION EQUAL "6")
- target_link_libraries(ContourTerminalDisplay Qt6::Core Qt6::Gui Qt6::OpenGL Qt6::OpenGLWidgets Qt6::Widgets)
+ target_link_libraries(ContourTerminalDisplay Qt6::Core Qt6::Gui Qt6::OpenGL Qt6::OpenGLWidgets Qt6::Widgets Qt6::Multimedia)
else()
target_link_libraries(ContourTerminalDisplay Qt5::Gui Qt5::Widgets)
endif()
@@ -4,12 +4,14 @@
, fetchurl
, cmake
, pkg-config
, boxed-cpp
, freetype
, fontconfig
, libunicode
, libutempter
, termbench-pro
, qtmultimedia
, qt5compat
, wrapQtAppsHook
, pcre
, boost
@@ -28,19 +30,18 @@
stdenv.mkDerivation (final: {
pname = "contour";
version = "0.3.12.262";
version = "0.4.0.6245";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = "contour";
rev = "v${final.version}";
hash = "sha256-4R0NyUtsyr3plYfVPom+EjJ5W0Cb/uuaSB5zyJ0yIB4=";
hash = "sha256-0A3fGbQPfzV4V4f5GGyjbQLJK+tX7ZVerAL7TkHhjdo=";
};
outputs = [ "out" "terminfo" ];
patches = [ ./dont-fix-app-bundle.diff ];
# fix missing <QtMultimedia/QAudioSink> on Darwin and codesign the binary
patches = [ ./contour-cmakelists.diff ./macos-codesign.diff ];
outputs = [ "out" "terminfo" ];
nativeBuildInputs = [
cmake
@@ -52,11 +53,13 @@ stdenv.mkDerivation (final: {
] ++ lib.optionals stdenv.isDarwin [ sigtool ];
buildInputs = [
boxed-cpp
fontconfig
freetype
libunicode
termbench-pro
qtmultimedia
qt5compat
pcre
boost
catch2
@@ -70,11 +73,6 @@ stdenv.mkDerivation (final: {
cmakeFlags = [ "-DCONTOUR_QT_VERSION=6" ];
preConfigure = ''
# Don't fix Darwin app bundle
sed -i '/fixup_bundle/d' src/contour/CMakeLists.txt
'';
postInstall = ''
mkdir -p $out/nix-support $terminfo/share
'' + lib.optionalString stdenv.isDarwin ''
@@ -0,0 +1,21 @@
diff --git a/src/contour/CMakeLists.txt b/src/contour/CMakeLists.txt
index 92afdf31..19416460 100644
--- a/src/contour/CMakeLists.txt
+++ b/src/contour/CMakeLists.txt
@@ -496,11 +496,11 @@ elseif(APPLE)
endforeach()
include(BundleUtilities)
- fixup_bundle(
- \"${BUNDLE_APP}\"
- \"\${PLUGIN_PATHS}\"
- \"${LIBS_SEARCH_DIRS}\"
- )
+ # fixup_bundle(
+ # \"${BUNDLE_APP}\"
+ # \"\${PLUGIN_PATHS}\"
+ # \"${LIBS_SEARCH_DIRS}\"
+ # )
# Post-fix libqcocoa.dylib platform plugin's rpath,
# The already provided rpath (@loader_path/../../../../lib) does not work
@@ -1,21 +0,0 @@
diff --git a/src/contour/CMakeLists.txt b/src/contour/CMakeLists.txt
index 0eebd585..5d0bc3c0 100644
--- a/src/contour/CMakeLists.txt
+++ b/src/contour/CMakeLists.txt
@@ -145,6 +145,16 @@ if(CONTOUR_BUILD_WITH_MIMALLOC)
target_link_libraries(contour mimalloc)
endif()
+if(APPLE)
+ add_custom_command(
+ TARGET contour POST_BUILD
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ COMMAND codesign --force --sign - contour.app/Contents/MacOS/contour
+ COMMENT "Codesigning macOS bundle executable"
+ VERBATIM
+ )
+endif()
+
if(NOT(WIN32))
set(terminfo_file "contour.terminfo")
set(terminfo_basedir "${CMAKE_CURRENT_BINARY_DIR}/terminfo")
+24
View File
@@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromGitHub, cmake, catch2 }:
stdenv.mkDerivation (final: {
pname = "boxed-cpp";
version = "1.1.0";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = "boxed-cpp";
rev = "v${final.version}";
hash = "sha256-8qhP1yXdRTbU/IbDAaQrdjzIMM5ZjCAULI07dw44XcE=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ catch2 ];
meta = with lib; {
description = "Boxing primitive types in C++";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = [ maintainers.moni ];
};
})
@@ -10,15 +10,18 @@ let
};
in stdenv.mkDerivation (final: {
pname = "libunicode";
version = "0.3.0-unstable-2023-03-05";
version = "0.4.0";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = "libunicode";
rev = "65e0c6ddf9648b94aa9bc7dda0718401efa9ef8e";
hash = "sha256-F4CVU5MImkM571mD4iFxqTnNbk2GXKTGksqO4LH2uEk=";
rev = "v${final.version}";
hash = "sha256-Us3T4fnGsArdsVB7IUhwdex43C+H1+lfL8yK9enhf2c=";
};
# Fix: set_target_properties Can not find target to add properties to: Catch2, et al.
patches = [ ./remove-target-properties.diff ];
nativeBuildInputs = [ cmake python3 ];
buildInputs = [ catch2 fmt ];
@@ -0,0 +1,19 @@
diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt
index 6c5ac20..9fa13a3 100644
--- a/src/libunicode/CMakeLists.txt
+++ b/src/libunicode/CMakeLists.txt
@@ -223,10 +223,10 @@ if(LIBUNICODE_TESTING)
# supress conversion warnings for Catch2
# https://github.com/catchorg/Catch2/issues/2583
# https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22
- set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
- set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
- get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
- target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
+ # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
+ # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
+ # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
+ # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
target_link_libraries(unicode_test unicode Catch2::Catch2WithMain fmt::fmt-header-only)
add_test(unicode_test unicode_test)
+5 -1
View File
@@ -3037,6 +3037,7 @@ with pkgs;
inherit (darwin.apple_sdk_11_0.libs) utmp;
inherit (darwin) sigtool;
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
catch2 = catch2_3;
fmt = fmt_9;
};
@@ -23609,7 +23610,10 @@ with pkgs;
libuldaq = callPackage ../development/libraries/libuldaq { };
libunicode = callPackage ../development/libraries/libunicode { fmt = fmt_8; };
libunicode = callPackage ../development/libraries/libunicode {
catch2 = catch2_3;
fmt = fmt_9;
};
libunwind =
if stdenv.isDarwin then darwin.libunwind