Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/mujs/
Date: Sun, 11 Aug 2019 09:07:33
Message-Id: 1565514435.1a59549ee5b33d01b739bfc44e9c4463249af2ec.slyfox@gentoo
1 commit: 1a59549ee5b33d01b739bfc44e9c4463249af2ec
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 11 09:07:15 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 11 09:07:15 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a59549e
7
8 dev-lang/mujs: bumped up to 1.0.6, added subslot, bug #670106
9
10 Added a comment why gentoo adds such a fine-grained SONAME:
11 library changes ABI (and API) all the time: functions are
12 added and removed.
13
14 Reported-by: Andreas Sturmlechner
15 Closes: https://bugs.gentoo.org/670106
16 Package-Manager: Portage-2.3.71, Repoman-2.3.17
17 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
18
19 dev-lang/mujs/Manifest | 1 +
20 dev-lang/mujs/mujs-1.0.6.ebuild | 58 +++++++++++++++++++++++++++++++++++++++++
21 2 files changed, 59 insertions(+)
22
23 diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest
24 index 0200ee406a7..c99e3bce086 100644
25 --- a/dev-lang/mujs/Manifest
26 +++ b/dev-lang/mujs/Manifest
27 @@ -1 +1,2 @@
28 DIST mujs-1.0.5.tar.gz 119353 BLAKE2B 48f1b598e50d5804b0d64230cdd6b4d3f719187ea0906f45c9f45baee2c8df59c6fd09dc25afc9e1ce4e20a9866d158d16a4632bec552fddd8fac70b20e2363f SHA512 c1c59b5e80e0e5f580f30dfc0b4707b6a1e44a73c746b9783bb24d91429ddf8ed670a7663478300cc568cfc15a511720b6d18be2ade40a3a66fc7ab8f3933c2d
29 +DIST mujs-1.0.6.tar.gz 121385 BLAKE2B b74da9cc9df6c51d81fe4b6170fddd9bfd3e37cc1c48509ddbcc9b657feb7169cfa98427770a118fb9c0923e70320668198739ea111cbd5d1c2303b2ada7093d SHA512 c3062348dcc79b8ea3726fc528b3ba765d3462232059617b9ab221ba47fa904cc81a305a6199a9a2cea24a2d891ca63d475b4884cd4e53fa715b3a55f51ca4d9
30
31 diff --git a/dev-lang/mujs/mujs-1.0.6.ebuild b/dev-lang/mujs/mujs-1.0.6.ebuild
32 new file mode 100644
33 index 00000000000..fdae6f9f0a1
34 --- /dev/null
35 +++ b/dev-lang/mujs/mujs-1.0.6.ebuild
36 @@ -0,0 +1,58 @@
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +
42 +inherit flag-o-matic toolchain-funcs
43 +
44 +DESCRIPTION="An embeddable Javascript interpreter in C."
45 +HOMEPAGE="
46 + https://mujs.com/
47 + https://github.com/ccxvii/mujs/
48 +"
49 +SRC_URI="https://github.com/ccxvii/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
50 +
51 +LICENSE="AGPL-3"
52 +# subslot matches SONAME
53 +SLOT="0/${PV}"
54 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
55 +IUSE="static-libs"
56 +
57 +RDEPEND="sys-libs/readline:0="
58 +DEPEND="${RDEPEND}"
59 +
60 +PATCHES=(
61 + "${FILESDIR}/${PN}-1.0.5-flags.patch"
62 +)
63 +
64 +src_prepare() {
65 + default
66 +
67 + tc-export AR CC
68 +
69 + # library's ABI (and API) changes in ~each release:
70 + # diff 'usr/includemujs.h' across releases to validate
71 + append-cflags -fPIC -Wl,-soname=lib${PN}.so.${PV}
72 +}
73 +
74 +src_compile() {
75 + emake VERSION=${PV} prefix=/usr shared
76 +}
77 +
78 +src_install() {
79 + local myeconfargs=(
80 + DESTDIR="${ED}"
81 + install-shared
82 + libdir="/usr/$(get_libdir)"
83 + prefix="/usr"
84 + VERSION="${PV}"
85 + $(usex static-libs install-static '')
86 + )
87 +
88 + emake "${myeconfargs[@]}"
89 +
90 + mv -v "${ED}"/usr/$(get_libdir)/lib${PN}.so{,.${PV}} || die
91 +
92 + dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so
93 + dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV:0:1}
94 +}