*/*: Drop stable ia64 keywords
[gentoo.git] / dev-lang / mujs / mujs-1.0.5.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit flag-o-matic toolchain-funcs
7
8 DESCRIPTION="An embeddable Javascript interpreter in C."
9 HOMEPAGE="
10         https://mujs.com/
11         https://github.com/ccxvii/mujs/
12 "
13 SRC_URI="https://github.com/ccxvii/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15 LICENSE="AGPL-3"
16 SLOT="0"
17 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
18 IUSE="static-libs"
19
20 RDEPEND="sys-libs/readline:0="
21 DEPEND="${RDEPEND}"
22
23 PATCHES=(
24         "${FILESDIR}/${P}-flags.patch"
25 )
26
27 src_prepare() {
28         default
29
30         tc-export AR CC
31
32         append-cflags -fPIC -Wl,-soname=lib${PN}.so.${PV}
33 }
34
35 src_compile() {
36         emake VERSION=${PV} prefix=/usr shared
37 }
38
39 src_install() {
40         local myeconfargs=(
41                 DESTDIR="${ED}"
42                 install-shared
43                 libdir="/usr/$(get_libdir)"
44                 prefix="/usr"
45                 VERSION="${PV}"
46                 $(usex static-libs install-static '')
47         )
48
49         emake "${myeconfargs[@]}"
50
51         mv -v "${ED}"/usr/$(get_libdir)/lib${PN}.so{,.${PV}} || die
52
53         dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so
54         dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV:0:1}
55 }