From: "Pierre-Henry F." <contact@phfrohring.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: "help-guix\\@gnu.org" <help-guix@gnu.org>
Subject: Re: [HELP] Packaging mupdf
Date: Mon, 04 Mar 2019 17:09:58 +0000 [thread overview]
Message-ID: <dbT0eyEgWJehWrvjmfgFu3wnaOHg-oKLM8JtberlkVptpyhUIAIcEDbWGJg5ywH_sXn2Zm7dADPCYqCj-L0z50tPqdGuBQWpaI1gkjqteZ0=@phfrohring.com> (raw)
In-Reply-To: <87h8ckvxn0.fsf@elephly.net>
Hi Ricardo,
With your help and a little of headbanging, it finally works !
Here are the relevant parts of the code.
I wrote my journey too, if it's of any help, I will gladly send it here.
Best,
PH
freeGLUT:
(define-module (freeglut-for-mupdf)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (gnu packages gl))
(define-public freeglut-for-mupdf
(package
(inherit freeglut)
(name "freeglut-for-mupdf")
(version "1.14.0")
(source (origin
(method url-fetch)
(uri (string-append "https://mupdf.com/downloads/archive/mupdf-" version "-source.tar.gz"))
(sha256
(base32
"093p7lv6pgyymagn28n58fs0np928r0i5p2az9cc4gwccwx4hhy4"))
(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)))))))
mupdf:
(define-module (my-mupdf)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (freeglut-for-mupdf)
#:use-module (gnu packages pdf)
#:use-module (gnu packages curl)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages xorg)
#:use-module (gnu packages javascript)
#:use-module (gnu packages tls)
#:use-module (gnu packages compression))
(define-public my-mupdf
(package
(inherit mupdf)
(name "my-mupdf")
(inputs
`(("curl" ,curl)
("freeglut" ,freeglut-for-mupdf)
("freetype" ,freetype)
("harfbuzz" ,harfbuzz)
("jbig2dec" ,jbig2dec)
("libjpeg" ,libjpeg)
("libx11" ,libx11)
("libxext" ,libxext)
("mujs" ,mujs)
("openjpeg" ,openjpeg)
("openssl" ,openssl)
("zlib" ,zlib)))))
Cordialement,
Pierre-Henry FRÖHRING
+33 6 34 48 17 57
contact@phfrohring.com
Skype: pierre.henry.frohring
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, March 3, 2019 3:30 PM, Ricardo Wurmus <rekado@elephly.net> wrote:
>
>
> 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
prev parent reply other threads:[~2019-03-04 17:10 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
2019-03-04 17:09 ` Pierre-Henry F. [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='dbT0eyEgWJehWrvjmfgFu3wnaOHg-oKLM8JtberlkVptpyhUIAIcEDbWGJg5ywH_sXn2Zm7dADPCYqCj-L0z50tPqdGuBQWpaI1gkjqteZ0=@phfrohring.com' \
--to=contact@phfrohring.com \
--cc=help-guix@gnu.org \
--cc=rekado@elephly.net \
/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).