summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-02-17 00:59:07 +0000
committerSam James <sam@gentoo.org>2021-02-17 00:59:07 +0000
commitbdefe5d8b67a74c258140162e4b5166a189090f4 (patch)
treeba9f6551c886f06c9b19a733cfbae38826a71a83 /dev-lang/mujs
parentprofiles/arch/powerpc: unmask dev-lang/php[jit] (diff)
downloadgentoo-bdefe5d8b67a74c258140162e4b5166a189090f4.tar.gz
gentoo-bdefe5d8b67a74c258140162e4b5166a189090f4.tar.bz2
gentoo-bdefe5d8b67a74c258140162e4b5166a189090f4.zip
dev-lang/mujs: bump to 1.1.0
Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/mujs')
-rw-r--r--dev-lang/mujs/Manifest1
-rw-r--r--dev-lang/mujs/files/mujs-1.1.0-flags.patch14
-rw-r--r--dev-lang/mujs/mujs-1.1.0.ebuild57
3 files changed, 72 insertions, 0 deletions
diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest
index c4b43650c73b..fbc2c2369cf8 100644
--- a/dev-lang/mujs/Manifest
+++ b/dev-lang/mujs/Manifest
@@ -1 +1,2 @@
DIST mujs-1.0.9.tar.gz 123113 BLAKE2B c55deaf14508c412394bf5fe3a53ef581d4e4726024d65f2ba5155eb2400a6e2f043c9f6721b170d19297e2cd38c62c462f3b4e102eb4bfe6e7857b40156c18b SHA512 a3dbc8dbf5c16b7de9803954fe38ea9f77c0e5b7de3895966ec0877e063d463c9950499791ea0d102e464bd0426413689f3edb15e38db3f13915d72f27556725
+DIST mujs-1.1.0.tar.gz 123450 BLAKE2B e7bc05d35566ff26346e713645e0f417a9acd1a73b5fb5c7f0c35bf940765fba1ab04199f4ed1dd6ce0e3bb2bf1547703335a1c125353da24de72f2b1adfb243 SHA512 10b61453f8483e3e67c95a742aa7868e255816b2ce25c84d8e24c5c737bad1f23ade67531c5c5bb914804be446da33c0cbe8e95a6d5889250dd8520ce56f23a0
diff --git a/dev-lang/mujs/files/mujs-1.1.0-flags.patch b/dev-lang/mujs/files/mujs-1.1.0-flags.patch
new file mode 100644
index 000000000000..3c57f4699109
--- /dev/null
+++ b/dev-lang/mujs/files/mujs-1.1.0-flags.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index 1702e67..7b24457 100644
+--- a/Makefile
++++ b/Makefile
+@@ -30,9 +30,6 @@ ifeq "$(build)" "debug"
+ else ifeq "$(build)" "sanitize"
+ CFLAGS += -pipe -g -fsanitize=address -fno-omit-frame-pointer
+ LDFLAGS += -fsanitize=address
+-else ifeq "$(build)" "release"
+- CFLAGS += -Os
+- LDFLAGS += -Wl,-s
+ endif
+
+ ifeq "$(HAVE_READLINE)" "yes"
diff --git a/dev-lang/mujs/mujs-1.1.0.ebuild b/dev-lang/mujs/mujs-1.1.0.ebuild
new file mode 100644
index 000000000000..af61b9b01bf5
--- /dev/null
+++ b/dev-lang/mujs/mujs-1.1.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="An embeddable Javascript interpreter in C."
+HOMEPAGE="https://mujs.com/ https://github.com/ccxvii/mujs"
+SRC_URI="https://github.com/ccxvii/mujs/archive/${PV}.tar.gz -> ${P}.tar.gz"
+# Not available right now.
+#SRC_URI="https://mujs.com/downloads/${P}.tar.xz"
+
+LICENSE="ISC"
+# subslot matches SONAME
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="static-libs"
+
+RDEPEND="sys-libs/readline:0="
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.0-flags.patch"
+)
+
+src_prepare() {
+ default
+
+ tc-export AR CC
+
+ # library's ABI (and API) changes in ~each release:
+ # diff 'usr/includemujs.h' across releases to validate
+ append-cflags -fPIC -Wl,-soname=lib${PN}.so.${PV}
+}
+
+src_compile() {
+ emake VERSION=${PV} prefix=/usr shared
+}
+
+src_install() {
+ local myeconfargs=(
+ DESTDIR="${ED}"
+ install-shared
+ libdir="/usr/$(get_libdir)"
+ prefix="/usr"
+ VERSION="${PV}"
+ $(usex static-libs install-static '')
+ )
+
+ emake "${myeconfargs[@]}"
+
+ mv -v "${ED}"/usr/$(get_libdir)/lib${PN}.so{,.${PV}} || die
+
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV:0:1}
+}