From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1292216-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id F12731382C5
	for <garchives@archives.gentoo.org>; Thu, 10 Jun 2021 19:23:29 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3A93BE091B;
	Thu, 10 Jun 2021 19:23:29 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 10F84E091B
	for <gentoo-commits@lists.gentoo.org>; Thu, 10 Jun 2021 19:23:29 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 05221335D6D
	for <gentoo-commits@lists.gentoo.org>; Thu, 10 Jun 2021 19:23:28 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 988A579A
	for <gentoo-commits@lists.gentoo.org>; Thu, 10 Jun 2021 19:23:26 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1623352995.d19b726a5ee7e6e6421bdfe55a8020c2efa7b287.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/mujs/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lang/mujs/Manifest dev-lang/mujs/mujs-1.1.3.ebuild
X-VCS-Directories: dev-lang/mujs/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: d19b726a5ee7e6e6421bdfe55a8020c2efa7b287
X-VCS-Branch: master
Date: Thu, 10 Jun 2021 19:23:26 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 06f68b9e-8f6d-4966-a11c-9171b95f0daf
X-Archives-Hash: 996e9d6009d729601ec89f6f7a3a9ad2

commit:     d19b726a5ee7e6e6421bdfe55a8020c2efa7b287
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 10 19:23:15 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 10 19:23:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d19b726a

dev-lang/mujs: add 1.1.3

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/mujs/Manifest          |  1 +
 dev-lang/mujs/mujs-1.1.3.ebuild | 72 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest
index dc69aaa09bd..4295a792c82 100644
--- a/dev-lang/mujs/Manifest
+++ b/dev-lang/mujs/Manifest
@@ -1,2 +1,3 @@
 DIST mujs-1.1.0.tar.gz 123450 BLAKE2B e7bc05d35566ff26346e713645e0f417a9acd1a73b5fb5c7f0c35bf940765fba1ab04199f4ed1dd6ce0e3bb2bf1547703335a1c125353da24de72f2b1adfb243 SHA512 10b61453f8483e3e67c95a742aa7868e255816b2ce25c84d8e24c5c737bad1f23ade67531c5c5bb914804be446da33c0cbe8e95a6d5889250dd8520ce56f23a0
 DIST mujs-1.1.2.tar.xz 98340 BLAKE2B bbb290786c26fd604082eb123adc78a3b7d9387dafabf70df23bae97d016a3ad16a434fb1ab3a33da85c575cf813491d0a09d956ff351bd7c8d38cac675ec114 SHA512 66641855e6fe732541fb80a99fda4418545183965c6a6ffb4a05101084fd1cc073aca1e51115f37fffb56bc5518cec21a1586d0745c55aec08deb47736e33392
+DIST mujs-1.1.3.tar.xz 98332 BLAKE2B 4dc2c0e657d7dcbbd7f82765556e75e7992cdcaf15c7986bb76c0fb6c244057ba0771a2a59c246eaf7bb9ff080e8af6ade8ef9a95606dc8ebde99f7d73c245c1 SHA512 6a8d0650f1924b5889039ddd8529438226677c63f9317b980492fac4e8380385d5c33fe8a315f26ebd0f7ae94c6c3bc90fdb75a8e4a0df367e6e4e355692e890

diff --git a/dev-lang/mujs/mujs-1.1.3.ebuild b/dev-lang/mujs/mujs-1.1.3.ebuild
new file mode 100644
index 00000000000..bc0c2a8caca
--- /dev/null
+++ b/dev-lang/mujs/mujs-1.1.3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic multilib 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
+
+	append-cflags -fPIC
+
+	# library's ABI (and API) changes in ~each release:
+	# diff 'usr/includemujs.h' across releases to validate
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		append-cflags -Wl,-install_name,"${EPREFIX}"/usr/$(get_libdir)/lib${PN}.${PV}.dylib
+	else
+		append-cflags -Wl,-soname=lib${PN}.so.${PV}
+	fi
+}
+
+src_compile() {
+	# We need to use ${PV} for the pkgconfig file
+	# #784461
+	emake \
+		VERSION=${PV} \
+		XCFLAGS="${CFLAGS}" \
+		XCPPFLAGS="${CPPFLAGS}" \
+		prefix=/usr \
+		shell shared
+}
+
+src_install() {
+	local myemakeargs=(
+		DESTDIR="${ED}"
+		VERSION=${PV}
+		libdir="/usr/$(get_libdir)"
+		prefix=/usr
+	)
+
+	emake "${myemakeargs[@]}" install-shared
+
+	# TODO: Tidy up this logic, improve readability
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		mv -v "${ED}"/usr/$(get_libdir)/lib${PN}.so "${ED}"/usr/$(get_libdir)/lib${PN}.${PV}.dylib || die
+		dosym lib${PN}.${PV}.dylib /usr/$(get_libdir)/lib${PN}.dylib
+		dosym lib${PN}.${PV}.dylib /usr/$(get_libdir)/lib${PN}.${PV:0:1}.dylib
+	else
+		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}
+	fi
+}