summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2015-03-17 13:03:30 +0000
committerAlfredo Tupone <tupone@gentoo.org>2015-03-17 13:03:30 +0000
commit25e26415205a5426be02eea92233528e12161cf7 (patch)
tree9f16732ca4b391aebe6854b958a21f590da699bd
parentVersion bump with some bugfixes, thanks Tony Murray <tonymurray@fastmail.fm> ... (diff)
downloadgentoo-2-25e26415205a5426be02eea92233528e12161cf7.tar.gz
gentoo-2-25e26415205a5426be02eea92233528e12161cf7.tar.bz2
gentoo-2-25e26415205a5426be02eea92233528e12161cf7.zip
Build from source and deployed on /usr tree
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0145142D)
-rw-r--r--media-libs/raspberrypi-userland/ChangeLog9
-rw-r--r--media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch81
-rw-r--r--media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild72
3 files changed, 117 insertions, 45 deletions
diff --git a/media-libs/raspberrypi-userland/ChangeLog b/media-libs/raspberrypi-userland/ChangeLog
index f332ca2f9e32..35d40d264b2c 100644
--- a/media-libs/raspberrypi-userland/ChangeLog
+++ b/media-libs/raspberrypi-userland/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/raspberrypi-userland
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/raspberrypi-userland/ChangeLog,v 1.6 2014/09/03 22:28:11 chithanh Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/raspberrypi-userland/ChangeLog,v 1.7 2015/03/17 13:03:30 tupone Exp $
+
+ 17 Mar 2015; Tupone Alfredo <tupone@gentoo.org>
+ raspberrypi-userland-9999.ebuild,
+ +files/raspberrypi-userland-9999-gentoo.patch:
+ Build from source and deployed on canonical tree /usr
*raspberrypi-userland-0_pre20140830 (03 Sep 2014)
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 000000000000..dc74ca0a50f3
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
@@ -0,0 +1,81 @@
+--- 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__)
+--- interface/vchiq_arm/vchiq_test.c.old 2015-02-20 20:52:15.202983349 +0100
++++ interface/vchiq_arm/vchiq_test.c 2015-02-20 20:53:34.401882346 +0100
+@@ -130,6 +130,7 @@
+ #ifdef __linux__
+
+ #include <fcntl.h>
++#include <sys/ioctl.h>
+ #include "interface/vmcs_host/vc_cma.h"
+
+ static void reserve_test(int reserve, int delay)
+@@ -1311,6 +1312,7 @@
+ clnt_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header,
+ VCHIQ_SERVICE_HANDLE_T service, void *bulk_userdata)
+ {
++ int data;
+ vcos_mutex_lock(&g_mutex);
+ if (reason == VCHIQ_MESSAGE_AVAILABLE)
+ {
+@@ -1318,7 +1320,7 @@
+ vchiq_release_message(service, header);
+ else
+ /* Responses of length 0 are not sync points */
+- if ((header->size >= 4) && (*(int *)header->data == MSG_ECHO))
++ if ((header->size >= 4) && (memcpy(&data, header->data, sizeof(data)), data == MSG_ECHO))
+ {
+ /* This is a complete echoed packet */
+ if (g_params.verify && (mem_check(header->data, bulk_tx_data[ctrl_received % NUM_BULK_BUFS], g_params.blocksize) != 0))
+--- interface/vchiq_arm/CMakeLists.txt.old 2015-02-20 21:23:05.736777755 +0100
++++ interface/vchiq_arm/CMakeLists.txt 2015-02-20 21:24:11.335832941 +0100
+@@ -3,7 +3,7 @@
+ vchiq_lib.c vchiq_util.c)
+
+ # pull in VCHI cond variable emulation
+-target_link_libraries(vchiq_arm)
++target_link_libraries(vchiq_arm vcos)
+
+ install(TARGETS vchiq_arm DESTINATION lib)
+ #install(FILES etc/10-vchiq.rules DESTINATION /etc/udev/rules.d)
+--- makefiles/cmake/vmcs.cmake.old 2015-02-21 14:31:57.608527445 +0100
++++ makefiles/cmake/vmcs.cmake 2015-02-21 14:32:09.358363958 +0100
+@@ -10,7 +10,7 @@
+ if (ANDROID)
+ SET(VMCS_INSTALL_PREFIX "/vendor/brcm/islands" CACHE PATH "Prefix prepended to install directories" FORCE)
+ else()
+- SET(VMCS_INSTALL_PREFIX "/opt/vc" CACHE PATH "Prefix prepended to install directories" FORCE)
++ SET(VMCS_INSTALL_PREFIX "/usr" CACHE PATH "Prefix prepended to install directories" FORCE)
+ endif()
+
+ SET(CMAKE_INSTALL_PREFIX "${VMCS_INSTALL_PREFIX}" CACHE INTERNAL "Prefix
+--- interface/vmcs_host/vcilcs_out.c.old 2015-02-24 06:57:20.977771332 +0100
++++ interface/vmcs_host/vcilcs_out.c 2015-02-24 06:59:34.735428061 +0100
+@@ -37,6 +37,7 @@
+ #include "interface/vmcs_host/vc_ilcs_defs.h"
+ #include "interface/vmcs_host/vcilcs.h"
+ #include "interface/vmcs_host/vcilcs_common.h"
++#include "interface/vcos/vcos_dlfcn.h"
+
+ static VC_PRIVATE_PORT_T *find_port(VC_PRIVATE_COMPONENT_T *comp, OMX_U32 nPortIndex)
+ {
+--- interface/khronos/common/linux/khrn_client_rpc_linux.c.old 2015-02-24 06:56:24.458761962 +0100
++++ interface/khronos/common/linux/khrn_client_rpc_linux.c 2015-02-24 07:02:41.522158412 +0100
+@@ -503,7 +503,8 @@
+ void rpc_call8_makecurrent(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)
+ {
+- if (thread->merge_pos == CLIENT_MAKE_CURRENT_SIZE && *((uint32_t *)thread->merge_buffer) == EGLINTMAKECURRENT_ID)
++ uint32_t data;
++ if (thread->merge_pos == CLIENT_MAKE_CURRENT_SIZE && (memcpy(&data,thread->merge_buffer,sizeof(data)), data == EGLINTMAKECURRENT_ID))
+ {
+ rpc_begin(thread);
+ vcos_log_trace("rpc_call8_makecurrent collapse onto previous makecurrent");
diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
index 2193bd3eef0f..aa421d745a11 100644
--- a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
@@ -1,61 +1,47 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild,v 1.2 2013/07/13 17:13:52 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild,v 1.3 2015/03/17 13:03:30 tupone Exp $
EAPI=5
-
-inherit cmake-utils
+inherit cmake-utils git-r3
DESCRIPTION="Raspberry Pi userspace tools and libraries"
HOMEPAGE="https://github.com/raspberrypi/userland"
-
-if [[ ${PV} == 9999* ]]; then
- inherit git-2
- EGIT_REPO_URI="git://github.com/${PN/-//}.git"
- SRC_URI=""
- KEYWORDS=""
-else
- SRC_URI="mirror://gentoo/${P}.tar.xz"
- KEYWORDS="~arm"
-fi
+SRC_URI=""
LICENSE="BSD"
SLOT="0"
+KEYWORDS=""
+IUSE=""
-# 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
- mv userland-*/ ${P}/ || die
- fi
-}
+DEPEND=""
+RDEPEND=""
-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
-}
+EGIT_REPO_URI="https://github.com/raspberrypi/userland"
-src_configure() {
- # toolchain file not needed, but build fails if it is not specified
- local mycmakeargs="-DCMAKE_TOOLCHAIN_FILE=/dev/null"
- cmake-utils_src_configure
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
}
src_install() {
cmake-utils_src_install
- doenvd "${FILESDIR}"/04${PN}
-
- # 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
+ 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
+
+ dodir /usr/share/doc/${PF}
+ mv "${D}"/usr/src/hello_pi "${D}"/usr/share/doc/${PF}/
+ rmdir "${D}"/usr/src
}