147 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			147 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
 | |
| # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
 | |
| # Contributor: Ben Reedy <thebenj88@gmail.com>
 | |
| # Contributor: Clement Guerin <geecko.dev@free.fr>
 | |
| # Contributor: Thiago Kenji Okada <thiago.mast3r@gmail.com>
 | |
| # Contributor: uberushaximus <uberushaximus@gmail.com>
 | |
| 
 | |
| pkgbase=ppsspp-git
 | |
| pkgname=('ppsspp-git' 'ppsspp-headless-git' 'ppsspp-qt-git')
 | |
| pkgver=1.4.r48.f66e54c4c
 | |
| pkgrel=1
 | |
| pkgdesc='A PSP emulator written in C++'
 | |
| arch=('x86_64')
 | |
| url='http://www.ppsspp.org/'
 | |
| license=('GPL2')
 | |
| depends=('gcc-libs' 'glew' 'glibc' 'libgl' 'sdl2' 'zlib')
 | |
| makedepends=('cmake' 'git' 'glu' 'libzip' 'qt5-tools')
 | |
| source=('git+https://github.com/hrydgard/ppsspp.git'
 | |
|         'ppsspp-ffmpeg::git+https://github.com/hrydgard/ppsspp-ffmpeg.git'
 | |
|         'ppsspp-glslang::git+https://github.com/hrydgard/glslang.git'
 | |
|         'git+https://github.com/hrydgard/ppsspp-lang.git'
 | |
|         'git+https://github.com/Kingcom/armips.git'
 | |
|         'armips-tinyformat::git+https://github.com/Kingcom/tinyformat.git'
 | |
|         'git+https://github.com/KhronosGroup/SPIRV-Cross.git'
 | |
|         'ppsspp.sh'
 | |
|         'ppsspp-headless.sh'
 | |
|         'ppsspp-qt.sh'
 | |
|         'ppsspp.desktop'
 | |
|         'ppsspp-qt.desktop'
 | |
|         'ppsspp-flags.patch')
 | |
| sha256sums=('SKIP'
 | |
|             'SKIP'
 | |
|             'SKIP'
 | |
|             'SKIP'
 | |
|             'SKIP'
 | |
|             'SKIP'
 | |
|             'SKIP'
 | |
|             '873d63c6ef9acdf7121f4bcc4cb849bb8a006abc508c403786c24ebd500e0eec'
 | |
|             '5c168ae19d19059095101e5ff587d5b107b16d070721541f765d002e15d89ed4'
 | |
|             'e14964ec3a931d10ed71a88316735f4c47ac7fd62f346973e0c9a0d0a2ff6cab'
 | |
|             '1c332702d0aeced07df7e12ba8530bc3f19a52bc76c355f6c84c141becfd46d8'
 | |
|             'b3b1fb9e0ecd3c4472b51f27d028a69514b1a3823c26e33da6ffaebfb1522b7f'
 | |
|             '6694643d96dae673f01555637139468eb277f3379afbcceccad3f7e0ae670278')
 | |
| 
 | |
| pkgver() {
 | |
|   cd ppsspp
 | |
| 
 | |
|   echo "$(git describe --tags | sed 's/^v//; s/-/.r/; s/-g/./')"
 | |
| }
 | |
| 
 | |
