mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 14:43:27 -04:00
dev-lang/quickjs: add 2025.09.13.2
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
DIST quickjs-2024-01-13.tar.xz 765800 BLAKE2B 6d65d9ae19ef816a7e4784821d138d2be9965bbbea42c11f13adc0560dc6d67db9cd75c367680a5caec34182a320819127fc0d0c95c10fcf441161ca7880d5aa SHA512 9f426404e4dc1e2a41fcc235b72e58708041aed24eadd5fb9e82f62435501003d3a6b04831f307b04852551d2fd265b94cd400b3293ec0810465f52de8a6c057
|
DIST quickjs-2024-01-13.tar.xz 765800 BLAKE2B 6d65d9ae19ef816a7e4784821d138d2be9965bbbea42c11f13adc0560dc6d67db9cd75c367680a5caec34182a320819127fc0d0c95c10fcf441161ca7880d5aa SHA512 9f426404e4dc1e2a41fcc235b72e58708041aed24eadd5fb9e82f62435501003d3a6b04831f307b04852551d2fd265b94cd400b3293ec0810465f52de8a6c057
|
||||||
|
DIST quickjs-2025-09-13-2.tar.xz 596244 BLAKE2B da4bdb04e87a3f6086287e352e878e9f5b78034feda5687f7e191a549a4e2e7a0aa54ce89dd25b99eb685ff83db5898021a314f05ca20830c99f59379c413c3e SHA512 ea20d9ce8b6e09e58f1c3dc51086cd23c1ca18de7b5711bbd88e86dbbba2589b950acd22003e33fbed94dd4ec3e1828e6af5342ea9c62024cce7ca11eca1029c
|
||||||
|
|||||||
25
dev-lang/quickjs/files/quickjs-2025-09-13-quickjs-pc.patch
Normal file
25
dev-lang/quickjs/files/quickjs-2025-09-13-quickjs-pc.patch
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index dcbbf7e..04c67f1 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -379,6 +379,8 @@ ifdef CONFIG_LTO
|
||||||
|
endif
|
||||||
|
mkdir -p "$(DESTDIR)$(PREFIX)/include/quickjs"
|
||||||
|
install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(PREFIX)/include/quickjs"
|
||||||
|
+ mkdir -p "$(DESTDIR)$(PREFIX)/lib/pkgconfig"
|
||||||
|
+ sed -e "s,@VERSION@,$(shell cat VERSION)," -e "s,@INCDIR@,$(PREFIX)/include/quickjs," -e "s,@LIBDIR@,$(PREFIX)/lib/quickjs," quickjs.pc.in > "$(DESTDIR)$(PREFIX)/lib/pkgconfig/quickjs.pc"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# examples
|
||||||
|
diff --git a/quickjs.pc.in b/quickjs.pc.in
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..9c79525
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/quickjs.pc.in
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+Name: quickjs
|
||||||
|
+Description: Small and embeddable Javascript engine
|
||||||
|
+URL: https://bellard.org/quickjs/
|
||||||
|
+Version: @VERSION@
|
||||||
|
+Cflags: -I@INCDIR@
|
||||||
|
+Libs: -L@LIBDIR@ -lquickjs
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
From 95fcacedc0d84a8d10f8189ebe932d6774e2367c Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
|
||||||
|
Date: Fri, 20 Feb 2026 23:28:22 +0100
|
||||||
|
Subject: [PATCH] Makefile: respect CFLAGS/LDFLAGS
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 14 +++++++-------
|
||||||
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index dcbbf7e..7d41f8a 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -101,7 +101,7 @@ endif
|
||||||
|
ifdef CONFIG_CLANG
|
||||||
|
HOST_CC=clang
|
||||||
|
CC=$(CROSS_PREFIX)clang
|
||||||
|
- CFLAGS+=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d
|
||||||
|
+ CFLAGS+=-Wall -MMD -MF $(OBJDIR)/$(@F).d
|
||||||
|
CFLAGS += -Wextra
|
||||||
|
CFLAGS += -Wno-sign-compare
|
||||||
|
CFLAGS += -Wno-missing-field-initializers
|
||||||
|
@@ -125,13 +125,13 @@ else ifdef CONFIG_COSMO
|
||||||
|
HOST_CC=gcc
|
||||||
|
CC=cosmocc
|
||||||
|
# cosmocc does not correct support -MF
|
||||||
|
- CFLAGS=-g -Wall #-MMD -MF $(OBJDIR)/$(@F).d
|
||||||
|
+ CFLAGS=-Wall #-MMD -MF $(OBJDIR)/$(@F).d
|
||||||
|
CFLAGS += -Wno-array-bounds -Wno-format-truncation
|
||||||
|
AR=cosmoar
|
||||||
|
else
|
||||||
|
HOST_CC=gcc
|
||||||
|
CC=$(CROSS_PREFIX)gcc
|
||||||
|
- CFLAGS+=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d
|
||||||
|
+ CFLAGS+=-Wall -MMD -MF $(OBJDIR)/$(@F).d
|
||||||
|
CFLAGS += -Wno-array-bounds -Wno-format-truncation -Wno-infinite-recursion
|
||||||
|
ifdef CONFIG_LTO
|
||||||
|
AR=$(CROSS_PREFIX)gcc-ar
|
||||||
|
@@ -162,14 +162,14 @@ endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS+=$(DEFINES)
|
||||||
|
-CFLAGS_DEBUG=$(CFLAGS) -O0
|
||||||
|
-CFLAGS_SMALL=$(CFLAGS) -Os
|
||||||
|
-CFLAGS_OPT=$(CFLAGS) -O2
|
||||||
|
+CFLAGS_DEBUG=$(CFLAGS)
|
||||||
|
+CFLAGS_SMALL=$(CFLAGS)
|
||||||
|
+CFLAGS_OPT=$(CFLAGS)
|
||||||
|
CFLAGS_NOLTO:=$(CFLAGS_OPT)
|
||||||
|
ifdef CONFIG_COSMO
|
||||||
|
LDFLAGS+=-s # better to strip by default
|
||||||
|
else
|
||||||
|
-LDFLAGS+=-g
|
||||||
|
+LDFLAGS+=
|
||||||
|
endif
|
||||||
|
ifdef CONFIG_LTO
|
||||||
|
CFLAGS_SMALL+=-flto
|
||||||
|
|
||||||
|
base-commit: f1139494d18a2053630c5ed3384a42bb70db3c53
|
||||||
|
--
|
||||||
|
2.52.0
|
||||||
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<name>Denis Reva</name>
|
<name>Denis Reva</name>
|
||||||
<description>rarogcmex</description>
|
<description>rarogcmex</description>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>contact@hacktivis.me</email>
|
||||||
|
<name>Haelwenn (lanodan) Monnier</name>
|
||||||
|
</maintainer>
|
||||||
<use>
|
<use>
|
||||||
<flag name="lto">Enable Link Time Optimizations (improves performance and decreases size of executables)</flag>
|
<flag name="lto">Enable Link Time Optimizations (improves performance and decreases size of executables)</flag>
|
||||||
</use>
|
</use>
|
||||||
|
|||||||
55
dev-lang/quickjs/quickjs-2025.09.13.2.ebuild
Normal file
55
dev-lang/quickjs/quickjs-2025.09.13.2.ebuild
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# Copyright 2021-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit toolchain-funcs
|
||||||
|
|
||||||
|
MY_P="${PN}-${PV//./-}"
|
||||||
|
|
||||||
|
DESCRIPTION="Small embeddable Javascript engine"
|
||||||
|
HOMEPAGE="https://bellard.org/quickjs/"
|
||||||
|
SRC_URI="https://bellard.org/quickjs/${MY_P}.tar.xz"
|
||||||
|
S="${WORKDIR}/${MY_P%-2}"
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE="lto static-libs"
|
||||||
|
|
||||||
|
# "${FILESDIR}/quickjs-2020.11.08_Remove-TTY-check-in-test.patch"
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/quickjs-2024-01-13-sharedlib.patch"
|
||||||
|
"${FILESDIR}/quickjs-2025-09-13-respect-flags.patch"
|
||||||
|
"${FILESDIR}/quickjs-2025-09-13-quickjs-pc.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Changed in master
|
||||||
|
sed -i '/^CONFIG_LTO=/s;^;#;' Makefile || die
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
sed -i '/$(STRIP) .*/d' Makefile || die "Failed removing STRIP call"
|
||||||
|
|
||||||
|
sed -Ei '/^\s*(CC|AR)=/d' Makefile \
|
||||||
|
|| die "Failed to remove hard-coded tools."
|
||||||
|
|
||||||
|
sed -i 's;$(PREFIX)/lib;$(LIBDIR);' Makefile || die "Failed fixing libdir"
|
||||||
|
|
||||||
|
if ! use static-libs; then
|
||||||
|
sed -i '/install -m644 libquickjs.a "$(DESTDIR)$(LIBDIR)\/quickjs"/d' Makefile || die "Failed fixing static-libs"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
export CC="$(tc-getCC)"
|
||||||
|
export AR="$(tc-getAR)"
|
||||||
|
|
||||||
|
export PREFIX=/usr
|
||||||
|
export LIBDIR="/usr/$(get_libdir)"
|
||||||
|
|
||||||
|
export CONFIG_LTO=$(use lto)
|
||||||
|
if ! use static-libs; then
|
||||||
|
export CONFIG_SHARED=y
|
||||||
|
fi
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user