install_dsda-doom.ksh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/ksh
  2. doas pkg_add cmake gmake sdl2 sdl2-image sdl2-mixer fluidsynth libmad portmidi libvorbis libzip
  3. application=dsda-doom
  4. repository=https://github.com/kraflab/dsda-doom.git
  5. export compile=
  6. mkdir -p ~/src
  7. cd ~/src || return
  8. if [ ! -d $application ]; then
  9. git clone $repository
  10. cd $application || return
  11. export compile=true
  12. else
  13. cd $application || return
  14. #git pull
  15. pwd
  16. git fetch
  17. LOCAL=$(git rev-parse HEAD)
  18. REMOTE=$(git rev-parse @{u})
  19. if [ ! $LOCAL = $REMOTE ]; then
  20. pwd
  21. echo "Need to pull"
  22. git pull
  23. export compile=true
  24. fi
  25. fi
  26. if [ "$compile" = "true" ]; then
  27. cd ~/src/$application || return
  28. cd prboom2 || return
  29. echo ""
  30. echo "NOTE: If getting a 'Provide an AUTOMAKE_VERSION environment variable, please' error do this:"
  31. echo "$ export AUTOMAKE_VERSION=1.16 # <- (version without minor number 1.16.5 > 1.16)"
  32. echo "$ export AUTOCONF_VERSION=2.71 # <- (version without minor number 2.71p3 > 2.71)"
  33. echo ""
  34. export AUTOMAKE_VERSION=1.16
  35. export AUTOCONF_VERSION=2.71
  36. mkdir -p build && cd build
  37. export CPPFLAGS="${CPPFLAGS} $(pkg-config --cflags osmesa) $(pkg-config --cflags glut) $(pkg-config --cflags gl)"
  38. cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_FLUIDSYNTH=OFF
  39. gmake
  40. fi