summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatoro <matoro@users.noreply.github.com>2022-06-27 19:54:42 -0400
committerJames Le Cuirot <chewi@gentoo.org>2022-07-14 23:27:13 +0100
commit479e4b74e76dce202079b441500a11bc228d47d1 (patch)
treea5ccd9b0bfcce68cf3d686a4071804dd9170cdae
parentapp-text/mdbook: add 0.4.20 (diff)
downloadgentoo-479e4b74e76dce202079b441500a11bc228d47d1.tar.gz
gentoo-479e4b74e76dce202079b441500a11bc228d47d1.tar.bz2
gentoo-479e4b74e76dce202079b441500a11bc228d47d1.zip
dev-libs/angelscript: revbump 2.35.1-r1, keyword arm64
Taken without modification from the Debian patchset: https://salsa.debian.org/yangfl-guest/angelscript/-/tree/master/debian/patches Unlike the existing workaround (adding -DAS_MAX_PORTABILITY to CFLAGS), this actually pulls in the arm64-specific implementation rather than falling back to the generic one. Revbump because this currently successfully compiles, but generates a broken library that cannot be linked against (depending on what you use from it) on arm64. Thus we need a revbump to avoid requiring a manual rebuild, even though reverse deps (e.g. games-action/supertuxkart) fail during build. Closes: https://bugs.gentoo.org/811420 Signed-off-by: matoro <matoro@users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/26102 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
-rw-r--r--dev-libs/angelscript/angelscript-2.35.1-r1.ebuild52
-rw-r--r--dev-libs/angelscript/files/0004-Add-as_callfunc_arm64.cpp-to-gnuc-makefile.patch30
-rw-r--r--dev-libs/angelscript/files/0006-Add-as_callfunc_arm_gcc.S-to-gnuc-makefile.patch31
3 files changed, 113 insertions, 0 deletions
diff --git a/dev-libs/angelscript/angelscript-2.35.1-r1.ebuild b/dev-libs/angelscript/angelscript-2.35.1-r1.ebuild
new file mode 100644
index 000000000000..d0aa028768b9
--- /dev/null
+++ b/dev-libs/angelscript/angelscript-2.35.1-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="A flexible, cross-platform scripting library"
+HOMEPAGE="http://www.angelcode.com/angelscript/"
+SRC_URI="http://www.angelcode.com/angelscript/sdk/files/angelscript_${PV}.zip"
+LICENSE="ZLIB"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="doc static-libs"
+
+BDEPEND="app-arch/unzip"
+
+S="${WORKDIR}/sdk"
+PATCHES=(
+ "${FILESDIR}/0004-Add-as_callfunc_arm64.cpp-to-gnuc-makefile.patch"
+ "${FILESDIR}/0006-Add-as_callfunc_arm_gcc.S-to-gnuc-makefile.patch"
+)
+
+pkg_setup() {
+ tc-export CXX AR RANLIB
+}
+
+src_prepare() {
+ default
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ emake -C ${PN}/projects/gnuc shared \
+ $(use static-libs && echo static)
+}
+
+multilib_src_install() {
+ emake -C ${PN}/projects/gnuc \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}"/usr \
+ LIBDIR_DEST='$(PREFIX)'/$(get_libdir) \
+ install_header install_shared \
+ $(use static-libs && echo install_static)
+}
+
+multilib_src_install_all() {
+ if use doc; then
+ docinto html
+ dodoc -r docs/*
+ fi
+}
diff --git a/dev-libs/angelscript/files/0004-Add-as_callfunc_arm64.cpp-to-gnuc-makefile.patch b/dev-libs/angelscript/files/0004-Add-as_callfunc_arm64.cpp-to-gnuc-makefile.patch
new file mode 100644
index 000000000000..b889c495f3e6
--- /dev/null
+++ b/dev-libs/angelscript/files/0004-Add-as_callfunc_arm64.cpp-to-gnuc-makefile.patch
@@ -0,0 +1,30 @@
+This patch taken from Debian:
+https://salsa.debian.org/yangfl-guest/angelscript/-/blob/master/debian/patches/0004-Add-as_callfunc_arm64.cpp-to-gnuc-makefile.patch
+
+Gentoo bug:
+https://bugs.gentoo.org/818868
+
+From 53841747c668abe3ff2cac280354703bef5dd395 Mon Sep 17 00:00:00 2001
+From: yangfl <yangfl@users.noreply.github.com>
+Date: Thu, 14 Oct 2021 18:29:25 +0800
+Subject: [PATCH 4/6] Add as_callfunc_arm64.cpp to gnuc makefile
+
+---
+ angelscript/projects/gnuc/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/angelscript/projects/gnuc/Makefile b/angelscript/projects/gnuc/Makefile
+index 5274f05e..276baa9e 100644
+--- a/angelscript/projects/gnuc/Makefile
++++ b/angelscript/projects/gnuc/Makefile
+@@ -107,6 +107,7 @@ SRCNAMES = \
+ as_bytecode.cpp \
+ as_callfunc.cpp \
+ as_callfunc_arm.cpp \
++ as_callfunc_arm64.cpp \
+ as_callfunc_mips.cpp \
+ as_callfunc_ppc.cpp \
+ as_callfunc_ppc_64.cpp \
+--
+2.33.0
+
diff --git a/dev-libs/angelscript/files/0006-Add-as_callfunc_arm_gcc.S-to-gnuc-makefile.patch b/dev-libs/angelscript/files/0006-Add-as_callfunc_arm_gcc.S-to-gnuc-makefile.patch
new file mode 100644
index 000000000000..ccdd21a5e7c9
--- /dev/null
+++ b/dev-libs/angelscript/files/0006-Add-as_callfunc_arm_gcc.S-to-gnuc-makefile.patch
@@ -0,0 +1,31 @@
+This file taken from Debian:
+https://salsa.debian.org/yangfl-guest/angelscript/-/blob/master/debian/patches/0006-Add-as_callfunc_arm_gcc.S-to-gnuc-makefile.patch
+
+Gentoo bug:
+https://bugs.gentoo.org/818868
+
+From 64e3e5a356047531012789802ece987bacb6a120 Mon Sep 17 00:00:00 2001
+From: yangfl <yangfl@users.noreply.github.com>
+Date: Fri, 15 Oct 2021 02:24:17 +0800
+Subject: [PATCH 6/6] Add as_callfunc_arm_gcc.S to gnuc makefile
+
+---
+ angelscript/projects/gnuc/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/angelscript/projects/gnuc/Makefile b/angelscript/projects/gnuc/Makefile
+index 276baa9e..973da7b0 100644
+--- a/angelscript/projects/gnuc/Makefile
++++ b/angelscript/projects/gnuc/Makefile
+@@ -145,7 +145,7 @@ OBJ = $(addprefix $(OBJDIR)/, $(notdir $(SRCNAMES:.cpp=.o)))
+ ifeq ($(TARGETPLATFORM), iphone)
+ OBJ += $(OBJDIR)/as_callfunc_arm_xcode.o
+ else
+- OBJ += $(OBJDIR)/as_callfunc_arm_gcc.o
++ OBJ += $(OBJDIR)/as_callfunc_arm_gcc.o $(OBJDIR)/as_callfunc_arm64_gcc.o
+ endif
+
+
+--
+2.33.0
+