contour: 0.3.12.262 -> 0.4.0.6245

This commit is contained in:
fortuneteller2k 2023-12-20 06:48:04 +08:00
parent bf0cf6f215
commit fa7f4072d2
4 changed files with 29 additions and 51 deletions

View file

@ -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()

View file

@ -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 ''

View file

@ -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

View file

@ -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")