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: Sat, 02 Mar 2019 23:15:16 +0100 [thread overview]
Message-ID: <87mumcx6rv.fsf@elephly.net> (raw)
In-Reply-To: <z0_jUIF4KaBeXdxLrRzSF1cc_wwZGFOb8UOnPGpcyRbpoN5MFQy0-GwEyNtZ7OSWWD_dvDUDZXDpjbHzDG5itjpFvvoIyCH8WwMJjY_5tEU=@phfrohring.com>
Hi Pierre-Henry,
> The problem with the way mupdf is package today[2] is that it
> does not include the patched version of freeglut that is
> necessary for the copy-pasting functionality[3].
>
> What does work is to follow the build instructions of mupdf[4]
> which boils down to:
>
> git clone --recursive git://git.ghostscript.com/mupdf.git
> cd mupdf
> git submodule update --init
> sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev xorg-dev libxcursor-dev libxrandr-dev libxinerama-dev
> make prefix=~/bin/mupdf install
>
> So, I guess that the objective is to somehow make guix execute
> the above script.
No, this would not work and would not be desirable.
Our mupdf package is already built with freeglut. Instead of bundling a
patched version of freeglut with your variant of mupdf it would better
to keep the packages separate.
Your first step would be to create a package variant of freeglut (use
“inherit” to avoid duplication) that includes the patch — or maybe it
would make sense to patch freeglut for all its users, I don’t know.
Once that is done you can refer to the new freegut variant in your mupdf
variant package.
Let me get back to the snippet you showed us:
> git clone --recursive git://git.ghostscript.com/mupdf.git
We express this with the package’s “source” field.
(source (origin
(method git-fetch)
(uri (git-reference
(url "git://git.ghostscript.com/mupdf.git")
(commit the-commit-you-need)))
(file-name (git-file-name name version))
(sha256
(base32
"…the result of guix hash -rx . in the checkout…"))))
Let’s not do the recursive clone here, because we don’t actually want
to include all of the submodules which bundle third party code.
> cd mupdf
We can ignore this. The “unpack” build phase takes care of this
already.
> git submodule update --init
We don’t do that. If we really wanted to fetch submodules we would
specify in the origin above that we want a recursive clone.
> sudo apt-get install mesa-common-dev libgl1-mesa-dev
> libglu1-mesa-dev xorg-dev libxcursor-dev libxrandr-dev
> libxinerama-dev
Since we aren’t using Debian we don’t run this ;)
Instead, we express this through the “inputs” and “native-inputs”
fields.
> make prefix=~/bin/mupdf install
The usual steps of the GNU build system (configure, make, make check,
make install) are implemented in the gnu-build-system, which we specify
as the value for the “build-system” field.
I encourage you to take a look at gnu/packages/pdf.scm, which contains a
definition for mupdf. It uses the gnu-build-system and changes its
behaviour via the “arguments” field (e.g. to pass extra options to
“make”, to delete build phases that don’t make sense here, to disable
tests, etc).
Hope this helps!
--
Ricardo
next prev parent reply other threads:[~2019-03-02 22:15 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 [this message]
2019-03-03 8:52 ` Pierre-Henry F.
2019-03-03 14:30 ` Ricardo Wurmus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mumcx6rv.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.