public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/raspberrypi-userland/, media-libs/raspberrypi-userland/files/
@ 2016-10-19 19:43 Alfredo Tupone
  0 siblings, 0 replies; 4+ messages in thread
From: Alfredo Tupone @ 2016-10-19 19:43 UTC (permalink / raw
  To: gentoo-commits

commit:     2b73810ed25d8db51a5f018da39f186f59d94831
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 19:42:23 2016 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 19:42:58 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b73810e

media-libs/raspberrypi-userland: Patch accepted by upstream

Package-Manager: portage-2.3.0

 .../files/raspberrypi-userland-9999-gentoo.patch               | 10 ----------
 .../raspberrypi-userland/raspberrypi-userland-9999.ebuild      |  4 ----
 2 files changed, 14 deletions(-)

diff --git a/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
deleted file mode 100644
index f58e288..00000000
--- a/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- CMakeLists.txt.old	2015-02-20 19:37:32.754551301 +0100
-+++ CMakeLists.txt	2015-02-20 19:38:45.643356903 +0100
-@@ -38,6 +38,7 @@
- add_definitions(-DOMX_SKIP64BIT)
- add_definitions(-DEGL_SERVER_DISPMANX)
- add_definitions(-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)
-+add_definitions(-D_GNU_SOURCE)
- 
- # do we actually need this?
- add_definitions(-D__VIDEOCORE4__)

diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
index 9c5d675..c744808 100644
--- a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
@@ -19,10 +19,6 @@ RDEPEND=""
 
 EGIT_REPO_URI="https://github.com/raspberrypi/userland"
 
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-gentoo.patch
-}
-
 src_configure() {
 	local mycmakeargs=(
 		-DVMCS_INSTALL_PREFIX="/usr"


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/raspberrypi-userland/, media-libs/raspberrypi-userland/files/
@ 2017-02-12 14:34 Alfredo Tupone
  0 siblings, 0 replies; 4+ messages in thread
From: Alfredo Tupone @ 2017-02-12 14:34 UTC (permalink / raw
  To: gentoo-commits

commit:     a18a8c4cbfc39c02825851d24e9e9ab777c4706b
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 12 14:33:47 2017 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Feb 12 14:33:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a18a8c4c

media-libs/raspberrypi-userland: Fix devices permissions

Not using anymore eselect opengl (includes not compatible)

Package-Manager: portage-2.3.3

 .../files/92-local-vchiq-permissions.rules         |  2 ++
 .../files/raspberrypi-userland-9999-gentoo.patch   | 15 +++++++++++++
 .../raspberrypi-userland-9999.ebuild               | 26 +++++++++-------------
 3 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/media-libs/raspberrypi-userland/files/92-local-vchiq-permissions.rules b/media-libs/raspberrypi-userland/files/92-local-vchiq-permissions.rules
index bacea0e066..fd95502940 100644
--- a/media-libs/raspberrypi-userland/files/92-local-vchiq-permissions.rules
+++ b/media-libs/raspberrypi-userland/files/92-local-vchiq-permissions.rules
@@ -1 +1,3 @@
 SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
+SUBSYSTEM=="vc-sm",GROUP="video",MODE="0660"
+SUBSYSTEM=="bcm2708_vcio",GROUP="video",MODE="0660"

diff --git a/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
new file mode 100644
index 0000000000..a5e60554cd
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
@@ -0,0 +1,15 @@
+--- raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/CMakeLists.txt.old	2017-02-04 19:01:38.944537134 +0100
++++ raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/CMakeLists.txt	2017-02-04 19:02:09.634401479 +0100
+@@ -22,12 +22,4 @@
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin)
+ 
+ set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post)
+-foreach(_script ${DTOVERLAY_SCRIPTS})
+-   add_custom_command(
+-     TARGET dtoverlay
+-     COMMAND ${CMAKE_COMMAND}
+-     -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${_script}
+-     ${CMAKE_BINARY_DIR}/../../bin/${_script}
+-   )
+-endforeach()
+ install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION bin)

diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
index c7448085bb..cc5ecd0b82 100644
--- a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
-inherit cmake-utils git-r3
+inherit cmake-utils flag-o-matic git-r3
 
 DESCRIPTION="Raspberry Pi userspace tools and libraries"
 HOMEPAGE="https://github.com/raspberrypi/userland"
@@ -19,6 +19,12 @@ RDEPEND=""
 
 EGIT_REPO_URI="https://github.com/raspberrypi/userland"
 
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+pkg_setup() {
+	append-ldflags $(no-as-needed)
+}
+
 src_configure() {
 	local mycmakeargs=(
 		-DVMCS_INSTALL_PREFIX="/usr"
@@ -30,20 +36,8 @@ src_configure() {
 src_install() {
 	cmake-utils_src_install
 
-	dodir /usr/lib/opengl/raspberrypi/lib
-	touch "${D}"/usr/lib/opengl/raspberrypi/.gles-only
-	mv "${D}"/usr/lib/lib{EGL,GLESv2}* \
-		"${D}"/usr/lib/opengl/raspberrypi/lib
-
-	dodir /usr/lib/opengl/raspberrypi/include
-	mv "${D}"/usr/include/{EGL,GLES,GLES2,KHR,WF} \
-		"${D}"/usr/lib/opengl/raspberrypi/include
-	mv "${D}"/usr/include/interface/vcos/pthreads/* \
-		"${D}"/usr/include/interface/vcos/
-	rmdir "${D}"/usr/include/interface/vcos/pthreads
-	mv "${D}"/usr/include/interface/vmcs_host/linux/* \
-		"${D}"/usr/include/interface/vmcs_host/
-	rmdir "${D}"/usr/include/interface/vmcs_host/linux
+	insinto /lib/udev/rules.d
+	doins "${FILESDIR}"/92-local-vchiq-permissions.rules
 
 	dodir /usr/share/doc/${PF}
 	mv "${D}"/usr/src/hello_pi "${D}"/usr/share/doc/${PF}/


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/raspberrypi-userland/, media-libs/raspberrypi-userland/files/
@ 2019-03-24 23:55 Andrey Utkin
  0 siblings, 0 replies; 4+ messages in thread
From: Andrey Utkin @ 2019-03-24 23:55 UTC (permalink / raw
  To: gentoo-commits

commit:     69db8036643a3b20b5b98e89e2518a283258c7de
Author:     stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Wed Nov  7 19:52:38 2018 +0000
Commit:     Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org>
CommitDate: Sun Mar 24 23:52:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69db8036

media-libs/raspberrypi-userland: 9999: remove upstreamed patch

Closes: https://bugs.gentoo.org/641046
Link: https://github.com/raspberrypi/userland/commit/2fe51001dbd421ac35a55af443ac080b50128266
Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com>
Signed-off-by: Andrey Utkin <andrey_utkin <AT> gentoo.org>

 .../files/raspberrypi-userland-9999-gentoo.patch          | 15 ---------------
 .../raspberrypi-userland/raspberrypi-userland-9999.ebuild |  2 --
 2 files changed, 17 deletions(-)

diff --git a/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
deleted file mode 100644
index a5e60554cd1..00000000000
--- a/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/CMakeLists.txt.old	2017-02-04 19:01:38.944537134 +0100
-+++ raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/CMakeLists.txt	2017-02-04 19:02:09.634401479 +0100
-@@ -22,12 +22,4 @@
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin)
- 
- set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post)
--foreach(_script ${DTOVERLAY_SCRIPTS})
--   add_custom_command(
--     TARGET dtoverlay
--     COMMAND ${CMAKE_COMMAND}
--     -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${_script}
--     ${CMAKE_BINARY_DIR}/../../bin/${_script}
--   )
--endforeach()
- install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION bin)

diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
index 99b34886324..6906bbc7039 100644
--- a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
@@ -18,8 +18,6 @@ RDEPEND=""
 
 EGIT_REPO_URI="https://github.com/raspberrypi/userland"
 
-PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
-
 pkg_setup() {
 	append-ldflags $(no-as-needed)
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/raspberrypi-userland/, media-libs/raspberrypi-userland/files/
@ 2021-02-16 19:26 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2021-02-16 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     3685f662853bf6e75118834a769ab487bea92176
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 16 19:25:32 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 16 19:26:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3685f662

Revert "media-libs/raspberrypi-userland: cleanup old"

This reverts commit 8021512569b236c2ceb62156c206c133b8f17bf0.
Newer version breaks some dependent packages because
we don't install GL includes due to collisions.

Also reverts 9cbaffb767a7eb275d54f9666584e235d9d0566e.

Bug: https://bugs.gentoo.org/770802
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/raspberrypi-userland/Manifest           |   1 +
 .../files/04raspberrypi-userland                   |   3 +
 media-libs/raspberrypi-userland/files/bcm_host.pc  |  10 +
 media-libs/raspberrypi-userland/files/egl.pc       |  11 ++
 media-libs/raspberrypi-userland/files/glesv2.pc    |  11 ++
 .../files/next-resource-handle.patch               | 207 +++++++++++++++++++++
 .../raspberrypi-userland-0_pre20160424.ebuild      | 109 +++++++++++
 7 files changed, 352 insertions(+)

diff --git a/media-libs/raspberrypi-userland/Manifest b/media-libs/raspberrypi-userland/Manifest
index 14ea7065276..29025c84702 100644
--- a/media-libs/raspberrypi-userland/Manifest
+++ b/media-libs/raspberrypi-userland/Manifest
@@ -1 +1,2 @@
+DIST raspberrypi-userland-0_pre20160424.tar.gz 32933952 BLAKE2B 4a2d40200a6a4d673be277a0958f768342a2777c28b14b4c7fcac1dbc9c59f2ef2485234f11fbd228aea6bbcf4982a3fd1d4825268af60be91665ea6fee6922d SHA512 04a71837b1247ecbbe479b3b09b5705638a9e576dc99a1ab2200727509195a4a2f2a9b184e3c23ce3933a3236b260afc8bd2b75bc218567b386445bdd8208a5b
 DIST raspberrypi-userland-0_pre20201022.tar.gz 32958590 BLAKE2B 01733a24822d80c5bf9aa3e0feefc3e9437390a465d7a4184d0a9c6a68446e91515d3d6d398ff516d9fd1bdcd4a885512d358a4ed1d24d9b94bdc72d81db84d3 SHA512 1813224068b8a8e569c874a8ffb354f1ac86e95b482caaad18b9703a187baaea60f1f87dfbb0c7e4b3cb2eb875abbcc82aedba410646a3c1df0208bd73aaf9f9

diff --git a/media-libs/raspberrypi-userland/files/04raspberrypi-userland b/media-libs/raspberrypi-userland/files/04raspberrypi-userland
new file mode 100644
index 00000000000..17b493b1814
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/04raspberrypi-userland
@@ -0,0 +1,3 @@
+PKG_CONFIG_PATH='/opt/vc/lib/pkgconfig'
+PATH='/opt/vc/bin'
+LDPATH='/opt/vc/lib'

diff --git a/media-libs/raspberrypi-userland/files/bcm_host.pc b/media-libs/raspberrypi-userland/files/bcm_host.pc
new file mode 100644
index 00000000000..7627ae87105
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/bcm_host.pc
@@ -0,0 +1,10 @@
+prefix=/opt/vc
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: bcm_host
+Description: Broadcom VideoCore host API library
+Version: 1
+Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm
+Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM

diff --git a/media-libs/raspberrypi-userland/files/egl.pc b/media-libs/raspberrypi-userland/files/egl.pc
new file mode 100644
index 00000000000..56bf1e07e93
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/egl.pc
@@ -0,0 +1,11 @@
+prefix=/opt/vc
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: EGL
+Description: Fake EGL package for RPi
+Version: 10
+Requires: bcm_host glesv2
+Libs: -L${libdir} -lEGL
+Cflags: -I${includedir}

diff --git a/media-libs/raspberrypi-userland/files/glesv2.pc b/media-libs/raspberrypi-userland/files/glesv2.pc
new file mode 100644
index 00000000000..04d61c21cea
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/glesv2.pc
@@ -0,0 +1,11 @@
+prefix=/opt/vc
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: GLESv2
+Description: Fake GL ES 2 package for RPi
+Version: 10
+Requires: bcm_host
+Libs: -L${libdir} -lGLESv2
+Cflags: -I${includedir}

diff --git a/media-libs/raspberrypi-userland/files/next-resource-handle.patch b/media-libs/raspberrypi-userland/files/next-resource-handle.patch
new file mode 100644
index 00000000000..45e1a494b2c
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/next-resource-handle.patch
@@ -0,0 +1,207 @@
+From 825c3236e5908ff003644abd870bfe98e82722b2 Mon Sep 17 00:00:00 2001
+From: Dom Cobley <dc4@broadcom.com>
+Date: Tue, 9 Jul 2013 09:26:26 -0400
+Subject: [PATCH] Allow applications to set next resource handle
+
+This patch adds provisions in userland to
+let apps callers set the next rendereing dispmanx resource.
+It's useful for implementing, say, a buffer carousel.
+---
+ interface/khronos/common/khrn_client_rpc.h |  2 ++
+ interface/khronos/common/khrn_int_ids.h    |  2 ++
+ interface/khronos/egl/egl_client.c         | 30 +++++++++++++++++++++++++++---
+ interface/khronos/egl/egl_client_surface.c | 24 +++++++++++++++++++++++-
+ interface/khronos/egl/egl_client_surface.h |  3 ++-
+ interface/khronos/egl/egl_int_impl.h       |  5 +++--
+ 6 files changed, 59 insertions(+), 7 deletions(-)
+
+diff --git a/interface/khronos/common/khrn_client_rpc.h b/interface/khronos/common/khrn_client_rpc.h
+index 418aa67..a7557a8 100644
+--- a/interface/khronos/common/khrn_client_rpc.h
++++ b/interface/khronos/common/khrn_client_rpc.h
+@@ -683,6 +683,7 @@ static INLINE void rpc_call18(CLIENT_THREAD_STATE_T *thread, uint32_t id, uint32
+ static INLINE void rpc_call13_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, void *out)               { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);      rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
+ static INLINE void rpc_call14_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
+ static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
++static INLINE void rpc_call16_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, uint32_t p14, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
+ #endif
+ 
+ #define RPC_CALL1_OUT_CTRL(fn, thread, id, out)                                               rpc_call1_out_ctrl(thread, id, out)
+@@ -700,6 +701,7 @@ static INLINE void rpc_call18(CLIENT_THREAD_STATE_T *thread, uint32_t id, uint32
+ #define RPC_CALL13_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out)      rpc_call13_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out)
+ #define RPC_CALL14_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out) rpc_call14_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out)
+ #define RPC_CALL15_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out) rpc_call15_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out)
++#define RPC_CALL16_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out) rpc_call16_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out)
+ 
+ # if !defined(__SYMBIAN32__)  //use functions defined in khrpc.cpp
+ static INLINE uint32_t rpc_call1_out_ctrl_res(CLIENT_THREAD_STATE_T *thread,uint32_t id, void *out)                                                                                                                       { uint32_t res; rpc_begin(thread); RPC_CALL(thread, id);                                     res = rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_RES | RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); return res; }
+diff --git a/interface/khronos/common/khrn_int_ids.h b/interface/khronos/common/khrn_int_ids.h
+index 8378f4a..ec961e0 100644
+--- a/interface/khronos/common/khrn_int_ids.h
++++ b/interface/khronos/common/khrn_int_ids.h
+@@ -367,6 +367,7 @@
+ */
+ 
+ #define EGLINTCREATESURFACE_ID            0x4000
++#define EGLINTCREATESURFACE_ID_V2         0x4100
+ #define EGLINTCREATEGLES11_ID             0x4001
+ #define EGLINTCREATEGLES20_ID             0x4002
+ #define EGLINTCREATEVG_ID                 0x4003
+@@ -377,6 +378,7 @@
+ #define EGLINTMAKECURRENT_ID              0x4008
+ #define EGLINTFLUSHANDWAIT_ID             0x4009
+ #define EGLINTSWAPBUFFERS_ID              0x400a
++#define EGLINTSWAPBUFFERS_ID_V2           0x410a
+ #define EGLINTSELECTMIPMAP_ID             0x400b
+ #define EGLINTFLUSH_ID                    0x400c
+ #define EGLINTGETCOLORDATA_ID             0x400d
+diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
+index fd07eb6..e902d19 100644
+--- a/interface/khronos/egl/egl_client.c
++++ b/interface/khronos/egl/egl_client.c
+@@ -162,6 +162,17 @@
+ void egl_gl_flush_callback(bool wait);
+ void egl_vg_flush_callback(bool wait);
+ 
++#include "interface/vmcs_host/vc_dispmanx_types.h"
++/**HACKHACK - give us the ability to inject a DispmanX 
++ * resource handle into the CreateWindowSurface and 
++ * SwapBuffers calls */ 
++static DISPMANX_RESOURCE_HANDLE_T next_resource_handle;
++
++EGLAPI EGLBoolean EGLAPIENTRY eglSetNextResourceHandle(DISPMANX_RESOURCE_HANDLE_T handle)
++{
++   next_resource_handle = handle;
++}
++
+ /*
+ TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate)
+ Also affects global image (and possibly others?)
+@@ -643,7 +654,8 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c
+                                 false,
+                                 EGL_NO_TEXTURE,
+                                 EGL_NO_TEXTURE,
+-                                0, 0);
++                                0, 0,
++                                next_resource_handle);
+ 
+                if (surface) {
+                   if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
+@@ -888,7 +900,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig
+                              mipmap_texture,
+                              texture_format,
+                              texture_target,
+-                             0, 0);
++                             0, 0, 0);
+ 
+             if (surface) {
+                if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
+@@ -1030,7 +1042,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c
+                                    false,
+                                    EGL_NO_TEXTURE,
+                                    EGL_NO_TEXTURE,
+-                                   pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle);
++                                   pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle, 0);
+ 
+                      if (surface) {
+                         if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
+@@ -2302,6 +2314,18 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
+ 
+                vcos_log_trace("eglSwapBuffers server call");
+ 
++               if (next_resource_handle)
++               RPC_CALL7(eglIntSwapBuffers_impl,
++                     thread,
++                     EGLINTSWAPBUFFERS_ID_V2,
++                     RPC_UINT(surface->serverbuffer),
++                     RPC_UINT(surface->width),
++                     RPC_UINT(surface->height),
++                     RPC_UINT(surface->internal_handle),
++                     RPC_UINT(surface->swap_behavior == EGL_BUFFER_PRESERVED ? 1 : 0),
++                     RPC_UINT(khrn_platform_get_window_position(surface->win)),
++                     RPC_INT(next_resource_handle));
++               else
+                RPC_CALL6(eglIntSwapBuffers_impl,
+                      thread,
+                      EGLINTSWAPBUFFERS_ID,
+diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
+index cda5943..0be56c5 100644
+--- a/interface/khronos/egl/egl_client_surface.c
++++ b/interface/khronos/egl/egl_client_surface.c
+@@ -314,7 +314,8 @@ EGL_SURFACE_T *egl_surface_create(
+    EGLenum texture_format,
+    EGLenum texture_target,
+    EGLNativePixmapType pixmap,
+-   const uint32_t *pixmap_server_handle)
++   const uint32_t *pixmap_server_handle,
++   DISPMANX_RESOURCE_HANDLE_T next_resource_handle)
+ {
+    KHRN_IMAGE_FORMAT_T color;
+    KHRN_IMAGE_FORMAT_T depth;
+@@ -473,6 +474,27 @@ EGL_SURFACE_T *egl_surface_create(
+ #endif
+          uint32_t results[3];
+ 
++         if (next_resource_handle)
++         RPC_CALL16_OUT_CTRL(eglIntCreateSurface_impl,
++                             thread,
++                             EGLINTCREATESURFACE_ID_V2,
++                             RPC_UINT(serverwin),
++                             RPC_UINT(buffers),
++                             RPC_UINT(width),
++                             RPC_UINT(height),
++                             RPC_UINT(color),
++                             RPC_UINT(depth),
++                             RPC_UINT(mask),
++                             RPC_UINT(multi),
++                             RPC_UINT(largest_pbuffer),
++                             RPC_UINT(mipmap_texture),
++                             RPC_UINT(config_depth_bits),
++                             RPC_UINT(config_stencil_bits),
++                             RPC_UINT(sem_name),
++                             RPC_UINT(type),
++                             RPC_INT(next_resource_handle),
++                             results);
++         else
+          RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl,
+                              thread,
+                              EGLINTCREATESURFACE_ID,
+diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h
+index c99d44c..b5bf70a 100644
+--- a/interface/khronos/egl/egl_client_surface.h
++++ b/interface/khronos/egl/egl_client_surface.h
+@@ -322,7 +322,8 @@ extern EGL_SURFACE_T *egl_surface_create(
+    EGLenum texture_format,
+    EGLenum texture_target,
+    EGLNativePixmapType pixmap,
+-   const uint32_t *pixmap_server_handle);
++   const uint32_t *pixmap_server_handle,
++   DISPMANX_RESOURCE_HANDLE_T next_resource_handle);
+ extern EGL_SURFACE_T *egl_surface_from_vg_image(
+    VGImage vg_handle,
+    EGLSurface name,
+diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h
+index 8a5734c..51b3580 100644
+--- a/interface/khronos/egl/egl_int_impl.h
++++ b/interface/khronos/egl/egl_int_impl.h
+@@ -56,7 +56,8 @@
+    uint32_t config_stencil_bits,
+    uint32_t sem,
+    uint32_t type,
+-   uint32_t *results))
++   uint32_t *results,
++   DISPMANX_RESOURCE_HANDLE_T next_resource_handle))
+ 
+ FN(int, eglIntCreatePbufferFromVGImage_impl, (
+    VGImage vg_handle,
+@@ -110,7 +111,7 @@
+ FN(int, eglIntFlushAndWait_impl, (uint32_t flushgl, uint32_t flushvg))
+ FN(void, eglIntFlush_impl, (uint32_t flushgl, uint32_t flushvg))
+ 
+-FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position))
++FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position, DISPMANX_RESOURCE_HANDLE_T new_back_buffer))
+ FN(void, eglIntSelectMipmap_impl, (EGL_SURFACE_ID_T s, int level))
+ 
+ FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data))
+-- 
+1.8.5.1

diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20160424.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20160424.ebuild
new file mode 100644
index 00000000000..ddbbd294d3a
--- /dev/null
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20160424.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Raspberry Pi userspace tools and libraries"
+HOMEPAGE="https://github.com/raspberrypi/userland"
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-2
+	EGIT_REPO_URI="https://github.com/${PN/-//}.git"
+	SRC_URI=""
+else
+	GIT_COMMIT="dff5760"
+	SRC_URI="https://github.com/raspberrypi/userland/tarball/${GIT_COMMIT} -> ${P}.tar.gz"
+	KEYWORDS="arm"
+	S="${WORKDIR}/raspberrypi-userland-${GIT_COMMIT}"
+fi
+
+RDEPEND="
+	!media-libs/raspberrypi-userland-bin
+	wayland? ( dev-libs/wayland )"
+
+DEPEND="
+	${RDEPEND}
+	wayland? ( virtual/pkgconfig )"
+
+IUSE="examples wayland"
+LICENSE="BSD"
+SLOT="0"
+
+# TODO:
+# * port vcfiled init script
+# * stuff is still installed to hardcoded /opt/vc location, investigate whether
+#   anything else depends on it being there
+# * live ebuild
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]]; then
+		git-2_src_unpack
+	else
+		default
+	fi
+}
+
+src_prepare() {
+	# init script for Debian, not useful on Gentoo
+	sed -i "/DESTINATION \/etc\/init.d/,+2d" interface/vmcs_host/linux/vcfiled/CMakeLists.txt || die
+
+	# wayland egl support
+	epatch "${FILESDIR}"/next-resource-handle.patch
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# provide OpenGL ES v1 according to https://github.com/raspberrypi/firmware/issues/78
+	dosym libGLESv2.so /opt/vc/lib/libGLESv1_CM.so
+
+	doenvd "${FILESDIR}"/04${PN}
+
+	insinto /lib/udev/rules.d
+	doins "${FILESDIR}"/92-local-vchiq-permissions.rules
+
+	# enable dynamic switching of the GL implementation
+	dodir /usr/lib/opengl
+	dosym ../../../opt/vc /usr/lib/opengl/${PN}
+
+	# tell eselect opengl that we do not have libGL
+	touch "${ED}"/opt/vc/.gles-only || die
+
+	insinto /opt/vc/lib/pkgconfig
+	doins "${FILESDIR}"/bcm_host.pc
+	doins "${FILESDIR}"/egl.pc
+	doins "${FILESDIR}"/glesv2.pc
+	if use wayland; then
+	# Missing wayland-egl version from the patch; claim 9.0 (a mesa version) for now, so gst-plugins-bad wayland-egl check is happy
+		sed -i -e 's/Version:  /Version: 9.0/' "${ED}/opt/vc/lib/pkgconfig/wayland-egl.pc" || die
+		doins "${ED}"/opt/vc/lib/pkgconfig/wayland-egl.pc # Maybe move?
+	fi
+
+	# some #include instructions are wrong so we need to fix them
+	einfo "Fixing #include \"vcos_platform_types.h\""
+	for file in $(grep -l "#include \"vcos_platform_types.h\"" "${D}"/opt/vc/include/* -r); do
+		einfo "  Fixing file ${file}"
+		sed -i "s%#include \"vcos_platform_types.h\"%#include \"interface/vcos/pthreads/vcos_platform_types.h\"%g" ${file} || die
+	done
+
+	einfo "Fixing #include \"vcos_platform.h\""
+	for file in $(grep -l "#include \"vcos_platform.h\"" "${D}"/opt/vc/include/* -r); do
+		einfo "  Fixing file ${file}"
+		sed -i "s%#include \"vcos_platform.h\"%#include \"interface/vcos/pthreads/vcos_platform.h\"%g" ${file} || die
+	done
+
+	einfo "Fixing #include \"vchost_config.h\""
+	for file in $(grep -l "#include \"vchost_config.h\"" "${D}"/opt/vc/include/* -r); do
+		einfo "  Fixing file ${file}"
+		sed -i "s%#include \"vchost_config.h\"%#include \"interface/vmcs_host/linux/vchost_config.h\"%g" ${file} || die
+	done
+
+	if use examples; then
+		dodir /usr/share/doc/${PF}/examples
+		mv "${D}"/opt/vc/src/hello_pi "${D}"/usr/share/doc/${PF}/examples/ || die
+	fi
+
+	rm -rfv "${D}"/opt/vc/src || die
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-16 19:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-24 23:55 [gentoo-commits] repo/gentoo:master commit in: media-libs/raspberrypi-userland/, media-libs/raspberrypi-userland/files/ Andrey Utkin
  -- strict thread matches above, loose matches on Subject: below --
2021-02-16 19:26 Sam James
2017-02-12 14:34 Alfredo Tupone
2016-10-19 19:43 Alfredo Tupone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox