Gentoo Archives: gentoo-commits

From: Michael Weber <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gamerlay:master commit in: dev-games/openscenegraph/, dev-games/openscenegraph/files/
Date: Tue, 26 Aug 2014 19:52:24
Message-Id: 1409082726.a92172782de87a0351053690bd7ef8920d5ce94e.xmw@gentoo
1 commit: a92172782de87a0351053690bd7ef8920d5ce94e
2 Author: Michael Weber <michael <AT> xmw <DOT> de>
3 AuthorDate: Tue Aug 26 19:52:06 2014 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 26 19:52:06 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/gamerlay.git;a=commit;h=a9217278
7
8 Fix freetype plugin (needed for newer flightgear canvas)
9
10 Package-Manager: portage-2.2.12
11 Manifest-Sign-Key: 62EEF090
12
13 ---
14 .../files/openscenegraph-3.2.0-freetype2.patch | 39 ++++++
15 .../openscenegraph/openscenegraph-3.2.0-r1.ebuild | 148 +++++++++++++++++++++
16 2 files changed, 187 insertions(+)
17
18 diff --git a/dev-games/openscenegraph/files/openscenegraph-3.2.0-freetype2.patch b/dev-games/openscenegraph/files/openscenegraph-3.2.0-freetype2.patch
19 new file mode 100644
20 index 0000000..0fffb25
21 --- /dev/null
22 +++ b/dev-games/openscenegraph/files/openscenegraph-3.2.0-freetype2.patch
23 @@ -0,0 +1,39 @@
24 +--- OpenSceneGraph-3.2.0/src/osgPlugins/freetype/FreeTypeFont.cpp
25 ++++ OpenSceneGraph-3.2.0/src/osgPlugins/freetype/FreeTypeFont.cpp
26 +@@ -14,8 +14,8 @@
27 + #include "FreeTypeFont.h"
28 + #include "FreeTypeLibrary.h"
29 +
30 +-#include <freetype/ftoutln.h>
31 +-#include <freetype/ftbbox.h>
32 ++#include <freetype2/ftoutln.h>
33 ++#include <freetype2/ftbbox.h>
34 +
35 + #include <osg/Notify>
36 + #include <osg/io_utils>
37 +--- OpenSceneGraph-3.2.0/CMakeModules/FindFreeType.cmake
38 ++++ OpenSceneGraph-3.2.0/CMakeModules/FindFreeType.cmake
39 +@@ -48,19 +48,19 @@
40 + /opt/csw
41 + /opt
42 + /usr/freeware
43 +- PATH_SUFFIXES include
44 ++ PATH_SUFFIXES include include/freetype2
45 + )
46 +
47 +-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
48 ++FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
49 + $ENV{FREETYPE_DIR}/include/freetype2
50 + NO_DEFAULT_PATH
51 + )
52 +-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
53 ++FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
54 + PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
55 + NO_DEFAULT_PATH
56 + PATH_SUFFIXES include/freetype2
57 + )
58 +-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
59 ++FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
60 + /usr/local/include/freetype2
61 + /usr/include/freetype2
62 + /usr/local/X11R6/include/freetype2
63
64 diff --git a/dev-games/openscenegraph/openscenegraph-3.2.0-r1.ebuild b/dev-games/openscenegraph/openscenegraph-3.2.0-r1.ebuild
65 new file mode 100644
66 index 0000000..7cbe227
67 --- /dev/null
68 +++ b/dev-games/openscenegraph/openscenegraph-3.2.0-r1.ebuild
69 @@ -0,0 +1,148 @@
70 +# Copyright 1999-2014 Gentoo Foundation
71 +# Distributed under the terms of the GNU General Public License v2
72 +# $Header: $
73 +
74 +EAPI=4
75 +
76 +inherit eutils cmake-utils flag-o-matic wxwidgets
77 +
78 +MY_PN="OpenSceneGraph"
79 +MY_P=${MY_PN}-${PV}
80 +
81 +DESCRIPTION="Open source high performance 3D graphics toolkit"
82 +HOMEPAGE="http://www.openscenegraph.org/projects/osg/"
83 +SRC_URI="http://www.openscenegraph.org/downloads/developer_releases/${MY_P}.zip"
84 +
85 +LICENSE="wxWinLL-3 LGPL-2.1"
86 +SLOT="0"
87 +KEYWORDS="~amd64 ~ppc ~x86"
88 +IUSE="curl debug doc examples ffmpeg fltk fox gdal gif glut gtk itk jpeg jpeg2k
89 +openexr openinventor osgapps pdf png qt4 sdl static-libs svg tiff truetype vnc
90 +wxwidgets xine xrandr zlib"
91 +
92 +# NOTE: OpenAL (support missing)
93 +# TODO: COLLADA, FBX, OpenVRML, Performer, DCMTK
94 +RDEPEND="
95 + x11-libs/libSM
96 + x11-libs/libXext
97 + virtual/glu
98 + virtual/opengl
99 + curl? ( net-misc/curl )
100 + examples? (
101 + fltk? ( x11-libs/fltk:1[opengl] )
102 + fox? ( x11-libs/fox:1.6[opengl] )
103 + glut? ( media-libs/freeglut )
104 + gtk? ( x11-libs/gtkglext )
105 + qt4? (
106 + dev-qt/qtcore:4
107 + dev-qt/qtgui:4
108 + dev-qt/qtopengl:4
109 + )
110 + sdl? ( media-libs/libsdl )
111 + wxwidgets? ( x11-libs/wxGTK[opengl,X] )
112 + )
113 + ffmpeg? ( virtual/ffmpeg )
114 + gdal? ( sci-libs/gdal )
115 + gif? ( media-libs/giflib )
116 + itk? ( dev-tcltk/itk )
117 + jpeg? ( virtual/jpeg )
118 + jpeg2k? ( media-libs/jasper )
119 + openexr? (
120 + media-libs/ilmbase
121 + media-libs/openexr
122 + )
123 + openinventor? (
124 + || (
125 + media-libs/coin
126 + media-libs/openinventor
127 + )
128 + )
129 + pdf? ( app-text/poppler[cairo] )
130 + png? ( media-libs/libpng:0 )
131 + svg? (
132 + gnome-base/librsvg
133 + x11-libs/cairo
134 + )
135 + tiff? ( media-libs/tiff:0 )
136 + truetype? ( media-libs/freetype:2 )
137 + vnc? ( net-libs/libvncserver )
138 + xine? ( media-libs/xine-lib )
139 + xrandr? ( x11-libs/libXrandr )
140 + zlib? ( sys-libs/zlib )
141 +"
142 +DEPEND="${RDEPEND}
143 + app-arch/unzip
144 + virtual/pkgconfig
145 + x11-proto/xextproto
146 + doc? ( app-doc/doxygen )
147 + xrandr? ( x11-proto/randrproto )
148 +"
149 +
150 +S=${WORKDIR}/${MY_P}
151 +
152 +DOCS=(AUTHORS.txt ChangeLog NEWS.txt)
153 +
154 +PATCHES=(
155 + "${FILESDIR}"/${PN}-3.2.0-cmake.patch
156 + "${FILESDIR}"/${PN}-3.2.0-ffmpeg.patch
157 + "${FILESDIR}"/${PN}-3.2.0-freetype2.patch
158 +)
159 +
160 +src_configure() {
161 + if use examples && use wxwidgets; then
162 + WX_GTK_VER="2.8"
163 + need-wxwidgets unicode
164 + fi
165 +
166 + # Needed by FFmpeg
167 + append-cppflags -D__STDC_CONSTANT_MACROS
168 +
169 + mycmakeargs=(
170 + -DWITH_OpenAL=OFF # Commented out in buildsystem
171 + -DWITH_NVTT=OFF #broken, just to be sure
172 + -DGENTOO_DOCDIR="/usr/share/doc/${PF}"
173 + $(cmake-utils_use_with curl)
174 + $(cmake-utils_use_build doc DOCUMENTATION)
175 + $(cmake-utils_use_build osgapps OSG_APPLICATIONS)
176 + $(cmake-utils_use_build examples OSG_EXAMPLES)
177 + $(cmake-utils_use_with ffmpeg FFmpeg)
178 + $(cmake-utils_use_with fltk)
179 + $(cmake-utils_use_with fox)
180 + $(cmake-utils_use_with gdal)
181 + $(cmake-utils_use_with gif GIFLIB)
182 + $(cmake-utils_use_with glut)
183 + $(cmake-utils_use_with gtk GtkGl)
184 + $(cmake-utils_use_with itk)
185 + $(cmake-utils_use_with jpeg)
186 + $(cmake-utils_use_with jpeg2k Jasper)
187 + $(cmake-utils_use_with openexr OpenEXR)
188 + $(cmake-utils_use_with openinventor Inventor)
189 + $(cmake-utils_use_with pdf Poppler-glib)
190 + $(cmake-utils_use_with png)
191 + $(cmake-utils_use_with qt4)
192 + $(cmake-utils_use !static-libs DYNAMIC_OPENSCENEGRAPH)
193 + $(cmake-utils_use_with sdl)
194 + $(cmake-utils_use_with svg rsvg)
195 + $(cmake-utils_use_with tiff)
196 + $(cmake-utils_use_with truetype FreeType)
197 + $(cmake-utils_use_with vnc LibVNCServer)
198 + $(cmake-utils_use_with wxwidgets wxWidgets)
199 + $(cmake-utils_use_with xine)
200 + $(cmake-utils_use xrandr OSGVIEWER_USE_XRANDR)
201 + $(cmake-utils_use_with zlib)
202 + )
203 + cmake-utils_src_configure
204 +}
205 +
206 +src_compile() {
207 + cmake-utils_src_compile
208 + use doc && cmake-utils_src_compile doc_openscenegraph doc_openthreads
209 +}
210 +
211 +pkg_postinst() {
212 + if has_version 'dev-games/simgear'; then
213 + ewarn "dev-games/simgear has been detected and may need to be rebuilt now."
214 + ewarn "Please run the following:"
215 + ewarn " # emerge -1 dev-games/simgear"
216 + fi
217 +}