Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/cogl/
Date: Sun, 31 Jan 2016 18:26:06
Message-Id: 1454264559.45604bc017aa87a95bf1a761c388cf01d47ccc7a.pacho@gentoo
1 commit: 45604bc017aa87a95bf1a761c388cf01d47ccc7a
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 31 18:22:39 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 31 18:22:39 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45604bc0
7
8 media-libs/cogl: Stop applying buggy patch (#573514 by Pascal Flöschel)
9
10 Package-Manager: portage-2.2.27
11
12 media-libs/cogl/cogl-1.22.0-r2.ebuild | 141 ++++++++++++++++++++++++++++++++++
13 1 file changed, 141 insertions(+)
14
15 diff --git a/media-libs/cogl/cogl-1.22.0-r2.ebuild b/media-libs/cogl/cogl-1.22.0-r2.ebuild
16 new file mode 100644
17 index 0000000..eb8ad4a
18 --- /dev/null
19 +++ b/media-libs/cogl/cogl-1.22.0-r2.ebuild
20 @@ -0,0 +1,141 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI="5"
26 +GCONF_DEBUG="yes"
27 +
28 +inherit eutils gnome2 multilib virtualx
29 +
30 +DESCRIPTION="A library for using 3D graphics hardware to draw pretty pictures"
31 +HOMEPAGE="http://www.cogl3d.org/"
32 +
33 +LICENSE="MIT BSD"
34 +SLOT="1.0/20" # subslot = .so version
35 +
36 +# doc and profile disable for now due to bugs #484750 and #483332
37 +IUSE="examples gles2 gstreamer +introspection +kms +opengl +pango test video_cards_fglrx wayland" # doc profile
38 +REQUIRED_USE="
39 + wayland? ( gles2 )
40 + || ( gles2 opengl )
41 +"
42 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
43 +
44 +COMMON_DEPEND="
45 + >=dev-libs/glib-2.32:2
46 + x11-libs/cairo:=
47 + >=x11-libs/gdk-pixbuf-2:2
48 + x11-libs/libX11
49 + >=x11-libs/libXcomposite-0.4
50 + x11-libs/libXdamage
51 + x11-libs/libXext
52 + >=x11-libs/libXfixes-3
53 + >=x11-libs/libXrandr-1.2
54 + virtual/opengl
55 + gles2? ( media-libs/mesa[gles2] )
56 + gstreamer? (
57 + media-libs/gstreamer:1.0
58 + media-libs/gst-plugins-base:1.0 )
59 + introspection? ( >=dev-libs/gobject-introspection-1.34.2:= )
60 + kms? (
61 + media-libs/mesa[gbm]
62 + x11-libs/libdrm:= )
63 + pango? ( >=x11-libs/pango-1.20.0[introspection?] )
64 + wayland? (
65 + >=dev-libs/wayland-1.1.90
66 + media-libs/mesa[egl,wayland] )
67 +"
68 +# before clutter-1.7, cogl was part of clutter
69 +RDEPEND="${COMMON_DEPEND}
70 + !<media-libs/clutter-1.7
71 +"
72 +DEPEND="${COMMON_DEPEND}
73 + >=dev-util/gtk-doc-am-1.13
74 + sys-devel/gettext
75 + virtual/pkgconfig
76 + test? (
77 + app-eselect/eselect-opengl
78 + media-libs/mesa[classic] )
79 +"
80 +
81 +# Need classic mesa swrast for tests, llvmpipe causes a test failure
82 +# For some reason GL3 conformance test all fails again...
83 +RESTRICT="test"
84 +
85 +src_prepare() {
86 + # Upstream fixes from 1.22 branch
87 + # kms-winsys: don't wait for a flip when page flipping fails
88 + epatch "${FILESDIR}"/${P}-wait-flip.patch
89 +
90 + # Let cogl work with fglrx driver, bug #567168
91 + # https://bugzilla.gnome.org/show_bug.cgi?id=756306
92 + use video_cards_fglrx && epatch "${FILESDIR}"/${PN}-1.22.0-fglrx.patch
93 +
94 + # Do not build examples
95 + sed -e "s/^\(SUBDIRS +=.*\)examples\(.*\)$/\1\2/" \
96 + -i Makefile.am Makefile.in || die
97 +
98 + if ! use test ; then
99 + # For some reason the configure switch will not completely disable
100 + # tests being built
101 + sed -e "s/^\(SUBDIRS =.*\)test-fixtures\(.*\)$/\1\2/" \
102 + -e "s/^\(SUBDIRS +=.*\)tests\(.*\)$/\1\2/" \
103 + -e "s/^\(.*am__append.* \)tests\(.*\)$/\1\2/" \
104 + -i Makefile.am Makefile.in || die
105 + fi
106 +
107 + gnome2_src_prepare
108 +}
109 +
110 +src_configure() {
111 + # TODO: think about quartz, sdl
112 + # Prefer gl over gles2 if both are selected
113 + # Profiling needs uprof, which is not available in portage yet, bug #484750
114 + # FIXME: Doesn't provide prebuilt docs, but they can neither be rebuilt, bug #483332
115 + gnome2_src_configure \
116 + --disable-examples-install \
117 + --disable-maintainer-flags \
118 + --enable-cairo \
119 + --enable-deprecated \
120 + --enable-gdk-pixbuf \
121 + --enable-glib \
122 + $(use_enable opengl glx) \
123 + $(use_enable opengl gl) \
124 + $(use_enable gles2) \
125 + $(use_enable gles2 cogl-gles2) \
126 + $(use_enable gles2 xlib-egl-platform) \
127 + $(usex gles2 --with-default-driver=$(usex opengl gl gles2)) \
128 + $(use_enable gstreamer cogl-gst) \
129 + $(use_enable introspection) \
130 + $(use_enable kms kms-egl-platform) \
131 + $(use_enable pango cogl-pango) \
132 + $(use_enable test unit-tests) \
133 + $(use_enable wayland wayland-egl-platform) \
134 + $(use_enable wayland wayland-egl-server) \
135 + --disable-profile
136 +# $(use_enable profile)
137 +}
138 +
139 +src_test() {
140 + # Use swrast for tests, llvmpipe is incomplete and "test_sub_texture" fails
141 + # NOTE: recheck if this is needed after every mesa bump
142 + if [[ "$(eselect opengl show)" != "xorg-x11" ]]; then
143 + ewarn "Skipping tests because a binary OpenGL library is enabled. To"
144 + ewarn "run tests for ${PN}, you need to enable the Mesa library:"
145 + ewarn "# eselect opengl set xorg-x11"
146 + return
147 + fi
148 + LIBGL_DRIVERS_PATH="${EROOT}/usr/$(get_libdir)/mesa" Xemake check
149 +}
150 +
151 +src_install() {
152 + if use examples; then
153 + insinto /usr/share/doc/${PF}/examples
154 + doins examples/{*.c,*.jpg}
155 + fi
156 +
157 + gnome2_src_install
158 +
159 + # Remove silly examples-data directory
160 + rm -rvf "${ED}/usr/share/cogl/examples-data/" || die
161 +}