diff options
author | Sam James <sam@gentoo.org> | 2021-04-13 22:47:36 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-04-13 22:52:13 +0000 |
commit | 9cdb3a1bee2b1281ca93812d24f612be3ed4d1bb (patch) | |
tree | 2880b22333f2726fc2763ef1b6eceb91567a236f /dev-lang | |
parent | net-analyzer/wireshark: include upstream patches for glib-2.68 (diff) | |
download | gentoo-9cdb3a1bee2b1281ca93812d24f612be3ed4d1bb.tar.gz gentoo-9cdb3a1bee2b1281ca93812d24f612be3ed4d1bb.tar.bz2 gentoo-9cdb3a1bee2b1281ca93812d24f612be3ed4d1bb.zip |
dev-lang/mujs: add 1.1.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/mujs/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/mujs/files/mujs-1.1.1-flags.patch | 12 | ||||
-rw-r--r-- | dev-lang/mujs/mujs-1.1.1.ebuild | 58 |
3 files changed, 71 insertions, 0 deletions
diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest index fbc2c2369cf8..0cf67cd7fb7e 100644 --- a/dev-lang/mujs/Manifest +++ b/dev-lang/mujs/Manifest @@ -1,2 +1,3 @@ DIST mujs-1.0.9.tar.gz 123113 BLAKE2B c55deaf14508c412394bf5fe3a53ef581d4e4726024d65f2ba5155eb2400a6e2f043c9f6721b170d19297e2cd38c62c462f3b4e102eb4bfe6e7857b40156c18b SHA512 a3dbc8dbf5c16b7de9803954fe38ea9f77c0e5b7de3895966ec0877e063d463c9950499791ea0d102e464bd0426413689f3edb15e38db3f13915d72f27556725 DIST mujs-1.1.0.tar.gz 123450 BLAKE2B e7bc05d35566ff26346e713645e0f417a9acd1a73b5fb5c7f0c35bf940765fba1ab04199f4ed1dd6ce0e3bb2bf1547703335a1c125353da24de72f2b1adfb243 SHA512 10b61453f8483e3e67c95a742aa7868e255816b2ce25c84d8e24c5c737bad1f23ade67531c5c5bb914804be446da33c0cbe8e95a6d5889250dd8520ce56f23a0 +DIST mujs-1.1.1.tar.xz 95448 BLAKE2B df19d045a16603b94fae6e8f996af32ab5986983a191041bf82cde67c876b34e9574b2c5ea75be8dba36da6692761608ce56117c7cf98833795eadec37ee546e SHA512 8978cb120458b982cd8fa2242ca648c1bb19a837f3b41a88226f95c6d48796b92f221d95b4c2cb73c4a4257ee33045640aee8c3c849cf0725a686fa452f2cc84 diff --git a/dev-lang/mujs/files/mujs-1.1.1-flags.patch b/dev-lang/mujs/files/mujs-1.1.1-flags.patch new file mode 100644 index 000000000000..f3dbdfd44cd1 --- /dev/null +++ b/dev-lang/mujs/files/mujs-1.1.1-flags.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -32,9 +32,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 += -O2 +- LDFLAGS += -Wl,-s + endif + + ifeq "$(HAVE_READLINE)" "yes" diff --git a/dev-lang/mujs/mujs-1.1.1.ebuild b/dev-lang/mujs/mujs-1.1.1.ebuild new file mode 100644 index 000000000000..f4a97b555780 --- /dev/null +++ b/dev-lang/mujs/mujs-1.1.1.ebuild @@ -0,0 +1,58 @@ +# 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://mujs.com/downloads/${P}.tar.xz" +#SRC_URI=" https://github.com/ccxvii/mujs/archive/${PV}.tar.xz -> ${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" + +RDEPEND="sys-libs/readline:0=" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.1-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=${PF} \ + XCFLAGS="${CFLAGS}" \ + XCPPFLAGS="${CPPFLAGS}" \ + prefix=/usr \ + shell shared +} + +src_install() { + local myemakeargs=( + DESTDIR="${ED}" + libdir="/usr/$(get_libdir)" + prefix="/usr" + VERSION="${PV}" + ) + + emake "${myemakeargs[@]}" install-shared + + 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} +} |