diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2022-02-20 16:48:14 +0100 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2022-02-20 16:48:14 +0100 |
commit | b44a22be92f9fc98df14be762688ef7b4d77c5b7 (patch) | |
tree | 41c1f20cef36b6aeac69b96f20ce3749727ef1d6 /x11-plugins | |
parent | x11-plugins/wmpop3lb: better sed command for $CC (diff) | |
download | gentoo-b44a22be92f9fc98df14be762688ef7b4d77c5b7.tar.gz gentoo-b44a22be92f9fc98df14be762688ef7b4d77c5b7.tar.bz2 gentoo-b44a22be92f9fc98df14be762688ef7b4d77c5b7.zip |
x11-plugins/wmforkplop: modernize configure.ac
Adapted from Debian patch:
https://salsa.debian.org/debian/wmforkplop/-/blob/master/debian/patches/0005-configure.ac-Modernize.patch
Also fix imlib2 support, using pkg-config
Closes: https://bugs.gentoo.org/828892
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'x11-plugins')
3 files changed, 153 insertions, 15 deletions
diff --git a/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-cflags.patch b/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-cflags.patch deleted file mode 100644 index 8846e46e2b99..000000000000 --- a/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-cflags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/configure 2012-10-23 15:54:48.098767586 +0200 -+++ b/configure 2012-10-23 15:54:56.946510053 +0200 -@@ -3483,9 +3483,6 @@ - - - --if test x$GCC = xyes; then -- CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W"; --fi - - echo "$as_me:$LINENO: checking for X" >&5 - echo $ECHO_N "checking for X... $ECHO_C" >&6 diff --git a/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-configure.patch b/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-configure.patch new file mode 100644 index 000000000000..23063948e861 --- /dev/null +++ b/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-configure.patch @@ -0,0 +1,145 @@ +diff -Naur wmforkplop-0.9.3.orig/configure.ac wmforkplop-0.9.3/configure.ac +--- wmforkplop-0.9.3.orig/configure.ac 2006-12-01 12:32:10.000000000 +0100 ++++ wmforkplop-0.9.3/configure.ac 2022-02-20 16:45:58.096842874 +0100 +@@ -1,11 +1,13 @@ +-AC_INIT(wmforkplop.c) +-AM_INIT_AUTOMAKE(wmforkplop, 0.9.3) +-AM_CONFIG_HEADER(config.h) ++AC_INIT([wmforkplop], [0.9.3], [http://hules.free.fr/wmforkplop/]) ++AM_INIT_AUTOMAKE ++LT_INIT ++AC_CONFIG_MACRO_DIRS([m4]) ++AC_CONFIG_HEADERS([config.h]) + + AC_SUBST(VERSION) + + ISODATE=`date +%Y-%m-%d` +-AC_SUBST(ISODATE) ++AC_SUBST([ISODATE]) + + AC_CANONICAL_HOST + +@@ -19,54 +21,48 @@ + + AC_DEFINE(_GNU_SOURCE,[],[uses GNU extensions]) + +- +-if test x$GCC = xyes; then +- CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W"; +-fi +- + 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" + +-PKG_CHECK_MODULES(PACKAGE, [libgtop-2.0 >= 2.7.90], LIBGTOPBUG="no", LIBGTOPBUG="yes") +-PKG_CHECK_MODULES(PACKAGE, [libgtop-2.0 >= 2.0.0]) +-LIBGTOP_CFLAGS=$PACKAGE_CFLAGS; +-LIBGTOP_LIBS=$PACKAGE_LIBS; +-dnl LIBGTOP_LIBS=`pkg-config --libs libgtop-2.0` +-dnl LIBGTOP_CFLAGS=`pkg-config --cflags libgtop-2.0` +-AC_SUBST(LIBGTOP_LIBS) +-AC_SUBST(LIBGTOP_CFLAGS) +-if test "x$LIBGTOPBUG" = "xyes"; then +- AC_DEFINE(LIBGTOP_BUGGY,[],[defined if libgtop < 2.7.90 is used]) +- echo "Using a buggy version (<2.7.90) of libgtop" +-else +- echo "Using a good version of libgtop" +-fi ++PKG_CHECK_MODULES([LIBGTOP], [libgtop-2.0 >= 2.7.90], [LIBGTOPBUG="no"], [LIBGTOPBUG="yes"]) ++PKG_CHECK_MODULES([LIBGTOP], [libgtop-2.0 >= 2.0.0]) ++AC_SUBST([LIBGTOP_LIBS]) ++AC_SUBST([LIBGTOP_CFLAGS]) ++AS_IF( ++ [test "x$LIBGTOPBUG" = "xyes"], ++ [AC_DEFINE([LIBGTOP_BUGGY], [], [defined if libgtop < 2.7.90 is used]) ++ AC_MSG_WARN([Using a buggy version (<2.7.90) of libgtop])], ++ [AC_MSG_NOTICE([Using a good version of libgtop])] ++) ++ + dnl Checks for the gkrellm plugin + build_gkforkplop="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 +@@ -90,8 +86,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]) +@@ -103,19 +99,7 @@ + fi + CPPFLAGS="$SAVECPPFLAGS" + fi +-AC_SUBST(GKFORKPLOP) +- ++AC_SUBST([GKFORKPLOP]) + +-AC_OUTPUT(Makefile) + +-dnl echo "- - - - - - - - - - - - - - - -" +-dnl echo -e "${YELLOW}wmforkplop will be built${RESET}" +-dnl if test "x$build_gkforkplop" = "xno"; then +-dnl echo -e "${YELLOW}gkforkplop.so will NOT be built${RESET}" +-dnl else +-dnl echo -e "${YELLOW}gkforkplop.so will be built${RESET}" +-dnl echo "Check that the plugin is working properly before installing it with:" +-dnl echo " gkrellm -p ./gkforkplop.so" +-dnl echo "and then install the gkrellm plugin with:" +-dnl echo " mv ./gkforkplop.so ~/.gkrellm2/plugins" +-dnl fi ++AC_OUTPUT([Makefile]) +diff -Naur wmforkplop-0.9.3.orig/Makefile.am wmforkplop-0.9.3/Makefile.am +--- wmforkplop-0.9.3.orig/Makefile.am 2004-07-11 20:22:33.000000000 +0200 ++++ wmforkplop-0.9.3/Makefile.am 2022-02-20 16:41:27.920695917 +0100 +@@ -1,3 +1,5 @@ ++ACLOCAL_AMFLAGS = -I m4 ++ + bin_PROGRAMS=wmforkplop + noinst_PROGRAMS=@GKFORKPLOP@ + EXTRA_PROGRAMS=gkforkplop.so diff --git a/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild b/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild index 3878d594dd31..2ecbefa3c127 100644 --- a/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild +++ b/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +inherit autotools DESCRIPTION="monitors the forking activity of the kernel and most active processes" HOMEPAGE="http://hules.free.fr/wmforkplop" @@ -15,5 +16,9 @@ DEPEND="gnome-base/libgtop media-libs/imlib2[X]" RDEPEND="${DEPEND}" -# Easier to patch configure directly here -PATCHES=( "${FILESDIR}"/${P}-cflags.patch ) +PATCHES=( "${FILESDIR}"/${P}-configure.patch ) + +src_prepare() { + default + eautoreconf +} |