Bug 170108 - x11-fonts/libfontenc: library in the package searches bogus dir for encodings.dir
Summary: x11-fonts/libfontenc: library in the package searches bogus dir for encodings...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 12:50 UTC by hiroto.kagotani
Modified: 2017-01-13 22:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hiroto.kagotani 2012-07-24 12:50:06 UTC
When building libfontenc without any X11/fonts installed, it is configured
to search non-existent "/usr/local/share/fonts/X11/encodings" directory
for "encodings.dir" file instead of "/usr/local/lib/X11/fonts/encodings"
directory.  Libraries in the binary package distribution have the same
configuration.

This finally causes X server to fail to use some encodings for TrueType fonts.

Fix: 

Should patch the configure script or aclocal/fontutil.m4.
How-To-Repeat: Install x11-fonts/libfontenc prior to any x11 fonts or install it from
the binary package.
Install x11-fonts/bitstream-vera.
Add bitstream-vera diractory to the font path.
(xset fp+ /usr/local/lib/X11/fonts/bitstream-vera/)
Look for a bitstream-vera font.
(xlsfonts -l -fn '-bitstream-bitstream vera sans-medium-r-normal-*')

You'll see just 4 encodings for the font other than ascii-0 encoding.
Also you'll find an error in /var/log/Xorg.0.log:
FreeType: couldn't find encoding 'ascii-0' for '/usr/local/lib/X11/fonts/bitstre
am-vera/Vera.ttf'
Comment 1 Edwin Groothuis freebsd_committer 2012-07-24 12:50:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-x11

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 hiroto.kagotani 2012-07-24 13:39:47 UTC
To fix, it will be also required to rebuild encodings.dir file using mkfontdir,
possibly because the library assumes absolute paths.

-- 
Hiroto Kagotani
<hiroto.kagotani@gmail.com>
Comment 3 hiroto.kagotani 2012-07-26 14:43:20 UTC
> To fix, it will be also required to rebuild encodings.dir file using mkfontdir,
> possibly because the library assumes absolute paths.

Sorry, the reason was wrong.
It is that x11-fonts/encodings creates encodings.dir file including
*.enc and *.enc.gz files, while it installs only *.enc.gz files.
When libfontenc searches for an encoding file, it fails on the first miss.

-- 
Hiroto Kagotani
<hiroto.kagotani@gmail.com>
Comment 4 Niclas Zeising freebsd_committer 2013-06-27 14:44:59 UTC
State Changed
From-To: open->closed

See followup in ports/170852 which contains patch instead.
Comment 5 hiroto.kagotani 2015-04-02 12:34:14 UTC
This problem still exists, so I reopen this report.

To reproduce the problem, try:

# pkg install -f libfontenc
# strings /usr/local/lib/libfontenc.a|grep usr
/usr/local/share/fonts/X11/encodings/encodings.dir
# portmaster libfontenc
# strings /usr/local/lib/libfontenc.a|grep usr
/usr/local/share/fonts/encodings/encodings.dir
Comment 6 commit-hook freebsd_committer 2017-01-13 22:38:02 UTC
A commit references this bug:

Author: bapt
Date: Fri Jan 13 22:37:40 UTC 2017
New revision: 431430
URL: https://svnweb.freebsd.org/changeset/ports/431430

Log:
  Fix encodings.dir path

  PR:		170108
  Modified:	hiroto.kagotani@gmail.com

Changes:
  head/x11-fonts/libfontenc/Makefile