deepin-voice-note: 5.11.1 -> 6.0.13

This commit is contained in:
rewine 2023-09-27 11:37:54 +08:00
parent 3f1eb313e0
commit aa4d16aa25
No known key found for this signature in database
GPG key ID: 2964FF5514455F51
2 changed files with 33 additions and 6 deletions

View file

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, qttools
@ -16,22 +17,37 @@
, gst_all_1
, gtest
}:
stdenv.mkDerivation rec {
pname = "deepin-voice-note";
version = "5.11.1";
version = "6.0.13";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-JX4OuVu+5/a3IhkfnvaWVDaKl+xg/8qxlvp9hM0nHNU=";
hash = "sha256-yDlWyMGkSToGCN7tuZNR8Mz7MUOZ7355w4H0OzeHBrs=";
};
patches = [
./use_v23_dbus_interface.diff
(fetchpatch {
name = "Adjust-the-audio-port-available-range.patch";
url = "https://github.com/linuxdeepin/deepin-voice-note/commit/a876e4c4cf7d77e50071246f9fb6998aa62def77.patch";
hash = "sha256-J/PPdj1Am/v2Sw2Dv2XvZJAy/6Tf7OoTfrbOB9rc5m8=";
})
(fetchpatch {
name = "fix-build-error-with-new-dtk.patch";
url = "https://github.com/linuxdeepin/deepin-voice-note/commit/9ce211f603deaff21b881e1c4f43d53e33a85347.patch";
hash = "sha256-oP+AzMniONxjYIFust8fGaD8/UOjKr4yZiRUkdTMd5w=";
})
];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr" "$out"
substituteInPlace src/common/audiowatcher.cpp \
--replace "/usr/share" "$out/share"
substituteInPlace assets/deepin-voice-note.desktop \
--replace "/usr/bin" "$out/bin"
'';
nativeBuildInputs = [
@ -61,8 +77,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DVERSION=${version}" ];
env.NIX_CFLAGS_COMPILE = "-I${dde-qt-dbus-factory}/include/libdframeworkdbus-2.0";
preFixup = ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
'';

View file

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7bfb81..f56f11a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,7 +103,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all")
execute_process(COMMAND cat /etc/os-version OUTPUT_VARIABLE OS_INFO_STR)
string(REGEX MATCHALL "MajorVersion=[0-9]+" MAJOR_STR "${OS_INFO_STR}")
string(REGEX MATCH "[0-9]+" MAJOR_VERSION "${MAJOR_STR}")
-if (MAJOR_VERSION MATCHES "23")
+if (TRUE)
message("--------------------- OS_BUILD_V23 on")
add_definitions(-DOS_BUILD_V23)
endif()