1 |
commit: 998a6d07e751e84cc5d48c833775fb3b622d1fe5 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 19 22:26:00 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 19 22:41:33 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=998a6d07 |
7 |
|
8 |
x11-wm/wm2: port to EAPI 7 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
x11-wm/wm2/files/wm2-4-gentoo.patch | 45 +++++++++++++++---------------------- |
13 |
x11-wm/wm2/wm2-4-r1.ebuild | 21 ++++++++++------- |
14 |
2 files changed, 31 insertions(+), 35 deletions(-) |
15 |
|
16 |
diff --git a/x11-wm/wm2/files/wm2-4-gentoo.patch b/x11-wm/wm2/files/wm2-4-gentoo.patch |
17 |
index 88c78080c54..f8ff09c0778 100644 |
18 |
--- a/x11-wm/wm2/files/wm2-4-gentoo.patch |
19 |
+++ b/x11-wm/wm2/files/wm2-4-gentoo.patch |
20 |
@@ -1,6 +1,5 @@ |
21 |
-diff -ur wm2-4/Border.C wm2-4.new/Border.C |
22 |
---- wm2-4/Border.C 1997-03-21 12:12:30.000000000 +0100 |
23 |
-+++ wm2-4.new/Border.C 2007-06-30 16:56:10.000000000 +0200 |
24 |
+--- a/Border.C |
25 |
++++ b/Border.C |
26 |
@@ -183,7 +183,7 @@ |
27 |
|
28 |
if (m_label) free(m_label); |
29 |
@@ -10,9 +9,8 @@ diff -ur wm2-4/Border.C wm2-4.new/Border.C |
30 |
|
31 |
int len = strlen(m_label); |
32 |
m_tabHeight = XRotTextWidth(m_tabFont, m_label, len) + 6 + m_tabWidth; |
33 |
-diff -ur wm2-4/Buttons.C wm2-4.new/Buttons.C |
34 |
---- wm2-4/Buttons.C 1997-03-21 12:12:30.000000000 +0100 |
35 |
-+++ wm2-4.new/Buttons.C 2007-06-30 16:56:10.000000000 +0200 |
36 |
+--- a/Buttons.C |
37 |
++++ b/Buttons.C |
38 |
@@ -139,7 +139,11 @@ |
39 |
(allowExit && ((n) > clients.count())) ? "[Exit wm2]" \ |
40 |
: clients.item((n)-1)->label()) |
41 |
@@ -25,9 +23,8 @@ diff -ur wm2-4/Buttons.C wm2-4.new/Buttons.C |
42 |
clients.append(m_hiddenClients.item(i)); |
43 |
} |
44 |
int nh = clients.count() + 1; |
45 |
-diff -ur wm2-4/Client.C wm2-4.new/Client.C |
46 |
---- wm2-4/Client.C 1997-03-21 12:12:30.000000000 +0100 |
47 |
-+++ wm2-4.new/Client.C 2007-06-30 16:56:10.000000000 +0200 |
48 |
+--- a/Client.C |
49 |
++++ b/Client.C |
50 |
@@ -4,7 +4,7 @@ |
51 |
|
52 |
#include <X11/Xutil.h> |
53 |
@@ -55,9 +52,8 @@ diff -ur wm2-4/Client.C wm2-4.new/Client.C |
54 |
} |
55 |
|
56 |
|
57 |
-diff -ur wm2-4/Client.h wm2-4.new/Client.h |
58 |
---- wm2-4/Client.h 1997-03-21 12:12:30.000000000 +0100 |
59 |
-+++ wm2-4.new/Client.h 2007-06-30 16:56:10.000000000 +0200 |
60 |
+--- a/Client.h |
61 |
++++ b/Client.h |
62 |
@@ -2,6 +2,8 @@ |
63 |
#ifndef _CLIENT_H_ |
64 |
#define _CLIENT_H_ |
65 |
@@ -76,9 +72,8 @@ diff -ur wm2-4/Client.h wm2-4.new/Client.h |
66 |
int getIntegerProperty(Atom); |
67 |
|
68 |
// accessors |
69 |
-diff -ur wm2-4/Config.h wm2-4.new/Config.h |
70 |
---- wm2-4/Config.h 1997-03-21 12:12:30.000000000 +0100 |
71 |
-+++ wm2-4.new/Config.h 2007-06-30 16:56:10.000000000 +0200 |
72 |
+--- a/Config.h |
73 |
++++ b/Config.h |
74 |
@@ -39,6 +39,9 @@ |
75 |
|
76 |
#define CONFIG_FRAME_THICKNESS 7 |
77 |
@@ -94,9 +89,8 @@ diff -ur wm2-4/Config.h wm2-4.new/Config.h |
78 |
|
79 |
#endif |
80 |
- |
81 |
-diff -ur wm2-4/General.h wm2-4.new/General.h |
82 |
---- wm2-4/General.h 1997-03-21 12:12:30.000000000 +0100 |
83 |
-+++ wm2-4.new/General.h 2007-06-30 16:56:10.000000000 +0200 |
84 |
+--- a/General.h |
85 |
++++ b/General.h |
86 |
@@ -32,7 +32,7 @@ |
87 |
#define NewString(x) (strcpy((char *)malloc(strlen(x)+1),(x))) |
88 |
|
89 |
@@ -106,9 +100,8 @@ diff -ur wm2-4/General.h wm2-4.new/General.h |
90 |
#endif |
91 |
|
92 |
#define signal(x,y) \ |
93 |
-diff -ur wm2-4/Makefile wm2-4.new/Makefile |
94 |
---- wm2-4/Makefile 1997-03-21 12:12:30.000000000 +0100 |
95 |
-+++ wm2-4.new/Makefile 2007-06-30 16:56:10.000000000 +0200 |
96 |
+--- a/Makefile |
97 |
++++ b/Makefile |
98 |
@@ -1,8 +1,8 @@ |
99 |
|
100 |
-LIBS = -L/usr/X11/lib -lXext -lX11 -lXmu -lm |
101 |
@@ -120,9 +113,8 @@ diff -ur wm2-4/Makefile wm2-4.new/Makefile |
102 |
CFLAGS = -O2 |
103 |
OBJECTS = Border.o Buttons.o Client.o Events.o Main.o Manager.o Rotated.o |
104 |
|
105 |
-diff -ur wm2-4/Manager.C wm2-4.new/Manager.C |
106 |
---- wm2-4/Manager.C 1997-03-21 12:12:30.000000000 +0100 |
107 |
-+++ wm2-4.new/Manager.C 2007-06-30 16:56:10.000000000 +0200 |
108 |
+--- a/Manager.C |
109 |
++++ b/Manager.C |
110 |
@@ -368,7 +368,7 @@ |
111 |
return m_currentTime; |
112 |
} |
113 |
@@ -132,9 +124,8 @@ diff -ur wm2-4/Manager.C wm2-4.new/Manager.C |
114 |
{ |
115 |
m_signalled = True; |
116 |
} |
117 |
-diff -ur wm2-4/Manager.h wm2-4.new/Manager.h |
118 |
---- wm2-4/Manager.h 1997-03-21 12:12:30.000000000 +0100 |
119 |
-+++ wm2-4.new/Manager.h 2007-06-30 16:56:10.000000000 +0200 |
120 |
+--- a/Manager.h |
121 |
++++ b/Manager.h |
122 |
@@ -85,7 +85,7 @@ |
123 |
|
124 |
static Boolean m_initialising; |
125 |
|
126 |
diff --git a/x11-wm/wm2/wm2-4-r1.ebuild b/x11-wm/wm2/wm2-4-r1.ebuild |
127 |
index 4e500c95b62..423d2be09b8 100644 |
128 |
--- a/x11-wm/wm2/wm2-4-r1.ebuild |
129 |
+++ b/x11-wm/wm2/wm2-4-r1.ebuild |
130 |
@@ -1,8 +1,9 @@ |
131 |
# Copyright 1999-2021 Gentoo Authors |
132 |
# Distributed under the terms of the GNU General Public License v2 |
133 |
|
134 |
-EAPI=5 |
135 |
-inherit epatch toolchain-funcs |
136 |
+EAPI=7 |
137 |
+ |
138 |
+inherit toolchain-funcs |
139 |
|
140 |
DESCRIPTION="Small, unconfigurable window manager" |
141 |
HOMEPAGE="http://www.all-day-breakfast.com/wm2/" |
142 |
@@ -16,16 +17,21 @@ RDEPEND="x11-libs/libXmu" |
143 |
DEPEND="${RDEPEND} |
144 |
x11-base/xorg-proto" |
145 |
|
146 |
+PATCHES=( |
147 |
+ "${FILESDIR}"/${P}-gentoo.patch |
148 |
+) |
149 |
+ |
150 |
src_prepare() { |
151 |
- epatch "${FILESDIR}/${P}-gentoo.patch" |
152 |
+ default |
153 |
+ |
154 |
sed -e "s/CFLAGS/CXXFLAGS/" \ |
155 |
-e "s/\$(CCC) -o/\$(CCC) \$(LDFLAGS) -o/" \ |
156 |
-i Makefile || die #334681 |
157 |
|
158 |
sed 's/^#//' Config.h > wm2.conf |
159 |
- if [ -e "/etc/wm2.conf" ]; then |
160 |
- echo "#undef _CONFIG_H_" >> Config.h |
161 |
- awk '/^[^/]/{print "#" $0}' /etc/wm2.conf >> Config.h |
162 |
+ if [[ -e "${EPREFIX}"/etc/wm2.conf ]] ; then |
163 |
+ echo "#undef _CONFIG_H_" >> Config.h || die |
164 |
+ awk '/^[^/]/{print "#" $0}' "${EPREFIX}"/etc/wm2.conf >> Config.h || die |
165 |
fi |
166 |
} |
167 |
|
168 |
@@ -38,18 +44,17 @@ src_compile() { |
169 |
|
170 |
src_install() { |
171 |
dobin wm2 |
172 |
+ |
173 |
insinto /etc |
174 |
doins wm2.conf |
175 |
dodoc README |
176 |
} |
177 |
|
178 |
pkg_postinst() { |
179 |
- echo |
180 |
elog "wm2 is unconfigurable after you have installed. If you want to" |
181 |
elog "change settings of wm2, please have a look at /etc/wm2.conf" |
182 |
elog "and rewrite it, then emerge wm2 again (wm2 ebuild uses settings" |
183 |
elog "from that file automatically). If you think wm2 lacks some important" |
184 |
elog "features that you want to use (such as background pixmaps)," |
185 |
elog "consider using wmx, written by the same author." |
186 |
- echo |
187 |
} |