x11-misc/dunst: update config path

Closes: https://bugs.gentoo.org/834050
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
Conrad Kostecki
2022-02-28 01:03:01 +01:00
parent 06d7fbaa37
commit c02c8cd677
4 changed files with 185 additions and 0 deletions
+79
View File
@@ -0,0 +1,79 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit systemd toolchain-funcs
DESCRIPTION="Lightweight replacement for common notification daemons"
HOMEPAGE="https://dunst-project.org/ https://github.com/dunst-project/dunst"
SRC_URI="https://github.com/dunst-project/dunst/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv x86"
IUSE="wayland"
DEPEND="
dev-libs/glib:2
sys-apps/dbus
x11-libs/cairo[X,glib]
x11-libs/gdk-pixbuf:2
x11-libs/libX11
x11-libs/libXext
x11-libs/libXScrnSaver
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libnotify
x11-libs/pango[X]
x11-misc/xdg-utils
wayland? ( dev-libs/wayland )
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-lang/perl
virtual/pkgconfig
wayland? ( dev-libs/wayland-protocols )
"
src_prepare() {
default
# Respect users CFLAGS
sed -e 's/-Os//' -i config.mk || die
# Use correct path for dbus and system unit
sed -e "s|##PREFIX##|${EPREFIX}/usr|" -i dunst.systemd.service.in || die
sed -e "s|##PREFIX##|${EPREFIX}/usr|" -i org.knopwob.dunst.service.in || die
}
src_configure() {
tc-export CC PKG_CONFIG
default
}
src_compile() {
local myemakeargs=(
SYSCONFDIR="${EPREFIX}/etc/xdg"
SYSTEMD="0"
WAYLAND="$(usex wayland 1 0)"
)
emake "${myemakeargs[@]}"
}
src_install() {
local myemakeargs=(
PREFIX="${ED}/usr"
SYSCONFDIR="${ED}/etc/xdg"
SYSTEMD="0"
WAYLAND="$(usex wayland 1 0)"
)
emake "${myemakeargs[@]}" install
systemd_newuserunit dunst.systemd.service.in dunst.service
}
+81
View File
@@ -0,0 +1,81 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit systemd toolchain-funcs
DESCRIPTION="Lightweight replacement for common notification daemons"
HOMEPAGE="https://dunst-project.org/ https://github.com/dunst-project/dunst"
SRC_URI="https://github.com/dunst-project/dunst/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
IUSE="wayland"
DEPEND="
dev-libs/glib:2
sys-apps/dbus
x11-libs/cairo[X,glib]
x11-libs/gdk-pixbuf:2
x11-libs/libX11
x11-libs/libXext
x11-libs/libXScrnSaver
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libnotify
x11-libs/pango[X]
x11-misc/xdg-utils
wayland? ( dev-libs/wayland )
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-lang/perl
virtual/pkgconfig
wayland? ( dev-libs/wayland-protocols )
"
PATCHES=( "${FILESDIR}/${PN}-1.8.0-xdg.patch" )
src_prepare() {
default
# Respect users CFLAGS
sed -e 's/-Os//' -i config.mk || die
# Use correct path for dbus and system unit
sed -e "s|##PREFIX##|${EPREFIX}/usr|" -i dunst.systemd.service.in || die
sed -e "s|##PREFIX##|${EPREFIX}/usr|" -i org.knopwob.dunst.service.in || die
}
src_configure() {
tc-export CC PKG_CONFIG
default
}
src_compile() {
local myemakeargs=(
SYSCONFDIR="${EPREFIX}/etc/xdg"
SYSTEMD="0"
WAYLAND="$(usex wayland 1 0)"
)
emake "${myemakeargs[@]}"
}
src_install() {
local myemakeargs=(
PREFIX="${ED}/usr"
SYSCONFDIR="${ED}/etc/xdg"
SYSTEMD="0"
WAYLAND="$(usex wayland 1 0)"
)
emake "${myemakeargs[@]}" install
systemd_newuserunit dunst.systemd.service.in dunst.service
}
+2
View File
@@ -39,6 +39,8 @@ BDEPEND="
wayland? ( dev-libs/wayland-protocols )
"
PATCHES=( "${FILESDIR}/${PN}-1.8.0-xdg.patch" )
src_prepare() {
default
@@ -0,0 +1,23 @@
From 50743754de28da6d474c001e6b7e04ada789c04a Mon Sep 17 00:00:00 2001
From: Aleksei Bavshin <alebastr89@gmail.com>
Date: Sun, 27 Feb 2022 08:49:41 -0800
Subject: [PATCH] Use correct variable for the configuration file paths
Fixes #1041
---
src/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils.c b/src/utils.c
index 380dac26..90c47a9a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -448,7 +448,7 @@ FILE *fopen_verbose(const char * const path)
/* see utils.h */
void add_paths_from_env(GPtrArray *arr, char *env_name, char *subdir, char *alternative) {
- const char *xdg_data_dirs = g_getenv("XDG_DATA_DIRS");
+ const char *xdg_data_dirs = g_getenv(env_name);
if (!xdg_data_dirs)
xdg_data_dirs = alternative;