[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HELP] Packaging mupdf

From: Pierre-Henry F.
Subject: Re: [HELP] Packaging mupdf
Date: Mon, 04 Mar 2019 17:09:58 +0000

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.


    (define-module (freeglut-for-mupdf)
      #:use-module (guix packages)
      #:use-module (guix download)
      #:use-module (gnu packages gl))

    (define-public freeglut-for-mupdf
       (inherit freeglut)
       (name "freeglut-for-mupdf")
       (version "1.14.0")
       (source (origin
                (method url-fetch)
                (uri (string-append 
""; version "-source.tar.gz"))
                (modules '((guix build utils)))
                     (lambda (dir)
                       (delete-file-recursively (string-append "thirdparty/" 
                     '("curl" "freetype" "harfbuzz" "jbig2dec" "lcms2"
                       "libjpeg" "mujs" "openjpeg" "zlib"))
        '(#:tests? #f ; there are none
                   (modify-phases %standard-phases
                                  (add-after 'unpack 'chdir
                                             (lambda _ (chdir 
"thirdparty/freeglut") #t)))))))

    (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
       (inherit mupdf)
       (name "my-mupdf")
        `(("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)))))

Pierre-Henry FRÖHRING
+33 6 34 48 17 57
Skype: pierre.henry.frohring

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, March 3, 2019 3:30 PM, Ricardo Wurmus <address@hidden> 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 "";
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]