summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/coldfire')
-rw-r--r--app-emulation/coldfire/coldfire-0.3.1-r1.ebuild39
-rw-r--r--app-emulation/coldfire/coldfire-0.3.1.ebuild16
-rw-r--r--app-emulation/coldfire/files/coldfire-0.3.1-implicit-function-declarations.patch12
-rw-r--r--app-emulation/coldfire/files/coldfire-0.3.1-ld.patch11
-rw-r--r--app-emulation/coldfire/files/coldfire-0.3.1-no-common.patch23
-rw-r--r--app-emulation/coldfire/metadata.xml2
6 files changed, 99 insertions, 4 deletions
diff --git a/app-emulation/coldfire/coldfire-0.3.1-r1.ebuild b/app-emulation/coldfire/coldfire-0.3.1-r1.ebuild
new file mode 100644
index 000000000000..768ca068bcb2
--- /dev/null
+++ b/app-emulation/coldfire/coldfire-0.3.1-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Motorola Coldfire Emulator"
+HOMEPAGE="http://www.slicer.ca/coldfire/"
+SRC_URI="http://www.slicer.ca/coldfire/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-headers.patch
+ "${FILESDIR}"/${P}-ld.patch
+ "${FILESDIR}"/${P}-no-common.patch
+ "${FILESDIR}"/${P}-implicit-function-declarations.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+
+ tc-export LD
+}
+
+src_install() {
+ dobin coldfire
+ dodoc CONTRIBUTORS HACKING README
+}
diff --git a/app-emulation/coldfire/coldfire-0.3.1.ebuild b/app-emulation/coldfire/coldfire-0.3.1.ebuild
index 21e971272979..653abff711e4 100644
--- a/app-emulation/coldfire/coldfire-0.3.1.ebuild
+++ b/app-emulation/coldfire/coldfire-0.3.1.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+inherit toolchain-funcs
+
DESCRIPTION="Motorola Coldfire Emulator"
HOMEPAGE="http://www.slicer.ca/coldfire/"
SRC_URI="http://www.slicer.ca/coldfire/files/${P}.tar.gz"
@@ -16,10 +18,18 @@ DEPEND="sys-libs/ncurses:0=
sys-libs/readline:0="
PATCHES=(
- "${FILESDIR}/${P}-build.patch"
- "${FILESDIR}/${P}-headers.patch"
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-headers.patch
+ "${FILESDIR}"/${P}-ld.patch
+ "${FILESDIR}"/${P}-no-common.patch
)
+src_prepare() {
+ default
+
+ tc-export LD
+}
+
src_install() {
dobin coldfire
dodoc CONTRIBUTORS HACKING README
diff --git a/app-emulation/coldfire/files/coldfire-0.3.1-implicit-function-declarations.patch b/app-emulation/coldfire/files/coldfire-0.3.1-implicit-function-declarations.patch
new file mode 100644
index 000000000000..2a96229e101f
--- /dev/null
+++ b/app-emulation/coldfire/files/coldfire-0.3.1-implicit-function-declarations.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/900326
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,6 +87,7 @@ AC_CHECK_FUNCS(_snprintf snprintf)
+
+ AC_MSG_CHECKING(for unaligned long accesses)
+ AC_TRY_RUN([
++ #include <stdlib.h>
+ void main(void)
+ { unsigned char data[sizeof(long)*2];
+ long *ptr;
diff --git a/app-emulation/coldfire/files/coldfire-0.3.1-ld.patch b/app-emulation/coldfire/files/coldfire-0.3.1-ld.patch
new file mode 100644
index 000000000000..b0b16fec8603
--- /dev/null
+++ b/app-emulation/coldfire/files/coldfire-0.3.1-ld.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.rules.in
++++ b/Makefile.rules.in
+@@ -1,7 +1,7 @@
+ CC = @CC@
+ CFLAGS = -Wall @CPPFLAGS@ @CFLAGS@ -I$(TOPSRCDIR)
+ LIBS = @LIBS@
+-LD_R = ld -r
++LD_R = $(LD) -r
+ RM = rm -f
+ LDFLAGS = @LDFLAGS@
+
diff --git a/app-emulation/coldfire/files/coldfire-0.3.1-no-common.patch b/app-emulation/coldfire/files/coldfire-0.3.1-no-common.patch
new file mode 100644
index 000000000000..f4cc61f7bb46
--- /dev/null
+++ b/app-emulation/coldfire/files/coldfire-0.3.1-no-common.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/706942
+--- a/peripherals/sim_5206.c
++++ b/peripherals/sim_5206.c
+@@ -23,7 +23,7 @@ static struct _sim_register *sim_register_lookup_by_offset(s32 offset);
+ static struct _sim_register *sim_register_lookup_by_name(char *name);
+ static void sim_interrupt_assert(s16 number, s16 vector);
+ static void sim_interrupt_withdraw(s16 number);
+-struct _sim sim_data;
++static struct _sim sim_data;
+
+ /* name, offset, width, read, write, resetvalue, description */
+ static struct _sim_register sim_reg[] = {
+--- a/peripherals/sim_5307.c
++++ b/peripherals/sim_5307.c
+@@ -59,7 +59,7 @@ static struct _sim_register *sim_register_lookup_by_offset(s32 offset);
+ static struct _sim_register *sim_register_lookup_by_name(char *name);
+ static void sim_interrupt_assert(s16 number, s16 vector);
+ static void sim_interrupt_withdraw(s16 number);
+-struct _sim sim_data;
++static struct _sim sim_data;
+
+ /* name, offset, width, read, write, resetvalue, description */
+ static struct _sim_register sim_reg[] = {
diff --git a/app-emulation/coldfire/metadata.xml b/app-emulation/coldfire/metadata.xml
index 71b1461e1146..98ae10b3c34a 100644
--- a/app-emulation/coldfire/metadata.xml
+++ b/app-emulation/coldfire/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>embedded@gentoo.org</email>