deepin.dde-calendar: 5.8.30 -> 5.10.1

This commit is contained in:
rewine 2023-08-01 17:16:45 +08:00
parent 356c6dcdf3
commit a58db6d363
No known key found for this signature in database
GPG key ID: 2964FF5514455F51
2 changed files with 35 additions and 37 deletions

View file

@ -1,53 +1,40 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, dtkwidget
, qt5integration
, qt5platform-plugins
, dde-qt-dbus-factory
, cmake
, qttools
, pkg-config
, wrapQtAppsHook
, runtimeShell
, dtkwidget
, qt5integration
, qt5platform-plugins
, dde-qt-dbus-factory
, qtbase
, gtest
, qtsvg
, libical
, sqlite
, runtimeShell
}:
stdenv.mkDerivation rec {
pname = "dde-calendar";
version = "5.8.30";
version = "5.10.1";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-8/UXq9W3Gb1Lg/nOji6zcHJts6lgY2uDxvrBxQs3Zio=";
hash = "sha256-oPrtPOCLZof4BysWfsCYeoqbJf30r7LijGEEXZlsAAY=";
};
patches = [
(fetchpatch {
name = "chore-use-GNUInstallDirs-in-CmakeLists.patch";
url = "https://github.com/linuxdeepin/dde-calendar/commit/b9d9555d90a36318eeee62ece49250b4bf8acd10.patch";
sha256 = "sha256-pvgxZPczs/lkwNjysNuVu+1AY69VZlxOn7hR9A02/3M=";
})
./fix-wrapped-name-not-in-whitelist.diff
];
postPatch = ''
substituteInPlace calendar-service/src/dbmanager/huanglidatabase.cpp \
--replace "/usr/share/dde-calendar/data/huangli.db" "$out/share/dde-calendar/data/huangli.db"
substituteInPlace calendar-service/src/main.cpp \
--replace "/usr/share/dde-calendar/translations" "$out/share/dde-calendar/translations"
substituteInPlace calendar-service/assets/data/com.deepin.dataserver.Calendar.service \
--replace "/usr/lib/deepin-daemon/dde-calendar-service" "$out/lib/deepin-daemon/dde-calendar-service"
substituteInPlace calendar-client/assets/dbus/com.deepin.Calendar.service \
--replace "/usr/bin/dde-calendar" "$out/bin/dde-calendar"
substituteInPlace calendar-service/{src/{csystemdtimercontrol.cpp,jobremindmanager.cpp},assets/{data/com.dde.calendarserver.calendar.service,dde-calendar-service.desktop}} \
--replace "/bin/bash" "${runtimeShell}"
substituteInPlace CMakeLists.txt \
--replace "ADD_SUBDIRECTORY(tests)" " "
for file in $(grep -rl "/bin/bash"); do
substituteInPlace $file --replace "/bin/bash" "${runtimeShell}"
done
'';
nativeBuildInputs = [
@ -58,22 +45,19 @@ stdenv.mkDerivation rec {
];
buildInputs = [
dtkwidget
qt5integration
qt5platform-plugins
dtkwidget
qtbase
qtsvg
dde-qt-dbus-factory
gtest
libical
sqlite
];
cmakeFlags = [ "-DVERSION=${version}" ];
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
];
postFixup = ''
wrapQtApp $out/lib/deepin-daemon/dde-calendar-service
'';
strictDeps = true;
meta = with lib; {
description = "Calendar for Deepin Desktop Environment";
@ -83,3 +67,4 @@ stdenv.mkDerivation rec {
maintainers = teams.deepin.members;
};
}

View file

@ -0,0 +1,13 @@
diff --git a/calendar-service/src/dbusservice/dservicebase.cpp b/calendar-service/src/dbusservice/dservicebase.cpp
index ac182881..93a9c2d8 100644
--- a/calendar-service/src/dbusservice/dservicebase.cpp
+++ b/calendar-service/src/dbusservice/dservicebase.cpp
@@ -52,6 +52,8 @@ bool DServiceBase::clientWhite(const int index)
return true;
}
}
+ if (getClientName().contains("dde-calendar"))
+ return true;
return false;
#else
Q_UNUSED(index)