dev-lang/jerryscript: add 3.0.0

Closes: https://bugs.gentoo.org/962353
Bug: https://bugs.gentoo.org/795312
Bug: https://bugs.gentoo.org/905089
Bug: https://bugs.gentoo.org/918550
Signed-off-by: Zac Medico <zmedico@gentoo.org>
This commit is contained in:
Zac Medico
2025-09-08 19:08:46 -07:00
parent 247c48d611
commit b5dd72e3c8
3 changed files with 95 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST jerryscript-2.4.0.tar.gz 2802799 BLAKE2B 18a3f71e7d3e2fc43772cb94aa3b0d4d28d72c6cd174eb0195f09283c5da5140ef85e86c6ed7a82e672724563549294c26d870b55c8bd9d0a92251b1002c612a SHA512 e96e6c6a2207ff869474801a1f8bbd3ce453d4076e558736ebf6962ccab08540f57cf932ec43bcd40429e21f1c6453d77874dd0a467d91a15d8357257533c1ea
DIST jerryscript-3.0.0.tar.gz 2257349 BLAKE2B 03d1c863630c9db58f97ca9a1c787dd8e6a84d23fbfce36ec5b9ff4b5a2d0b7c7284a20cba5d12e1e9b50878be058b5e7675285522fd3cccbee3fcb3f73826e0 SHA512 cd9767143f3821311c81f1ead85ed75d0f98ea1aa8a6dd09cdd6e207b60d78180bee277ef20bbf77b7a87924132a51b96b72d8fb169a043ed7b79ba2d636b1ee

View File

@@ -0,0 +1,20 @@
https://bugs.gentoo.org/840263
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,7 +176,6 @@
macro(jerry_add_compile_warnings)
foreach(_warning ${ARGV})
jerry_add_compile_flags(-W${_warning})
- jerry_add_compile_flags(-Werror=${_warning})
endforeach()
endmacro()
@@ -224,7 +223,7 @@
if(NOT "${PLATFORM}" STREQUAL "WINDOWS")
jerry_add_compile_warnings(conversion)
endif()
- jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes -Werror)
+ jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes)
endif()
if(USING_GCC)

View File

@@ -0,0 +1,74 @@
# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
inherit cmake python-single-r1
DESCRIPTION="Ultra-lightweight JavaScript engine for the Internet of Things"
HOMEPAGE="https://github.com/jerryscript-project/jerryscript"
SRC_URI="https://github.com/jerryscript-project/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debugger"
RDEPEND="debugger? ( ${PYTHON_DEPS} )"
BDEPEND="${RDEPEND}"
REQUIRED_USE="debugger? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="test"
PATCHES=(
"${FILESDIR}/jerryscript-3.0.0-no-werror.patch"
)
src_prepare() {
find . -name CMakeLists.txt -print0 | xargs -0 sed -i \
-e "s:lib/pkgconfig:$(get_libdir)/pkgconfig:" \
-e "s:DESTINATION lib):DESTINATION $(get_libdir)):" \
|| die
find . -name '*.pc.in' -print0 | xargs -0 sed -i \
-e "s|/lib\$|/$(get_libdir)|" \
|| die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DENABLE_STRIP=OFF
-DJERRY_DEBUGGER=ON
-DJERRY_ERROR_MESSAGES=ON
-DJERRY_EXTERNAL_CONTEXT=ON
-DJERRY_LINE_INFO=ON
-DJERRY_LOGGING=ON
-DJERRY_PARSER_DUMP_BYTE_CODE=ON
-DJERRY_PARSER=ON
-DJERRY_REGEXP_DUMP_BYTE_CODE=ON
-DJERRY_SNAPSHOT_EXEC=ON
-DJERRY_SNAPSHOT_SAVE=ON
)
cmake_src_configure
}
src_install() {
local jerry_debugger_dir
cmake_src_install
if use debugger; then
jerry_debugger_dir=/usr/$(get_libdir)/jerryscript/jerry-debugger
insinto "${jerry_debugger_dir}"
doins jerry-debugger/*.py
python_optimize "${ED}${jerry_debugger_dir}"
cat <<-EOF > "${T}/jerry-debugger"
#!/usr/bin/python
import sys
sys.path.insert(0, "${EPREFIX}${jerry_debugger_dir}")
with open("${jerry_debugger_dir}/jerry_client.py") as f:
exec(f.read())
EOF
python_doscript "${T}"/jerry-debugger
fi
}