unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Pierre-Henry F." <contact@phfrohring.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: [HELP] Packaging mupdf
Date: Sun, 03 Mar 2019 15:30:11 +0100	[thread overview]
Message-ID: <87h8ckvxn0.fsf@elephly.net> (raw)
In-Reply-To: <jtusmklkHyRyLibZD10kE2kNIyWZ4Vf4dSLkeuT6-6Nuom6fTFkGa-EPHIgcCT6mzbQ9KmtDOt5o4R6rR-JYlBMjteMJ10oXClyHnZ-wANE=@phfrohring.com>


Hi Pierre-Henry,

the mupdf release tarball includes the freeglut sources.  We can reuse
the mupdf package’s “source” field and add a build phase after 'unpack
to change directories.

Here’s how (untested):

--8<---------------cut here---------------start------------->8---
(define freeglut-for-mupdf
  (package
    (inherit freeglut)
    (source (origin
              (method url-fetch)
              (uri (string-append "https://mupdf.com/downloads/archive/"
                                  name "-" version "-source.tar.xz"))
              (sha256
               (base32
                "1psnz02w5p7wc1s1ma7vvjmkjfy641xvsh9ykaqzkk84dflnjgk0"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  (for-each
                   (lambda (dir)
                     (delete-file-recursively (string-append "thirdparty/" dir)))
                   '("curl" "freetype" "harfbuzz" "jbig2dec" "lcms2"
                     "libjpeg" "mujs" "openjpeg" "zlib"))
                  #t))))
    (arguments
     '(#:tests? #f ; there are none
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'chdir
           (lambda _ (chdir "thirdparty/freeglut") #t)))))))
--8<---------------cut here---------------end--------------->8---

Hope that helps!

--
Ricardo

  reply	other threads:[~2019-03-03 14:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02 20:15 [HELP] Packaging mupdf Pierre-Henry F.
2019-03-02 22:15 ` Ricardo Wurmus
2019-03-03  8:52   ` Pierre-Henry F.
2019-03-03 14:30     ` Ricardo Wurmus [this message]
2019-03-04 17:09       ` Pierre-Henry F.

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=87h8ckvxn0.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=contact@phfrohring.com \
    --cc=help-guix@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.
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).