Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/asmjit/, dev-libs/asmjit/files/
Date: Fri, 20 May 2022 19:57:08
Message-Id: 1653076600.d23f015d98ec1ea1d16c8e805d6e5c61bf252649.tupone@gentoo
1 commit: d23f015d98ec1ea1d16c8e805d6e5c61bf252649
2 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 20 19:56:40 2022 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Fri May 20 19:56:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d23f015d
7
8 dev-libs/asmjit: add to tree
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
12
13 dev-libs/asmjit/Manifest | 1 +
14 dev-libs/asmjit/asmjit-2021.11.13.ebuild | 34 ++++++++++++++++
15 .../asmjit/files/asmjit-2021.11.13-gentoo.patch | 45 ++++++++++++++++++++++
16 dev-libs/asmjit/metadata.xml | 11 ++++++
17 4 files changed, 91 insertions(+)
18
19 diff --git a/dev-libs/asmjit/Manifest b/dev-libs/asmjit/Manifest
20 new file mode 100644
21 index 000000000000..1a9ef2aede79
22 --- /dev/null
23 +++ b/dev-libs/asmjit/Manifest
24 @@ -0,0 +1 @@
25 +DIST asmjit-2021.11.13.tar.gz 717251 BLAKE2B 2bcad7234b0cab2d60c9fcd09149c93397595ca4859cb415378dabf52f8660de3aa5de40ee192fca814ee62bfc690ae8260c2f54faf10eb52c3ed3d63d1f4258 SHA512 2774168ff0847b3c29aee87325f12e431693c70661f8c10e0dc0d6530a3683d51ca472ef993e88c9d4e179494b045b2e75c22d6eda19b0c75e19843b69162da1
26
27 diff --git a/dev-libs/asmjit/asmjit-2021.11.13.ebuild b/dev-libs/asmjit/asmjit-2021.11.13.ebuild
28 new file mode 100644
29 index 000000000000..27da2e68b8b3
30 --- /dev/null
31 +++ b/dev-libs/asmjit/asmjit-2021.11.13.ebuild
32 @@ -0,0 +1,34 @@
33 +# Copyright 2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +inherit cmake
38 +
39 +CommitId=4ec760a3d1f69e32ba460ecd2513f29b8428700b
40 +DESCRIPTION="Machine code generation for C++"
41 +HOMEPAGE="https://asmjit.com/"
42 +SRC_URI="https://github.com/asmjit/${PN}/archive/${CommitId}.tar.gz
43 + -> ${P}.tar.gz"
44 +
45 +LICENSE="ZLIB"
46 +SLOT="0"
47 +KEYWORDS="~amd64"
48 +IUSE="test"
49 +
50 +DEPEND=""
51 +RDEPEND="${DEPEND}"
52 +BDEPEND="test? ( dev-cpp/gtest )"
53 +RESTRICT="!test? ( test )"
54 +
55 +S="${WORKDIR}"/${PN}-${CommitId}
56 +
57 +PATCHES=(
58 + "${FILESDIR}"/${P}-gentoo.patch
59 +)
60 +
61 +src_configure() {
62 + mycmakeargs=(
63 + -DASMJIT_TEST=$(usex test TRUE FALSE)
64 + )
65 + cmake_src_configure
66 +}
67
68 diff --git a/dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch b/dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch
69 new file mode 100644
70 index 000000000000..035ffbbbdcea
71 --- /dev/null
72 +++ b/dev-libs/asmjit/files/asmjit-2021.11.13-gentoo.patch
73 @@ -0,0 +1,45 @@
74 +diff --git a/src/asmjit/core/support.h b/src/asmjit/core/support.h
75 +index f98ffaa..2329cb2 100644
76 +--- a/src/asmjit/core/support.h
77 ++++ b/src/asmjit/core/support.h
78 +@@ -33,33 +33,40 @@
79 + ASMJIT_BEGIN_NAMESPACE
80 +
81 + //! \addtogroup asmjit_utilities
82 + //! \{
83 +
84 + //! Contains support classes and functions that may be used by AsmJit source
85 + //! and header files. Anything defined here is considered internal and should
86 + //! not be used outside of AsmJit and related projects like AsmTK.
87 + namespace Support {
88 +
89 + // ============================================================================
90 + // [asmjit::Support - Architecture Features & Constraints]
91 + // ============================================================================
92 +
93 + //! \cond INTERNAL
94 ++#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 11
95 ++// There is a bug in GCC11+ that makes it unusable to use annotated unaligned loads/stores.
96 ++static constexpr bool kUnalignedAccess16 = false;
97 ++static constexpr bool kUnalignedAccess32 = false;
98 ++static constexpr bool kUnalignedAccess64 = false;
99 ++#else
100 + static constexpr bool kUnalignedAccess16 = ASMJIT_ARCH_X86 != 0;
101 + static constexpr bool kUnalignedAccess32 = ASMJIT_ARCH_X86 != 0;
102 + static constexpr bool kUnalignedAccess64 = ASMJIT_ARCH_X86 != 0;
103 ++#endif
104 + //! \endcond
105 +
106 + // ============================================================================
107 + // [asmjit::Support - Internal]
108 + // ============================================================================
109 +
110 + //! \cond INTERNAL
111 + namespace Internal {
112 + template<typename T, size_t Alignment>
113 + struct AlignedInt {};
114 +
115 + template<> struct AlignedInt<uint16_t, 1> { typedef uint16_t ASMJIT_ALIGN_TYPE(T, 1); };
116 + template<> struct AlignedInt<uint16_t, 2> { typedef uint16_t T; };
117 + template<> struct AlignedInt<uint32_t, 1> { typedef uint32_t ASMJIT_ALIGN_TYPE(T, 1); };
118 + template<> struct AlignedInt<uint32_t, 2> { typedef uint32_t ASMJIT_ALIGN_TYPE(T, 2); };
119
120 diff --git a/dev-libs/asmjit/metadata.xml b/dev-libs/asmjit/metadata.xml
121 new file mode 100644
122 index 000000000000..0e892b7edd0d
123 --- /dev/null
124 +++ b/dev-libs/asmjit/metadata.xml
125 @@ -0,0 +1,11 @@
126 +<?xml version="1.0" encoding="UTF-8"?>
127 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
128 +<pkgmetadata>
129 + <maintainer type="person">
130 + <email>tupone@g.o</email>
131 + <name>Tupone Alfredo</name>
132 + </maintainer>
133 + <upstream>
134 + <remote-id type="github">asmjit/asmjit</remote-id>
135 + </upstream>
136 +</pkgmetadata>