2015-09-09 09:51:44 -04:00
|
|
|
# Maintainer: Ossi Saukko <osaukko at gmail dot com>
|
|
|
|
_name=ocp
|
|
|
|
pkgname=ocp-git
|
2021-02-06 07:26:51 -05:00
|
|
|
pkgver=0.2.90.r516.980c461
|
2019-11-27 06:20:55 -05:00
|
|
|
pkgrel=1
|
2015-09-09 09:56:18 -04:00
|
|
|
pkgdesc="Open Cubic Player (GIT Version)"
|
2015-09-09 09:51:44 -04:00
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url="http://stian.cubic.org/project-ocp.php"
|
|
|
|
license=('GPL')
|
|
|
|
depends=('hicolor-icon-theme'
|
|
|
|
'libxpm'
|
2020-04-19 08:54:12 -04:00
|
|
|
'libxxf86vm'
|
|
|
|
'ttf-unifont')
|
2015-09-09 09:51:44 -04:00
|
|
|
optdepends=('adplug: for OPL formats support'
|
|
|
|
'alsa-lib: for ALSA output'
|
|
|
|
'flac: for FLAC audio support'
|
|
|
|
'libmad: for MPEG audio support'
|
|
|
|
'libvorbis: for Vorbis audio support'
|
2018-11-29 10:48:19 -05:00
|
|
|
'sdl: for SDL user interface support'
|
|
|
|
'sdl2: for SDL2 user interface support')
|
2020-02-27 09:22:17 -05:00
|
|
|
makedepends=('git'
|
|
|
|
'xa')
|
2015-09-09 09:51:44 -04:00
|
|
|
provides=("${_name}=${pkgver}")
|
|
|
|
conflicts=("${_name}")
|
|
|
|
install=$pkgname.install
|
2020-04-19 08:54:12 -04:00
|
|
|
source=("${_name}::git://github.com/mywave82/opencubicplayer.git"
|
|
|
|
"unifont.patch")
|
|
|
|
md5sums=('SKIP'
|
2020-06-06 08:53:18 -04:00
|
|
|
'ce9883e1daacd9624c65be1bcdbb9124')
|
2020-04-19 08:54:12 -04:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "${srcdir}/${_name}"
|
|
|
|
# The ttf-unifont package changes the file names. This patch changes the OCP source code to use the same names.
|
|
|
|
patch --forward --strip=2 --input="${srcdir}/unifont.patch"
|
|
|
|
}
|
2015-09-09 09:51:44 -04:00
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd "${srcdir}/${_name}"
|
|
|
|
printf "%s.r%s.%s" "$(grep \^AC_INIT configure.ac|cut -d, -f2|xargs)" \
|
|
|
|
"$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "${srcdir}/${_name}"
|
2016-03-21 10:50:34 -04:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2018-11-29 10:48:19 -05:00
|
|
|
|
|
|
|
# If both SDL and SDL2 are installed, then disable SDL.
|
|
|
|
# Otherwise there are functions with similar names and linking fails.
|
2020-04-19 08:54:12 -04:00
|
|
|
CONFIG="--prefix=/usr --sysconfdir=/etc --with-timidity-default-path=/etc/timidity++/ --with-unifontdir=/usr/share/fonts/Unifont"
|
2018-11-29 10:48:19 -05:00
|
|
|
if [ -f /usr/include/SDL/SDL.h ] && [ -f /usr/include/SDL2/SDL.h ]
|
|
|
|
then
|
|
|
|
CONFIG="${CONFIG} --without-sdl"
|
|
|
|
fi
|
|
|
|
|
|
|
|
./configure ${CONFIG}
|
2015-09-09 09:51:44 -04:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "${srcdir}/${_name}"
|
|
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
}
|