psp-dependencies.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #!/bin/bash
  2. [[ -z $PSPDEV ]] && { echo "\$PSPDEV is unset. Aborting"; exit 1; }
  3. export PATH="$PSPDEV/bin:$PATH"
  4. export PORTS_REPO=https://github.com/pspdev/psp-ports.git
  5. echo ""
  6. echo "/********************/"
  7. echo " PSP - dependencies "
  8. echo "/********************/"
  9. pacman --needed --noconfirm -S autoconf automake libtool patch mingw-w64-x86_64-imagemagick
  10. cd /mzx-build-workingdir
  11. rm -rf psp-ports
  12. git clone $PORTS_REPO "psp-ports"
  13. # The copy of the SDK formerly distributed with the Windows version of
  14. # devkitPro was missing an include. If the include is missing, patch
  15. # it back in.
  16. if ! grep -q "psptypes" $PSPDEV/psp/sdk/include/pspge.h ; then
  17. patch $PSPDEV/psp/sdk/include/pspge.h /cross-patches/pspge.patch
  18. fi
  19. echo ""
  20. echo "/************/"
  21. echo " PSP - zlib "
  22. echo "/************/"
  23. cd /mzx-build-workingdir/psp-ports/zlib
  24. make -j8
  25. make install
  26. echo ""
  27. echo "/**************/"
  28. echo " PSP - libpng "
  29. echo "/**************/"
  30. cd /mzx-build-workingdir/psp-ports/libpng
  31. make -j8
  32. make install
  33. echo ""
  34. echo "/**************/"
  35. echo " PSP - tremor "
  36. echo "/**************/"
  37. cd /mzx-build-workingdir/psp-ports/libTremor
  38. LDFLAGS="-L$(psp-config --pspsdk-path)/lib" LIBS="-lc -lpspuser" ./autogen.sh \
  39. --host psp --prefix=$(psp-config --psp-prefix)
  40. make -j8
  41. make install
  42. echo ""
  43. echo "/***********/"
  44. echo " PSP - SDL "
  45. echo "/***********/"
  46. cd /mzx-build-workingdir/psp-ports/SDL
  47. ./autogen.sh
  48. LDFLAGS="-L$(psp-config --pspsdk-path)/lib" LIBS="-lc -lpspuser" \
  49. ./configure --host psp --prefix=$(psp-config --psp-prefix)
  50. # If you thought that pspge.h patch was pretty cool, then you should
  51. # know that this generated a worthless SDL_config.h. Replace it with
  52. # our own based on SDL2's PSP config.
  53. cp /cross-patches/SDL_config_psp.h include/SDL_config.h
  54. make -j8
  55. make install
  56. echo ""
  57. echo "/*****************/"
  58. echo " PSP - pspirkeyb "
  59. echo "/*****************/"
  60. cd /mzx-build-workingdir/psp-ports/pspirkeyb
  61. make -j8
  62. make install
  63. echo ""
  64. echo "/*************/"
  65. echo " PSP - pspgl "
  66. echo "/*************/"
  67. cd /mzx-build-workingdir/psp-ports/pspgl
  68. export PSP_MOUNTDIR=/Volumes/PSP
  69. export PSP_REVISION=1.50
  70. make -j8
  71. make install