unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "James K. Lowden" <jklowden@speakeasy.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Ubuntu font of wisdom
Date: Sat, 17 Dec 2016 13:59:42 -0500	[thread overview]
Message-ID: <20161217135942.6e33f741e4cc057ffdca4c74@speakeasy.net> (raw)
In-Reply-To: o33tvl$hrt$1@dont-email.me

On Sat, 17 Dec 2016 12:53:14 -0500
Dan Espen <despen@verizon.net> wrote:

> Why are you using stuff in /usr/local at all?
> The package manager shouldn't put stuff there.

You're right, the package manager isn't putting stuff in /usr/local.  I
am, as well I should.  That's what it's there for.  

Why is the emacs configure script traversing /usr/local in search of
include files?  That's the more pertinent question to this list.  The
behavior is wrong, even on its own terms.  I just happened to have a
setup that exposes it.  

> > If I put my anaconda elsewhere or ran closer to the leading edge
> > (either one) my anaconda installation wouldn't have come into play,
> > because configure would have found /usr/local/lib/libpng16.so.  It's
> > only the combination that manifests the defect.  
> 
> Still not clear on what you are up to, but you may want to adjust
> the order things are retrieved with /usr/local closer to the front.

Gee, I thought it was pretty plain what I'm up to: installing emacs
from source.  The configure script broke on my system and suggested
--no-png as an option.  Since I knew I had libpng installed, and
couldn't upgrade it (under Ubuntu LTS as of December 2016),
I asked some questions here.  That led to the discovery that configure
was using an include directory it had no right to.  

configure has every reason to look in /usr/include
and /usr/local/include.  There's no justification for rooting around
the entire /usr/local.  Especially if it doesn't also do the same for
the associated library.  The configure test is, simply, broken.  

In the event, my workaround worked: I renamed the anaconda directory
to /usr/local/.anaconda.  configure ignored it, and emacs built just
fine.  As an added bonus, having read INSTALL carefully, I excluded the
dbus stuff and no longer see warnings when emacs starts up.  I think I
just heard an angel get its wings.  

Below, for the record, is the final Makefile I used.  It prepares
Ubuntu to build packages, fetches and builds emacs, constructs a binary
Debian package (IIUC), and installs it.  I hope it is useful to someone
else.  

My original question was how to use the fonts I want.  Kudos to Javier
for pointing me in the GTK direction, correctly suggesting that fixing
that would fix the font issue, too.  

--jkl

== snip ==
EMACS = emacs-25.1
SOURCES = /etc/apt/sources.list
TMPSRCS = /tmp/$(notdir $(SOURCES))
PATCH = $(TMPSRCS).diff
PKG.OPTIONS = --pkgname emacs --maintainer jkl --pkgversion 25.1

all: .checkinstall

# construct & install emacs25 as a standard binary package
.checkinstall: .update .build $(EMACS)/build/description-pak
	(cd $(EMACS)/build && sudo checkinstall $(PKG.OPTIONS))

$(EMACS)/build/description-pak:
	echo 'emacs is the new black' > $@

# resynchronize the package index files from their sources
.update: .source-ok
	sudo apt-get -y update
	@touch $@

# Open the barn doors for source code repositories.
.source-ok: $(PATCH)
	sudo patch < $(PATCH) $(SOURCES)
	@touch $@

$(PATCH): 
	test -f $(TMPSRCS).orig || cp $(SOURCES) $(TMPSRCS).orig
	chmod -w $(TMPSRCS).orig
	sed -E 's/^# deb-src/deb-src/' $(SOURCES) > $(TMPSRCS)
	diff -u $(TMPSRCS).orig $(TMPSRCS) > $(PATCH)~ || test $$? = 1
	mv $(PATCH)~ $(PATCH)

# Use pretty GTK widgets & fonts. Because I always run emacs over
# remote X with ssh, disable all the dbus stuff.  Otherwise emacs
# emits a buch of warnings on startup.

OPTIONS = --with-x-toolkit=gtk3 --with-toolkit-scroll-bars \
	  --without-dbus --without-gconf --without-gsettings

build: .build
.build: .fetched
	mkdir -p $(EMACS)/build
	(cd $(EMACS)/build && nohup ../configure $(OPTIONS) > log)
	(cd $(EMACS)/build && nohup make -j8) > $@~
	@mv $@~ $@

# fetch & unpack the tarball
.fetched: $(EMACS).tar.xz
	sudo apt install pax 
	pax -Jrf $^
	@touch $@

$(EMACS).tar.xz:
	wget http://ftp.gnu.org/gnu/emacs/$(EMACS).tar.xz

# install emacs24 dependencies for use in emacs25
.build-dep: .pre-checkinstall
	sudo apt-get build-dep emacs24
	@touch $@

# prepare packaging system to build a packages
.pre-checkinstall:
	sudo apt install -y build-essential checkinstall
	@touch $@
== pins ==




  reply	other threads:[~2016-12-17 18:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 22:43 Ubuntu font of wisdom James K. Lowden
2016-12-16 21:41 ` Javier
2016-12-17  5:29   ` James K. Lowden
2016-12-17  6:02     ` Dan Espen
2016-12-17 17:04       ` James K. Lowden
2016-12-17 17:53         ` Dan Espen
2016-12-17 18:59           ` James K. Lowden [this message]
2016-12-18 21:32     ` Tomas Nordin

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://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161217135942.6e33f741e4cc057ffdca4c74@speakeasy.net \
    --to=jklowden@speakeasy.net \
    --cc=help-gnu-emacs@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.
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).