summaryrefslogtreecommitdiff
blob: c4cd6abef175b55878a220ce7ed1164a071fc520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

MY_P="${PN}-$(ver_cut 1-3)"
MY_DEB_P="${PN}_$(ver_cut 1-3)-$(ver_cut 5)"

DESCRIPTION="Splitting terminals into two shells"
HOMEPAGE="https://slouken.libsdl.org/projects/splitvt/"
SRC_URI="
	https://slouken.libsdl.org/projects/splitvt/${MY_P}.tar.gz
	mirror://debian/pool/main/s/splitvt/${MY_DEB_P}.diff.gz
	https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-fix-build-for-clang16.patch.xz
"
S="${WORKDIR}/${MY_P}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ia64 ppc sparc x86"

DEPEND="sys-libs/ncurses:="
RDEPEND="${DEPEND}"

PATCHES=(
	"${WORKDIR}"/${MY_DEB_P}.diff
	"${FILESDIR}"/1.6.6-ldflags.patch
	"${WORKDIR}"/${P}-fix-build-for-clang16.patch
)

DOCS=( ANNOUNCE BLURB CHANGES NOTES README TODO )

src_prepare() {
	default
	sed -i \
		-e "s|/usr/local/bin|${ED}/usr/bin|g" \
		-e "s|/usr/local/man/|${ED}/usr/share/man/|g" config.c || die
}

src_configure() {
	# upstream has their own homebrew configure script
	./configure || die "configure failed"
	sed -i \
		-e "s|-O2|${CFLAGS}|" \
		-e "s|^CC = gcc|CC = $(tc-getCC)|" Makefile || die
}

src_install() {
	dodir /usr/bin /usr/share/man/man1

	default

	fperms 755 /usr/bin/xsplitvt
	doman splitvt.1
}