From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 58014@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#58014] [PATCH 02/15] gnu: tigervnc-server: Move source production into origin snippet.
Date: Fri, 23 Sep 2022 01:00:29 -0400 [thread overview]
Message-ID: <20220923050042.29893-2-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20220923050042.29893-1-maxim.cournoyer@gmail.com>
This will make it possible to patch command references in source files, and
also makes it more transparent as to what sources get used.
* gnu/packages/vnc.scm (tigervnc-server): Re-flow comment.
[source]: Inherit from xorg-server. Add a snippet. Use a patch to apply the
xserver patch. Fix file name.
[phases]{copy-tvnc-xserver, patch-xserver}: Delete phases.
{build-tigervnc, install-tigervnc-aux}: Adjust accordingly.
---
gnu/packages/vnc.scm | 70 ++++++++++++++++++++++++++------------------
1 file changed, 42 insertions(+), 28 deletions(-)
diff --git a/gnu/packages/vnc.scm b/gnu/packages/vnc.scm
index 18244b3334..e06dbcceb9 100644
--- a/gnu/packages/vnc.scm
+++ b/gnu/packages/vnc.scm
@@ -210,20 +210,49 @@ (define-public tigervnc-client
(define %tigervnc-client-source (package-source tigervnc-client))
-;; A VNC server is, in fact, an X server so it seems like a good idea
-;; to build on the work already done for xorg-server package. This is
-;; not entirely compatible with the recommendation in BUILDING.txt
-;; where the client is built first, then the source code of the X
-;; server is copied into a subdir of the build directory, patched with
-;; VNC additions and then build and installed as Xvnc. The procedure
-;; was turned around, where TigerVNC code is downloaded and built
-;; inside the Guix X server build dir. Also, the VNC patching process
-;; for the X server is automated in a straightforward manner.
+;; A VNC server is, in fact, an X server so it seems like a good idea to build
+;; on the work already done for xorg-server package. This is not entirely
+;; compatible with the recommendation in BUILDING.txt where the client is
+;; built first, then the source code of the X server is copied into a subdir
+;; of the build directory, patched with VNC additions and then build and
+;; installed as Xvnc. The procedure was turned around, where TigerVNC code is
+;; downloaded and built inside the Guix X server build dir. Also, the VNC
+;; patching process for the X server is automated in a straightforward manner.
(define-public tigervnc-server
(package
(inherit xorg-server)
(name "tigervnc-server")
(version (package-version tigervnc-client))
+ (source
+ (origin
+ (inherit (package-source xorg-server))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Copy the VNC extension into the xorg-server sources.
+ (copy-recursively #$(file-append %tigervnc-client-source
+ "/unix/xserver")
+ ".")
+ ;; Include a full copy of tigervnc-client sources, so that the
+ ;; complete sources involved are available and can be edited during
+ ;; the build.
+ (copy-recursively #$%tigervnc-client-source "tigervnc-client")
+ ;; Adjust the VNC extension build system files so that it refers
+ ;; to it.
+ (substitute* "hw/vnc/Makefile.am"
+ (("(TIGERVNC_SRCDIR=).*" _ head)
+ (string-append head "$(CURDIR)/../../tigervnc-client\n"))
+ (("(TIGERVNC_BUILDDIR=).*" _ head)
+ (string-append head
+ "$(CURDIR)/../../tigervnc-client/build\n")))
+ ;; Ensure the Autotools build system gets re-bootstrapped.
+ (delete-file "configure")))
+ ;; Patch the xorg-server build system so that it builds the VNC
+ ;; extension.
+ (patches (cons (file-append %tigervnc-client-source
+ "/unix/xserver21.1.1.patch")
+ (origin-patches (package-source xorg-server))))
+ (file-name (string-append name "-" version ".tar.xz"))))
(arguments
(substitute-keyword-arguments
(package-arguments xorg-server)
@@ -254,28 +283,13 @@ (define-public tigervnc-server
((#:phases phases)
#~(modify-phases #$phases
(delete 'check) ;no test suite
- (add-after 'unpack 'copy-tvnc-xserver
- (lambda* (#:key inputs #:allow-other-keys)
- (copy-recursively (search-input-directory inputs "unix/xserver")
- ".")
- ;; Adjust Makefile variables default values to simplify usage.
- (substitute* "hw/vnc/Makefile.am"
- (("(TIGERVNC_SRCDIR=).*" _ head)
- (string-append head #$%tigervnc-client-source "\n"))
- (("(TIGERVNC_BUILDDIR=).*" _ head)
- (string-append head (getcwd) "/tigervnc-build\n")))))
- (add-after 'copy-tvnc-xserver 'patch-xserver
- (lambda* (#:key inputs #:allow-other-keys)
- (invoke "patch" "-p1" "-i"
- (search-input-file inputs "unix/xserver21.1.1.patch"))
- (invoke "autoreconf" "-fiv")))
(add-before 'build 'build-tigervnc
(lambda* (#:key parallel-build? #:allow-other-keys)
- (mkdir-p "tigervnc-build")
- (with-directory-excursion "tigervnc-build"
+ (mkdir-p "tigervnc-client/build")
+ (with-directory-excursion "tigervnc-client/build"
(invoke "cmake" "-G" "Unix Makefiles"
(string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
- #$%tigervnc-client-source)
+ "..")
(invoke "make" "-j" (number->string (if parallel-build?
(parallel-job-count)
1))))))
@@ -286,7 +300,7 @@ (define-public tigervnc-server
1)))))
(add-before 'install 'install-tigervnc-aux
(lambda _
- (invoke "make" "-C" "tigervnc-build/unix" "install")))
+ (invoke "make" "-C" "tigervnc-client/build/unix" "install")))
(replace 'install
(lambda _
(invoke "make" "install")))))))
--
2.37.3
next prev parent reply other threads:[~2022-09-23 5:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 4:58 [bug#58014] [PATCH 00/15] Add xvnc-service-type Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 01/15] gnu: tigervnc-server: Use new style inputs, gexps Maxim Cournoyer
2022-09-23 5:00 ` Maxim Cournoyer [this message]
2022-09-23 5:00 ` [bug#58014] [PATCH 03/15] gnu: tigervnc-server: Adjust PAM config Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 04/15] gnu: tigervnc-server: Disable tests via #:tests? Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 05/15] gnu: tigervnc-server: Patch and wrap vncserver script Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 06/15] gnu: gdm: Patch an extra reference to the Xsession script Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 07/15] services: gdm: Add a configuration field to enable XDMCP Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 08/15] marionette: Make marionette-screen-text private Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 09/15] marionette: Preserve screen dumps on failures Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 10/15] marionette: Define keystrokes for typing colons and exclamation marks Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 11/15] marionette: Add a callback arguments to wait-for-screen-text Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 12/15] gnu: dconf: Set sysconfdir to /etc Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 13/15] services: Add dconf-service-type Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 14/15] services: xorg: Add auto-suspend? field to <gdm-configuration> Maxim Cournoyer
2022-09-23 5:00 ` [bug#58014] [PATCH 15/15] services: Add xvnc-service-type 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220923050042.29893-2-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=58014@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.