guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.

commit 9913dbf8aa30490c7a0efe276db3902e95f0d136
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Thu Jul 31 09:06:09 2025 +0900

    gnu: directfb: Supersede with directfb2.
    
    * gnu/packages/graphics.scm (directfb2): New variable.
    (directfb): Mark as deprecated.
    * gnu/packages/patches/directfb-davinci-glibc-228-compat.patch: Delete file.
    * gnu/packages/patches/directfb2-rpath.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
    
    Change-Id: I1d8ad72aa3beb04af742b9c341a78cf0d8f324af
---
 gnu/local.mk                                       |   2 +-
 gnu/packages/graphics.scm                          | 150 ++++++++----------
 .../directfb-davinci-glibc-228-compat.patch        |  41 -----
 gnu/packages/patches/directfb2-rpath.patch         | 168 +++++++++++++++++++++
 4 files changed, 235 insertions(+), 126 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index a78c63dd7e..5b60d9153a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1196,7 +1196,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/dfu-programmer-fix-libusb.patch         \
   %D%/packages/patches/dhclient-script-resolvconf-support.patch \
   %D%/packages/patches/dicedb-remove-init-from-config-subpkg.patch     \
-  %D%/packages/patches/directfb-davinci-glibc-228-compat.patch \
+  %D%/packages/patches/directfb2-rpath.patch                   \
   %D%/packages/patches/dkimproxy-add-ipv6-support.patch                \
   %D%/packages/patches/doc++-gcc-14.patch                      \
   %D%/packages/patches/docbook-utils-documentation-edits.patch \
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 25fe072936..d43a3e343b 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -189,92 +189,74 @@ framebuffer graphics, audio output and input event.")
     (home-page "https://github.com/hodefoting/mmm";)
     (license license:isc)))
 
