summaryrefslogtreecommitdiff
path: root/dev-scheme/ypsilon/ypsilon-0.9.6_p3-r2.ebuild
blob: 75550544e5195bc93b020e73b97b896c8cce9a1e (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
58
59
60
61
62
63
64
65
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit flag-o-matic toolchain-funcs

MY_P="${P/_p/.update}"

DESCRIPTION="R6RS-compliant Scheme implementation for real-time applications"
HOMEPAGE="http://www.littlewingpinball.com/doc/en/ypsilon"
SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${MY_P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples"

RDEPEND="app-alternatives/cpio"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_P}"

PATCHES=(
	"${FILESDIR}"/${P}-asneeded.patch
	"${FILESDIR}"/${P}-clang-cflags.patch
)

src_prepare() {
	default

	append-flags -pthread
	# fix build with >=sys-devel/gcc-11, bug #787866
	sed -i "/^CPPFLAGS/s/=/= -DNO_TLS/" Makefile

	# -Werror=strict-aliasing
	# https://bugs.gentoo.org/858257
	#
	# There is an upstream update to 2.0.8 (lotta new versions!) but it changes
	# way too much to trivially update. The issue may or may not be fixed.
	# Before multiple other things bombed out, the erroring source file
	# *seemed* to compile ok.
	append-flags -fno-strict-aliasing
	filter-lto
}

src_compile() {
	emake \
		PREFIX="${EPREFIX}/usr" \
		AS="$(tc-getAS)" \
		CXX="$(tc-getCXX)" \
		CXXFLAGS="${CXXFLAGS}" \
		LDFLAGS="${LDFLAGS}"
}

src_install() {
	emake \
		PREFIX="${EPREFIX}/usr" \
		DESTDIR="${D}" \
		install

	if use examples; then
		docinto examples
		dodoc example/*
	fi
}