unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 60577@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#60577] [PATCH 1/2] gnu: Add raspberrypi-userland.
Date: Thu,  5 Jan 2023 12:15:57 -0500	[thread overview]
Message-ID: <20230105171558.14088-1-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20230105171253.13825-1-maxim.cournoyer@gmail.com>

* gnu/packages/raspberry-pi.scm (raspberrypi-userland): New variable.
---

 gnu/packages/raspberry-pi.scm | 55 ++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm
index c0a2cb5bf2..12625c1cf9 100644
--- a/gnu/packages/raspberry-pi.scm
+++ b/gnu/packages/raspberry-pi.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2021 Stefan <stefan-guix@vodafonemail.de>
-;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,8 +37,10 @@ (define-module (gnu packages raspberry-pi)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages tls)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system qt)
@@ -375,6 +377,57 @@ (define-public %bcmrpi3-defconfig
    "arm64" "bcmrpi3_defconfig"
    "1bfnl4p0ddx3200dg91kmh2pln36w95y05x1asc312kixv0jgd81"))
 
+(define-public raspberrypi-userland
+  ;; There are no release nor tag; use the latest commit.
+  (let ((revision "0")
+        (commit "54fd97ae4066a10b6b02089bc769ceed328737e0"))
+    (package
+      (name "raspberrypi-userland")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/raspberrypi/userland")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "01853x2kx36vcm1wd0p20v72kw2p4xhnzp36jivh06mhma9b3h2v"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:tests? #f                     ;no test suite
+        #:configure-flags #~(list (string-append "-DVMCS_INSTALL_PREFIX="
+                                                 #$output))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'patch-paths
+              (lambda _
+                (substitute* "interface/khronos/ext/egl_khr_image_client.c"
+                  (("/opt/vc/lib/libvcsm.so")
+                   (string-append #$output "/lib/libvcsm.so")))))
+            (add-after 'unpack 'disable-hello_pi
+              (lambda _
+                ;; Do not build hello_pi, which installs 32 MiB of binaries
+                ;; and source files to src/.
+                (substitute* "host_applications/linux/CMakeLists.txt"
+                  ((".*add_subdirectory\\(apps/hello_pi).*")
+                   ""))
+                (substitute* "makefiles/cmake/vmcs.cmake"
+                  (("install.*host_applications/linux/apps/hello_pi" all)
+                   (string-append "# " all))
+                  ((".*DESTINATION \\$\\{VMCS_INSTALL_PREFIX}/src)" all)
+                   (string-append "# " all))))))))
+      (native-inputs (list pkg-config))
+      (home-page "https://github.com/raspberrypi/userland/")
+      (supported-systems (list "armhf-linux" "aarch64-linux"))
+      (synopsis "Raspberry Pi GPU-related libraries")
+      (description "This package package contains libraries to interface to
+EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, VFC and OpenVG.  It
+also provides the @command{dtmerge}, @command{dtoverlay}, @command{dtparam},
+@command{raspivid} and @command{tvservice} commands, among others.")
+      (license license:bsd-3))))
+
 (define-public rpi-imager
   (package
     (name "rpi-imager")

base-commit: 80902fc210d8dc28e14d63d68f398aef796b5838
-- 
2.38.1





  reply	other threads:[~2023-01-05 17:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 17:12 [bug#60577] [PATCH 0/2] Add rpi-fbcp and its raspberrypi-userland dependency Maxim Cournoyer
2023-01-05 17:15 ` Maxim Cournoyer [this message]
2023-01-05 17:15   ` [bug#60577] [PATCH 2/2] gnu: Add rpi-fbcp Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230105171558.14088-1-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=60577@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).