[Top][All Lists]

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

Re: Ubuntu font of wisdom

From: James K. Lowden
Subject: Re: Ubuntu font of wisdom
Date: Sat, 17 Dec 2016 13:59:42 -0500

On Sat, 17 Dec 2016 12:53:14 -0500
Dan Espen <> 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/  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

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.  


== snip ==
EMACS = emacs-25.1
SOURCES = /etc/apt/sources.list
TMPSRCS = /tmp/$(notdir $(SOURCES))
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))

        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 $@

        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 $@


# 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
        sudo apt install -y build-essential checkinstall
        @touch $@
== pins ==

reply via email to

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