1 |
commit: b44a22be92f9fc98df14be762688ef7b4d77c5b7 |
2 |
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 20 15:48:14 2022 +0000 |
4 |
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 20 15:48:14 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b44a22be |
7 |
|
8 |
x11-plugins/wmforkplop: modernize configure.ac |
9 |
|
10 |
Adapted from Debian patch: |
11 |
https://salsa.debian.org/debian/wmforkplop/-/blob/master/debian/patches/0005-configure.ac-Modernize.patch |
12 |
|
13 |
Also fix imlib2 support, using pkg-config |
14 |
|
15 |
Closes: https://bugs.gentoo.org/828892 |
16 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
17 |
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org> |
18 |
|
19 |
.../wmforkplop/files/wmforkplop-0.9.3-cflags.patch | 12 -- |
20 |
.../files/wmforkplop-0.9.3-configure.patch | 145 +++++++++++++++++++++ |
21 |
x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild | 11 +- |
22 |
3 files changed, 153 insertions(+), 15 deletions(-) |
23 |
|
24 |
diff --git a/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-cflags.patch b/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-cflags.patch |
25 |
deleted file mode 100644 |
26 |
index 8846e46e2b99..000000000000 |
27 |
--- a/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-cflags.patch |
28 |
+++ /dev/null |
29 |
@@ -1,12 +0,0 @@ |
30 |
---- a/configure 2012-10-23 15:54:48.098767586 +0200 |
31 |
-+++ b/configure 2012-10-23 15:54:56.946510053 +0200 |
32 |
-@@ -3483,9 +3483,6 @@ |
33 |
- |
34 |
- |
35 |
- |
36 |
--if test x$GCC = xyes; then |
37 |
-- CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W"; |
38 |
--fi |
39 |
- |
40 |
- echo "$as_me:$LINENO: checking for X" >&5 |
41 |
- echo $ECHO_N "checking for X... $ECHO_C" >&6 |
42 |
|
43 |
diff --git a/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-configure.patch b/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-configure.patch |
44 |
new file mode 100644 |
45 |
index 000000000000..23063948e861 |
46 |
--- /dev/null |
47 |
+++ b/x11-plugins/wmforkplop/files/wmforkplop-0.9.3-configure.patch |
48 |
@@ -0,0 +1,145 @@ |
49 |
+diff -Naur wmforkplop-0.9.3.orig/configure.ac wmforkplop-0.9.3/configure.ac |
50 |
+--- wmforkplop-0.9.3.orig/configure.ac 2006-12-01 12:32:10.000000000 +0100 |
51 |
++++ wmforkplop-0.9.3/configure.ac 2022-02-20 16:45:58.096842874 +0100 |
52 |
+@@ -1,11 +1,13 @@ |
53 |
+-AC_INIT(wmforkplop.c) |
54 |
+-AM_INIT_AUTOMAKE(wmforkplop, 0.9.3) |
55 |
+-AM_CONFIG_HEADER(config.h) |
56 |
++AC_INIT([wmforkplop], [0.9.3], [http://hules.free.fr/wmforkplop/]) |
57 |
++AM_INIT_AUTOMAKE |
58 |
++LT_INIT |
59 |
++AC_CONFIG_MACRO_DIRS([m4]) |
60 |
++AC_CONFIG_HEADERS([config.h]) |
61 |
+ |
62 |
+ AC_SUBST(VERSION) |
63 |
+ |
64 |
+ ISODATE=`date +%Y-%m-%d` |
65 |
+-AC_SUBST(ISODATE) |
66 |
++AC_SUBST([ISODATE]) |
67 |
+ |
68 |
+ AC_CANONICAL_HOST |
69 |
+ |
70 |
+@@ -19,54 +21,48 @@ |
71 |
+ |
72 |
+ AC_DEFINE(_GNU_SOURCE,[],[uses GNU extensions]) |
73 |
+ |
74 |
+- |
75 |
+-if test x$GCC = xyes; then |
76 |
+- CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W"; |
77 |
+-fi |
78 |
+- |
79 |
+ dnl check for X |
80 |
+ AC_PATH_X |
81 |
+ AC_PATH_XTRA |
82 |
+-if test x$no_x = xyes; then |
83 |
+- echo "You need to supply the path to the X headers and libraries with --x-includes=dir and --x-libraries=dir"; |
84 |
+- exit 1; |
85 |
+-fi; |
86 |
++AS_IF( |
87 |
++ [test "x${no_x}" = "xyes"], |
88 |
++ [AC_MSG_ERROR([You need to supply the path to the X headers and libraries with --x-includes=dir and --x-libraries=dir])] |
89 |
++) |
90 |
+ |
91 |
+ LIBS="${X_PRE_LIBS} ${X_LIBS} -lX11 -lXext ${LIBS} ${X_EXTRA_LIBS}" |
92 |
+ CFLAGS="$CFLAGS $X_CFLAGS" |
93 |
+ |
94 |
+ dnl Checks for library functions. |
95 |
+-AC_CHECK_HEADERS(linux/hdreg.h) |
96 |
++AC_CHECK_HEADERS([linux/hdreg.h]) |
97 |
+ |
98 |
+-AC_CHECK_PROG([IMLIB2_CONFIG_IN_PATH],[imlib2-config],[yes],[no]) |
99 |
+-if test "x$IMLIB2_CONFIG_IN_PATH" = "xno"; then |
100 |
+- AC_ERROR([imlib2-config not found in PATH.. You need to install Imlib2 (and its developpement package)]) |
101 |
+-fi |
102 |
+-IMLIB2_CFLAGS=$(imlib2-config --cflags) |
103 |
+-IMLIB2_LIBS=$(imlib2-config --libs) |
104 |
+-AC_SUBST(IMLIB2_CFLAGS) |
105 |
+-AC_SUBST(IMLIB2_LIBS) |
106 |
++AC_CHECK_PROG([PKG_CONFIG_IN_PATH],[pkg-config],[yes],[no]) |
107 |
++AS_IF( |
108 |
++ [test "x$PKG_CONFIG_IN_PATH" = "xno"], |
109 |
++ [AC_ERROR([pkg-config not found in PATH.. You need to install pkgconf])] |
110 |
++) |
111 |
++ |
112 |
++IMLIB2_CFLAGS=$(pkg-config imlib2 --cflags) |
113 |
++IMLIB2_LIBS=$(pkg-config imlib2 --libs) |
114 |
++AC_SUBST([IMLIB2_CFLAGS]) |
115 |
++AC_SUBST([IMLIB2_LIBS]) |
116 |
+ |
117 |
+ YELLOW="\\033\\1331;33m" |
118 |
+ RESET="\\033\\1330m" |
119 |
+ |
120 |
+-PKG_CHECK_MODULES(PACKAGE, [libgtop-2.0 >= 2.7.90], LIBGTOPBUG="no", LIBGTOPBUG="yes") |
121 |
+-PKG_CHECK_MODULES(PACKAGE, [libgtop-2.0 >= 2.0.0]) |
122 |
+-LIBGTOP_CFLAGS=$PACKAGE_CFLAGS; |
123 |
+-LIBGTOP_LIBS=$PACKAGE_LIBS; |
124 |
+-dnl LIBGTOP_LIBS=`pkg-config --libs libgtop-2.0` |
125 |
+-dnl LIBGTOP_CFLAGS=`pkg-config --cflags libgtop-2.0` |
126 |
+-AC_SUBST(LIBGTOP_LIBS) |
127 |
+-AC_SUBST(LIBGTOP_CFLAGS) |
128 |
+-if test "x$LIBGTOPBUG" = "xyes"; then |
129 |
+- AC_DEFINE(LIBGTOP_BUGGY,[],[defined if libgtop < 2.7.90 is used]) |
130 |
+- echo "Using a buggy version (<2.7.90) of libgtop" |
131 |
+-else |
132 |
+- echo "Using a good version of libgtop" |
133 |
+-fi |
134 |
++PKG_CHECK_MODULES([LIBGTOP], [libgtop-2.0 >= 2.7.90], [LIBGTOPBUG="no"], [LIBGTOPBUG="yes"]) |
135 |
++PKG_CHECK_MODULES([LIBGTOP], [libgtop-2.0 >= 2.0.0]) |
136 |
++AC_SUBST([LIBGTOP_LIBS]) |
137 |
++AC_SUBST([LIBGTOP_CFLAGS]) |
138 |
++AS_IF( |
139 |
++ [test "x$LIBGTOPBUG" = "xyes"], |
140 |
++ [AC_DEFINE([LIBGTOP_BUGGY], [], [defined if libgtop < 2.7.90 is used]) |
141 |
++ AC_MSG_WARN([Using a buggy version (<2.7.90) of libgtop])], |
142 |
++ [AC_MSG_NOTICE([Using a good version of libgtop])] |
143 |
++) |
144 |
++ |
145 |
+ dnl Checks for the gkrellm plugin |
146 |
+ build_gkforkplop="yes" |
147 |
+-AC_ARG_ENABLE(gkrellm, |
148 |
++AC_ARG_ENABLE([gkrellm], |
149 |
+ [ --enable-gkrellm build the gkrellm plugin (requires gtk2 and gkrellm developpement files) (Default is yes) |
150 |
+ --disable-gkrellm do not build the gkrellm plugin], |
151 |
+ [ if test "x$enableval" = "xno" ; then |
152 |
+@@ -90,8 +86,8 @@ |
153 |
+ PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) |
154 |
+ GTK2_CFLAGS=$PACKAGE_CFLAGS; |
155 |
+ GTK2_LIBS=$PACKAGE_LIBS; |
156 |
+- AC_SUBST(GTK2_CFLAGS) |
157 |
+- AC_SUBST(GTK2_LIBS) |
158 |
++ AC_SUBST([GTK2_CFLAGS]) |
159 |
++ AC_SUBST([GTK2_LIBS]) |
160 |
+ SAVECPPFLAGS="$CPPFLAGS" |
161 |
+ CPPFLAGS="$CFLAGS $GTK2_CFLAGS" |
162 |
+ AC_CHECK_HEADERS([gkrellm2/gkrellm.h], [ok=1], [ok=0]) |
163 |
+@@ -103,19 +99,7 @@ |
164 |
+ fi |
165 |
+ CPPFLAGS="$SAVECPPFLAGS" |
166 |
+ fi |
167 |
+-AC_SUBST(GKFORKPLOP) |
168 |
+- |
169 |
++AC_SUBST([GKFORKPLOP]) |
170 |
+ |
171 |
+-AC_OUTPUT(Makefile) |
172 |
+ |
173 |
+-dnl echo "- - - - - - - - - - - - - - - -" |
174 |
+-dnl echo -e "${YELLOW}wmforkplop will be built${RESET}" |
175 |
+-dnl if test "x$build_gkforkplop" = "xno"; then |
176 |
+-dnl echo -e "${YELLOW}gkforkplop.so will NOT be built${RESET}" |
177 |
+-dnl else |
178 |
+-dnl echo -e "${YELLOW}gkforkplop.so will be built${RESET}" |
179 |
+-dnl echo "Check that the plugin is working properly before installing it with:" |
180 |
+-dnl echo " gkrellm -p ./gkforkplop.so" |
181 |
+-dnl echo "and then install the gkrellm plugin with:" |
182 |
+-dnl echo " mv ./gkforkplop.so ~/.gkrellm2/plugins" |
183 |
+-dnl fi |
184 |
++AC_OUTPUT([Makefile]) |
185 |
+diff -Naur wmforkplop-0.9.3.orig/Makefile.am wmforkplop-0.9.3/Makefile.am |
186 |
+--- wmforkplop-0.9.3.orig/Makefile.am 2004-07-11 20:22:33.000000000 +0200 |
187 |
++++ wmforkplop-0.9.3/Makefile.am 2022-02-20 16:41:27.920695917 +0100 |
188 |
+@@ -1,3 +1,5 @@ |
189 |
++ACLOCAL_AMFLAGS = -I m4 |
190 |
++ |
191 |
+ bin_PROGRAMS=wmforkplop |
192 |
+ noinst_PROGRAMS=@GKFORKPLOP@ |
193 |
+ EXTRA_PROGRAMS=gkforkplop.so |
194 |
|
195 |
diff --git a/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild b/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild |
196 |
index 3878d594dd31..2ecbefa3c127 100644 |
197 |
--- a/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild |
198 |
+++ b/x11-plugins/wmforkplop/wmforkplop-0.9.3-r3.ebuild |
199 |
@@ -1,7 +1,8 @@ |
200 |
-# Copyright 1999-2018 Gentoo Foundation |
201 |
+# Copyright 1999-2022 Gentoo Authors |
202 |
# Distributed under the terms of the GNU General Public License v2 |
203 |
|
204 |
EAPI=7 |
205 |
+inherit autotools |
206 |
|
207 |
DESCRIPTION="monitors the forking activity of the kernel and most active processes" |
208 |
HOMEPAGE="http://hules.free.fr/wmforkplop" |
209 |
@@ -15,5 +16,9 @@ DEPEND="gnome-base/libgtop |
210 |
media-libs/imlib2[X]" |
211 |
RDEPEND="${DEPEND}" |
212 |
|
213 |
-# Easier to patch configure directly here |
214 |
-PATCHES=( "${FILESDIR}"/${P}-cflags.patch ) |
215 |
+PATCHES=( "${FILESDIR}"/${P}-configure.patch ) |
216 |
+ |
217 |
+src_prepare() { |
218 |
+ default |
219 |
+ eautoreconf |
220 |
+} |