summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-07-05 22:49:49 +0200
committerDavid Seifert <soap@gentoo.org>2020-07-05 22:49:49 +0200
commit455ef7eca85e71c011a63cd66cc5479fdcb26cbf (patch)
tree26a5d21fb4c38ec6747e9d4fc18f6453721a60c4 /dev-embedded
parentdev-games/hawknl: Fix build system (diff)
downloadgentoo-455ef7eca85e71c011a63cd66cc5479fdcb26cbf.tar.gz
gentoo-455ef7eca85e71c011a63cd66cc5479fdcb26cbf.tar.bz2
gentoo-455ef7eca85e71c011a63cd66cc5479fdcb26cbf.zip
dev-embedded/xa: Fix build system
Closes: https://bugs.gentoo.org/722600 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/xa/files/xa-2.3.10-Makefile.patch77
-rw-r--r--dev-embedded/xa/xa-2.3.10.ebuild17
2 files changed, 85 insertions, 9 deletions
diff --git a/dev-embedded/xa/files/xa-2.3.10-Makefile.patch b/dev-embedded/xa/files/xa-2.3.10-Makefile.patch
new file mode 100644
index 000000000000..cabc7b99beec
--- /dev/null
+++ b/dev-embedded/xa/files/xa-2.3.10-Makefile.patch
@@ -0,0 +1,77 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,11 +1,7 @@
+ # Unix gcc or DOS go32 cross-compiling gcc
+ #
+-CC = gcc
+-LD = gcc
+ # for testing. not to be used; build failures in misc/.
+ #CFLAGS = -O2 -W -Wall -pedantic -ansi
+-CFLAGS = -O2
+-LDFLAGS = -lc
+
+ # for DOS?
+ # CC = gcc-go32
+@@ -32,13 +28,13 @@
+ rm -f xa
+
+ xa:
+- (cd src && LD=${LD} CC="${CC} ${CFLAGS}" ${MAKE})
++ (cd src && ${MAKE})
+
+ load:
+- (cd loader && CC="${CC} ${CFLAGS}" ${MAKE})
++ (cd loader && ${MAKE})
+
+ uncpk:
+- (cd misc && CC="${CC} ${CFLAGS}" ${MAKE})
++ (cd misc && ${MAKE})
+
+ dos: clean
+ (cd src && LD=gcc-go32 CC=gcc-go32 CFLAGS="-W -Wall -pedantic" ${MAKE})
+--- a/misc/Makefile
++++ b/misc/Makefile
+@@ -2,7 +2,6 @@
+ XCBMLIB = ..
+
+ # -Wall -ansi et al. cause compile problems.
+-CFLAGS = -O2
+
+ LIBS = #-lncurses -ltermcap -lm
+
+@@ -10,19 +9,19 @@
+ all: ../mkrom.sh ../uncpk ../printcbm ../file65 ../reloc65 ../ldo65
+
+ ../uncpk: uncpk.c
+- ${CC} ${CFLAGS} uncpk.c -o $(XCBMLIB)/uncpk
++ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} uncpk.c -o $(XCBMLIB)/uncpk
+
+ ../printcbm: printcbm.c
+- ${CC} ${CFLAGS} printcbm.c -o $(XCBMLIB)/printcbm
++ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} printcbm.c -o $(XCBMLIB)/printcbm
+
+ ../file65: file65.c
+- ${CC} ${CFLAGS} file65.c -o $(XCBMLIB)/file65
++ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} file65.c -o $(XCBMLIB)/file65
+
+ ../ldo65: ldo65.c
+- ${CC} ${CFLAGS} ldo65.c -o $(XCBMLIB)/ldo65
++ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} ldo65.c -o $(XCBMLIB)/ldo65
+
+ ../reloc65: reloc65.c
+- ${CC} ${CFLAGS} reloc65.c -o $(XCBMLIB)/reloc65
++ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} reloc65.c -o $(XCBMLIB)/reloc65
+
+ ../mkrom.sh: mkrom.sh
+ cp mkrom.sh ../mkrom.sh
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -8,7 +8,7 @@
+ all: xa
+
+ xa: ${OBJ}
+- ${LD} -o ../xa ${OBJ} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${LDFLAGS} -o ../xa ${OBJ}
+
+ clean:
+ rm -f *.o *.o65
diff --git a/dev-embedded/xa/xa-2.3.10.ebuild b/dev-embedded/xa/xa-2.3.10.ebuild
index c3803fcb811e..ea526d56aac6 100644
--- a/dev-embedded/xa/xa-2.3.10.ebuild
+++ b/dev-embedded/xa/xa-2.3.10.ebuild
@@ -13,14 +13,13 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
-PATCHES=( "${FILESDIR}"/${PN}-2.3.10-fix-gcc10-fno-common.patch )
-
-src_compile() {
- emake \
- CC="$(tc-getCC)" \
- LD="$(tc-getCC) " \
- CFLAGS="${CFLAGS} ${LDFLAGS}" \
- LDFLAGS="${LDFLAGS}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.10-Makefile.patch
+ "${FILESDIR}"/${PN}-2.3.10-fix-gcc10-fno-common.patch
+)
+
+src_configure() {
+ tc-export CC
}
src_test() {
@@ -28,6 +27,6 @@ src_test() {
}
src_install() {
- emake install DESTDIR="${ED}/usr"
+ emake DESTDIR="${ED}"/usr install
einstalldocs
}