diff options
author | Chris Severance | 2017-02-27 14:22:40 -0500 |
---|---|---|
committer | Chris Severance | 2017-02-27 14:22:40 -0500 |
commit | 71b7bbe303b3620d3642a4b62506597a4f7d7079 (patch) | |
tree | 892058557a380b84a827e7edda3f8f6cc82f1137 /PKGBUILD | |
parent | 5ca2c9a7b4299be3ad38287703d5428079867912 (diff) | |
download | aur-71b7bbe303b3620d3642a4b62506597a4f7d7079.tar.gz |
More Debug, new freedos link
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 67 |
1 files changed, 43 insertions, 24 deletions
@@ -11,32 +11,30 @@ set -u _opt_Debug=0 # 0 = standard build -# 1 = debug build +# 1 = debug build. This requires sudo to change a system setting. # 2 = debug build with slow compile to make compile errors easy to see _pkgname='dosemu2' pkgname="${_pkgname}-git" -pkgver=2.0pre6.1.dev.34.g2c7ccd7 +pkgver=2.0pre6.1.dev.290.g5424865e pkgrel=1 pkgdesc='Virtual machine that allows you to run DOS programs under Linux' arch=('i686' 'x86_64') url='https://stsp.github.io/dosemu2/' license=('GPL' 'custom') -depends=('glibc') +depends=('glibc' 'alsa-lib') +if [ "${_opt_Debug}" -ne 0 ]; then + depends+=('gdb' 'binutils' 'sudo') +fi optdepends=( - 'vde2: networking support' - 'sdl2: graphical display' - 'slang: console display' - 'gpm: mouse support in console' 'libao: audio output' + 'gpm: mouse support in console' + 'slang: console display' + 'sdl2: graphical display' 'fluidsynth: MIDI support' + 'vde2: networking support' ) -if [ "${_opt_Debug}" -ne 0 ]; then - optdepends+=('gdb: debug support') -else - depends+=('gdb' 'binutils') -fi -makedepends=('git') +makedepends=('git' 'flex' 'bison' 'binutils' 'sed' 'perl') provides=('dosemu=2.0' "${_pkgname}=2.0") conflicts=('dosemu' "${_pkgname}") backup=( @@ -48,17 +46,16 @@ _github='stsp/dosemu2' _verwatch=("https://github.com/${_github}/releases.atom" "\s\+<title>${_pkgname}-\([^<]\+\)</title>" 'f') _freedos='dosemu-freedos-1.1-bin.tgz' # 'dosemu-freedos-bin.tgz' source=( - 'git+https://github.com/stsp/dosemu2.git' - "https://dl.dropboxusercontent.com/u/13513277/dosemu/${_freedos}" + "git+https://github.com/${_github}.git" + #"https://dl.dropboxusercontent.com/u/13513277/dosemu/${_freedos}" + "https://chungy.keybase.pub/dosemu/${_freedos}" 'build-system.patch' - 'xdosemu.desktop' 'http://downloads.sourceforge.net/sourceforge/dosemu/dosemu-freedos-1.0-bin.tgz' # for the GNU utils ) noextract=("${_freedos}") sha256sums=('SKIP' '0891a8346ee58f8468ab17f93315d6f23fe68348d297be39c1faad5bd6e59613' 'c4364f3837744775faebeac86ad22e5b636db411942c6e21e74e9b3277e066cf' - 'ed210a850a1102fbf56bfd8a34b5dddca538caa2eee39210ee612406891c3e5a' '080c306a1b611e1861fd64466062f268eb44d2bf38082b8a57efadb5a9c0ebc7') pkgver() { @@ -75,9 +72,8 @@ prepare() { set -u cd 'dosemu2' - # Some makepkg options including -i erroneously run prepare() which should only be run when src is unpacked - local _prepareArch='prepare.Arch' - if [ ! -f "${_prepareArch}" ]; then + # Some makepkg options including -i erroneously run prepare() for vcs packages + if [ -f 'debian/rules' ]; then #patch -Np1 < ../build-system.patch #sed -ie '/yyget_leng/ s/int/size_t/' src/base/init/lexer.h ln -sf "../${_freedos}" @@ -88,12 +84,12 @@ prepare() { -e '# Update freedos' \ -e 's:^\(\s*fdtarball\)\s.*$:'"\1 ${_freedos}:g" \ -e '# Prefix' \ - -e 's:^}$: prefix=/usr\n&:g' \ + -e 's:^}$: prefix /usr\n&:g' \ 'compiletime-settings'{,.devel} ./autogen.sh local _opts=() if [ "${_opt_Debug}" -ne 0 ]; then - sed -i -e '# Temp fix for backtrace' \ + sed -i -e '# Temp fix for debug xbacktrace' \ -e 's:^#include <string\.h>:#include "config.h"\n&:g' \ 'src/arch/linux/async/backtrace-symbols.c' _opts+=('-d') @@ -101,7 +97,7 @@ prepare() { fi CFLAGS="${CFLAGS} -Wno-unused-result" \ ./default-configure ${_opts[@]:-} - echo -n > "${_prepareArch}" + rm -f 'debian/rules' fi set +u } @@ -122,11 +118,34 @@ package() { set -u cd 'dosemu2' make DESTDIR="${pkgdir}" install - install -Dpm644 "${srcdir}/xdosemu.desktop" -t "${pkgdir}/usr/share/applications/" + install -Dm644 <(cat << EOF +[Desktop Entry] +Name=DOSEMU +Exec=dosemu -X +Icon=dosemu +Terminal=false +Type=Application +Categories=Emulator;System; +GenericName=DOS Emulator +EOF + ) "${pkgdir}/usr/share/applications/xdosemu.desktop" install -Dpm644 'etc/dosemu.xpm' -t "${pkgdir}/usr/share/icons/" install -Dpm644 'COPYING' 'COPYING.DOSEMU' -t "${pkgdir}/usr/share/licenses/${_pkgname}/" # Add the gnu tools to prevent compatibility problems install -Dpm644 '../dosemu/freedos/gnu'/* -t "${pkgdir}/usr/share/dosemu/freedos/gnu/" + if [ "${_opt_Debug}" -ne 0 ]; then + local _code=' +if [ "$(cat "/proc/sys/kernel/yama/ptrace_scope")" -ne "0" ]; then + echo "DEBUG BUILD: Enter user password to disable ptrace_scope" + echo "0" | sudo tee "/proc/sys/kernel/yama/ptrace_scope" > /dev/null +fi + +' + local _lf=$'\n' + sed -i -e '# Enable ptrace_scope' \ + -e "s@^get_binary()@${_code//${_lf}/\\n}&@g" \ + "${pkgdir}/usr/bin/dosemu" + fi set +u } |