Gentoo Archives: gentoo-commits

From: NP Hardass <np-hardass@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/freeorion/files/, games-strategy/freeorion/
Date: Mon, 16 Jul 2018 05:02:33
Message-Id: 1531717069.6ada805286db1e9e4ba661532805840618ae7973.np-hardass@gentoo
1 commit: 6ada805286db1e9e4ba661532805840618ae7973
2 Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 3 16:01:40 2018 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 16 04:57:49 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ada8052
7
8 games-strategy/freeorion: Backport fix for detecting SDL2 incl dir
9
10 Closes: https://bugs.gentoo.org/651762
11 Package-Manager: Portage-2.3.36, Repoman-2.3.9
12
13 ...ion-0.4.7.1-backport-sdl2-include-dir-fix.patch | 34 +++++++++
14 .../freeorion/freeorion-0.4.7.1-r4.ebuild | 85 ++++++++++++++++++++++
15 2 files changed, 119 insertions(+)
16
17 diff --git a/games-strategy/freeorion/files/freeorion-0.4.7.1-backport-sdl2-include-dir-fix.patch b/games-strategy/freeorion/files/freeorion-0.4.7.1-backport-sdl2-include-dir-fix.patch
18 new file mode 100644
19 index 00000000000..f7ccdba126b
20 --- /dev/null
21 +++ b/games-strategy/freeorion/files/freeorion-0.4.7.1-backport-sdl2-include-dir-fix.patch
22 @@ -0,0 +1,34 @@
23 +From 77bdc407d0760a529e40914d16248dce01fd4778 Mon Sep 17 00:00:00 2001
24 +From: O01eg <o01eg@××××××.ru>
25 +Date: Wed, 8 Nov 2017 16:07:57 +0300
26 +Subject: [PATCH] Fix #1843
27 +
28 +---
29 + CMakeLists.txt | 2 +-
30 + GG/CMakeLists.txt | 2 +-
31 + 2 files changed, 2 insertions(+), 2 deletions(-)
32 +
33 +--- a/CMakeLists.txt 2018-06-03 11:36:04.631832409 -0400
34 ++++ b/CMakeLists.txt 2018-06-03 11:36:20.678821846 -0400
35 +@@ -484,7 +484,7 @@
36 + ${Boost_INCLUDE_DIRS}
37 + ${OPENGL_INCLUDE_DIR}
38 + ${GLEW_INCLUDE_DIRS}
39 +- ${SDL_INCLUDE_DIRS}
40 ++ ${SDL_INCLUDE_DIR}
41 + ${OPENAL_INCLUDE_DIR}
42 + ${OGG_INCLUDE_DIRS}
43 + ${VORBIS_INCLUDE_DIRS}
44 +diff --git a/GG/CMakeLists.txt b/GG/CMakeLists.txt
45 +index 5d3c157362..c5bf3825d8 100644
46 +--- a/GG/CMakeLists.txt
47 ++++ b/GG/CMakeLists.txt
48 +@@ -184,7 +184,7 @@ target_include_directories(GiGiSDL SYSTEM
49 + ${Boost_INCLUDE_DIRS}
50 + ${OPENGL_INCLUDE_DIR}
51 + ${GLEW_INCLUDE_DIRS}
52 +- ${SDL_INCLUDE_DIRS}
53 ++ ${SDL_INCLUDE_DIR}
54 + )
55 +
56 + target_link_libraries(GiGiSDL
57
58 diff --git a/games-strategy/freeorion/freeorion-0.4.7.1-r4.ebuild b/games-strategy/freeorion/freeorion-0.4.7.1-r4.ebuild
59 new file mode 100644
60 index 00000000000..e3471161e46
61 --- /dev/null
62 +++ b/games-strategy/freeorion/freeorion-0.4.7.1-r4.ebuild
63 @@ -0,0 +1,85 @@
64 +# Copyright 1999-2018 Gentoo Foundation
65 +# Distributed under the terms of the GNU General Public License v2
66 +
67 +EAPI=6
68 +
69 +PYTHON_COMPAT=( python2_7 )
70 +inherit cmake-utils python-single-r1 gnome2-utils
71 +
72 +DESCRIPTION="A free turn-based space empire and galactic conquest game"
73 +HOMEPAGE="http://www.freeorion.org"
74 +
75 +if [[ ${PV} == 9999 ]]; then
76 + inherit git-r3
77 + EGIT_REPO_URI="https://github.com/freeorion/freeorion.git"
78 +else
79 + MY_PV="${PV/_/-}"
80 + SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
81 + KEYWORDS="~amd64"
82 + S="${WORKDIR}/${PN}-${MY_PV}"
83 +fi
84 +
85 +LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
86 +SLOT="0"
87 +IUSE=""
88 +
89 +RDEPEND="
90 + >=dev-libs/boost-1.56:=[python,threads,${PYTHON_USEDEP}]
91 + media-libs/freealut
92 + media-libs/freetype
93 + media-libs/glew:=
94 + media-libs/libsdl2
95 + >=media-libs/libogg-1.1.3
96 + media-libs/libpng:0
97 + media-libs/libsdl2[X,opengl,video]
98 + >=media-libs/libvorbis-1.1.2
99 + media-libs/openal
100 + sci-physics/bullet
101 + sys-libs/zlib
102 + virtual/opengl
103 + !dev-games/gigi"
104 + # Use bundled gigi as of freeorion-0.4.3
105 +
106 +DEPEND="${RDEPEND}
107 + ${PYTHON_DEPS}
108 + virtual/pkgconfig"
109 +
110 +PATCHES=( "${FILESDIR}/${P}-backport-sdl2-include-dir-fix.patch" )
111 +
112 +pkg_setup() {
113 + # build system is using FindPythonLibs.cmake which needs python:2
114 + python-single-r1_pkg_setup
115 +}
116 +
117 +src_prepare() {
118 + sed -e "s/-O3//" -i CMakeLists.txt || die
119 +
120 + cmake-utils_src_prepare
121 +}
122 +
123 +src_configure() {
124 + local mycmakeargs=(
125 + -DCMAKE_BUILD_TYPEE=Release
126 + -DRELEASE_COMPILE_FLAGS=""
127 + -DCMAKE_SKIP_RPATH=ON
128 + )
129 +
130 + append-cppflags -DBOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
131 +
132 + cmake-utils_src_configure
133 +}
134 +
135 +src_install() {
136 + cmake-utils_src_install
137 + dodoc ChangeLog.md
138 +
139 + newenvd "${FILESDIR}/${PN}.envd" 99${PN}
140 +}
141 +
142 +pkg_postinst() {
143 + gnome2_icon_cache_update
144 +}
145 +
146 +pkg_postrm() {
147 + gnome2_icon_cache_update
148 +}