wok-next view dev86/receipt @ rev 21597

updated dosbox (0.74-2 -> 0.74.3)
author Hans-G?nter Theisgen
date Wed Jun 24 14:18:09 2020 +0100 (2020-06-24)
parents 917cbaa57ad2
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="dev86"
4 VERSION="0.16.21"
5 CATEGORY="development"
6 SHORT_DESC="Linux 8086 development environment"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.debath.co.uk/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$GITHUB/lkundrak/dev86/tarball/v$VERSION"
14 BUILD_DEPENDS="coreutils-file-output-full" # for `cat -v`
15 SPLIT="elksemu $PACKAGE"
16 case $ARCH in
17 # elksemu isn't supported on x86-64, see:
18 # /usr/include/sys/vm86.h:24:3: error: #error This header is unsupported on x86-64.
19 x86_64) unset SPLIT;;
20 esac
22 compile_rules() {
23 sed -i 's|/usr/man|/usr/share/man|' man/Makefile
24 sed -i 's|REFIX)/man|REFIX)/share/man|' Makefile */Makefile
25 make -j1 PREFIX=/usr &&
26 make -j1 DIST=$install install || return 1
28 install -Dm755 $stuff/com2exe $install/usr/bin/com2exe
29 }
31 genpkg_rules() {
32 case $PACKAGE in
33 elksemu)
34 copy elksemu
35 CAT="system-tools|Embedded Linux Kernel Subset emulator"
36 TAGS="virtual 8086 vm86"
37 ;;
38 dev86)
39 copy @std @dev @rm
40 TAGS="compiler C assembler 8086"
41 ;;
42 esac
43 }
45 post_install_dev86() {
46 [ "$1" ] && return
47 register=/proc/sys/fs/binfmt_misc/register
48 [ -f $register ] || modprobe binfmt_misc 2>/dev/null || true
49 [ -f $register ] && cat > $register <<EOT
50 :i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/usr/bin/elksemu:
51 EOT
52 true
53 }
55 post_install_elksemu() {
56 fmt="binfmt_misc"
57 proc="/proc/sys/fs/binfmt_misc"
58 cat > /tmp/runelks$$ <<EOT
59 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc
60 echo ':i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/usr/bin/elksemu:' >$proc/register
61 EOT
62 rc="$1/etc/init.d/local.sh"
63 grep -q ':i86-elks:M:' $rc || cat /tmp/runelks$$ >> $rc
64 [ -n "$1" ] || . /tmp/runelks$$
65 rm -f /tmp/runelks$$
66 }
68 pre_remove_elksemu() {
69 echo -1 > /proc/sys/fs/binfmt_misc/i86-elks
70 sed -i '/binfmt_misc/{N;/:i86-elks:M:/d}' "$1/etc/init.d/local.sh"
71 }