mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-24 07:58:24 +02:00
ideally the source should be fixed upstream. but many of the existing fixes have already been reported to upstream, both by myself and others [1] [2] and upstream has not been responsive. so just patch it up with -std=gnu17 for now. 1: https://github.com/Terraspace/UASM/issues/197 2: https://github.com/Terraspace/UASM/pulls Closes: https://bugs.gentoo.org/951108 Signed-off-by: NRK <nrk@disroot.org> Closes: https://github.com/gentoo/gentoo/pull/40998 Signed-off-by: Sam James <sam@gentoo.org>
45 lines
1,016 B
Bash
45 lines
1,016 B
Bash
# Copyright 2024-2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit toolchain-funcs flag-o-matic
|
|
|
|
DESCRIPTION="UASM is a free MASM-compatible assembler"
|
|
HOMEPAGE="https://www.terraspace.co.uk/uasm.html"
|
|
SRC_URI="https://github.com/Terraspace/UASM/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
S="${WORKDIR}/UASM-${PV}"
|
|
|
|
LICENSE="Watcom-1.0"
|
|
SLOT="0"
|
|
KEYWORDS="amd64"
|
|
PATCHES=(
|
|
"${FILESDIR}/build-fix.patch"
|
|
"${FILESDIR}/makefile-dep-fix.patch"
|
|
"${FILESDIR}/bool-fix.diff"
|
|
)
|
|
|
|
src_prepare() {
|
|
default
|
|
# don't strip binary
|
|
sed -i gccLinux64.mak -e 's/ -s / /g' || die
|
|
}
|
|
|
|
src_compile() {
|
|
# Bug: https://github.com/Terraspace/UASM/issues/143
|
|
append-cflags -fcommon
|
|
# https://github.com/Terraspace/UASM/issues/197
|
|
append-cflags -Wno-error=incompatible-pointer-types
|
|
# BUG: 951108
|
|
append-cflags -std=gnu17
|
|
|
|
emake -f gccLinux64.mak \
|
|
CC="$(tc-getCC)" \
|
|
CFLAGS="${CFLAGS}" \
|
|
LDFLAGS="${LDFLAGS}"
|
|
}
|
|
|
|
src_install() {
|
|
dobin GccUnixR/uasm
|
|
dodoc *.txt Doc/*.txt
|
|
}
|