summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2022-10-28 15:49:33 +0200
committerPacho Ramos <pacho@gentoo.org>2022-10-28 17:15:24 +0200
commit1e0ebfc2e1cb1f5ed435a59d627d1a85053c70bd (patch)
treed79f18c1bf6933d4ab5b6e6a1001257e3db6007f /dev-lang/squirrel
parentgnome-extra/gnome-network-displays: new package, add 0.90.5 (diff)
downloadgentoo-1e0ebfc2e1cb1f5ed435a59d627d1a85053c70bd.tar.gz
gentoo-1e0ebfc2e1cb1f5ed435a59d627d1a85053c70bd.tar.bz2
gentoo-1e0ebfc2e1cb1f5ed435a59d627d1a85053c70bd.zip
dev-lang/squirrel: add 3.2
Bug: https://bugs.gentoo.org/843155 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'dev-lang/squirrel')
-rw-r--r--dev-lang/squirrel/Manifest2
-rw-r--r--dev-lang/squirrel/files/squirrel-3.2-CVE-2022-30292.patch12
-rw-r--r--dev-lang/squirrel/files/squirrel.pc.in12
-rw-r--r--dev-lang/squirrel/squirrel-3.2.ebuild63
4 files changed, 89 insertions, 0 deletions
diff --git a/dev-lang/squirrel/Manifest b/dev-lang/squirrel/Manifest
index a07ee041552a..0836da444be7 100644
--- a/dev-lang/squirrel/Manifest
+++ b/dev-lang/squirrel/Manifest
@@ -1 +1,3 @@
DIST squirrel-3.1_p20200612.tar.gz 181047 BLAKE2B f6965b5e721919c6c33426843a9b73fb27f39b7341763c2ff01421e6b6dce6cb86c6a02df65af9cb2266e8a63d6612c0e857456c4bb6e2546760f937d1979990 SHA512 e9853c92c151ca35e137a91ba4e3c9ad9c4c6d95a22c3686ebbae74cea7c1bf704ec5274d610f9d8158d8662a2b1b1445664f3f33c11689553cfc090a957b204
+DIST squirrel-3.2.tar.gz 620486 BLAKE2B c03cee0dffc12ff48caa4a7c9c0fffec32cdfb23306f265b8475454b0b9f14a3d2ec620b0f2183de8e8bc83e4921d6853105ac1a8d37bf3f2d97e914a001c4fd SHA512 e488ccc07b851e1707f3fde923f691747b18dc2fcc4748d2a68f2590ab84a3c0db647c8ac9ee775796984d2302a3d3686459556ea0c49a0b96b1354fcb8a6c74
+DIST squirrel-config.cmake.in_3.2 143 BLAKE2B e9e795a4f855f41206c5aca89b949c279f35dce06dad73c9153a9c03701f1721d831bdc29e3a399a2a6b2cf6e97d3a966008d81dfe955b2f5412c818d5a054bc SHA512 4820835a233b2beb5768b39e6b3ce5f06f1f9bc57c4c19df2c4f7ce2b03e67c18554c3084259317092d1eb0fee7d909bdbc56a9fc556f57ed61ef8b0f181996d
diff --git a/dev-lang/squirrel/files/squirrel-3.2-CVE-2022-30292.patch b/dev-lang/squirrel/files/squirrel-3.2-CVE-2022-30292.patch
new file mode 100644
index 000000000000..3ba274b3270c
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-3.2-CVE-2022-30292.patch
@@ -0,0 +1,12 @@
+diff --git a/squirrel/sqbaselib.cpp b/squirrel/sqbaselib.cpp
+index e2f248e..308d2cc 100644
+--- a/squirrel/sqbaselib.cpp
++++ b/squirrel/sqbaselib.cpp
+@@ -1149,6 +1149,7 @@ static SQInteger thread_call(HSQUIRRELVM v)
+ SQObjectPtr o = stack_get(v,1);
+ if(sq_type(o) == OT_THREAD) {
+ SQInteger nparams = sq_gettop(v);
++ sq_reservestack(_thread(o), nparams + 3);
+ _thread(o)->Push(_thread(o)->_roottable);
+ for(SQInteger i = 2; i<(nparams+1); i++)
+ sq_move(_thread(o),v,i);
diff --git a/dev-lang/squirrel/files/squirrel.pc.in b/dev-lang/squirrel/files/squirrel.pc.in
new file mode 100644
index 000000000000..4dc26b906ad2
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel.pc.in
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@libdir@
+includedir=/usr/include/squirrel
+
+Name: squirrel
+Description: squirrel library
+Version: @version@
+
+Requires:
+Libs: -L${libdir} -lsquirrel -lsqstdlib
+Cflags: -I${includedir}
diff --git a/dev-lang/squirrel/squirrel-3.2.ebuild b/dev-lang/squirrel/squirrel-3.2.ebuild
new file mode 100644
index 000000000000..02c8bcc6a1d4
--- /dev/null
+++ b/dev-lang/squirrel/squirrel-3.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A interpreted language mainly used for games"
+HOMEPAGE="http://squirrel-lang.org/"
+# Missing file in the tarball, do the same as Mageia
+SRC_URI="https://download.sourceforge.net/squirrel/${PN}_${PV/./_}_stable.tar.gz -> ${P}.tar.gz
+ https://raw.githubusercontent.com/albertodemichelis/squirrel/v${PV}/squirrel-config.cmake.in -> squirrel-config.cmake.in_${PV}"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}3"
+
+PATCHES=(
+ # Fixed in master
+ "${FILESDIR}/${P}-CVE-2022-30292.patch"
+)
+
+src_prepare() {
+ cp "${DISTDIR}/squirrel-config.cmake.in_${PV}" "${S}/squirrel-config.cmake.in" || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(usex static-libs '' -DDISABLE_STATIC=YES)
+ # /usr/bin/sq is used by app-text/ispell
+ # /usr/lib/libsquirrel.so is used by app-shells/squirrelsh
+ -DLONG_OUTPUT_NAMES=YES
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dodoc HISTORY
+
+ if use examples; then
+ docompress -x /usr/share/doc/${PF}/samples
+ dodoc -r samples
+ fi
+
+ # Add pkgconfig file, needed for some reverse deps (follows Mageia
+ # one)
+ # https://github.com/albertodemichelis/squirrel/issues/259
+ dodir /usr/$(get_libdir)/pkgconfig
+ sed \
+ -e "s/@libdir@/$(get_libdir)/" \
+ -e "s/@version@/${PV}/" \
+ "${FILESDIR}/${PN}.pc.in" > "${ED}/usr/$(get_libdir)/pkgconfig/${PN}.pc" || die
+}