From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4xAL-0002mt-KF for guix-patches@gnu.org; Sun, 30 Apr 2017 18:18:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4xAI-0007ic-Bu for guix-patches@gnu.org; Sun, 30 Apr 2017 18:18:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d4xAI-0007iY-6O for guix-patches@gnu.org; Sun, 30 Apr 2017 18:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d4xAH-0004ql-Sd for guix-patches@gnu.org; Sun, 30 Apr 2017 18:18:01 -0400 Subject: bug#26713: [PATCH] gnu: Move netsurf to web-browsers.scm. Resent-Message-ID: From: Kei Kebreau References: <20170429220942.26880-1-kei@openmailbox.org> <20170430191306.GA26169@jasmine> <87shkpoehf.fsf@openmailbox.org> Date: Sun, 30 Apr 2017 18:17:30 -0400 In-Reply-To: <87shkpoehf.fsf@openmailbox.org> (Kei Kebreau's message of "Sun, 30 Apr 2017 15:57:32 -0400") Message-ID: <87o9vdo805.fsf@openmailbox.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Leo Famulari Cc: 26713@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Kei Kebreau writes: > Leo Famulari writes: > >> On Sat, Apr 29, 2017 at 06:09:42PM -0400, Kei Kebreau wrote: >>> * gnu/packages/web.scm: Move netsurf... >>> * gnu/packages/web-browsers.scm: ...here. >> >> This caused building Guix to fail because the glib-or-gtk build-system >> module was not imported in (gnu packages web-browsers). >> > > Oh no! :( > >> I planned to add that module in a followup commit, but I realized that >> several other variables from (gnu packages web) need to be imported in >> (gnu packages web-browsers) along with this change, and I decided to >> revert the change for now. >> >> Can you take another look at moving this package? > > Will do. I'll have to adjust the qutebrowser patch for corrections to > this one. Try the attached patch. I'm not sure that copying the definition of netsurf-buildsystem is the best way to handle the move, but I'm not sure this is worth making netsurf-buildsystem a publicly-defined package. Thoughts? --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Move-netsurf-to-web-browsers.scm.patch Content-Transfer-Encoding: quoted-printable From=2077be2770f571ac7e76783701eb44323cc33cf92a Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Sat, 29 Apr 2017 18:08:25 -0400 Subject: [PATCH] gnu: Move netsurf to web-browsers.scm. To: guix-patches@gnu.org * gnu/packages/web.scm: Move netsurf... * gnu/packages/web-browsers.scm: ...here. (netsurf-buildsystem): Copy defintion from web.scm to web-browsers.scm. =2D-- gnu/packages/web-browsers.scm | 122 ++++++++++++++++++++++++++++++++++++++= ++++ gnu/packages/web.scm | 116 --------------------------------------- 2 files changed, 122 insertions(+), 116 deletions(-) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 3ff69611b..fe971de91 100644 =2D-- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -1,4 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2016 Efraim Flashner ;;; Copyright =C2=A9 2016 Kei Kebreau ;;; ;;; This file is part of GNU Guix. @@ -20,13 +21,20 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages) + #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages curl) #:use-module (gnu packages fltk) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gtk) + #:use-module (gnu packages image) + #:use-module (gnu packages libidn) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages image) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) + #:use-module (gnu packages web) #:use-module (gnu packages xorg) #:use-module (guix download) #:use-module (guix build-system gnu)) @@ -61,3 +69,117 @@ older or slower computers and embedded systems.") (home-page "http://www.dillo.org") (license license:gpl3+))) + +(define-public netsurf + (package + (name "netsurf") + (version "3.6") + (source + (origin + (method url-fetch) + (uri (string-append "http://download.netsurf-browser.org/netsurf/" + "releases/source/netsurf-" version "-src.tar.gz= ")) + (sha256 + (base32 + "174sjx0566agckwmlj4w2cip5qbxdiafyhlp185a1qprxx84pbjr")) + (patches (search-patches "netsurf-system-utf8proc.patch" + "netsurf-y2038-tests.patch" + "netsurf-longer-test-timeout.patch")))) + (build-system glib-or-gtk-build-system) + (native-inputs + `(("netsurf-buildsystem" ,netsurf-buildsystem) + ("nsgenbind" ,nsgenbind) + ("libidn" ,libidn) ;only for tests + ("check" ,check) + ("perl" ,perl) + ("perl-html-parser" ,perl-html-parser) + ("pkg-config" ,pkg-config))) + (inputs + `(("curl" ,curl) + ("gtk+" ,gtk+-2) + ("openssl" ,openssl) + ("utf8proc" ,utf8proc) + ("libpng" ,libpng) + ("libjpeg" ,libjpeg) + ("libcss" ,libcss) + ("libdom" ,libdom) + ("libnsbmp" ,libnsbmp) + ("libnsgif" ,libnsgif) + ("libnspsl" ,libnspsl) + ("libnsutils" ,libnsutils) + ("libsvgtiny" ,libsvgtiny) + ("miscfiles" ,miscfiles))) + (arguments + `(#:make-flags `("CC=3Dgcc" "BUILD_CC=3Dgcc" + ,(string-append "PREFIX=3D" %output) + ,(string-append "NSSHARED=3D" + (assoc-ref %build-inputs + "netsurf-buildsystem") + "/share/netsurf-buildsystem")) + #:test-target "test" + #:modules ((ice-9 rdelim) + (ice-9 match) + (srfi srfi-1) + (sxml simple) + ,@%glib-or-gtk-build-system-modules) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'build 'adjust-welcome + (lambda _ + ;; First, fix some unended tags and simple substitutions + (substitute* "frontends/gtk/res/welcome.html" + (("<(img|input)([^>]*)>" _ tag contents) + (string-append "<" tag contents " />")) + (("Licence") "License") ;prefer GNU spelling + ((" open source") ", free software") + (("web site") "website") + ;; Prefer privacy-respecting default search engine + (("www.google.co.uk") "www.duckduckgo.com/html") + (("Google Search") "DuckDuckGo Search") + (("name=3D\"btnG\"") "")) + ;; Remove default links so it doesn't seem we're endorsing th= em + (with-atomic-file-replacement "frontends/gtk/res/welcome.html" + (lambda (in out) + ;; Leave the DOCTYPE header as is + (display (read-line in 'concat) out) + (sxml->xml + (let rec ((sxml (xml->sxml in))) + ;; We'd like to use sxml-match here, but it can't + ;; match against generic tag symbols... + (match sxml + (`(div (@ (class "links")) . ,rest) + '()) + ((x ...) + (map rec x)) + (x x))) + out))) + #t)) + (add-before 'check 'patch-check + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("test/bloom.c" "test/hashtable.c") + (("/usr/share/dict/words") + (string-append (assoc-ref inputs "miscfiles") "/share/web2= "))) + #t)) + (add-after 'install 'install-more + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (desktop (string-append out "/share/applications/" + "netsurf.desktop"))) + (mkdir-p (dirname desktop)) + (copy-file "frontends/gtk/res/netsurf-gtk.desktop" + desktop) + (substitute* desktop + (("netsurf-gtk") (string-append out "/bin/netsurf")) + (("netsurf.png") (string-append out "/share/netsurf/" + "netsurf.xpm"))) + (install-file "Docs/netsurf-gtk.1" + (string-append out "/share/man/man1/")) + #t)))))) + (home-page "http://www.netsurf-browser.org") + (synopsis "Web browser") + (description + "NetSurf is a lightweight web browser that has its own layout and +rendering engine entirely written from scratch. It is small and capable of +handling many of the web standards in use today.") + (license license:gpl2+))) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 487366b4a..6a4489508 100644 =2D-- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -69,10 +69,8 @@ #:use-module (gnu packages gnu-doc) #:use-module (gnu packages gnupg) #:use-module (gnu packages gperf) =2D #:use-module (gnu packages gtk) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) =2D #:use-module (gnu packages libidn) #:use-module (gnu packages lua) #:use-module (gnu packages ncurses) #:use-module (gnu packages base) @@ -4101,120 +4099,6 @@ Public Suffix List. It is developed as part of the= NetSurf project.") w3c webidl files and a binding configuration file.") (license l:expat))) =20 =2D(define-public netsurf =2D (package =2D (name "netsurf") =2D (version "3.6") =2D (source =2D (origin =2D (method url-fetch) =2D (uri (string-append "http://download.netsurf-browser.org/netsurf/" =2D "releases/source/netsurf-" version "-src.tar.= gz")) =2D (sha256 =2D (base32 =2D "174sjx0566agckwmlj4w2cip5qbxdiafyhlp185a1qprxx84pbjr")) =2D (patches (search-patches "netsurf-system-utf8proc.patch" =2D "netsurf-y2038-tests.patch" =2D "netsurf-longer-test-timeout.patch")))) =2D (build-system glib-or-gtk-build-system) =2D (native-inputs =2D `(("netsurf-buildsystem" ,netsurf-buildsystem) =2D ("nsgenbind" ,nsgenbind) =2D ("libidn" ,libidn) ;only for tests =2D ("check" ,check) =2D ("perl" ,perl) =2D ("perl-html-parser" ,perl-html-parser) =2D ("pkg-config" ,pkg-config))) =2D (inputs =2D `(("curl" ,curl) =2D ("gtk+" ,gtk+-2) =2D ("openssl" ,openssl) =2D ("utf8proc" ,utf8proc) =2D ("libpng" ,libpng) =2D ("libjpeg" ,libjpeg) =2D ("libcss" ,libcss) =2D ("libdom" ,libdom) =2D ("libnsbmp" ,libnsbmp) =2D ("libnsgif" ,libnsgif) =2D ("libnspsl" ,libnspsl) =2D ("libnsutils" ,libnsutils) =2D ("libsvgtiny" ,libsvgtiny) =2D ("miscfiles" ,miscfiles))) =2D (arguments =2D `(#:make-flags `("CC=3Dgcc" "BUILD_CC=3Dgcc" =2D ,(string-append "PREFIX=3D" %output) =2D ,(string-append "NSSHARED=3D" =2D (assoc-ref %build-inputs =2D "netsurf-buildsystem") =2D "/share/netsurf-buildsystem")) =2D #:test-target "test" =2D #:modules ((ice-9 rdelim) =2D (ice-9 match) =2D (srfi srfi-1) =2D (sxml simple) =2D ,@%glib-or-gtk-build-system-modules) =2D #:phases =2D (modify-phases %standard-phases =2D (delete 'configure) =2D (add-after 'build 'adjust-welcome =2D (lambda _ =2D ;; First, fix some unended tags and simple substitutions =2D (substitute* "frontends/gtk/res/welcome.html" =2D (("<(img|input)([^>]*)>" _ tag contents) =2D (string-append "<" tag contents " />")) =2D (("Licence") "License") ;prefer GNU spelling =2D ((" open source") ", free software") =2D (("web site") "website") =2D ;; Prefer privacy-respecting default search engine =2D (("www.google.co.uk") "www.duckduckgo.com/html") =2D (("Google Search") "DuckDuckGo Search") =2D (("name=3D\"btnG\"") "")) =2D ;; Remove default links so it doesn't seem we're endorsing = them =2D (with-atomic-file-replacement "frontends/gtk/res/welcome.ht= ml" =2D (lambda (in out) =2D ;; Leave the DOCTYPE header as is =2D (display (read-line in 'concat) out) =2D (sxml->xml =2D (let rec ((sxml (xml->sxml in))) =2D ;; We'd like to use sxml-match here, but it can't =2D ;; match against generic tag symbols... =2D (match sxml =2D (`(div (@ (class "links")) . ,rest) =2D '()) =2D ((x ...) =2D (map rec x)) =2D (x x))) =2D out))) =2D #t)) =2D (add-before 'check 'patch-check =2D (lambda* (#:key inputs #:allow-other-keys) =2D (substitute* '("test/bloom.c" "test/hashtable.c") =2D (("/usr/share/dict/words") =2D (string-append (assoc-ref inputs "miscfiles") "/share/we= b2"))) =2D #t)) =2D (add-after 'install 'install-more =2D (lambda* (#:key outputs #:allow-other-keys) =2D (let* ((out (assoc-ref outputs "out")) =2D (desktop (string-append out "/share/applications/" =2D "netsurf.desktop"))) =2D (mkdir-p (dirname desktop)) =2D (copy-file "frontends/gtk/res/netsurf-gtk.desktop" =2D desktop) =2D (substitute* desktop =2D (("netsurf-gtk") (string-append out "/bin/netsurf")) =2D (("netsurf.png") (string-append out "/share/netsurf/" =2D "netsurf.xpm"))) =2D (install-file "Docs/netsurf-gtk.1" =2D (string-append out "/share/man/man1/")) =2D #t)))))) =2D (home-page "http://www.netsurf-browser.org") =2D (synopsis "Web browser") =2D (description =2D "NetSurf is a lightweight web browser that has its own layout and =2Drendering engine entirely written from scratch. It is small and capable= of =2Dhandling many of the web standards in use today.") =2D (license l:gpl2+))) =2D (define-public surfraw (package (name "surfraw") =2D-=20 2.12.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlkGYnoACgkQ5qXuPBlG eg1IBg/+J1dGH/FdsNWrSf2696KMsvrsDoby864uILZBqcF9A/VqQKpKw9bRX3ZE wpR+ouUxqGHs1XF3Jua38GRJf0OlZSw6URNBcxkkcIg3TSHSUGc6PV5rprxH9Qi2 p041lyFS0c7eVM1K617bhcVT/VG/V4BAlpZZKEv+93Ev1/zIQYDAkviRxi1BDRRi lIw7Yd2XhzJ+zoL6nwJVlx1eYriwxtww7ehS+lOB3/CtvBZH5G/3wbTMGKFfA7Q8 0ab73Pee96D3RL3QVdk0vzCBxPWd3l830BVfqy8HFiHmjXxv4WTK+fHpzbmXViIX DR9jhDFwfuqsdo897qXBRP7VVJ3TmqZF+VO9X3iNJXbLDYIlunipH3db4atUBpUt tgvoFdf8aluNRfLCNc5HfGMXEJ3PZSLieQLveo4Zkc6j2uOCgg+x3L3HDRlJPAUU 3VXqiqWC1gT28N0hIlaLsi+Ynja+FMk/EfipihvE97zhFLf2KO3Ax8sfQXE5vvUh cgIpbSBjHmYv05RMTmEJQbsWckkLzXOpbnJUV8qvhXo29pgyx5UCOBhAreMBvv4d 3Q/rWnGzehvijoOs3PToONBJ+C9p9MHhselT4UgADAGXPn3miZbJmign+2zOUq+I egcvmDxpQM1bkrJwKweXZ+CooBK1jMie/q8NYUuUP+R3AYDnaXU= =CLu+ -----END PGP SIGNATURE----- --==-=-=--