Thanks to doj@cubic.org.
Bug: https://bugs.gentoo.org/686234
Bug: https://github.com/gentoo/gentoo/pull/13504
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
--- /dev/null
+DIST xa-2.3.9.tar.gz 151086 BLAKE2B 312d082bf18eebdcd41eb4127a035db5fe2b47121bceadf45aa06e515160cb9233742791447806ee057a1b4e3860ecddda3f85f76d0e9d672dcd00cb8a1871c4 SHA512 9e140192f7daae8b5042a01c81c85f6ec4e53c727fa5af624fbe94a8ce85fbf821a1ee94dc9c11e8087b08a4060010b989f95b77cbcd2b550ab552c3b5455dfe
--- /dev/null
+--- a/Makefile.orig 2019-05-18 09:07:31.331089966 -0700
++++ b/Makefile 2019-05-18 09:10:15.274673364 -0700
+@@ -17,11 +17,11 @@
+ #CFLAGS =
+ #LD = ld
+
+-DESTDIR = /usr/local
++PREFIX ?= /usr
+
+-BINDIR = $(DESTDIR)/bin
+-MANDIR = $(DESTDIR)/share/man/man1
+-DOCDIR = $(DESTDIR)/share/doc
++BINDIR = $(DESTDIR)/$(PREFIX)/bin
++MANDIR = $(DESTDIR)/$(PREFIX)/share/man/man1
++DOCDIR = $(DESTDIR)/$(PREFIX)/share/doc
+
+ MKDIR = mkdir -p
+ INSTALL = install
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+ xa is a high-speed, two-pass portable cross-assembler. It
+ understands mnemonics and generates code for NMOS 6502s (such as
+ 6502A, 6504, 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s
+ (65C02 and Rockwell R65C02) and the 65816.
+ </longdescription>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="xa high-speed, two-pass portable 6502 cross-assembler"
+HOMEPAGE="https://www.floodgap.com/retrotech/xa/"
+SRC_URI="https://www.floodgap.com/retrotech/${PN}/dists/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+ "${FILESDIR}/${P}-Makefile.patch"
+)