Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/raspberrypi-userland/
Date: Wed, 30 Mar 2016 13:37:27
Message-Id: 1459345029.5e3a59a561313546f27414713071c0ad84b606a8.fordfrog@gentoo
1 commit: 5e3a59a561313546f27414713071c0ad84b606a8
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 30 13:35:53 2016 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 30 13:37:09 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e3a59a5
7
8 media-libs/raspberrypi-userland: version bump
9
10 Package-Manager: portage-2.2.28
11
12 media-libs/raspberrypi-userland/Manifest | 1 +
13 .../raspberrypi-userland-0_pre20160330.ebuild | 108 +++++++++++++++++++++
14 2 files changed, 109 insertions(+)
15
16 diff --git a/media-libs/raspberrypi-userland/Manifest b/media-libs/raspberrypi-userland/Manifest
17 index b4e59ea..4a34270 100644
18 --- a/media-libs/raspberrypi-userland/Manifest
19 +++ b/media-libs/raspberrypi-userland/Manifest
20 @@ -3,3 +3,4 @@ DIST raspberrypi-userland-0_pre20140117.tar.xz 31998784 SHA256 2999d711465ddbc6b
21 DIST raspberrypi-userland-0_pre20140830.tar.xz 32066536 SHA256 f9a06d2ca7d41cdc700b83eeb7c3e06d3ea6bd3fd187880a563144a6bf6ee901 SHA512 775005177e760fff611d7ce7e4beb466ea111dfc4652b97593d1061b97b1ded32979f8666a0aada6338791abab988883bbfd902f267eba5734e8aa932ebcf487 WHIRLPOOL 3066272a88b868ef20f27614f6f680aa6eb8a43cd2e281a7a930b99be341b037fa843a1c36bfdc6be619544e5b4b8751e5ab58c853b1baff44894b39284bfa55
22 DIST raspberrypi-userland-0_pre20150921.tar.xz 32395092 SHA256 771bf96111d40c3b86cf2590f22d02306e5f56668f6ee11ace389c719bfccb2b SHA512 0aad096f5c6d54ef1d494708e80f8fb921e30e0d93ced79b4e939afffa8e824e35347595d6f925d1d7ee86917e72fa0b160ad56c8a4df7711d5e87b5cc399be1 WHIRLPOOL 2204dd8f8acf79c3d8baab770e133d18596f00fbf714e9ab46bf4a5ae1a1c0cf9edcbf763bf7fc0403126bb0ca9de7f422a3427dd429d849df6aee1be08b4b6a
23 DIST raspberrypi-userland-0_pre20160305.tar.gz 32888927 SHA256 01cc6dfb5ee50733d58e6cb1ba0f79cb90ab7ef46718c302cbac0fd9e3a09b6a SHA512 8621f48d699b2736d4a22f03e5cdde6be564b8d2100f46ab85d3f6e0fc958634436fafc8d218f55a114a37acaf6dbe21b5cf2bf57c258a3067af2720d63d0c27 WHIRLPOOL 109aabddfc483900741758a737f93c1f3bc4074de2e2f0d25d28a620f8381adb44d21b5fa8eb3f59a69eb3a9903b95b32e3a5d9d9353560d42e37d19aaa9b085
24 +DIST raspberrypi-userland-0_pre20160330.tar.gz 32928211 SHA256 a1f3772afee594c7f08e5362cff96d783d2a0a4970d0172c611a638fe93cfeea SHA512 5b56885a1d832fff7d806718341d0050df66641d698ead4997e684c2aedb8faebd5cd9ce84a69537cc0ed362ca1b6c487ff2fd5575f5a3fbb1d4a7fe8602fb6e WHIRLPOOL ec3d224715e351150f72d021fd5a623287a64bc39379137cde01f8c460e083069f9cc18cf4899fff43d69a711b4c5bd9c69f51113b3b0a6b5092bb62441d9355
25
26 diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20160330.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20160330.ebuild
27 new file mode 100644
28 index 0000000..076d8de
29 --- /dev/null
30 +++ b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20160330.ebuild
31 @@ -0,0 +1,108 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=5
37 +
38 +inherit cmake-utils
39 +
40 +DESCRIPTION="Raspberry Pi userspace tools and libraries"
41 +HOMEPAGE="https://github.com/raspberrypi/userland"
42 +
43 +if [[ ${PV} == 9999* ]]; then
44 + inherit git-2
45 + EGIT_REPO_URI="git://github.com/${PN/-//}.git"
46 + SRC_URI=""
47 + KEYWORDS=""
48 +else
49 + GIT_COMMIT="703a2c4"
50 + SRC_URI="https://github.com/raspberrypi/userland/tarball/${GIT_COMMIT} -> ${P}.tar.gz"
51 + KEYWORDS="~arm"
52 + S="${WORKDIR}/raspberrypi-userland-${GIT_COMMIT}"
53 +fi
54 +
55 +RDEPEND="!media-libs/raspberrypi-userland-bin
56 + wayland? ( dev-libs/wayland )"
57 +DEPEND="${RDEPEND}
58 + wayland? ( virtual/pkgconfig )"
59 +
60 +IUSE="examples wayland"
61 +LICENSE="BSD"
62 +SLOT="0"
63 +
64 +# TODO:
65 +# * port vcfiled init script
66 +# * stuff is still installed to hardcoded /opt/vc location, investigate whether
67 +# anything else depends on it being there
68 +# * live ebuild
69 +
70 +src_unpack() {
71 + if [[ ${PV} == 9999* ]]; then
72 + git-2_src_unpack
73 + else
74 + default
75 + fi
76 +}
77 +
78 +src_prepare() {
79 + # init script for Debian, not useful on Gentoo
80 + sed -i "/DESTINATION \/etc\/init.d/,+2d" interface/vmcs_host/linux/vcfiled/CMakeLists.txt || die
81 +
82 + # wayland egl support
83 + epatch "${FILESDIR}"/next-resource-handle.patch \
84 + "${FILESDIR}"/wayland-wsys.patch
85 +}
86 +
87 +src_install() {
88 + cmake-utils_src_install
89 +
90 + # provide OpenGL ES v1 according to https://github.com/raspberrypi/firmware/issues/78
91 + dosym libGLESv2.so /opt/vc/lib/libGLESv1_CM.so
92 +
93 + doenvd "${FILESDIR}"/04${PN}
94 +
95 + insinto /lib/udev/rules.d
96 + doins "${FILESDIR}"/92-local-vchiq-permissions.rules
97 +
98 + # enable dynamic switching of the GL implementation
99 + dodir /usr/lib/opengl
100 + dosym ../../../opt/vc /usr/lib/opengl/${PN}
101 +
102 + # tell eselect opengl that we do not have libGL
103 + touch "${ED}"/opt/vc/.gles-only
104 +
105 + insinto /opt/vc/lib/pkgconfig
106 + doins "${FILESDIR}"/bcm_host.pc
107 + doins "${FILESDIR}"/egl.pc
108 + doins "${FILESDIR}"/glesv2.pc
109 + if use wayland; then
110 + # Missing wayland-egl version from the patch; claim 9.0 (a mesa version) for now, so gst-plugins-bad wayland-egl check is happy
111 + sed -i -e 's/Version: /Version: 9.0/' "${ED}"/opt/vc/lib/pkgconfig/wayland-egl.pc
112 + doins "${ED}"/opt/vc/lib/pkgconfig/wayland-egl.pc # Maybe move?
113 + fi
114 +
115 + # some #include instructions are wrong so we need to fix them
116 + einfo "Fixing #include \"vcos_platform_types.h\""
117 + for file in $(grep -l "#include \"vcos_platform_types.h\"" "${D}"/opt/vc/include/* -r); do
118 + einfo " Fixing file ${file}"
119 + sed -i "s%#include \"vcos_platform_types.h\"%#include \"interface/vcos/pthreads/vcos_platform_types.h\"%g" ${file}
120 + done
121 + einfo "Fixing #include \"vcos_platform.h\""
122 + for file in $(grep -l "#include \"vcos_platform.h\"" "${D}"/opt/vc/include/* -r); do
123 + einfo " Fixing file ${file}"
124 + sed -i "s%#include \"vcos_platform.h\"%#include \"interface/vcos/pthreads/vcos_platform.h\"%g" ${file}
125 + done
126 + einfo "Fixing #include \"vchost_config.h\""
127 + for file in $(grep -l "#include \"vchost_config.h\"" "${D}"/opt/vc/include/* -r); do
128 + einfo " Fixing file ${file}"
129 + sed -i "s%#include \"vchost_config.h\"%#include \"interface/vmcs_host/linux/vchost_config.h\"%g" ${file}
130 + done
131 +
132 + if use examples ; then
133 + dodir /usr/share/doc/${PF}/examples
134 + mv "${D}"/opt/vc/src/hello_pi "${D}"/usr/share/doc/${PF}/examples/ || die
135 + rm -fr "${D}"/opt/vc/src
136 + else
137 + rm -fr "${D}/opt/vc/src"
138 + fi
139 +}