From f9619d080b1fe7e93445895c6943f8cb2d0f4dee Mon Sep 17 00:00:00 2001 From: Ossi Saukko Date: Thu, 29 Nov 2018 17:48:19 +0200 Subject: [PATCH] Update to 0.1.22.r120.f4e3a9d Also disabling SDL support when SDL and SDL2 are both installed. Otherwise linker is having a problems with functions from SDL and SDL2 having the same names. --- .SRCINFO | 5 +++-- PKGBUILD | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index d8696ea..b0b4921 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = ocp-git pkgdesc = Open Cubic Player (GIT Version) - pkgver = 0.1.22.r119.7b725e8 + pkgver = 0.1.22.r120.f4e3a9d pkgrel = 1 url = http://stian.cubic.org/project-ocp.php install = ocp-git.install @@ -18,7 +18,8 @@ pkgbase = ocp-git optdepends = libsidplay: for SID music support optdepends = libvorbis: for Vorbis audio support optdepends = sdl: for SDL user interface support - provides = ocp=0.1.22.r119.7b725e8 + optdepends = sdl2: for SDL2 user interface support + provides = ocp=0.1.22.r120.f4e3a9d conflicts = ocp source = ocp::git://git.code.sf.net/p/opencubicplayer/code md5sums = SKIP diff --git a/PKGBUILD b/PKGBUILD index 78e4af9..271dcd7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Ossi Saukko _name=ocp pkgname=ocp-git -pkgver=0.1.22.r119.7b725e8 +pkgver=0.1.22.r120.f4e3a9d pkgrel=1 pkgdesc="Open Cubic Player (GIT Version)" arch=('i686' 'x86_64') @@ -16,7 +16,8 @@ optdepends=('adplug: for OPL formats support' 'libmad: for MPEG audio support' 'libsidplay: for SID music support' 'libvorbis: for Vorbis audio support' - 'sdl: for SDL user interface support') + 'sdl: for SDL user interface support' + 'sdl2: for SDL2 user interface support') makedepends=('git') provides=("${_name}=${pkgver}") conflicts=("${_name}") @@ -34,8 +35,19 @@ build() { cd "${srcdir}/${_name}" git submodule init git submodule update + + # Adding support for new version of GCC sed -i.orig 's/\*|4\.\*|5\.\*|6\.\*|7\*/&|8*/' configure - ./configure --prefix=/usr --sysconfdir=/etc --with-timidity-default-path=/etc/timidity++/ + + # If both SDL and SDL2 are installed, then disable SDL. + # Otherwise there are functions with similar names and linking fails. + CONFIG="--prefix=/usr --sysconfdir=/etc --with-timidity-default-path=/etc/timidity++/" + if [ -f /usr/include/SDL/SDL.h ] && [ -f /usr/include/SDL2/SDL.h ] + then + CONFIG="${CONFIG} --without-sdl" + fi + + ./configure ${CONFIG} make }