-(define-public directfb
-  (package
-    (name "directfb")
-    (version "1.7.7")
-    (source
-     (origin
-       (method git-fetch)
-       (uri
-        (git-reference
-         (url "https://github.com/deniskropp/DirectFB";)
-         (commit "DIRECTFB_1_7_7")))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:configure-flags
-       '("CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-buildtime
-           ;; Remove embedded build time for reproducible builds
-           (lambda _
-             (substitute* "src/core/core.c"
-               (("..BUILDTIME..") ""))))
-         ;; TODO: Move patch to source.
-         ,@(if (target-arm32?)
-             `((add-after 'unpack 'patch-source
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (invoke "patch" "--force" "-p1" "-i"
-                           (assoc-ref inputs "patch-file")))))
-             '())
-         (add-after 'unpack 'disable-configure-during-bootstrap
-           (lambda _
-             (substitute* "autogen.sh"
-               (("^.*\\$srcdir/configure.*") "")))))))
-    (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ,@(if (target-arm32?)
-         `(("patch" ,patch)
-           ("patch-file"
-            ,(search-patch "directfb-davinci-glibc-228-compat.patch")))
-         '())))
-    (inputs
-     (list alsa-lib
-           ffmpeg
-           freetype
-           glu
-           gstreamer
-           imlib2
-           jasper
-           libjpeg-turbo
-           libcddb
-           libdrm
-           libtimidity
-           libmad
-           libmng
-           libmpeg2
-           libmpeg3
-           mesa
-           libpng
-           sdl
-           (librsvg-for-system)
-           libtiff
-           tslib
-           libvdpau
-           libvorbis
-           wayland
-           libwebp
-           libx11
-           libxcomposite
-           libxext
-           xorgproto
-           zlib))
-    (propagated-inputs
-     (list flux))
-    (synopsis "DFB Graphics Library")
-    (description "DirectFB is a graphics library which was designed with 
embedded
+(define-public directfb2
+  ;; There are no recent release nor tags. Use the latest commit available.
+  (let ((commit "2d2dbd54f72d8db4881d4e0e2800b14d84567aae")
+        (revision "0"))
+    (package
+      (name "directfb2")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+            (url "https://github.com/directfb2/DirectFB2";)
+            (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pd7hjlljprj72dbiq5fnmkf70nblyjchp1clcwk14jhbd5pniab"))
+         (patches (search-patches "directfb2-rpath.patch"))))
+      (build-system meson-build-system)
+      (arguments
+       (list ;; #:configure-flags
+             ;; #~(list (string-append "-Dc_link_args=-Wl,-rpath="
+        ;;                        #$output "/lib"))
+        #:phases #~(modify-phases %standard-phases
+                     (delete 'validate-runpath))))
+      (native-inputs (list pkg-config python-minimal))
+      (inputs
+       (list alsa-lib
+             ffmpeg
+             freetype
+             glu
+             gstreamer
+             imlib2
+             jasper
+             libjpeg-turbo
+             libcddb
+             libdrm
+             libtimidity
+             libmad
+             libmng
+             libmpeg2
+             libmpeg3
+             mesa
+             libpng
+             sdl
+             (librsvg-for-system)
+             libtiff
+             tslib
+             libvdpau
+             libvorbis
+             wayland
+             libwebp
+             libx11
+             libxcomposite
+             libxext
+             xorgproto
+             zlib))
+      (propagated-inputs
+       (list flux))
+      (synopsis "DFB Graphics Library")
+      (description "DirectFB is a graphics library which was designed with 
embedded
 systems in mind.  It offers maximum hardware accelerated performance at a
 minimum of resource usage and overhead.")
-    (home-page "https://github.com/deniskropp/DirectFB";)
-    (license license:lgpl2.1+)))
+      (home-page "https://github.com/directfb2/DirectFB2";)
+      (license license:lgpl2.1+))))
+
+(define-public directfb
+  (deprecated-package "directfb" directfb2))
 
 (define-public minifb
   (let ((commit "43f8c1309341f4709a471b592d04434326042483")
diff --git a/gnu/packages/patches/directfb-davinci-glibc-228-compat.patch 
b/gnu/packages/patches/directfb-davinci-glibc-228-compat.patch
deleted file mode 100644
index eeee337f57..0000000000
--- a/gnu/packages/patches/directfb-davinci-glibc-228-compat.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-This patch is from upstream
-
-From 3a236241bbec3f15b012b6f0dbe94353d8094557 Mon Sep 17 00:00:00 2001
-From: Andrew Childs <[email protected]>
-Date: Sat, 2 May 2020 12:36:46 +0900
-Subject: [PATCH] davinci: fix build with glibc >= 2.28
-
-From glibc 2.28 release notes:
-
-* The macros 'major', 'minor', and 'makedev' are now only available from
-  the header <sys/sysmacros.h>; not from <sys/types.h> or various other
-  headers that happen to include <sys/types.h>.  These macros are rarely
-  used, not part of POSIX nor XSI, and their names frequently collide with
-  user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for
-  further explanation.
-
-  <sys/sysmacros.h> is a GNU extension.  Portable programs that require
-  these macros should first include <sys/types.h>, and then include
-  <sys/sysmacros.h> if __GNU_LIBRARY__ is defined.
-
-https://lists.gnu.org/archive/html/info-gnu/2018-08/msg00000.html
----
- gfxdrivers/davinci/davinci_c64x.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/gfxdrivers/davinci/davinci_c64x.c 
b/gfxdrivers/davinci/davinci_c64x.c
-index 431ffdd99..351250a03 100644
---- a/gfxdrivers/davinci/davinci_c64x.c
-+++ b/gfxdrivers/davinci/davinci_c64x.c
-@@ -39,6 +39,11 @@
- #include <sys/types.h>
- #include <unistd.h>
- 
-+// Required for `makedev` in glibc >= 2.28
-+#if defined(__GNU_LIBRARY__)
-+#include <sys/sysmacros.h>
-+#endif
-+
- #include <directfb_util.h>
- 
- #include <direct/clock.h>
diff --git a/gnu/packages/patches/directfb2-rpath.patch 
b/gnu/packages/patches/directfb2-rpath.patch
new file mode 100644
index 0000000000..da27b0462e
--- /dev/null
+++ b/gnu/packages/patches/directfb2-rpath.patch
@@ -0,0 +1,168 @@
+Upstream-status: https://github.com/directfb2/DirectFB2/pull/160
+
+diff --git a/inputdrivers/linux_input/meson.build 
b/inputdrivers/linux_input/meson.build
+index 0e9c557..fc6d93a 100644
+--- a/inputdrivers/linux_input/meson.build
++++ b/inputdrivers/linux_input/meson.build
+@@ -21,7 +21,7 @@ endif
+ 
+ library('directfb_linux_input',
+         'linux_input.c',
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'inputdrivers')
+diff --git a/interfaces/ICoreResourceManager/meson.build 
b/interfaces/ICoreResourceManager/meson.build
+index 9833aa8..09fa3e7 100644
+--- a/interfaces/ICoreResourceManager/meson.build
++++ b/interfaces/ICoreResourceManager/meson.build
+@@ -16,7 +16,7 @@
+ 
+ library('icoreresourcemanager_default',
+         'icoreresourcemanager_default.c',
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'interfaces/ICoreResourceManager')
+diff --git a/interfaces/IDirectFBFont/meson.build 
b/interfaces/IDirectFBFont/meson.build
+index cb4e172..4d13411 100644
+--- a/interfaces/IDirectFBFont/meson.build
++++ b/interfaces/IDirectFBFont/meson.build
+@@ -16,7 +16,7 @@
+ 
+ library('idirectfbfont_dgiff',
+         'idirectfbfont_dgiff.c',
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'interfaces/IDirectFBFont')
+diff --git a/interfaces/IDirectFBImageProvider/meson.build 
b/interfaces/IDirectFBImageProvider/meson.build
+index 5303ca3..df7859e 100644
+--- a/interfaces/IDirectFBImageProvider/meson.build
++++ b/interfaces/IDirectFBImageProvider/meson.build
+@@ -16,7 +16,7 @@
+ 
+ library('idirectfbimageprovider_dfiff',
+         'idirectfbimageprovider_dfiff.c',
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'interfaces/IDirectFBImageProvider')
+diff --git a/interfaces/IDirectFBVideoProvider/meson.build 
b/interfaces/IDirectFBVideoProvider/meson.build
+index 0fdc8d6..f414fd3 100644
+--- a/interfaces/IDirectFBVideoProvider/meson.build
++++ b/interfaces/IDirectFBVideoProvider/meson.build
+@@ -16,7 +16,7 @@
+ 
+ library('idirectfbvideoprovider_dfvff',
+         'idirectfbvideoprovider_dfvff.c',
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'interfaces/IDirectFBVideoProvider')
+diff --git a/interfaces/IDirectFBWindows/meson.build 
b/interfaces/IDirectFBWindows/meson.build
+index 1123184..70974d5 100644
+--- a/interfaces/IDirectFBWindows/meson.build
++++ b/interfaces/IDirectFBWindows/meson.build
+@@ -16,7 +16,7 @@
+ 
+ library('idirectfbwindows_default',
+         'idirectfbwindows_default.c',
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'interfaces/IDirectFBWindows')
+diff --git a/lib/fusion/meson.build b/lib/fusion/meson.build
+index a082076..da6deb7 100644
+--- a/lib/fusion/meson.build
++++ b/lib/fusion/meson.build
+@@ -92,7 +92,7 @@ endif
+ libfusion = library('fusion-@0@.@1@'.format(directfb_major_version, 
directfb_minor_version),
+                     fusion_sources, shm_sources,
+                     include_directories: [config_inc, lib_inc],
+-                    build_rpath: get_option('prefix') / get_option('libdir'),
++                    install_rpath: get_option('prefix') / 
get_option('libdir'),
+                     dependencies: direct_dep,
+                     version: '0.@[email protected]'.format(directfb_micro_version),
+                     install: true)
+diff --git a/src/core/fluxcomp.py b/src/core/fluxcomp.py
+index 2f06ea5..b8dc96f 100755
+--- a/src/core/fluxcomp.py
++++ b/src/core/fluxcomp.py
+@@ -1,4 +1,4 @@
+-#!/bin/env python3
++#!/usr/bin/env python3
+ 
+ license = """
+ /*
+diff --git a/src/meson.build b/src/meson.build
+index abbc6c5..c4b78a9 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -190,7 +190,7 @@ libdirectfb = 
library('directfb-@0@.@1@'.format(directfb_major_version, directfb
+                       c_args: ['-DBUILDTIME="'  + run_command('date', '-u', 
'+%Y-%m-%d %H:%M',
+                                                               check: 
true).stdout().strip()                  + '"',
+                                '-DSYSCONFDIR="' + get_option('prefix') / 
get_option('sysconfdir') + '"'],
+-                      build_rpath: get_option('prefix') / 
get_option('libdir'),
++                      install_rpath: get_option('prefix') / 
get_option('libdir'),
+                       dependencies: [direct_dep, fusion_dep],
+                       version: '0.@[email protected]'.format(directfb_micro_version),
+                       install: true)
+diff --git a/systems/drmkms/meson.build b/systems/drmkms/meson.build
+index 1e9c6a7..2aa1676 100644
+--- a/systems/drmkms/meson.build
++++ b/systems/drmkms/meson.build
+@@ -32,7 +32,7 @@ drmkms_sources = [
+ 
+ library('directfb_drmkms',
+         drmkms_sources,
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: [directfb_dep, drmkms_dep],
+         install: true,
+         install_dir: moduledir / 'systems')
+diff --git a/systems/dummy/meson.build b/systems/dummy/meson.build
+index 62fd5a3..7b15875 100644
+--- a/systems/dummy/meson.build
++++ b/systems/dummy/meson.build
+@@ -20,7 +20,7 @@ dummy_sources = [
+ 
+ library('directfb_dummy',
+         dummy_sources,
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'systems')
+diff --git a/systems/fbdev/meson.build b/systems/fbdev/meson.build
+index 4825456..374fce0 100644
+--- a/systems/fbdev/meson.build
++++ b/systems/fbdev/meson.build
+@@ -31,7 +31,7 @@ fbdev_sources = [
+ 
+ library('directfb_fbdev',
+         fbdev_sources,
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'systems')
+diff --git a/wm/default/meson.build b/wm/default/meson.build
+index adbd6c0..fb817c7 100644
+--- a/wm/default/meson.build
++++ b/wm/default/meson.build
+@@ -17,7 +17,7 @@
+ library('directfbwm_default',
+         'default.c',
+         include_directories: config_inc,
+-        build_rpath: get_option('prefix') / get_option('libdir'),
++        install_rpath: get_option('prefix') / get_option('libdir'),
+         dependencies: directfb_dep,
+         install: true,
+         install_dir: moduledir / 'wm')

Reply via email to