summaryrefslogtreecommitdiff
path: root/dev-libs/asmjit
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/asmjit')
-rw-r--r--dev-libs/asmjit/Manifest4
-rw-r--r--dev-libs/asmjit/asmjit-2021.11.13.ebuild34
-rw-r--r--dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch45
-rw-r--r--dev-libs/asmjit/metadata.xml11
4 files changed, 94 insertions, 0 deletions
diff --git a/dev-libs/asmjit/Manifest b/dev-libs/asmjit/Manifest
new file mode 100644
index 000000000000..07343330647b
--- /dev/null
+++ b/dev-libs/asmjit/Manifest
@@ -0,0 +1,4 @@
+AUX asmjit-2021.11.13-gentoo.patch 1936 BLAKE2B f809f2f5f9ab8a916d7a5f1a025f94694164c16b85cf65dbec54dea0cae2fe75a438ed393dfa6977f3cf43fec49de32e0b6dd346bb0b5cbf861555977f0fc0ff SHA512 cf0e207c6580061abaefbe3d0655a9d0bac8be4784bd0eb53e9689f97e95a9a90f48391a2394dbb36a7ea4b3fa168927bb140238917c21c08b8b86fcc1b83fec
+DIST asmjit-2021.11.13.tar.gz 717251 BLAKE2B 2bcad7234b0cab2d60c9fcd09149c93397595ca4859cb415378dabf52f8660de3aa5de40ee192fca814ee62bfc690ae8260c2f54faf10eb52c3ed3d63d1f4258 SHA512 2774168ff0847b3c29aee87325f12e431693c70661f8c10e0dc0d6530a3683d51ca472ef993e88c9d4e179494b045b2e75c22d6eda19b0c75e19843b69162da1
+EBUILD asmjit-2021.11.13.ebuild 661 BLAKE2B 20dcaa8acddd4db8ed4ff99bfc8e2eb45ab20f50a3403713b38353eb3399a8a67e05b6fe26c9dd9307fbfc8de051d77ca52ec91fa408164e664555ba2d822a44 SHA512 4184f9ba6e02374582e655b14149a484655c9beb9ce6f02ac6317ddace4227bb26ffbedd4070cdbfe895d3836ea3360a8c3f15642385fdcf16cc6f33865cc389
+MISC metadata.xml 326 BLAKE2B 33b6a6c08e1c2d3427bd6106ba3d354c2b5cce4ea529d955d558839ce1b2446ed0980f0a149f4706d89abdbf61d98e99cf5c30dbbb58e30a9c8c659b33992c6f SHA512 753ce999cb3a5a181bdf8efa874269cf31b43c836a8e2ac709fc64429ca003fccfafc38bdd0fc1ddfbc92a45baea64370568b96ff4435eed0df636eab6d41d34
diff --git a/dev-libs/asmjit/asmjit-2021.11.13.ebuild b/dev-libs/asmjit/asmjit-2021.11.13.ebuild
new file mode 100644
index 000000000000..27da2e68b8b3
--- /dev/null
+++ b/dev-libs/asmjit/asmjit-2021.11.13.ebuild
@@ -0,0 +1,34 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit cmake
+
+CommitId=4ec760a3d1f69e32ba460ecd2513f29b8428700b
+DESCRIPTION="Machine code generation for C++"
+HOMEPAGE="https://asmjit.com/"
+SRC_URI="https://github.com/asmjit/${PN}/archive/${CommitId}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-cpp/gtest )"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}"/${PN}-${CommitId}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_configure() {
+ mycmakeargs=(
+ -DASMJIT_TEST=$(usex test TRUE FALSE)
+ )
+ cmake_src_configure
+}
diff --git a/dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch b/dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch
new file mode 100644
index 000000000000..035ffbbbdcea
--- /dev/null
+++ b/dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch
@@ -0,0 +1,45 @@
+diff --git a/src/asmjit/core/support.h b/src/asmjit/core/support.h
+index f98ffaa..2329cb2 100644
+--- a/src/asmjit/core/support.h
++++ b/src/asmjit/core/support.h
+@@ -33,33 +33,40 @@
+ ASMJIT_BEGIN_NAMESPACE
+
+ //! \addtogroup asmjit_utilities
+ //! \{
+
+ //! Contains support classes and functions that may be used by AsmJit source
+ //! and header files. Anything defined here is considered internal and should
+ //! not be used outside of AsmJit and related projects like AsmTK.
+ namespace Support {
+
+ // ============================================================================
+ // [asmjit::Support - Architecture Features & Constraints]
+ // ============================================================================
+
+ //! \cond INTERNAL
++#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 11
++// There is a bug in GCC11+ that makes it unusable to use annotated unaligned loads/stores.
++static constexpr bool kUnalignedAccess16 = false;
++static constexpr bool kUnalignedAccess32 = false;
++static constexpr bool kUnalignedAccess64 = false;
++#else
+ static constexpr bool kUnalignedAccess16 = ASMJIT_ARCH_X86 != 0;
+ static constexpr bool kUnalignedAccess32 = ASMJIT_ARCH_X86 != 0;
+ static constexpr bool kUnalignedAccess64 = ASMJIT_ARCH_X86 != 0;
++#endif
+ //! \endcond
+
+ // ============================================================================
+ // [asmjit::Support - Internal]
+ // ============================================================================
+
+ //! \cond INTERNAL
+ namespace Internal {
+ template<typename T, size_t Alignment>
+ struct AlignedInt {};
+
+ template<> struct AlignedInt<uint16_t, 1> { typedef uint16_t ASMJIT_ALIGN_TYPE(T, 1); };
+ template<> struct AlignedInt<uint16_t, 2> { typedef uint16_t T; };
+ template<> struct AlignedInt<uint32_t, 1> { typedef uint32_t ASMJIT_ALIGN_TYPE(T, 1); };
+ template<> struct AlignedInt<uint32_t, 2> { typedef uint32_t ASMJIT_ALIGN_TYPE(T, 2); };
diff --git a/dev-libs/asmjit/metadata.xml b/dev-libs/asmjit/metadata.xml
new file mode 100644
index 000000000000..0e892b7edd0d
--- /dev/null
+++ b/dev-libs/asmjit/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">asmjit/asmjit</remote-id>
+ </upstream>
+</pkgmetadata>