| prepare() {
 | |
|   cd ppsspp
 | |
| 
 | |
|   patch -Np1 -i ../ppsspp-flags.patch
 | |
| 
 | |
|   for submodule in ffmpeg assets/lang ext/glslang; do
 | |
|     git submodule init ${submodule}
 | |
|     git config submodule.${submodule}.url ../ppsspp-${submodule#*/}
 | |
|     git submodule update ${submodule}
 | |
|   done
 | |
|   for submodule in ext/{SPIRV-Cross,armips}; do
 | |
|     git submodule init ${submodule}
 | |
|     git config submodule.${submodule}.url ../${submodule#*/}
 | |
|     git submodule update ${submodule}
 | |
|   done
 | |
| 
 | |
|   pushd ext/armips
 | |
| 
 | |
|   for submodule in ext/tinyformat; do
 | |
|     git submodule init ${submodule}
 | |
|     git config submodule.${submodule}.url ../../../armips-${submodule#*/}
 | |
|     git submodule update ${submodule}
 | |
|   done
 | |
| 
 | |
|   popd
 | |
| 
 | |
|   for ui in sdl qt; do
 | |
|     if [[ -d build-$ui ]]; then
 | |
|       rm -rf build-$ui
 | |
|     fi
 | |
|     mkdir build-$ui
 | |
|   done
 | |
| }
 | |
| 
 | |
| build() {
 | |
|   cd ppsspp/build-sdl
 | |
| 
 | |
|   cmake .. \
 | |
|     -DCMAKE_BUILD_TYPE='Release' \
 | |
|     -DCMAKE_SKIP_RPATH='ON' \
 | |
|     -DHEADLESS='ON'
 | |
|   make
 | |
| 
 | |
|   cd ../build-qt
 | |
| 
 | |
|   cmake .. \
 | |
|     -DCMAKE_BUILD_TYPE='Release' \
 | |
|     -DCMAKE_SKIP_RPATH='ON' \
 | |
|     -DUSING_QT_UI='ON'
 | |
|   make
 | |
| }
 | |
| 
 | |
| package_ppsspp-git() {
 | |
|   depends+=('hicolor-icon-theme' 'libzip')
 | |
|   provides=('ppsspp')
 | |
|   conflicts=('ppsspp' 'ppsspp-qt' 'ppsspp-qt-git')
 | |
| 
 | |
|   cd ppsspp/build-sdl
 | |
| 
 | |
|   install -dm 755 "${pkgdir}"/{opt/ppsspp,usr/{bin,share/{applications,icons,pixmaps}}}
 | |
|   install -m 755 PPSSPPSDL "${pkgdir}"/opt/ppsspp/
 | |
|   cp -dr --no-preserve='ownership' assets "${pkgdir}"/opt/ppsspp/
 | |
|   cp -dr --no-preserve='ownership' ../icons/hicolor "${pkgdir}"/usr/share/icons/
 | |
|   install -m 644 ../icons/icon-512.svg "${pkgdir}"/usr/share/pixmaps/ppsspp.svg
 | |
|   install -m 755 ../../ppsspp.sh "${pkgdir}"/usr/bin/ppsspp
 | |
|   install -m 644 ../../ppsspp.desktop "${pkgdir}"/usr/share/applications/
 | |
| }
 | |
| 
 | |
| package_ppsspp-headless-git() {
 | |
|   provides=('ppsspp-headless')
 | |
|   conflicts=('ppsspp-headless')
 | |
| 
 | |
|   cd ppsspp/build-sdl
 | |
| 
 | |
|   install -dm 755 "${pkgdir}"/{opt/ppsspp,usr/bin}
 | |
|   install -m 755 PPSSPPHeadless "${pkgdir}"/opt/ppsspp/
 | |
|   install -m 755 ../../ppsspp-headless.sh "${pkgdir}"/usr/bin/ppsspp-headless
 | |
| }
 | |
| 
 | |
| package_ppsspp-qt-git() {
 | |
|   depends+=('hicolor-icon-theme' 'libzip' 'qt5-base')
 | |
|   provides=('ppsspp-qt')
 | |
|   conflicts=('ppsspp' 'ppsspp-git' 'ppsspp-qt')
 | |
| 
 | |
|   cd ppsspp/build-qt
 | |
| 
 | |
|   install -dm 755 "${pkgdir}"/{opt/ppsspp,usr/{bin,share/{applications,icons,pixmaps}}}
 | |
|   install -m 755 PPSSPPQt "${pkgdir}"/opt/ppsspp/
 | |
|   cp -dr --no-preserve='ownership' assets "${pkgdir}"/opt/ppsspp/
 | |
|   cp -dr --no-preserve='ownership' ../icons/hicolor "${pkgdir}"/usr/share/icons/
 | |
|   install -m 644 ../icons/icon-512.svg "${pkgdir}"/usr/share/pixmaps/ppsspp.svg
 | |
|   install -m 755 ../../ppsspp-qt.sh "${pkgdir}"/usr/bin/ppsspp-qt
 | |
|   install -m 644 ../../ppsspp-qt.desktop "${pkgdir}"/usr/share/applications/
 | |
| }
 | |
| 
 | |
| # vim ts=2 sw=2 et:
 |