summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2022-07-15 14:24:47 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2022-07-15 14:25:35 +0200
commitda73faed3c16f963f2a6a1c1060c68447709793e (patch)
tree6a1dd00f133ddfe9e48342e5e350b68a2ce4663c
parentx11-plugins/wmhdplop: drop 0.9.10 (diff)
downloadgentoo-da73faed3c16f963f2a6a1c1060c68447709793e.tar.gz
gentoo-da73faed3c16f963f2a6a1c1060c68447709793e.tar.bz2
gentoo-da73faed3c16f963f2a6a1c1060c68447709793e.zip
x11-plugins/wmhdplop: fix imlib2 support
Adapt patch from wmforkplop, also backport an indent fix Closes: https://bugs.gentoo.org/828926 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
-rw-r--r--x11-plugins/wmhdplop/files/wmhdplop-0.9.11-configure.patch112
-rw-r--r--x11-plugins/wmhdplop/files/wmhdplop-0.9.11-indent.patch38
-rw-r--r--x11-plugins/wmhdplop/wmhdplop-0.9.11-r1.ebuild (renamed from x11-plugins/wmhdplop/wmhdplop-0.9.11.ebuild)9
3 files changed, 155 insertions, 4 deletions
diff --git a/x11-plugins/wmhdplop/files/wmhdplop-0.9.11-configure.patch b/x11-plugins/wmhdplop/files/wmhdplop-0.9.11-configure.patch
new file mode 100644
index 000000000000..3eabe853f62a
--- /dev/null
+++ b/x11-plugins/wmhdplop/files/wmhdplop-0.9.11-configure.patch
@@ -0,0 +1,112 @@
+diff -Naur wmhdplop-0.9.11.orig/configure.ac wmhdplop-0.9.11/configure.ac
+--- wmhdplop-0.9.11.orig/configure.ac 2018-12-11 02:45:33.000000000 +0100
++++ wmhdplop-0.9.11/configure.ac 2022-07-15 14:17:50.244012667 +0200
+@@ -1,12 +1,14 @@
+-AC_INIT(wmhdplop, 0.9.11)
++AC_INIT([wmhdplop], [0.9.11], [https://www.dockapps.net/wmhdplop])
+ AC_CONFIG_SRCDIR(wmhdplop.c)
+ AM_INIT_AUTOMAKE
++LT_INIT
++AC_CONFIG_MACRO_DIRS([m4])
+ AM_CONFIG_HEADER(config.h)
+
+ AC_SUBST(VERSION)
+
+ ISODATE=`date +%Y-%m-%d`
+-AC_SUBST(ISODATE)
++AC_SUBST([ISODATE])
+
+ AC_CANONICAL_HOST
+
+@@ -19,39 +21,42 @@
+ AC_DEFINE(_GNU_SOURCE,[],[uses GNU extensions])
+
+
+-if test x$GCC = xyes; then
+- CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W";
+-fi
++AS_IF(
++ [test "x${GCC}" = "xyes"],
++ [CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W"]
++)
+
+ dnl check for X
+ AC_PATH_X
+ AC_PATH_XTRA
+-if test x$no_x = xyes; then
+- echo "You need to supply the path to the X headers and libraries with --x-includes=dir and --x-libraries=dir";
+- exit 1;
+-fi;
++AS_IF(
++ [test "x${no_x}" = "xyes"],
++ [AC_MSG_ERROR([You need to supply the path to the X headers and libraries with --x-includes=dir and --x-libraries=dir])]
++)
+
+ LIBS="${X_PRE_LIBS} ${X_LIBS} -lX11 -lXext ${LIBS} ${X_EXTRA_LIBS}"
+ CFLAGS="$CFLAGS $X_CFLAGS"
+
+ dnl Checks for library functions.
+-AC_CHECK_HEADERS(linux/hdreg.h)
++AC_CHECK_HEADERS([linux/hdreg.h])
+
+-AC_CHECK_PROG([IMLIB2_CONFIG_IN_PATH],[imlib2-config],[yes],[no])
+-if test "x$IMLIB2_CONFIG_IN_PATH" = "xno"; then
+- AC_ERROR([imlib2-config not found in PATH.. You need to install Imlib2 (and its developpement package)])
+-fi
+-IMLIB2_CFLAGS=$(imlib2-config --cflags)
+-IMLIB2_LIBS=$(imlib2-config --libs)
+-AC_SUBST(IMLIB2_CFLAGS)
+-AC_SUBST(IMLIB2_LIBS)
++AC_CHECK_PROG([PKG_CONFIG_IN_PATH],[pkg-config],[yes],[no])
++AS_IF(
++ [test "x$PKG_CONFIG_IN_PATH" = "xno"],
++ [AC_ERROR([pkg-config not found in PATH.. You need to install pkgconf])]
++)
++
++IMLIB2_CFLAGS=$(pkg-config imlib2 --cflags)
++IMLIB2_LIBS=$(pkg-config imlib2 --libs)
++AC_SUBST([IMLIB2_CFLAGS])
++AC_SUBST([IMLIB2_LIBS])
+
+ YELLOW="\\033\\1331;33m"
+ RESET="\\033\\1330m"
+
+ dnl Checks for the gkrellm plugin
+ build_gkhdplop="yes"
+-AC_ARG_ENABLE(gkrellm,
++AC_ARG_ENABLE([gkrellm],
+ [ --enable-gkrellm build the gkrellm plugin (requires gtk2 and gkrellm developpement files) (Default is yes)
+ --disable-gkrellm do not build the gkrellm plugin],
+ [ if test "x$enableval" = "xno" ; then
+@@ -69,8 +74,8 @@
+ PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
+ GTK2_CFLAGS=$PACKAGE_CFLAGS;
+ GTK2_LIBS=$PACKAGE_LIBS;
+- AC_SUBST(GTK2_CFLAGS)
+- AC_SUBST(GTK2_LIBS)
++ AC_SUBST([GTK2_CFLAGS])
++ AC_SUBST([GTK2_LIBS])
+ SAVECPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CFLAGS $GTK2_CFLAGS"
+ AC_CHECK_HEADERS([gkrellm2/gkrellm.h], [ok=1], [ok=0])
+@@ -82,7 +87,7 @@
+ fi
+ CPPFLAGS="$SAVECPPFLAGS"
+ fi
+-AC_SUBST(GKHDPLOP)
++AC_SUBST([GKHDPLOP])
+
+
+ AC_OUTPUT(Makefile)
+diff -Naur wmhdplop-0.9.11.orig/Makefile.am wmhdplop-0.9.11/Makefile.am
+--- wmhdplop-0.9.11.orig/Makefile.am 2018-12-08 22:48:27.000000000 +0100
++++ wmhdplop-0.9.11/Makefile.am 2022-07-15 14:11:07.842722348 +0200
+@@ -8,6 +8,8 @@
+
+ EXTRA_DIST=autogen.sh gkrellm_hdplop.c
+
++ACLOCAL_AMFLAGS = -I m4
++
+ IMLIB2_LIBS=@IMLIB2_LIBS@
+ IMLIB2_CFLAGS=@IMLIB2_CFLAGS@
+
diff --git a/x11-plugins/wmhdplop/files/wmhdplop-0.9.11-indent.patch b/x11-plugins/wmhdplop/files/wmhdplop-0.9.11-indent.patch
new file mode 100644
index 000000000000..30e44715ea2a
--- /dev/null
+++ b/x11-plugins/wmhdplop/files/wmhdplop-0.9.11-indent.patch
@@ -0,0 +1,38 @@
+From f597fc7288f57d1dfddd5bb559cc7b0f598d15e5 Mon Sep 17 00:00:00 2001
+From: "Torrance, Douglas" <dtorrance@piedmont.edu>
+Date: Sun, 10 Oct 2021 10:01:04 +0000
+Subject: [PATCH] wmhdplop: Fix "misleadingly indented" compiler warnings.
+
+---
+ wmhdplop/wmhdplop.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/wmhdplop.c b/wmhdplop.c
+index 16b9a4f..bbbe971 100644
+--- a/wmhdplop.c
++++ b/wmhdplop.c
+@@ -421,7 +421,9 @@ static void draw_hdlist(App *app) {
+ //printf("update : first displayed(%d) = %p\n", cnt, dl);
+
+ for (dl = first_dev_in_list(), dev_cnt=hd_cnt=-1; dl; dl = dl->next) {
+- if (dl->part_id == 0) ++hd_cnt; if (!is_displayed(dl->hd_id, dl->part_id)) continue; ++dev_cnt;
++ if (dl->part_id == 0) ++hd_cnt;
++ if (!is_displayed(dl->hd_id, dl->part_id)) continue;
++ ++dev_cnt;
+ imlib_get_text_size(shorten_name(dl),&w,&h);
+ lw = MAX(w,lw);
+ lh += h;
+@@ -440,7 +442,9 @@ static void draw_hdlist(App *app) {
+ imlib_image_draw_rectangle(lx-1,ly-1,lw+2,lh+2);
+
+ for (dl = first_dev_in_list(), dev_cnt=hd_cnt=-1; dl; dl = dl->next) {
+- if (dl->part_id==0) ++hd_cnt; if (!is_displayed(dl->hd_id, dl->part_id)) continue; ++dev_cnt;
++ if (dl->part_id==0) ++hd_cnt;
++ if (!is_displayed(dl->hd_id, dl->part_id)) continue;
++ ++dev_cnt;
+ int x = lx, y = ly + lh - dev_cnt * h;
+ if (!Prefs.disable_hd_leds) {
+ if (dl->touched_r) {
+--
+2.11.4.GIT
+
diff --git a/x11-plugins/wmhdplop/wmhdplop-0.9.11.ebuild b/x11-plugins/wmhdplop/wmhdplop-0.9.11-r1.ebuild
index 2806056295d9..2f766c788980 100644
--- a/x11-plugins/wmhdplop/wmhdplop-0.9.11.ebuild
+++ b/x11-plugins/wmhdplop/wmhdplop-0.9.11-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit autotools
DESCRIPTION="a dockapp for monitoring disk activities with fancy visuals"
@@ -21,14 +21,15 @@ RDEPEND="media-libs/imlib2[X]
DEPEND="${RDEPEND}"
PATCHES=(
- "${FILESDIR}"/${PN}-0.9.10-cflags.patch
+ "${FILESDIR}"/${P}-configure.patch
+ "${FILESDIR}"/${P}-indent.patch
)
DOCS=( AUTHORS ChangeLog NEWS README )
src_prepare() {
- eautoreconf
default
+ eautoreconf
}
src_configure() {