From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "James K. Lowden" Newsgroups: gmane.emacs.help Subject: Re: Ubuntu font of wisdom Date: Sat, 17 Dec 2016 13:59:42 -0500 Organization: http://www.NewsDemon.com Message-ID: <20161217135942.6e33f741e4cc057ffdca4c74@speakeasy.net> References: <20161215174358.9656c013f10b66d2c7e029ad@speakeasy.net> <20161217002926.2fc5db735711a8d9e10744e5@speakeasy.net> <20161217120425.29862805b94ff5d4257b5f34@speakeasy.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1482001233 20838 195.159.176.226 (17 Dec 2016 19:00:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Dec 2016 19:00:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 17 20:00:27 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIKDa-0004Fw-Rc for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Dec 2016 20:00:26 +0100 Original-Received: from localhost ([::1]:37642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIKDf-0000RN-3g for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Dec 2016 14:00:31 -0500 X-Received: by 10.129.177.133 with SMTP id p127mr2408627ywh.61.1482001185553; Sat, 17 Dec 2016 10:59:45 -0800 (PST) Original-Path: usenet.stanford.edu!p16no1020537qta.1!news-out.google.com!j8ni23083qtc.0!nntp.google.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post01.iad.highwinds-media.com!fx41.iad.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Newsreader: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64--netbsd) Original-Lines: 119 Original-X-Complaints-To: abuse@newsdemon.com Original-NNTP-Posting-Date: Sat, 17 Dec 2016 18:59:45 UTC X-Received-Bytes: 5146 X-Received-Body-CRC: 1898867741 Original-Xref: usenet.stanford.edu gnu.emacs.help:219036 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111978 Archived-At: 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/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 ==