mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-libs/asmjit: add to tree
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
1
dev-libs/asmjit/Manifest
Normal file
1
dev-libs/asmjit/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST asmjit-2021.11.13.tar.gz 717251 BLAKE2B 2bcad7234b0cab2d60c9fcd09149c93397595ca4859cb415378dabf52f8660de3aa5de40ee192fca814ee62bfc690ae8260c2f54faf10eb52c3ed3d63d1f4258 SHA512 2774168ff0847b3c29aee87325f12e431693c70661f8c10e0dc0d6530a3683d51ca472ef993e88c9d4e179494b045b2e75c22d6eda19b0c75e19843b69162da1
|
||||
34
dev-libs/asmjit/asmjit-2021.11.13.ebuild
Normal file
34
dev-libs/asmjit/asmjit-2021.11.13.ebuild
Normal file
@@ -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
|
||||
}
|
||||
45
dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch
Normal file
45
dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch
Normal file
@@ -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); };
|
||||
11
dev-libs/asmjit/metadata.xml
Normal file
11
dev-libs/asmjit/metadata.xml
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user