aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dev86/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-12-15 14:00:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-12-15 14:01:01 +0000
commit6c615833a557fdda19e2ffdc46dfdbb0486a3901 (patch)
tree211272624b7117d570744c0a61ac3f2b34759a64 /testing/dev86/APKBUILD
parentd30437a74830f78e39f116483858fe263b9192e8 (diff)
downloadaports-6c615833a557fdda19e2ffdc46dfdbb0486a3901.tar.bz2
aports-6c615833a557fdda19e2ffdc46dfdbb0486a3901.tar.xz
testing/dev86: new aport
A real mode 80x86 assembler and linker http://www.debath.co.uk/dev86/
Diffstat (limited to 'testing/dev86/APKBUILD')
-rw-r--r--testing/dev86/APKBUILD79
1 files changed, 79 insertions, 0 deletions
diff --git a/testing/dev86/APKBUILD b/testing/dev86/APKBUILD
new file mode 100644
index 0000000000..dd1ab2139e
--- /dev/null
+++ b/testing/dev86/APKBUILD
@@ -0,0 +1,79 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=dev86
+pkgver=0.16.18
+pkgrel=0
+pkgdesc="A real mode 80x86 assembler and linker"
+url="http://www.debath.co.uk/dev86/"
+arch="all"
+license="GPL+ and GPLv2+ and LGPLv2+"
+depends=
+makedepends="bash coreutils"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.debath.co.uk/dev86/Dev86src-$pkgver.tar.gz
+ dev86-noelks.patch
+ dev86-pic.patch
+ dev86-overflow.patch
+ dev86-print-overflow.patch
+ "
+
+_builddir="$srcdir"/dev86-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ # use our CFLAGS
+ sed -i -e "s/-O2 -g/${CFLAGS}/" makefile.in
+# if [ "$CARCH" = x86_64 ]; then
+ sed -i \
+ -e 's,alt-libs elksemu,alt-libs,' \
+ -e 's,install-lib install-emu,install-lib,' \
+ makefile.in || return 1
+# fi
+ sed -i \
+ -e "s:-O2 -g:${CFLAGS}:" \
+ -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
+
+}
+
+build() {
+ cd "$_builddir"
+ export CPPFLAGS=""
+ export SHELL=/bin/bash
+ msg "building bcc86 unproto copt as86 ld86"
+ make -j1 bcc86 unproto copt as86 ld86 CFLAGS="$CFLAGS" CC="${CC:-gcc}" \
+ || return 1
+ msg "building cpp"
+ make -C cpp CFLAGS="$CFLAGS" CC="${CC:-gcc}" || return 1
+ msg "building ar"
+ make -C ar CFLAGS="$CFLAGS" CC="${CC:-gcc}" || return 1
+ msg "building ld"
+ make -C ld CFLAGS="$CFLAGS" CC="${CC:-gcc}" || return 1
+ msg "building the rest..."
+ make -j1 DIST="$pkgdir" CC="${CC:-gcc}" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DIST="$pkgdir" \
+ MANDIR=/usr/share/man \
+ LIBDIR=/usr/lib/bcc \
+ INCLDIR=/usr/lib/bcc \
+ LOCALPREFIX=/usr \
+ install install-man
+}
+
+md5sums="f2e06b547397383b2b2650b9c4fd9bab Dev86src-0.16.18.tar.gz
+eba7081bc5dbd72b7b9b902275251499 dev86-noelks.patch
+d508a2a8ededa9e34dbd9105dfd66290 dev86-pic.patch
+8f462d57fe4d5c9393331ba917db0258 dev86-overflow.patch
+7ce097efcb8c043727b4b3bf6c396c75 dev86-print-overflow.patch"