# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="UASM is a free MASM-compatible assembler"
HOMEPAGE="https://www.terraspace.co.uk/uasm.html"
SRC_URI="https://github.com/Terraspace/UASM/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/UASM-${PV}"

LICENSE="Watcom-1.0"
SLOT="0"
KEYWORDS="~amd64"

src_compile() {
	emake -f Makefile-Linux-common.mak \
		CC="$(tc-getCC)" \
		CFLAGS="${CFLAGS}" \
		LDFLAGS="${LDFLAGS}"
}

src_install() {
	dobin UnixR/uasm
	dodoc *.txt Doc/*.txt
}
