Merge pull request #71614 from worldofpeace/deepin-kwin

deepin.dde-kwin: init at 5.0.0
This commit is contained in:
worldofpeace 2019-10-29 00:46:29 +00:00 committed by GitHub
commit 03ad61c987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 213 additions and 265 deletions

View file

@ -0,0 +1,56 @@
From c4edb65554f90a5abfc2ecbf63587b8c6ef2653d Mon Sep 17 00:00:00 2001
From: worldofpeace <worldofpeace@protonmail.ch>
Date: Tue, 22 Oct 2019 17:20:24 -0400
Subject: [PATCH] dde-kwin.pc: make paths relative
Values like libdir should be relative to the literal ${prefix}.
We also use @ONLY so we don't substitute values like ${prefix}
with CMake resulting in an unintentional replacement.
---
plugins/kwin-xcb/lib/CMakeLists.txt | 2 +-
plugins/kwin-xcb/lib/dde-kwin.pc.in | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/plugins/kwin-xcb/lib/CMakeLists.txt b/plugins/kwin-xcb/lib/CMakeLists.txt
index 0189b74..62e5553 100644
--- a/plugins/kwin-xcb/lib/CMakeLists.txt
+++ b/plugins/kwin-xcb/lib/CMakeLists.txt
@@ -61,7 +61,7 @@ install_files(
kwinutils.h
)
-configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc)
+configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
if (CMAKE_INSTALL_LIBDIR)
install_files("/${CMAKE_INSTALL_LIBDIR}/pkgconfig" FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc)
elseif (CMAKE_LIBRARY_OUTPUT_DIRECTORY)
diff --git a/plugins/kwin-xcb/lib/dde-kwin.pc.in b/plugins/kwin-xcb/lib/dde-kwin.pc.in
index 9b1d813..1179761 100644
--- a/plugins/kwin-xcb/lib/dde-kwin.pc.in
+++ b/plugins/kwin-xcb/lib/dde-kwin.pc.in
@@ -1,13 +1,13 @@
-prefix=${CMAKE_INSTALL_PREFIX}
-exec_prefix=${CMAKE_INSTALL_PREFIX}
-libdir=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
-includedir=${INCLUDE_OUTPUT_PATH}
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=@INCLUDE_OUTPUT_PATH@
-Name: ${PROJECT_NAME}
+Name: @PROJECT_NAME@
Description: DDE KWin plugin library
-Version: ${PROJECT_VERSION}
-Libs: -l${PROJECT_NAME}
-Libs.private: -L/usr/X11R6/lib64 -lQt5X11Extras -lKF5WindowSystem -lQt5Widgets -lQt5Gui -lKF5ConfigCore -lKF5CoreAddons -lQt5Core -lGL -lpthread
-Cflags: -I${INCLUDE_OUTPUT_PATH}
+Version: @PROJECT_VERSION@
+Libs: -l$@PROJECT_NAME@
+Libs.private: -L/usr/X11R6/lib64 -lQt5X11Extras -lKF5WindowSystem -lQt5Widgets -lQt5Gui -lKF5ConfigCore -lKF5CoreAddons -lQt5Core -lGL -lpthread
+Cflags: -I@INCLUDE_OUTPUT_PATH@
--
2.23.0

View file

