From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pierre-Henry F." Subject: Re: [HELP] Packaging mupdf Date: Mon, 04 Mar 2019 17:09:58 +0000 Message-ID: References: <87mumcx6rv.fsf@elephly.net> <87h8ckvxn0.fsf@elephly.net> Reply-To: "Pierre-Henry F." Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:57377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0r6b-0003k0-Po for help-guix@gnu.org; Mon, 04 Mar 2019 12:10:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0r6a-0000k1-KI for help-guix@gnu.org; Mon, 04 Mar 2019 12:10:21 -0500 Received: from mail4.protonmail.ch ([185.70.40.27]:26026) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h0r6a-0000bP-0h for help-guix@gnu.org; Mon, 04 Mar 2019 12:10:20 -0500 In-Reply-To: <87h8ckvxn0.fsf@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Ricardo Wurmus Cc: "help-guix\\@gnu.org" 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/mu= pdf-" 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/f= reeglut") #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=C3=96HRING +33 6 34 48 17 57 contact@phfrohring.com Skype: pierre.henry.frohring =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Sunday, March 3, 2019 3:30 PM, Ricardo Wurmus wrote= : > > > Hi Pierre-Henry, > > the mupdf release tarball includes the freeglut sources. We can reuse > the mupdf package=E2=80=99s =E2=80=9Csource=E2=80=9D field and add a buil= d phase after 'unpack > to change directories. > > Here=E2=80=99s 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