[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HELP] Packaging mupdf
From: |
Ricardo Wurmus |
Subject: |
Re: [HELP] Packaging mupdf |
Date: |
Sun, 03 Mar 2019 15:30:11 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
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