From patchwork Thu Sep 2 20:41:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 32524 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0752C27BBE3; Thu, 2 Sep 2021 21:42:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6BC6727BBE1 for ; Thu, 2 Sep 2021 21:42:33 +0100 (BST) Received: from localhost ([::1]:59956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLtXc-0006lB-Ir for patchwork@mira.cbaines.net; Thu, 02 Sep 2021 16:42:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLtX9-0006J9-Uu for guix-patches@gnu.org; Thu, 02 Sep 2021 16:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLtX9-0000uB-NE for guix-patches@gnu.org; Thu, 02 Sep 2021 16:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mLtX9-0005Ae-La for guix-patches@gnu.org; Thu, 02 Sep 2021 16:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48554] [PATCH wip-gnome v6 3/4] gnu: gtk+@2: Move block and inherit from gtk. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Sep 2021 20:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48554 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 48554@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 48554-submit@debbugs.gnu.org id=B48554.163061530319828 (code B ref 48554); Thu, 02 Sep 2021 20:42:03 +0000 Received: (at 48554) by debbugs.gnu.org; 2 Sep 2021 20:41:43 +0000 Received: from localhost ([127.0.0.1]:42180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLtWp-00059f-Aq for submit@debbugs.gnu.org; Thu, 02 Sep 2021 16:41:43 -0400 Received: from out1.migadu.com ([91.121.223.63]:63295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLtWg-00058t-Id for 48554@debbugs.gnu.org; Thu, 02 Sep 2021 16:41:37 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1630615294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VAgYPmw9ifGk9TZvQ2NNHjQti2jNP6iFCV+CcN/03Dk=; b=BttynYR+VHz17JozF9olfeJOQHpao5j2heHLWbwOR60cbRphyaPsI/aijqhw5ol7racL7m 91GJuqcYrkJFayUcWe4ldTywmMYhGJPFg+KTUJ5bYOQGs9QghGcFoUGAZlRpGaC2S8vbYv 7G3wXRd7auEJ2qt6EGtQxTSsJvgVKs38ssZG7OMbn7negatiQgAJb4HgzQy8pwNrsL7ih6 ywugJkf5hMu3HV29ysvydWyfdwKkipVZZUNKHCE4T/mpyk2w1jEQny5ZsqpKIqRZTBxse7 vxMNccJc8Re9TTWUaOSydOynP+NgDGyqLLzqe/WZBsxWxunj49gQfk3PGa1AfA== Date: Thu, 2 Sep 2021 16:41:27 -0400 Message-Id: <20210902204128.31675-3-rg@raghavgururajan.name> In-Reply-To: <20210902204128.31675-1-rg@raghavgururajan.name> References: <20210902204128.31675-1-rg@raghavgururajan.name> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rg@raghavgururajan.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches X-Patchwork-Original-From: Raghav Gururajan via Guix-patches via From: Raghav Gururajan X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gtk.scm (gtk+-2)[inherit]: New field. [home-page]: Remove field. [synopsis]: Remove field. [description]: Remove field. [license]: Remove field. --- gnu/packages/gtk.scm | 193 +++++++++++++++++++++---------------------- 1 file changed, 93 insertions(+), 100 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 3367a8dc6e..f83d3e3f24 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -981,106 +981,6 @@ interfaces. Offering a complete set of widgets, GTK is suitable for projects ranging from small one-off tools to complete application suites.") (license license:lgpl2.1+))) -(define-public gtk+-2 - (package - (name "gtk+") - (version "2.24.33") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc")) - (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch" - "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch" - "gtk2-theme-paths.patch")))) - (build-system gnu-build-system) - (outputs '("out" "bin" "doc")) - (propagated-inputs - `(("atk" ,atk) - ("cairo" ,cairo) - ;; SVG support is optional and requires librsvg, which pulls in rust. - ;; Rust is not supported well on every architecture yet. - ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system) - (%current-system))) - gdk-pixbuf+svg - gdk-pixbuf)) - ("glib" ,glib) - ("pango" ,pango))) - (inputs - `(("cups" ,cups) - ("libx11" ,libx11) - ("libxcomposite" ,libxcomposite) - ("libxcursor" ,libxcursor) - ("libxext" ,libxext) - ("libxdamage" ,libxdamage) - ("libxi" ,libxi) - ("libxinerama" ,libxinerama) - ("libxkbcommon" ,libxkbcommon) - ("libxrandr" ,libxrandr) - ("libxrender" ,libxrender) - ("libxshmfence" ,libxshmfence))) - (native-inputs - `(("gettext" ,gettext-minimal) - ("glib" ,glib "bin") - ("gobject-introspection" ,gobject-introspection) - ("intltool" ,intltool) - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python-wrapper" ,python-wrapper) - ("xorg-server" ,xorg-server-for-tests))) - (arguments - `(#:parallel-tests? #f - #:configure-flags - (list "--with-xinput=yes" - (string-append "--with-html-dir=" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html")) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-failing-tests - (lambda _ - (substitute* "gtk/Makefile.in" - (("aliasfilescheck\\.sh") "")) - (substitute* "gtk/tests/recentmanager.c" - (("g_test_add_func \\(\"/recent-manager.*;") "")) - (substitute* "gtk/tests/defaultvalue.c" - (("return g_test_run\\(\\);") "")) - #t)) - (add-before 'check 'pre-check - (lambda _ - ;; Tests require a running X server. - (system "Xvfb :1 +extension GLX &") - (setenv "DISPLAY" ":1") - ;; Tests write to $HOME. - (setenv "HOME" (getcwd)) - ;; Tests look for $XDG_RUNTIME_DIR. - (setenv "XDG_RUNTIME_DIR" (getcwd)) - ;; For missing '/etc/machine-id'. - (setenv "DBUS_FATAL_WARNINGS" "0") - #t)) - (add-after 'install 'remove-cache - (lambda* (#:key outputs #:allow-other-keys) - (for-each - delete-file - (find-files (assoc-ref outputs "out") "immodules.cache")) - #t))))) - (native-search-paths - (list (search-path-specification - (variable "GUIX_GTK2_PATH") - (files '("lib/gtk-2.0"))))) - (search-paths native-search-paths) - (synopsis "Cross-platform toolkit for creating graphical user interfaces") - (description - "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating -graphical user interfaces. Offering a complete set of widgets, GTK+ is -suitable for projects ranging from small one-off tools to complete -application suites.") - (license license:lgpl2.0+) - (home-page "https://www.gtk.org/"))) - (define-public gtk+ (package (inherit gtk) @@ -1217,6 +1117,99 @@ application suites.") (variable "GUIX_GTK3_PATH") (files '("lib/gtk-3.0"))))))) +(define-public gtk+-2 + (package + (inherit gtk) + (name "gtk+") + (version "2.24.33") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc")) + (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch" + "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch" + "gtk2-theme-paths.patch")))) + (build-system gnu-build-system) + (outputs '("out" "bin" "doc")) + (propagated-inputs + `(("atk" ,atk) + ("cairo" ,cairo) + ;; SVG support is optional and requires librsvg, which pulls in rust. + ;; Rust is not supported well on every architecture yet. + ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system) + (%current-system))) + gdk-pixbuf+svg + gdk-pixbuf)) + ("glib" ,glib) + ("pango" ,pango))) + (inputs + `(("cups" ,cups) + ("libx11" ,libx11) + ("libxcomposite" ,libxcomposite) + ("libxcursor" ,libxcursor) + ("libxext" ,libxext) + ("libxdamage" ,libxdamage) + ("libxi" ,libxi) + ("libxinerama" ,libxinerama) + ("libxkbcommon" ,libxkbcommon) + ("libxrandr" ,libxrandr) + ("libxrender" ,libxrender) + ("libxshmfence" ,libxshmfence))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("glib" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("intltool" ,intltool) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python-wrapper" ,python-wrapper) + ("xorg-server" ,xorg-server-for-tests))) + (arguments + `(#:parallel-tests? #f + #:configure-flags + (list "--with-xinput=yes" + (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "gtk/Makefile.in" + (("aliasfilescheck\\.sh") "")) + (substitute* "gtk/tests/recentmanager.c" + (("g_test_add_func \\(\"/recent-manager.*;") "")) + (substitute* "gtk/tests/defaultvalue.c" + (("return g_test_run\\(\\);") "")) + #t)) + (add-before 'check 'pre-check + (lambda _ + ;; Tests require a running X server. + (system "Xvfb :1 +extension GLX &") + (setenv "DISPLAY" ":1") + ;; Tests write to $HOME. + (setenv "HOME" (getcwd)) + ;; Tests look for $XDG_RUNTIME_DIR. + (setenv "XDG_RUNTIME_DIR" (getcwd)) + ;; For missing '/etc/machine-id'. + (setenv "DBUS_FATAL_WARNINGS" "0") + #t)) + (add-after 'install 'remove-cache + (lambda* (#:key outputs #:allow-other-keys) + (for-each + delete-file + (find-files (assoc-ref outputs "out") "immodules.cache")) + #t))))) + (native-search-paths + (list (search-path-specification + (variable "GUIX_GTK2_PATH") + (files '("lib/gtk-2.0"))))) + (search-paths native-search-paths))) + ;;; ;;; Guile bindings. ;;;