[emacs-w3m:13076] Re: Dependencies: mule-ucs, apel, oauth2, flim

Boruch Baum <[email protected]>
Newsgroups gmane.emacs.w3m
Message-ID <[email protected]>
On 2018-12-17 07:45, Keith David Bershatsky wrote:
> Thank you, Boruch, for taking the time to look into these potential issues.

I don't have time just now for testing this, but here are some side-comments,
not central to your problem, but which you might find generally useful.

> Here are three (3) errors during byte-compilation and the build
> recipe. The ultimate goal is to have a recipe to install emacs-w3m
> from scratch without the byte-compiler complaining of missing
> dependencies.

The error messages are awful and ugly, but do they matter? Do
emacs-w3m / flim / apel compile anyway? Do they work despite the error
messages? If they do work, what functionality is missing?

> BUILD RECIPE:
>
> mkdir ~/.emacs.d
> mkdir ~/.emacs.d/lisp
> mkdir ~/.emacs.d/lisp/apel
> mkdir ~/.emacs.d/lisp/flim
> mkdir ~/.emacs.d/lisp/emacs-w3m
> mkdir ~/.emacs.d/src

If you're using bash or similar shell, you can condense the six 'mkdir's
into a single command:

  mkdir -p ~/.emacs.d/{src,lisp/{apel,flim,emacs-w3m}}

> git clone https://github.com/wanderlust/apel.git
> git clone https://github.com/wanderlust/flim.git

The two 'git clone' commands, as written, will pull entire repositories,
including all historical artifacts of all possible git branches, none of
which you need. A handy general alternative is:

  git clone --depth=1 --branch=master <repository-url>

For github, one may also generally perform direct downloads of
repository snapshots, without any git overhead whatsoever, by replacing
the ".git" suffix of the url with either "archive/master.tar.gz" or
"archive/master.zip".

  repo="<repository-url>"  wget -c ${repo/%.git/\/archive\/master.tar.gz} -O - | tar -xz

> find ~/.emacs.d/src/apel -maxdepth 1 -iname "*.el" -exec cp {} ~/.emacs.d/lisp/apel/ \;
> find ~/.emacs.d/src/flim -maxdepth 1 -iname "*.el" -exec cp {} ~/.emacs.d/lisp/flim/ \;
> find ~/.emacs.d/src/emacs-w3m -maxdepth 1 -iname "*.el" -exec cp {} ~/.emacs.d/lisp/emacs-w3m/ \;

I don't look kindly upon the three 'find -exec cp' commands, because
they exclude documentation and other file that could be useful in the
future. Furthermore, some packages have a legal licensing requirement to
include certain files (eg. LICENSE, AUTHORS)[IANAL]. If you choose for your
recipe to perform some form of 'git clone', an alternative would be to
'rm -r .git'; if you for your recipe to perform a snapshot download, you
won't have overhead to exclude.

Finally, your recipe doesn't delete its temporary files:

  rm -r ~/.emacs.d/src/{apel,flim,emacs-w3m}

In my example, I could bring myself to delete from "src" because a user
might have other unrelated directories already there...

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.