aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2013-01-04 22:19:59 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2013-01-04 22:19:59 +0100
commit7ff6220d016ae83f7c388c9f474b6d7f86c3fa69 (patch)
tree5fdcce4ad6bcc12597166878bbb679fe31ac9800 /main
parent8fa08b81feb7b9a86f821ec60ecc6d22c8dae9e5 (diff)
main/dev86: fix build on eglibc
Diffstat (limited to 'main')
-rw-r--r--main/dev86/APKBUILD15
-rw-r--r--main/dev86/dev86-0.16.19-memmove.patch17
2 files changed, 26 insertions, 6 deletions
diff --git a/main/dev86/APKBUILD b/main/dev86/APKBUILD
index 43a60d22f02..6eb97f9ab78 100644
--- a/main/dev86/APKBUILD
+++ b/main/dev86/APKBUILD
@@ -16,7 +16,7 @@ source="http://www.debath.co.uk/dev86/Dev86src-$pkgver.tar.gz
dev86-pic.patch
dev86-print-overflow.patch
dev86-long.patch
- "
+ dev86-0.16.19-memmove.patch"
_builddir="$srcdir"/dev86-$pkgver
prepare() {
@@ -28,7 +28,8 @@ prepare() {
esac
done
# use our CFLAGS
- sed -i -e "s/-O2 -g/${CFLAGS}/" makefile.in
+ sed -i -e "s/-O2 -g/${CFLAGS}/" \
+ makefile.in || return 1
# if [ "$CARCH" = x86_64 ]; then
sed -i \
-e 's,alt-libs elksemu,alt-libs,' \
@@ -40,9 +41,10 @@ prepare() {
-e '/INEXE=/s:-s::' \
makefile.in || return 1
# no stripping
- sed -i -e '/INSTALL_OPTS=/s:-s::' bin86/Makefile
- sed -i -e '/install -m 755 -s/s:-s::' dis88/Makefile
-
+ sed -i -e '/INSTALL_OPTS=/s:-s::' \
+ bin86/Makefile || return 1
+ sed -i -e '/install -m 755 -s/s:-s::' \
+ dis88/Makefile || return 1
}
build() {
@@ -76,4 +78,5 @@ md5sums="442e98e1afa23fe00d40c5a996385942 Dev86src-0.16.19.tar.gz
eba7081bc5dbd72b7b9b902275251499 dev86-noelks.patch
d508a2a8ededa9e34dbd9105dfd66290 dev86-pic.patch
7ce097efcb8c043727b4b3bf6c396c75 dev86-print-overflow.patch
-95e9df3245d46a02154fbe2f8b907782 dev86-long.patch"
+95e9df3245d46a02154fbe2f8b907782 dev86-long.patch
+cbb648a57fd13b716ba91c26af248885 dev86-0.16.19-memmove.patch"
diff --git a/main/dev86/dev86-0.16.19-memmove.patch b/main/dev86/dev86-0.16.19-memmove.patch
new file mode 100644
index 00000000000..e0bd8b7ce00
--- /dev/null
+++ b/main/dev86/dev86-0.16.19-memmove.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/354351
+
+fix sniped from Debian:
+* Fix "FTBFS: ncc: illegal label": apply patch by dai that replaces strcpy
+ by memmove (closes: #591133).
+
+--- a/copt/copt.c
++++ b/copt/copt.c
+@@ -174,7 +174,7 @@
+ /* Delete leading white spaces */
+ for (cp = buf; *cp && isspace(*cp); cp++) ;
+ if (cp != buf && *cp)
+- strcpy(buf, cp);
++ memmove(buf, cp, strlen(cp) + 1);
+
+ return(buf);
+ }