@ -0,0 +1,140 @@
{ stdenv
, mkDerivation
, pkgconfig
, fetchFromGitHub
, deepin
, cmake
, extra-cmake-modules
, qtbase
, libxcb
, kglobalaccel
, kwindowsystem
, kcoreaddons
, kwin
, dtkcore
, gsettings-qt
, fontconfig
, deepin-desktop-schemas
, glib
, libXrender
, mtdev
, qttools
, deepin-gettext-tools
, kwayland
, qtx11extras
, qtquickcontrols2
, epoxy
, qt5integration
, dde-session-ui
, dbus
, wrapGAppsHook
}:
mkDerivation rec {
pname = "dde-kwin";
version = "5.0.0";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "0bvkx9h5ygj46a0j76kfyq3gvk6zn4fx6clhrmcr40hbi2k33cbl";
};
nativeBuildInputs = [
cmake
deepin-gettext-tools
deepin.setupHook
extra-cmake-modules
pkgconfig
wrapGAppsHook
];
buildInputs = [
deepin-desktop-schemas
dtkcore
epoxy
fontconfig
glib
gsettings-qt
kcoreaddons
kglobalaccel
kwayland
kwin
kwindowsystem
libXrender
libxcb
mtdev
qtbase
qtquickcontrols2
qttools
qtx11extras
qt5integration
];
# Need to add kwayland around:
# * https://github.com/linuxdeepin/dde-kwin/blob/5226bb984c844129f9fa589da56e77decb7b39a1/plugins/kwineffects/blur/CMakeLists.txt#L14
NIX_CFLAGS_COMPILE = "-I${kwayland.dev}/include/KF5";
cmakeFlags = [
"-DKWIN_VERSION=${(builtins.parseDrvName kwin.name).version}"
];
patches = [
./0001-dde-kwin.pc-make-paths-relative.patch
./fix-paths.patch
];
postPatch = ''
searchHardCodedPaths
patchShebangs translate_ts2desktop.sh \
translate_generation.sh \
translate_desktop2ts.sh \
plugins/kwin-xcb/plugin/translate_generation.sh
fixPath ${deepin-gettext-tools} /usr/bin/deepin-desktop-ts-convert translate_desktop2ts.sh translate_ts2desktop.sh
fixPath $out /etc/xdg configures/CMakeLists.txt deepin-wm-dbus/deepinwmfaker.cpp
# TODO: Need environmental patch
fixPath /run/current-system/sw /usr/lib plugins/kwin-xcb/plugin/main.cpp
substituteInPlace configures/kwin-wm-multitaskingview.desktop \
--replace "dbus-send" "${dbus}/bin/dbus-send"
fixPath ${dde-session-ui} /usr/lib/deepin-daemon/dde-warning-dialog deepin-wm-dbus/deepinwmfaker.cpp
# Correct qt plugin installation path to be within dde-kwin prefix.
substituteInPlace CMakeLists.txt \
--subst-var-by plugin_path "$out/$qtPluginPrefix"
'';
postInstall = ''
# Correct invalid path in .pc
substituteInPlace $out/lib/pkgconfig/dde-kwin.pc \
--replace "-L/usr/X11R6/lib64" ""
chmod +x $out/bin/kwin_no_scale
'';
dontWrapQtApps = true;
preFixup = ''
gappsWrapperArgs+=(
"''${qtWrapperArgs[@]}"
)
'';
enableParallelBuilding = true;
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
meta = with stdenv.lib; {
description = "KWin configuration for Deepin Desktop Environment";
homepage = "https://github.com/linuxdeepin/dde-kwin";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo worldofpeace ];
};
}

View file

@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index feef49d..ecb7ed2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,9 +26,9 @@ macro(query_qmake args output)
endif()
endmacro()
-query_qmake("QT_INSTALL_PLUGINS" QT_INSTALL_PLUGINS)
+set(QT_INSTALL_PLUGINS @plugin_path@)
-set(PLUGIN_INSTALL_PATH ${QT_INSTALL_PLUGINS}/platforms)
+set(PLUGIN_INSTALL_PATH @plugin_path@/platforms)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed

View file

