unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: Eric Bavier <ericbavier@openmailbox.org>
Cc: guix-devel@gnu.org, Eric Bavier <bavier@member.fsf.org>
Subject: Re: [PATCH] gnu: Add NetSurf.
Date: Tue, 16 Aug 2016 10:43:22 +0300	[thread overview]
Message-ID: <87fuq5gnvp.fsf@gmail.com> (raw)
In-Reply-To: <20160816010326.391ff6de@openmailbox.org> (Eric Bavier's message of "Tue, 16 Aug 2016 01:03:26 -0500")

Eric Bavier (2016-08-16 09:03 +0300) wrote:

Impressive work on this package, thanks!

> From 3aa59b69066d8850b3f62d05020df5aae0fbded3 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Thu, 7 Jul 2016 00:55:41 -0500
> Subject: [PATCH] gnu: Add NetSurf.
>
> * gnu/packages/web.scm (netsurf): New variable.
> * gnu/packages/patches/netsurf-about.patch: New patch.
> * gnu/local.mk (dist_patch_DATA): Add it.
[...]
> +    (arguments
> +     `(#:make-flags `("CC=gcc" "BUILD_CC=gcc"
> +                      ,(string-append "PREFIX=" %output))
> +       #:parallel-build? #f         ;parallel builds not supported
> +       #:tests? #f                  ;no way to easily run from release tarball
> +       #:modules ((ice-9 rdelim)
> +                  (ice-9 match)
> +                  (srfi srfi-1)
> +                  (sxml simple)
> +                  ,@%glib-or-gtk-build-system-modules)
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           (lambda* (#:key outputs #:allow-other-keys)

'outputs' arg is not used in this phase, so it can simply be (lambda _ ...)

> +             (call-with-output-file "netsurf/Makefile.config"
> +               (lambda (port)
> +                 (format port "~
> +                         NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/~@
> +                         ")))
> +             #t))
> +         (add-after 'build 'adjust-welcome
> +           (lambda* _

Just 'lambda' (without *)

> +             ;; First, fix some unended tags and simple substitutions
> +             (substitute* "netsurf/gtk/res/welcome.html"
> +               (("<(img|input)([^>]*)>" _ tag contents)
> +                (string-append "<" tag contents " />"))
> +               (("Licence") "License") ;prefer GNU spelling
> +               ((" open source") ", free software")
> +               (("web&nbsp;site") "website")
> +               ;; Prefer privacy-respecting default search engine
> +               (("www.google.co.uk") "www.duckduckgo.com/html")
> +               (("Google Search") "DuckDuckGo Search")
> +               (("name=\"btnG\"") ""))
> +             ;; Remove default links so it doesn't seem we're endorsing them
> +             (with-atomic-file-replacement "netsurf/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-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 "netsurf/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 "netsurf/Docs/netsurf-gtk.1"
> +                             (string-append out "/share/man/man1/"))
> +               #t))))))
> +    (home-page "https://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 l:gpl2+)))

-- 
Alex

      reply	other threads:[~2016-08-16  7:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 12:59 [PATCH] gnu: Add NetSurf ericbavier
2016-08-16  6:03 ` Eric Bavier
2016-08-16  7:43   ` Alex Kost [this message]

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=87fuq5gnvp.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=bavier@member.fsf.org \
    --cc=ericbavier@openmailbox.org \
    --cc=guix-devel@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).