summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-02-27 01:34:08 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-02-28 13:26:08 +0100
commit12cab87b1c1f371baab24426d13280b00f338c7f (patch)
tree8ea4a7cd7a78370b578dac8319d9ec8dcb9f943e /games-arcade
parentgames-arcade/savagewheels: Drop 1.6.1-r1 (diff)
downloadgentoo-12cab87b1c1f371baab24426d13280b00f338c7f.tar.gz
gentoo-12cab87b1c1f371baab24426d13280b00f338c7f.tar.bz2
gentoo-12cab87b1c1f371baab24426d13280b00f338c7f.zip
games-arcade/performous: EAPI-7 bump, cmake.eclass, build w/ boost-1.73
Thanks-to: Stephan Ivanov <info@stephan.i9x.ru> Closes: https://bugs.gentoo.org/722906 Package-Manager: Portage-3.0.15, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/performous/files/performous-1.1-boost-1.73.patch11
-rw-r--r--games-arcade/performous/files/performous-1.1-pango-use-pkgconfig.patch113
-rw-r--r--games-arcade/performous/performous-1.1-r2.ebuild33
3 files changed, 140 insertions, 17 deletions
diff --git a/games-arcade/performous/files/performous-1.1-boost-1.73.patch b/games-arcade/performous/files/performous-1.1-boost-1.73.patch
new file mode 100644
index 000000000000..3d7147a5170f
--- /dev/null
+++ b/games-arcade/performous/files/performous-1.1-boost-1.73.patch
@@ -0,0 +1,11 @@
+--- a/game/surface.cc 2021-01-18 14:22:05.876604740 +0300
++++ b/game/surface.cc 2021-01-18 14:23:08.908716258 +0300
+@@ -135,7 +135,7 @@
+ bitmap.resize(1, 1);
+ target->load(bitmap);
+ // Ask the loader to retrieve the image
+- ldr->push(target, Job(name, boost::bind(&T::load, target, _1)));
++ ldr->push(target, Job(name, boost::bind(&T::load, target, boost::placeholders::_1)));
+ }
+
+ Surface::Surface(fs::path const& filename) { loader(this, filename); }
diff --git a/games-arcade/performous/files/performous-1.1-pango-use-pkgconfig.patch b/games-arcade/performous/files/performous-1.1-pango-use-pkgconfig.patch
new file mode 100644
index 000000000000..9019183206d6
--- /dev/null
+++ b/games-arcade/performous/files/performous-1.1-pango-use-pkgconfig.patch
@@ -0,0 +1,113 @@
+From caea553262e1d40bf9caec84223b5d25989464c0 Mon Sep 17 00:00:00 2001
+From: Orivej Desh <orivej@gmx.fr>
+Date: Wed, 25 Mar 2020 14:17:06 +0000
+Subject: [PATCH] Rely on pkg-config to find Pango
+
+Fixes build with pango that needs -I/usr/include/harfbuzz (as specified in its
+pkg config).
+
+PkgConfig results can be overridded by setting e.g. Pango_PKGCONF_INCLUDEDIR,
+Pango_PKGCONF_LDFLAGS (see FindPkgConfig documentation).
+
+IMPORTED_TARGET was added in CMake 3.6.
+
+Fixes #490
+Closes #493
+---
+ CMakeLists.txt | 2 +-
+ cmake/Modules/FindPango.cmake | 25 ++---------------------
+ cmake/Modules/FindPangoCairo.cmake | 32 ++++--------------------------
+ 3 files changed, 7 insertions(+), 52 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f6e72942d..ca7ae4e92 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.8)
++cmake_minimum_required(VERSION 3.6)
+ project(Performous CXX C)
+
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+diff --git a/cmake/Modules/FindPango.cmake b/cmake/Modules/FindPango.cmake
+index bdddb9e03..42cb199cc 100644
+--- a/cmake/Modules/FindPango.cmake
++++ b/cmake/Modules/FindPango.cmake
+@@ -2,31 +2,10 @@
+ # Once done, this will define
+ #
+ # Pango_FOUND - system has Pango
+-# Pango_INCLUDE_DIRS - the Pango include directories
+ # Pango_LIBRARIES - link these to use Pango
+
+ include(LibFindMacros)
+
+-# Dependencies
+-libfind_package(Pango Freetype)
+-libfind_package(Pango Glib)
+-libfind_package(Pango GObject)
+-
+-# Use pkg-config to get hints about paths
+-libfind_pkg_check_modules(Pango_PKGCONF pango)
+-
+-# Include dir
+-find_path(Pango_INCLUDE_DIR
+- NAMES pango/pango.h
+- HINTS ${Pango_PKGCONF_INCLUDE_DIRS}
+- PATH_SUFFIXES pango-1.0
+-)
+-
+-# Finally the library itself
+-find_library(Pango_LIBRARY
+- NAMES pango-1.0
+- HINTS ${Pango_PKGCONF_LIBRARY_DIRS}
+-)
+-
++libfind_pkg_check_modules(Pango_PKGCONF IMPORTED_TARGET pango)
++set(Pango_LIBRARY PkgConfig::Pango_PKGCONF)
+ libfind_process(Pango)
+-
+diff --git a/cmake/Modules/FindPangoCairo.cmake b/cmake/Modules/FindPangoCairo.cmake
+index a26f83bd0..1c1a9e843 100644
+--- a/cmake/Modules/FindPangoCairo.cmake
++++ b/cmake/Modules/FindPangoCairo.cmake
+@@ -1,35 +1,11 @@
+ # - Try to find PangoCairo
+ # Once done, this will define
+ #
+-# PangoCairo_FOUND - system has Pango
+-# PangoCairo_INCLUDE_DIRS - the Pango include directories
+-# PangoCairo_LIBRARIES - link these to use Pango
++# PangoCairo_FOUND - system has PangoCairo
++# PangoCairo_LIBRARIES - link these to use PangoCairo
+
+ include(LibFindMacros)
+
+-# Dependencies
+-libfind_package(PangoCairo Pango)
+-libfind_package(PangoCairo Cairo)
+-
+-# Use pkg-config to get hints about paths
+-libfind_pkg_check_modules(PangoCairo_PKGCONF pangocairo)
+-
+-# Include dir
+-find_path(PangoCairo_INCLUDE_DIR
+- NAMES pango/pangocairo.h
+- HINTS ${PangoCairo_PKGCONF_INCLUDE_DIRS}
+- PATH_SUFFIXES pango-1.0
+-)
+-
+-# Finally the library itself
+-find_library(PangoCairo_LIBRARY
+- NAMES pangocairo-1.0
+- HINTS ${PangoCairo_PKGCONF_LIBRARY_DIRS}
+-)
+-
+-# Set the include dir variables and the libraries and let libfind_process do the rest.
+-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
+-set(PangoCairo_PROCESS_INCLUDES PangoCairo_INCLUDE_DIR Pango_INCLUDE_DIR Cairo_INCLUDE_DIR)
+-set(PangoCairo_PROCESS_LIBS PangoCairo_LIBRARY Pango_LIBRARY Cairo_LIBRARY)
++libfind_pkg_check_modules(PangoCairo_PKGCONF IMPORTED_TARGET pangocairo)
++set(PangoCairo_LIBRARY PkgConfig::PangoCairo_PKGCONF)
+ libfind_process(PangoCairo)
+-
diff --git a/games-arcade/performous/performous-1.1-r2.ebuild b/games-arcade/performous/performous-1.1-r2.ebuild
index 5e1eeb5741dd..af1c5fefeb09 100644
--- a/games-arcade/performous/performous-1.1-r2.ebuild
+++ b/games-arcade/performous/performous-1.1-r2.ebuild
@@ -1,18 +1,15 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-CMAKE_REMOVE_MODULES="yes"
-CMAKE_REMOVE_MODULES_LIST="FindALSA FindBoost FindFreetype FindGettext FindJpeg FindPng FindTiff FindZ"
-inherit cmake-utils desktop gnome2-utils
-
-MY_PN="Performous"
-MY_P="${MY_PN}-${PV}"
-SONGS_PN="ultrastar-songs"
+CMAKE_REMOVE_MODULES_LIST=( FindALSA FindBoost FindFreetype FindGettext FindJpeg FindPng FindTiff FindZ )
+inherit cmake desktop xdg-utils
DESCRIPTION="SingStar GPL clone"
HOMEPAGE="https://performous.org/"
+
+SONGS_PN="ultrastar-songs"
SRC_URI="https://github.com/performous/performous/archive/${PV}.tar.gz -> ${P}.tar.gz
songs? (
mirror://sourceforge/performous/${SONGS_PN}-restricted-3.zip
@@ -22,8 +19,7 @@ SRC_URI="https://github.com/performous/performous/archive/${PV}.tar.gz -> ${P}.t
)
"
-LICENSE="GPL-2 songs? ( CC-BY-NC-SA-2.5 CC-BY-NC-ND-2.5 )
-"
+LICENSE="GPL-2 songs? ( CC-BY-NC-SA-2.5 CC-BY-NC-ND-2.5 )"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="midi songs tools webcam"
@@ -52,7 +48,8 @@ RDEPEND="
midi? ( media-libs/portmidi )
webcam? ( media-libs/opencv )
"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
sys-apps/help2man
sys-devel/gettext
songs? ( app-arch/unzip )
@@ -66,10 +63,12 @@ PATCHES=(
"${FILESDIR}"/${P}-nomancompress.patch
"${FILESDIR}"/${P}-jpeg-9c.patch
"${FILESDIR}"/${P}-boost-1.70.patch
+ "${FILESDIR}"/${P}-boost-1.73.patch
+ "${FILESDIR}"/${P}-pango-use-pkgconfig.patch
)
src_prepare() {
- cmake-utils_src_prepare
+ cmake_src_prepare
sed -i \
-e "s:@GENTOO_BINDIR@:/usr/bin:" \
@@ -89,11 +88,11 @@ src_configure() {
-DCMAKE_VERBOSE_MAKEFILE=TRUE
-DSHARE_INSTALL="/usr/share/${PN}"
)
- cmake-utils_src_configure
+ cmake_src_configure
}
src_install() {
- cmake-utils_src_install
+ cmake_src_install
if use songs ; then
insinto "/usr/share/${PN}"
doins -r "${WORKDIR}/songs"
@@ -103,9 +102,9 @@ src_install() {
}
pkg_postinst() {
- gnome2_icon_cache_update
+ xdg_icon_cache_update
}
pkg_postrm() {
- gnome2_icon_cache_update
+ xdg_icon_cache_update
}