@ -1,65 +0,0 @@
{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, gnome3, glib,
gtk3, libgtop, bamf, json-glib, libcanberra-gtk3, libxkbcommon,
libstartup_notification, deepin-wallpapers, deepin-desktop-schemas,
deepin, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "deepin-metacity";
version = "3.22.24";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "1im0wz1zlxiag4kpp5d4hv0aa0ybr4bizarr3903hrqv0lp46hyx";
};
nativeBuildInputs = [
pkgconfig
intltool
libtool
glib.dev
gnome3.gnome-common
wrapGAppsHook
];
buildInputs = [
gnome3.dconf
gtk3
libgtop
gnome3.zenity
bamf
json-glib
libcanberra-gtk3
libstartup_notification
libxkbcommon
deepin-wallpapers
deepin-desktop-schemas
];
postPatch = ''
sed -i src/ui/deepin-background-cache.c \
-e 's;/usr/share/backgrounds/default_background.jpg;${deepin-wallpapers}/share/backgrounds/deepin/desktop.jpg;'
'';
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
configureFlags = [ "--disable-themes-documentation" ];
preConfigure = ''
HOME=$TMP
NOCONFIGURE=1 ./autogen.sh
'';
enableParallelBuilding = true;
passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; };
meta = with stdenv.lib; {
description = "2D window manager for Deepin";
homepage = https://github.com/linuxdeepin/deepin-metacity;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}

View file

@ -1,41 +0,0 @@
From 8eeb4febcae517080d6638f8953e02335df79f01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Sat, 20 Apr 2019 00:28:47 -0300
Subject: [PATCH] Get plugins dir from environment variable
---
src/compositor/meta-plugin-manager.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c
index ac5716db..d000100b 100644
--- a/src/compositor/meta-plugin-manager.c
+++ b/src/compositor/meta-plugin-manager.c
@@ -56,14 +56,22 @@ meta_plugin_manager_set_plugin_type (GType gtype)
void
meta_plugin_manager_load (const gchar *plugin_name)
{
- const gchar *dpath = MUTTER_PLUGIN_DIR "/";
+ const gchar *env_var;
+ const gchar *dpath;
gchar *path;
MetaModule *module;
+ env_var = g_getenv ("DEEPIN_MUTTER_PLUGINS_DIR");
+ g_debug ("$DEEPIN_MUTTER_PLUGINS_DIR: %s\n", env_var);
+
+ dpath = env_var == NULL || strlen (env_var) == 0 ? MUTTER_PLUGIN_DIR : env_var;
+ g_debug ("dpath: %s\n", dpath);
+
if (g_path_is_absolute (plugin_name))
path = g_strdup (plugin_name);
else
- path = g_strconcat (dpath, plugin_name, ".so", NULL);
+ path = g_strconcat (dpath, "/", plugin_name, ".so", NULL);
+ g_debug ("path: %s\n", path);
module = g_object_new (META_TYPE_MODULE, "path", path, NULL);
if (!module || !g_type_module_use (G_TYPE_MODULE (module)))
--
2.21.0

View file

@ -1,79 +0,0 @@
{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, gnome3, gtk3,
xorg, libcanberra-gtk3, upower, xkeyboard_config, libxkbcommon,
libstartup_notification, libinput, libgudev, cogl, clutter, systemd,
gsettings-desktop-schemas, deepin-desktop-schemas, wrapGAppsHook,
deepin }:
stdenv.mkDerivation rec {
pname = "deepin-mutter";
version = "3.20.38";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "1aq7606sgn2c6n8wfgxdryw3lprc4va0zjc0r65798w5656fdi31";
};
nativeBuildInputs = [
pkgconfig
intltool
libtool
gnome3.gnome-common
wrapGAppsHook
deepin.setupHook
];
buildInputs = [
clutter
cogl
deepin-desktop-schemas
gnome3.gnome-desktop
gnome3.zenity
gsettings-desktop-schemas
gtk3
libcanberra-gtk3
libgudev
libinput
libstartup_notification
libxkbcommon
systemd
upower
xkeyboard_config
xorg.libxkbfile
];
patches = [
./deepin-mutter.plugins-dir.patch
];
postPatch = ''
searchHardCodedPaths # debugging
sed -i -e "s,Exec=deepin-mutter,Exec=$out/bin/deepin-mutter," data/mutter.desktop.in
'';
configureFlags = [
"--enable-native-backend"
"--enable-compile-warnings=minimum"
];
preConfigure = ''
NOCONFIGURE=1 ./autogen.sh
'';
postFixup = ''
searchHardCodedPaths $out # debugging
'';
enableParallelBuilding = true;
passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; };
meta = with stdenv.lib; {
description = "Base window manager for deepin, fork of gnome mutter";
homepage = https://github.com/linuxdeepin/deepin-mutter;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}

View file

@ -1,75 +0,0 @@
{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, vala, gnome3,
dbus, bamf, clutter-gtk, pantheon, libgee, libcanberra-gtk3,
libwnck3, deepin-menu, deepin-mutter, deepin-wallpapers,
deepin-desktop-schemas, wrapGAppsHook, deepin }:
stdenv.mkDerivation rec {
pname = "deepin-wm";
version = "1.9.38";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "1qhdnv4x78f0gkr94q0j8x029fk9ji4m9jdipgrdm83pnahib80g";
};
nativeBuildInputs = [
pkgconfig
intltool
libtool
vala
gnome3.gnome-common
wrapGAppsHook
deepin.setupHook
];
buildInputs = [
bamf
clutter-gtk
dbus
deepin-desktop-schemas
deepin-menu
deepin-mutter
deepin-wallpapers
gnome3.gnome-desktop
libcanberra-gtk3
libgee
libwnck3
pantheon.granite
];
postPatch = ''
searchHardCodedPaths # debugging
# fix background path
fixPath ${deepin-wallpapers} /usr/share/backgrounds src/Background/BackgroundSource.vala
sed -i 's|default_background.jpg|deepin/desktop.jpg|' src/Background/BackgroundSource.vala
# fix executable paths in desktop files
sed -i -e "s,Exec=dbus-send,Exec=${dbus}/bin/dbus-send," data/gala-multitaskingview.desktop.in
sed -i -e "s,Exec=deepin-wm,Exec=$out/bin/deepin-wm," data/gala.desktop
'';
NIX_CFLAGS_COMPILE = "-DWNCK_I_KNOW_THIS_IS_UNSTABLE";
preConfigure = ''
NOCONFIGURE=1 ./autogen.sh
'';
postFixup = ''
searchHardCodedPaths $out # debugging
'';
enableParallelBuilding = true;
passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; };
meta = with stdenv.lib; {
description = "Deepin Window Manager";
homepage = https://github.com/linuxdeepin/deepin-wm;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}

View file

@ -13,6 +13,7 @@ let
dde-daemon = callPackage ./dde-daemon { };
dde-dock = callPackage ./dde-dock { };
dde-file-manager = callPackage ./dde-file-manager { };
dde-kwin = callPackage ./dde-kwin { };
dde-launcher = callPackage ./dde-launcher { };
dde-network-utils = callPackage ./dde-network-utils { };
dde-polkit-agent = callPackage ./dde-polkit-agent { };
@ -27,9 +28,7 @@ let
deepin-icon-theme = callPackage ./deepin-icon-theme { };
deepin-image-viewer = callPackage ./deepin-image-viewer { };
deepin-menu = callPackage ./deepin-menu { };
deepin-metacity = callPackage ./deepin-metacity { };
deepin-movie-reborn = callPackage ./deepin-movie-reborn { };
deepin-mutter = callPackage ./deepin-mutter { };
deepin-screenshot = callPackage ./deepin-screenshot { };
deepin-shortcut-viewer = callPackage ./deepin-shortcut-viewer { };
deepin-sound-theme = callPackage ./deepin-sound-theme { };
@ -38,9 +37,6 @@ let
};
deepin-turbo = callPackage ./deepin-turbo { };
deepin-wallpapers = callPackage ./deepin-wallpapers { };
deepin-wm = callPackage ./deepin-wm {
vala = pkgs.vala_0_40;
};
dpa-ext-gnomekeyring = callPackage ./dpa-ext-gnomekeyring { };
dtkcore = callPackage ./dtkcore { };
dtkwidget = callPackage ./dtkwidget { };