summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-19 23:26:00 +0100
committerSam James <sam@gentoo.org>2021-04-19 23:41:33 +0100
commit998a6d07e751e84cc5d48c833775fb3b622d1fe5 (patch)
tree4776c7d9fd4dd0063c26eed5d0d0339a28b91d5d /x11-wm/wm2
parentx11-themes/gtk-engines-qtpixmap: port to EAPI 7 (diff)
downloadgentoo-998a6d07e751e84cc5d48c833775fb3b622d1fe5.tar.gz
gentoo-998a6d07e751e84cc5d48c833775fb3b622d1fe5.tar.bz2
gentoo-998a6d07e751e84cc5d48c833775fb3b622d1fe5.zip
x11-wm/wm2: port to EAPI 7
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-wm/wm2')
-rw-r--r--x11-wm/wm2/files/wm2-4-gentoo.patch45
-rw-r--r--x11-wm/wm2/wm2-4-r1.ebuild21
2 files changed, 31 insertions, 35 deletions
diff --git a/x11-wm/wm2/files/wm2-4-gentoo.patch b/x11-wm/wm2/files/wm2-4-gentoo.patch
index 88c78080c542..f8ff09c07780 100644
--- a/x11-wm/wm2/files/wm2-4-gentoo.patch
+++ b/x11-wm/wm2/files/wm2-4-gentoo.patch
@@ -1,6 +1,5 @@
-diff -ur wm2-4/Border.C wm2-4.new/Border.C
---- wm2-4/Border.C 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Border.C 2007-06-30 16:56:10.000000000 +0200
+--- a/Border.C
++++ b/Border.C
@@ -183,7 +183,7 @@
if (m_label) free(m_label);
@@ -10,9 +9,8 @@ diff -ur wm2-4/Border.C wm2-4.new/Border.C
int len = strlen(m_label);
m_tabHeight = XRotTextWidth(m_tabFont, m_label, len) + 6 + m_tabWidth;
-diff -ur wm2-4/Buttons.C wm2-4.new/Buttons.C
---- wm2-4/Buttons.C 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Buttons.C 2007-06-30 16:56:10.000000000 +0200
+--- a/Buttons.C
++++ b/Buttons.C
@@ -139,7 +139,11 @@
(allowExit && ((n) > clients.count())) ? "[Exit wm2]" \
: clients.item((n)-1)->label())
@@ -25,9 +23,8 @@ diff -ur wm2-4/Buttons.C wm2-4.new/Buttons.C
clients.append(m_hiddenClients.item(i));
}
int nh = clients.count() + 1;
-diff -ur wm2-4/Client.C wm2-4.new/Client.C
---- wm2-4/Client.C 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Client.C 2007-06-30 16:56:10.000000000 +0200
+--- a/Client.C
++++ b/Client.C
@@ -4,7 +4,7 @@
#include <X11/Xutil.h>
@@ -55,9 +52,8 @@ diff -ur wm2-4/Client.C wm2-4.new/Client.C
}
-diff -ur wm2-4/Client.h wm2-4.new/Client.h
---- wm2-4/Client.h 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Client.h 2007-06-30 16:56:10.000000000 +0200
+--- a/Client.h
++++ b/Client.h
@@ -2,6 +2,8 @@
#ifndef _CLIENT_H_
#define _CLIENT_H_
@@ -76,9 +72,8 @@ diff -ur wm2-4/Client.h wm2-4.new/Client.h
int getIntegerProperty(Atom);
// accessors
-diff -ur wm2-4/Config.h wm2-4.new/Config.h
---- wm2-4/Config.h 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Config.h 2007-06-30 16:56:10.000000000 +0200
+--- a/Config.h
++++ b/Config.h
@@ -39,6 +39,9 @@
#define CONFIG_FRAME_THICKNESS 7
@@ -94,9 +89,8 @@ diff -ur wm2-4/Config.h wm2-4.new/Config.h
#endif
-
-diff -ur wm2-4/General.h wm2-4.new/General.h
---- wm2-4/General.h 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/General.h 2007-06-30 16:56:10.000000000 +0200
+--- a/General.h
++++ b/General.h
@@ -32,7 +32,7 @@
#define NewString(x) (strcpy((char *)malloc(strlen(x)+1),(x)))
@@ -106,9 +100,8 @@ diff -ur wm2-4/General.h wm2-4.new/General.h
#endif
#define signal(x,y) \
-diff -ur wm2-4/Makefile wm2-4.new/Makefile
---- wm2-4/Makefile 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Makefile 2007-06-30 16:56:10.000000000 +0200
+--- a/Makefile
++++ b/Makefile
@@ -1,8 +1,8 @@
-LIBS = -L/usr/X11/lib -lXext -lX11 -lXmu -lm
@@ -120,9 +113,8 @@ diff -ur wm2-4/Makefile wm2-4.new/Makefile
CFLAGS = -O2
OBJECTS = Border.o Buttons.o Client.o Events.o Main.o Manager.o Rotated.o
-diff -ur wm2-4/Manager.C wm2-4.new/Manager.C
---- wm2-4/Manager.C 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Manager.C 2007-06-30 16:56:10.000000000 +0200
+--- a/Manager.C
++++ b/Manager.C
@@ -368,7 +368,7 @@
return m_currentTime;
}
@@ -132,9 +124,8 @@ diff -ur wm2-4/Manager.C wm2-4.new/Manager.C
{
m_signalled = True;
}
-diff -ur wm2-4/Manager.h wm2-4.new/Manager.h
---- wm2-4/Manager.h 1997-03-21 12:12:30.000000000 +0100
-+++ wm2-4.new/Manager.h 2007-06-30 16:56:10.000000000 +0200
+--- a/Manager.h
++++ b/Manager.h
@@ -85,7 +85,7 @@
static Boolean m_initialising;
diff --git a/x11-wm/wm2/wm2-4-r1.ebuild b/x11-wm/wm2/wm2-4-r1.ebuild
index 4e500c95b628..423d2be09b8c 100644
--- a/x11-wm/wm2/wm2-4-r1.ebuild
+++ b/x11-wm/wm2/wm2-4-r1.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit epatch toolchain-funcs
+EAPI=7
+
+inherit toolchain-funcs
DESCRIPTION="Small, unconfigurable window manager"
HOMEPAGE="http://www.all-day-breakfast.com/wm2/"
@@ -16,16 +17,21 @@ RDEPEND="x11-libs/libXmu"
DEPEND="${RDEPEND}
x11-base/xorg-proto"
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}/${P}-gentoo.patch"
+ default
+
sed -e "s/CFLAGS/CXXFLAGS/" \
-e "s/\$(CCC) -o/\$(CCC) \$(LDFLAGS) -o/" \
-i Makefile || die #334681
sed 's/^#//' Config.h > wm2.conf
- if [ -e "/etc/wm2.conf" ]; then
- echo "#undef _CONFIG_H_" >> Config.h
- awk '/^[^/]/{print "#" $0}' /etc/wm2.conf >> Config.h
+ if [[ -e "${EPREFIX}"/etc/wm2.conf ]] ; then
+ echo "#undef _CONFIG_H_" >> Config.h || die
+ awk '/^[^/]/{print "#" $0}' "${EPREFIX}"/etc/wm2.conf >> Config.h || die
fi
}
@@ -38,18 +44,17 @@ src_compile() {
src_install() {
dobin wm2
+
insinto /etc
doins wm2.conf
dodoc README
}
pkg_postinst() {
- echo
elog "wm2 is unconfigurable after you have installed. If you want to"
elog "change settings of wm2, please have a look at /etc/wm2.conf"
elog "and rewrite it, then emerge wm2 again (wm2 ebuild uses settings"
elog "from that file automatically). If you think wm2 lacks some important"
elog "features that you want to use (such as background pixmaps),"
elog "consider using wmx, written by the same author."
- echo
}