commit: 2023fb28f38eecc3ad2b87532c275c67d58a4879 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> AuthorDate: Sat Aug 3 11:21:37 2024 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Sat Aug 3 11:23:09 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2023fb28
dev-lang/jwasm: add 2.18 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> dev-lang/jwasm/Manifest | 1 + .../jwasm/files/jwasm-2.18-makefile-dep-fix.patch | 11 +++++ dev-lang/jwasm/files/jwasm-2.18-types-test.patch | 47 ++++++++++++++++++++++ dev-lang/jwasm/jwasm-2.18.ebuild | 36 +++++++++++++++++ 4 files changed, 95 insertions(+) diff --git a/dev-lang/jwasm/Manifest b/dev-lang/jwasm/Manifest index e2626ac8ea5e..caed04a75758 100644 --- a/dev-lang/jwasm/Manifest +++ b/dev-lang/jwasm/Manifest @@ -1 +1,2 @@ DIST jwasm-2.13.tar.gz 578365 BLAKE2B 8c6fbe3e6cb56c0fe8135c30c629534d2b6e2a2ed534249834e0e2674bf6635cb15ab94d4fa05c5378cb0db8569ddc3ba49d2d7c9615b7ddb769cba1a2d5b715 SHA512 03f80f4a74b39c6093f5cd5334364f7458836a52ad01279c95683e7053cb4211c40235e16f6f2ee40bc7316dcd8a4fbcb57bf3606d31249d96d01933a8aa0563 +DIST jwasm-2.18.tar.gz 1169949 BLAKE2B 2a5d6c37f27dd5193390a5b5ab7d7ec260a800ead132dda4a49b16b5ae43b53ef397b663166767c8f4ce2de69dd9fa61e59e0537d837ba85da38cb17aa0da6e0 SHA512 f5ca9d2ec80b979e2acec7246861e13e11717917f59df126f28339e3c1ded3405c8a93daaef6ee817bc217d593151010bf18c85c9fc03600ff70cb18e793309c diff --git a/dev-lang/jwasm/files/jwasm-2.18-makefile-dep-fix.patch b/dev-lang/jwasm/files/jwasm-2.18-makefile-dep-fix.patch new file mode 100644 index 000000000000..277216cf18ef --- /dev/null +++ b/dev-lang/jwasm/files/jwasm-2.18-makefile-dep-fix.patch @@ -0,0 +1,11 @@ +--- a/GccUnix.mak ++++ b/GccUnix.mak +@@ -30,7 +30,7 @@ include gccmod.inc + + #.c.o: + # $(CC) -c $(inc_dirs) $(c_flags) -o $(OUTD)/$*.o $< +-$(OUTD)/%.o: src/%.c ++$(OUTD)/%.o: src/%.c | $(OUTD) + $(CC) -c $(inc_dirs) $(c_flags) -o $(OUTD)/$*.o $< + + all: $(OUTD) $(OUTD)/$(TARGET1) diff --git a/dev-lang/jwasm/files/jwasm-2.18-types-test.patch b/dev-lang/jwasm/files/jwasm-2.18-types-test.patch new file mode 100644 index 000000000000..37b35208e96f --- /dev/null +++ b/dev-lang/jwasm/files/jwasm-2.18-types-test.patch @@ -0,0 +1,47 @@ +From b19339d4356efbd9b49f73e67ed7c09b9dad4b75 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <[email protected]> +Date: Thu, 16 May 2013 12:24:17 +0300 +Subject: [PATCH 1/2] types: add sanity tests for used sizes + +Signed-off-by: Sergei Trofimovich <[email protected]> +--- a/gccmod.inc ++++ b/gccmod.inc +@@ -6,6 +6,7 @@ $(OUTD)/atofloat.o \ + $(OUTD)/backptch.o \ + $(OUTD)/bin.o \ + $(OUTD)/branch.o \ ++$(OUTD)/checks.o \ + $(OUTD)/cmdline.o \ + $(OUTD)/codegen.o \ + $(OUTD)/coff.o \ +--- /dev/null ++++ b/src/checks.c +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++* ++* This code is Public Domain. ++* ++* ======================================================================== ++* ++* Description: make sure "inttype.h" filelds are of the desired size. ++* ++****************************************************************************/ ++ ++#include "inttype.h" ++ ++/* fails to compile if type sizes are of unexpected size */ ++static void validate_inttype_sizes() ++{ ++/* try to create */ ++#define T_IS_SIZE(__type, __expected_size, __test_name) \ ++ char __test_name[2 * (sizeof (__type) == (__expected_size)) - 1]; ++ ++ T_IS_SIZE(uint_8, 1, size_of_uint_8_must_be_1_byte); ++ T_IS_SIZE(uint_16, 2, size_of_uint_16_must_be_2_bytes); ++ T_IS_SIZE(uint_32, 4, size_of_uint_32_must_be_4_bytes); ++ T_IS_SIZE(uint_64, 8, size_of_uint_64_must_be_8_bytes); ++ ++#undef T_IS_SIZE ++} +-- +1.8.2.1 diff --git a/dev-lang/jwasm/jwasm-2.18.ebuild b/dev-lang/jwasm/jwasm-2.18.ebuild new file mode 100644 index 000000000000..f583e3ffd328 --- /dev/null +++ b/dev-lang/jwasm/jwasm-2.18.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="MASM-compatible TASM-similar assembler (fork of Wasm)" +HOMEPAGE="https://github.com/Baron-von-Riedesel/JWasm" +SRC_URI="https://github.com/Baron-von-Riedesel/JWasm/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/JWasm-${PV}" + +LICENSE="Watcom-1.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( + "${FILESDIR}"/${PN}-2.18-types-test.patch + "${FILESDIR}"/${PN}-2.18-makefile-dep-fix.patch +) + +src_prepare() { + default + + # don't strip binary + sed -i GccUnix.mak -e 's/ -s / /g' || die +} + +src_compile() { + emake -f GccUnix.mak CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}" +} + +src_install() { + dobin build/GccUnixR/jwasm + dodoc -r README.md History.txt Html/ +}
