mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
x11-wm/vtwm: EAPI7->8, drop rplay, fix w/ clang16, -std=gnu89
Also added some lacking EPREFIX and xsetroot dep. Just surface fixes, left old patches/sed as-is given haven't tried runtime (may be due for last rites like rplay). Closes: https://bugs.gentoo.org/874468 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
7
x11-wm/vtwm/files/vtwm-5.4.7-clang16.patch
Normal file
7
x11-wm/vtwm/files/vtwm-5.4.7-clang16.patch
Normal file
@@ -0,0 +1,7 @@
|
||||
https://bugs.gentoo.org/874468
|
||||
--- a/gram.y
|
||||
+++ b/gram.y
|
||||
@@ -86,2 +86,3 @@
|
||||
static void yyerror();
|
||||
+static int yylex();
|
||||
static name_list **list;
|
||||
@@ -8,7 +8,4 @@
|
||||
and whatever windows might be visible within it, are simple
|
||||
point-and-click operations within a scaled representation of the
|
||||
workspace.</longdescription>
|
||||
<use>
|
||||
<flag name="rplay">Enable rplay support, needed for sound.</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit toolchain-funcs
|
||||
inherit flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="TWM descendant that implements a Virtual Desktop"
|
||||
HOMEPAGE="http://www.vtwm.org/"
|
||||
@@ -12,15 +12,18 @@ SRC_URI="http://www.vtwm.org/downloads/${P}.tar.gz"
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ppc sparc x86"
|
||||
IUSE="rplay"
|
||||
|
||||
RDEPEND="x11-libs/libX11
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
COMMON_DEPEND="
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXpm
|
||||
rplay? ( media-sound/rplay )"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-libs/libXt"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
x11-apps/xsetroot"
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
x11-base/xorg-proto"
|
||||
BDEPEND="
|
||||
app-text/rman
|
||||
@@ -29,24 +32,27 @@ BDEPEND="
|
||||
sys-devel/gcc
|
||||
>=x11-misc/imake-1.0.8-r1"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-do-not-rm.patch
|
||||
"${FILESDIR}"/${P}-NO_SOUND_SUPPORT.patch
|
||||
"${FILESDIR}"/${P}-clang16.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}"/${P}-do-not-rm.patch
|
||||
sed -i Imakefile \
|
||||
-e 's:-L/usr/local/lib::g' \
|
||||
-e 's:-I/usr/local/include::g' \
|
||||
|| die "sed Imakefile"
|
||||
if ! use rplay ; then
|
||||
sed -i Imakefile \
|
||||
-e 's:^XCOMM\ \(.*NO_SOUND\):\1:' \
|
||||
-e 's:^\(SOUNDLIB.*\):XCOMM\ \1:' \
|
||||
-e 's:sound\..::g' \
|
||||
|| die "sed Imakefile"
|
||||
eapply "${FILESDIR}"/${P}-NO_SOUND_SUPPORT.patch
|
||||
fi
|
||||
default
|
||||
|
||||
# disable sound support, relies on last-rited media-sound/rplay
|
||||
sed -e 's:^XCOMM\ \(.*NO_SOUND\):\1:' \
|
||||
-e 's:^\(SOUNDLIB.*\):XCOMM\ \1:' \
|
||||
-e 's:sound\..::g' \
|
||||
-e 's:-I/usr/local/include::g' \
|
||||
-e 's:-L/usr/local/lib::g' \
|
||||
-i Imakefile || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-cflags -std=gnu89 # old codebase, incompatible with c2x
|
||||
|
||||
CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \
|
||||
IMAKECPP="${IMAKECPP:-${CHOST}-gcc -E}" xmkmf -a || die "xmkmf failed"
|
||||
}
|
||||
@@ -59,15 +65,17 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake BINDIR=/usr/bin \
|
||||
LIBDIR=/etc/X11 \
|
||||
MANPATH=/usr/share/man \
|
||||
emake BINDIR="${EPREFIX}"/usr/bin \
|
||||
LIBDIR="${EPREFIX}"/etc/X11 \
|
||||
MANPATH="${EPREFIX}"/usr/share/man \
|
||||
DESTDIR="${D}" install
|
||||
|
||||
echo "#!/bin/sh" > vtwm
|
||||
echo "xsetroot -cursor_name left_ptr &" >> vtwm
|
||||
echo "/usr/bin/vtwm" >> vtwm
|
||||
exeinto /etc/X11/Sessions
|
||||
doexe vtwm
|
||||
newexe - vtwm <<-EOF
|
||||
#!/usr/bin/env sh
|
||||
xsetroot -cursor_name left_ptr &
|
||||
"${EPREFIX}/usr/bin/vtwm"
|
||||
EOF
|
||||
|
||||
dodoc doc/{4.7.*,CHANGELOG,BUGS,DEVELOPERS,HISTORY,SOUND,WISHLIST}
|
||||
}
|
||||
Reference in New Issue
Block a user