summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/raspberrypi-userland')
-rw-r--r--media-libs/raspberrypi-userland/Manifest1
-rw-r--r--media-libs/raspberrypi-userland/files/raspberrypi-userland-include.patch19
-rw-r--r--media-libs/raspberrypi-userland/files/raspberrypi-userland-libdir.patch316
-rw-r--r--media-libs/raspberrypi-userland/files/raspberrypi-userland-libfdt-static.patch22
-rw-r--r--media-libs/raspberrypi-userland/files/raspberrypi-userland-pkgconf-arm64.patch38
-rw-r--r--media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20201022.ebuild69
-rw-r--r--media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild65
7 files changed, 511 insertions, 19 deletions
diff --git a/media-libs/raspberrypi-userland/Manifest b/media-libs/raspberrypi-userland/Manifest
index 0b6aea310c4c..29025c84702d 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/raspberrypi-userland-include.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-include.patch
new file mode 100644
index 000000000000..83556be3ae46
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/raspberrypi-userland-include.patch
@@ -0,0 +1,19 @@
+diff -NrU5 1/makefiles/cmake/vmcs.cmake 2/makefiles/cmake/vmcs.cmake
+--- 1/makefiles/cmake/vmcs.cmake 2020-11-06 14:21:49.103179336 +0100
++++ 2/makefiles/cmake/vmcs.cmake 2020-11-06 17:00:57.410230948 +0100
+@@ -72,10 +72,14 @@
+ install(DIRECTORY ${vmcs_root}/interface/vctypes DESTINATION ${VMCS_INSTALL_PREFIX}/include/interface FILES_MATCHING PATTERN "*.h")
+ install(DIRECTORY ${vmcs_root}/vcinclude DESTINATION ${VMCS_INSTALL_PREFIX}/include FILES_MATCHING PATTERN "*.h")
+ install(DIRECTORY ${vmcs_root}/interface/peer DESTINATION ${VMCS_INSTALL_PREFIX}/include/interface FILES_MATCHING PATTERN "*.h")
+ install(DIRECTORY ${vmcs_root}/interface/vmcs_host DESTINATION ${VMCS_INSTALL_PREFIX}/include/interface FILES_MATCHING PATTERN "*.h" PATTERN "${vmcs_root}/interface/vmcs_host/khronos" EXCLUDE)
+
+-install(DIRECTORY ${vmcs_root}/interface/khronos/include DESTINATION ${VMCS_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.h")
++install(DIRECTORY ${vmcs_root}/interface/khronos/include DESTINATION ${VMCS_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.h"
++ PATTERN EGL EXCLUDE
++ PATTERN GLES EXCLUDE
++ PATTERN GLES2 EXCLUDE
++ PATTERN KHR EXCLUDE )
+ install(DIRECTORY ${vmcs_root}/interface/vmcs_host/khronos/IL DESTINATION ${VMCS_INSTALL_PREFIX}/include FILES_MATCHING PATTERN "*.h")
+
+ install(DIRECTORY ${vmcs_root}/host_applications/linux/libs/bcm_host/include DESTINATION ${VMCS_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.h")
+
diff --git a/media-libs/raspberrypi-userland/files/raspberrypi-userland-libdir.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-libdir.patch
new file mode 100644
index 000000000000..b1367a982321
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/raspberrypi-userland-libdir.patch
@@ -0,0 +1,316 @@
+From 9f2ba8c56e473fa05a5f216260571f4269fc16cc Mon Sep 17 00:00:00 2001
+From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
+Date: Mon, 14 Sep 2020 09:23:07 +0200
+Subject: [PATCH] Install libraries as per GNU Coding Standards
+
+Includes GNUInstallDirs and uses LIBDIR (instead of hardcoded lib)
+to install libraries.
+
+Fixes packaging on aarch64 systems where LIBDIR=lib64 (not lib).
+
+Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
+---
+ CMakeLists.txt | 4 +++-
+ containers/CMakeLists.txt | 2 +-
+ helpers/dtoverlay/CMakeLists.txt | 2 +-
+ host_applications/linux/libs/bcm_host/CMakeLists.txt | 2 +-
+ host_applications/linux/libs/debug_sym/CMakeLists.txt | 4 ++--
+ host_applications/linux/libs/sm/CMakeLists.txt | 2 +-
+ interface/khronos/CMakeLists.txt | 6 +++---
+ interface/mmal/CMakeLists.txt | 2 +-
+ interface/mmal/components/CMakeLists.txt | 2 +-
+ interface/mmal/core/CMakeLists.txt | 2 +-
+ interface/mmal/util/CMakeLists.txt | 2 +-
+ interface/mmal/vc/CMakeLists.txt | 2 +-
+ interface/vchiq_arm/CMakeLists.txt | 2 +-
+ interface/vcos/pthreads/CMakeLists.txt | 2 +-
+ interface/vmcs_host/CMakeLists.txt | 2 +-
+ middleware/openmaxil/CMakeLists.txt | 2 +-
+ pkgconfig/bcm_host.pc.in | 2 +-
+ pkgconfig/brcmegl.pc.in | 2 +-
+ pkgconfig/brcmglesv2.pc.in | 2 +-
+ pkgconfig/brcmvg.pc.in | 2 +-
+ pkgconfig/mmal.pc.in | 2 +-
+ pkgconfig/vcsm.pc.in | 2 +-
+ 22 files changed, 27 insertions(+), 25 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fe67fc87..035b16fa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,8 @@ SET(PROJECT_VER_PATCH 0)
+ SET(PROJECT_VER "${PROJECT_VER_MAJOR}.${PROJECT_VER_MINOR}.${PROJECT_VER_PATCH}")
+ SET(PROJECT_APIVER "${PROJECT_VER}")
+
++include(GNUInstallDirs)
++
+ if(ARM64)
+ set(BUILD_MMAL FALSE)
+ set(BUILD_MMAL_APPS FALSE)
+@@ -125,7 +127,7 @@ if(PKG_CONFIG_FOUND)
+ foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc)
+ configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+ endforeach()
+ endif()
+ # Remove cache entry, if one added by command line
+diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt
+index 5570038c..3578fe80 100644
+--- a/containers/CMakeLists.txt
++++ b/containers/CMakeLists.txt
+@@ -66,7 +66,7 @@ set(packetizers_SRCS ${packetizers_SRCS} ${SOURCE_DIR}/h264/avc1_packetizer.c)
+
+ add_library(containers ${LIBRARY_TYPE} ${core_SRCS} ${io_SRCS} ${net_SRCS} ${packetizers_SRCS})
+ target_link_libraries(containers vcos)
+-install(TARGETS containers DESTINATION lib)
++install(TARGETS containers DESTINATION ${LIBDIR})
+
+ set(container_readers)
+ set(container_writers)
+diff --git a/helpers/dtoverlay/CMakeLists.txt b/helpers/dtoverlay/CMakeLists.txt
+index b3bd30f1..5e1a3a4a 100644
+--- a/helpers/dtoverlay/CMakeLists.txt
++++ b/helpers/dtoverlay/CMakeLists.txt
+@@ -22,4 +22,4 @@ add_library (dtovl ${SHARED}
+
+ target_link_libraries(dtovl fdt)
+
+-install (TARGETS dtovl DESTINATION lib)
++install (TARGETS dtovl DESTINATION ${LIBDIR})
+diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
+index 2f4beb93..e18d611c 100644
+--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
++++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
+@@ -19,5 +19,5 @@ add_library(bcm_host ${SHARED} bcm_host.c)
+
+ target_link_libraries(bcm_host vcos vchostif)
+
+-install(TARGETS bcm_host DESTINATION lib)
++install(TARGETS bcm_host DESTINATION ${LIBDIR})
+
+diff --git a/host_applications/linux/libs/debug_sym/CMakeLists.txt b/host_applications/linux/libs/debug_sym/CMakeLists.txt
+index d437b995..40e0bc77 100644
+--- a/host_applications/linux/libs/debug_sym/CMakeLists.txt
++++ b/host_applications/linux/libs/debug_sym/CMakeLists.txt
+@@ -11,6 +11,6 @@ include_directories (
+ add_library(debug_sym ${SHARED} debug_sym.c)
+ add_library(debug_sym_static STATIC debug_sym.c)
+
+-install(TARGETS debug_sym DESTINATION lib)
+-install(TARGETS debug_sym_static DESTINATION lib)
++install(TARGETS debug_sym DESTINATION ${LIBDIR})
++install(TARGETS debug_sym_static DESTINATION ${LIBDIR})
+ install(FILES debug_sym.h DESTINATION include/interface/debug_sym)
+diff --git a/host_applications/linux/libs/sm/CMakeLists.txt b/host_applications/linux/libs/sm/CMakeLists.txt
+index 5ce5aca7..f85959bd 100644
+--- a/host_applications/linux/libs/sm/CMakeLists.txt
++++ b/host_applications/linux/libs/sm/CMakeLists.txt
+@@ -14,5 +14,5 @@ add_library(vcsm ${SHARED} user-vcsm.c)
+
+ target_link_libraries(vcsm vcos)
+
+-install(TARGETS vcsm DESTINATION lib)
++install(TARGETS vcsm DESTINATION ${LIBDIR})
+ install(FILES user-vcsm.h DESTINATION include/interface/vcsm)
+diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt
+index 9ad615b8..97683049 100644
+--- a/interface/khronos/CMakeLists.txt
++++ b/interface/khronos/CMakeLists.txt
+@@ -78,8 +78,8 @@ target_link_libraries(GLESv2 EGL khrn_client vcos)
+ target_link_libraries(WFC EGL)
+ target_link_libraries(OpenVG EGL)
+
+-install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION lib)
+-install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION lib)
++install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION ${LIBDIR})
++install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION ${LIBDIR})
+
+ # recommended names to use to avoid conflicts with mesa libs
+ add_library(brcmEGL ${SHARED} ${EGL_SOURCE})
+@@ -92,4 +92,4 @@ target_link_libraries(brcmGLESv2 brcmEGL khrn_client vcos)
+ target_link_libraries(brcmWFC brcmEGL)
+ target_link_libraries(brcmOpenVG brcmEGL)
+
+-install(TARGETS brcmEGL brcmGLESv2 brcmOpenVG brcmWFC DESTINATION lib)
++install(TARGETS brcmEGL brcmGLESv2 brcmOpenVG brcmWFC DESTINATION ${LIBDIR})
+diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt
+index 46f149df..544f173b 100644
+--- a/interface/mmal/CMakeLists.txt
++++ b/interface/mmal/CMakeLists.txt
+@@ -16,7 +16,7 @@ add_subdirectory(client)
+
+ target_link_libraries(mmal mmal_core mmal_util mmal_vc_client vcos mmal_components)
+
+-install(TARGETS mmal DESTINATION lib)
++install(TARGETS mmal DESTINATION ${LIBDIR})
+ install(FILES
+ mmal.h
+ mmal_buffer.h
+diff --git a/interface/mmal/components/CMakeLists.txt b/interface/mmal/components/CMakeLists.txt
+index d65fa37d..5b929098 100644
+--- a/interface/mmal/components/CMakeLists.txt
++++ b/interface/mmal/components/CMakeLists.txt
+@@ -30,5 +30,5 @@ set(container_libs ${container_libs} containers)
+ target_link_libraries(mmal_components ${container_libs} mmal_util)
+ target_link_libraries(mmal_components mmal_core)
+
+-install(TARGETS mmal_components DESTINATION lib)
++install(TARGETS mmal_components DESTINATION ${LIBDIR})
+
+diff --git a/interface/mmal/core/CMakeLists.txt b/interface/mmal/core/CMakeLists.txt
+index de0bcb25..7f1adb86 100644
+--- a/interface/mmal/core/CMakeLists.txt
++++ b/interface/mmal/core/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_library (mmal_core ${LIBRARY_TYPE}
+
+ target_link_libraries (mmal_core vcos)
+
+-install(TARGETS mmal_core DESTINATION lib)
++install(TARGETS mmal_core DESTINATION ${LIBDIR})
+ install(FILES
+ mmal_buffer_private.h
+ mmal_clock_private.h
+diff --git a/interface/mmal/util/CMakeLists.txt b/interface/mmal/util/CMakeLists.txt
+index b2a6858b..acabed6f 100644
+--- a/interface/mmal/util/CMakeLists.txt
++++ b/interface/mmal/util/CMakeLists.txt
+@@ -12,7 +12,7 @@ add_library (mmal_util ${LIBRARY_TYPE}
+
+ target_link_libraries (mmal_util vcos)
+
+-install(TARGETS mmal_util DESTINATION lib)
++install(TARGETS mmal_util DESTINATION ${LIBDIR})
+ install(FILES
+ mmal_component_wrapper.h
+ mmal_connection.h
+diff --git a/interface/mmal/vc/CMakeLists.txt b/interface/mmal/vc/CMakeLists.txt
+index d6e80db7..ecba8112 100644
+--- a/interface/mmal/vc/CMakeLists.txt
++++ b/interface/mmal/vc/CMakeLists.txt
+@@ -13,7 +13,7 @@ endif(BUILD_MMAL_APPS)
+
+ include_directories ( ../../../host_applications/linux/libs/sm )
+
+-install(TARGETS mmal_vc_client DESTINATION lib)
++install(TARGETS mmal_vc_client DESTINATION ${LIBDIR})
+ install(FILES
+ mmal_vc_api.h
+ mmal_vc_api_drm.h
+diff --git a/interface/vchiq_arm/CMakeLists.txt b/interface/vchiq_arm/CMakeLists.txt
+index 7af383de..75080655 100644
+--- a/interface/vchiq_arm/CMakeLists.txt
++++ b/interface/vchiq_arm/CMakeLists.txt
+@@ -5,7 +5,7 @@ add_library(vchiq_arm SHARED
+ # pull in VCHI cond variable emulation
+ target_link_libraries(vchiq_arm vcos)
+
+-install(TARGETS vchiq_arm DESTINATION lib)
++install(TARGETS vchiq_arm DESTINATION ${LIBDIR})
+ #install(FILES etc/10-vchiq.rules DESTINATION /etc/udev/rules.d)
+
+ include_directories(../..)
+diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt
+index 1d81ca3c..c6a80cf3 100644
+--- a/interface/vcos/pthreads/CMakeLists.txt
++++ b/interface/vcos/pthreads/CMakeLists.txt
+@@ -43,4 +43,4 @@ endif ()
+
+
+ #install(FILES ${HEADERS} DESTINATION include)
+-install(TARGETS vcos DESTINATION lib)
++install(TARGETS vcos DESTINATION ${LIBDIR})
+diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
+index cbef80c5..f61067f0 100755
+--- a/interface/vmcs_host/CMakeLists.txt
++++ b/interface/vmcs_host/CMakeLists.txt
+@@ -32,5 +32,5 @@ target_link_libraries(vchostif vchiq_arm vcos)
+
+ #target_link_libraries(bufman WFC)
+
+-install(TARGETS ${INSTALL_TARGETS} DESTINATION lib)
++install(TARGETS ${INSTALL_TARGETS} DESTINATION ${LIBDIR})
+
+diff --git a/middleware/openmaxil/CMakeLists.txt b/middleware/openmaxil/CMakeLists.txt
+index 3e9c5f9d..6b6c36a6 100644
+--- a/middleware/openmaxil/CMakeLists.txt
++++ b/middleware/openmaxil/CMakeLists.txt
+@@ -49,4 +49,4 @@ else ()
+
+ endif ()
+
+-install (TARGETS openmaxil DESTINATION lib)
++install (TARGETS openmaxil DESTINATION ${LIBDIR})
+diff --git a/pkgconfig/bcm_host.pc.in b/pkgconfig/bcm_host.pc.in
+index c7237c53..2988b42f 100644
+--- a/pkgconfig/bcm_host.pc.in
++++ b/pkgconfig/bcm_host.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: bcm_host
+diff --git a/pkgconfig/brcmegl.pc.in b/pkgconfig/brcmegl.pc.in
+index 5dd3d5b9..a45bf22a 100644
+--- a/pkgconfig/brcmegl.pc.in
++++ b/pkgconfig/brcmegl.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: brcmEGL
+diff --git a/pkgconfig/brcmglesv2.pc.in b/pkgconfig/brcmglesv2.pc.in
+index e0e36f5a..902fbf33 100644
+--- a/pkgconfig/brcmglesv2.pc.in
++++ b/pkgconfig/brcmglesv2.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: brcmGLESv2
+diff --git a/pkgconfig/brcmvg.pc.in b/pkgconfig/brcmvg.pc.in
+index 763a44b0..98489ee4 100644
+--- a/pkgconfig/brcmvg.pc.in
++++ b/pkgconfig/brcmvg.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: brcmOpenVG
+diff --git a/pkgconfig/mmal.pc.in b/pkgconfig/mmal.pc.in
+index 37d344c4..1ffa4f51 100644
+--- a/pkgconfig/mmal.pc.in
++++ b/pkgconfig/mmal.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: MMAL
+diff --git a/pkgconfig/vcsm.pc.in b/pkgconfig/vcsm.pc.in
+index b12c56fc..6f762cbf 100644
+--- a/pkgconfig/vcsm.pc.in
++++ b/pkgconfig/vcsm.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: VCSM
diff --git a/media-libs/raspberrypi-userland/files/raspberrypi-userland-libfdt-static.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-libfdt-static.patch
new file mode 100644
index 000000000000..7ba0cd0852d3
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/raspberrypi-userland-libfdt-static.patch
@@ -0,0 +1,22 @@
+From 55999626af756874012f0163718152a77b14ff51 Mon Sep 17 00:00:00 2001
+From: crabbed halo ablution
+ <17379795+crabbedhaloablution@users.noreply.github.com>
+Date: Sun, 8 Nov 2020 13:49:09 +0100
+Subject: [PATCH] Make explicit that libfdt should be built static
+
+---
+ opensrc/helpers/libfdt/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/opensrc/helpers/libfdt/CMakeLists.txt b/opensrc/helpers/libfdt/CMakeLists.txt
+index f57c61cb..fad86d32 100755
+--- a/opensrc/helpers/libfdt/CMakeLists.txt
++++ b/opensrc/helpers/libfdt/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ include_directories(.)
+
+-add_library(fdt
++add_library(fdt STATIC
+ fdt.c
+ fdt_empty_tree.c
+ fdt_ro.c
diff --git a/media-libs/raspberrypi-userland/files/raspberrypi-userland-pkgconf-arm64.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-pkgconf-arm64.patch
new file mode 100644
index 000000000000..48ccea1f6811
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/raspberrypi-userland-pkgconf-arm64.patch
@@ -0,0 +1,38 @@
+From 6d666d333f2022004fa453b28faad91021cd13d3 Mon Sep 17 00:00:00 2001
+From: crabbedhaloablution
+ <17379795+crabbedhaloablution@users.noreply.github.com>
+Date: Mon, 16 Nov 2020 13:41:12 +0100
+Subject: [PATCH] Only install .pc files for which we build a .so.
+
+Many .so files are not built on arm64, but currently we install
+the .pc files anyway. Fix by including the .pc files in the ARM64
+conditional.
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fe67fc87..8393a8bd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,9 +11,11 @@ SET(PROJECT_APIVER "${PROJECT_VER}")
+ if(ARM64)
+ set(BUILD_MMAL FALSE)
+ set(BUILD_MMAL_APPS FALSE)
++ set(PKGCONFFILES bcm_host.pc)
+ else()
+ set(BUILD_MMAL TRUE)
+ set(BUILD_MMAL_APPS TRUE)
++ set(PKGCONFFILES bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc)
+ endif()
+ set(vmcs_root ${PROJECT_SOURCE_DIR})
+ get_filename_component(VIDEOCORE_ROOT . ABSOLUTE)
+@@ -122,7 +124,7 @@ include_directories("${PROJECT_BINARY_DIR}")
+ include(FindPkgConfig QUIET)
+ if(PKG_CONFIG_FOUND)
+ # Produce a pkg-config file
+- foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc)
++ foreach(PCFILE IN LISTS PKGCONFFILES)
+ configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20201022.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20201022.ebuild
new file mode 100644
index 000000000000..9242ae883fc6
--- /dev/null
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20201022.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake flag-o-matic udev
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN/-//}.git"
+ SRC_URI=""
+else
+ #We base our versioning off Raspbian's
+ #Go to https://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-userland/
+ #Example:
+ #libraspberrypi-bin-dbgsym_2+git20201022~151804+e432bc3-1_arm64.deb
+ #"e432bc3" is the first 7 hex digits of the commit hash.
+ #Now go to https://github.com/raspberrypi/userland/commits/master and find the
+ #full hash
+ GIT_COMMIT="e432bc3400401064e2d8affa5d1454aac2cf4a00"
+ SRC_URI="https://github.com/raspberrypi/userland/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~arm ~arm64"
+ S="${WORKDIR}/userland-${GIT_COMMIT}"
+fi
+
+DESCRIPTION="Raspberry Pi userspace tools and libraries"
+HOMEPAGE="https://github.com/raspberrypi/userland"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="acct-group/video
+ !media-libs/raspberrypi-userland-bin"
+
+#Install in $(get_libdir)
+#See https://github.com/raspberrypi/userland/pull/650
+PATCHES=( "${FILESDIR}/${PN}-libdir.patch" )
+#Don't install includes that collide.
+PATCHES+=( "${FILESDIR}/${PN}-include.patch" )
+#See https://github.com/raspberrypi/userland/pull/655
+PATCHES+=( "${FILESDIR}/${PN}-libfdt-static.patch" )
+#See https://github.com/raspberrypi/userland/pull/659
+PATCHES+=( "${FILESDIR}/${PN}-pkgconf-arm64.patch" )
+
+pkg_setup() {
+ append-ldflags $(no-as-needed)
+
+ mycmakeargs=(
+ -DVMCS_INSTALL_PREFIX="/usr"
+ -DARM64=$(usex arm64 ON OFF)
+ )
+}
+
+src_prepare() {
+ cmake_src_prepare
+ sed -i \
+ -e 's:DESTINATION ${VMCS_INSTALL_PREFIX}/src:DESTINATION ${VMCS_INSTALL_PREFIX}/'"share/doc/${PF}:" \
+ "${S}/makefiles/cmake/vmcs.cmake" || die "Failed sedding makefiles/cmake/vmcs.cmake"
+ sed -i \
+ -e 's:^install(TARGETS EGL GLESv2 OpenVG WFC:install(TARGETS:' \
+ -e '/^install(TARGETS EGL_static GLESv2_static/d' \
+ "${S}/interface/khronos/CMakeLists.txt" || die "Failed sedding interface/khronos/CMakeLists.txt"
+}
+
+src_install() {
+ cmake_src_install
+ udev_dorules "${FILESDIR}/92-local-vchiq-permissions.rules"
+}
diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
index 6906bbc70397..9242ae883fc6 100644
--- a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
@@ -1,42 +1,69 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit cmake-utils flag-o-matic git-r3
+EAPI=7
+inherit cmake flag-o-matic udev
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN/-//}.git"
+ SRC_URI=""
+else
+ #We base our versioning off Raspbian's
+ #Go to https://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-userland/
+ #Example:
+ #libraspberrypi-bin-dbgsym_2+git20201022~151804+e432bc3-1_arm64.deb
+ #"e432bc3" is the first 7 hex digits of the commit hash.
+ #Now go to https://github.com/raspberrypi/userland/commits/master and find the
+ #full hash
+ GIT_COMMIT="e432bc3400401064e2d8affa5d1454aac2cf4a00"
+ SRC_URI="https://github.com/raspberrypi/userland/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~arm ~arm64"
+ S="${WORKDIR}/userland-${GIT_COMMIT}"
+fi
DESCRIPTION="Raspberry Pi userspace tools and libraries"
HOMEPAGE="https://github.com/raspberrypi/userland"
-SRC_URI=""
LICENSE="BSD"
SLOT="0"
-KEYWORDS=""
IUSE=""
DEPEND=""
-RDEPEND=""
+RDEPEND="acct-group/video
+ !media-libs/raspberrypi-userland-bin"
-EGIT_REPO_URI="https://github.com/raspberrypi/userland"
+#Install in $(get_libdir)
+#See https://github.com/raspberrypi/userland/pull/650
+PATCHES=( "${FILESDIR}/${PN}-libdir.patch" )
+#Don't install includes that collide.
+PATCHES+=( "${FILESDIR}/${PN}-include.patch" )
+#See https://github.com/raspberrypi/userland/pull/655
+PATCHES+=( "${FILESDIR}/${PN}-libfdt-static.patch" )
+#See https://github.com/raspberrypi/userland/pull/659
+PATCHES+=( "${FILESDIR}/${PN}-pkgconf-arm64.patch" )
pkg_setup() {
append-ldflags $(no-as-needed)
-}
-src_configure() {
- local mycmakeargs=(
+ mycmakeargs=(
-DVMCS_INSTALL_PREFIX="/usr"
+ -DARM64=$(usex arm64 ON OFF)
)
+}
- cmake-utils_src_configure
+src_prepare() {
+ cmake_src_prepare
+ sed -i \
+ -e 's:DESTINATION ${VMCS_INSTALL_PREFIX}/src:DESTINATION ${VMCS_INSTALL_PREFIX}/'"share/doc/${PF}:" \
+ "${S}/makefiles/cmake/vmcs.cmake" || die "Failed sedding makefiles/cmake/vmcs.cmake"
+ sed -i \
+ -e 's:^install(TARGETS EGL GLESv2 OpenVG WFC:install(TARGETS:' \
+ -e '/^install(TARGETS EGL_static GLESv2_static/d' \
+ "${S}/interface/khronos/CMakeLists.txt" || die "Failed sedding interface/khronos/CMakeLists.txt"
}
src_install() {
- cmake-utils_src_install
-
- 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}/
- rmdir "${D}"/usr/src
+ cmake_src_install
+ udev_dorules "${FILESDIR}/92-local-vchiq-permissions.rules"
}