Bug 5175 - font-util: make mapdir configurable [PATCH]
Summary: font-util: make mapdir configurable [PATCH]
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Build/Modular (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-11-27 08:32 UTC by David Coulthart
Modified: 2005-12-08 22:52 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to font-util's configure.ac & Makefile.am to make mapdir configurable (1.11 KB, patch)
2005-11-27 08:33 UTC, David Coulthart
no flags Details | Splinter Review
update patch so configure displays default mapdir path (1.14 KB, patch)
2005-11-30 03:45 UTC, David Coulthart
no flags Details | Splinter Review
patch to encodings to move to datadir & toplevel encodings dir (443 bytes, patch)
2005-12-01 03:14 UTC, David Coulthart
no flags Details | Splinter Review
patch to font-util to move to datadir & toplevel util dir (516 bytes, patch)
2005-12-01 03:15 UTC, David Coulthart
no flags Details | Splinter Review
patch to libfontenc to move to datadir & toplevel encodings dir (647 bytes, patch)
2005-12-01 03:16 UTC, David Coulthart
no flags Details | Splinter Review
update patch to encodings to also adjust large encodingsdir (899 bytes, patch)
2005-12-03 03:23 UTC, David Coulthart
no flags Details | Splinter Review
configurable-mapdir.patch (1.65 KB, patch)
2005-12-09 09:55 UTC, Donnie Berkholz
kem: 6.9/7.0+
Details | Splinter Review

Description David Coulthart 2005-11-27 08:32:21 UTC
Currently, font-util hardcodes mapdir to $libdir/X11/fonts/util.  The attached
patch makes mapdir an option at configure time.  It is based on the similar work
already committed to CVS to make fontdir configurable for the actual fonts.

NOTE: the patch is untested.
Comment 1 David Coulthart 2005-11-27 08:33:16 UTC
Created attachment 3914 [details] [review]
patch to font-util's configure.ac & Makefile.am to make mapdir configurable
Comment 2 David Coulthart 2005-11-30 03:45:46 UTC
Created attachment 3937 [details] [review]
update patch so configure displays default mapdir path

I have now tested this patch against CVS, following the directions at
http://xorg.freedesktop.org/wiki/ModularDevelopersGuide, performing both make
install & make distcheck.
Comment 3 David Coulthart 2005-12-01 03:08:04 UTC
After discussing this bug with mharris on IRC, he suggested changing font-util's
mapdir to use $datadir instead of $libdir, since the encodings files are
architecture-independent data files and therefore according to the FHS belong in
$datadir.  Instead of adding a --with-mapdir configure option,
X.org/distributors would be free to set datadir=libdir to get the old behavior.

mharris also proposed making encodings & util parallel dirs to fonts instead of
subdirectories.  So the structure would look like
$datadir/X11/{encodings,fonts,util} instead of
$datadir/X11/fonts/{encodings,util}.  This way the fonts directory would only
contain fonts and distributors wouldn't have to do ugly hacks to ignore special
subdirectories in fonts.

Implementing this change requires patching three modules: libfontenc, encodings,
and font-util.  I will be attaching those patches now.

The only concern is for those distributors that will be upset about moving the
default location of these files, but it seems like the switch to modular X.org
would be the best time to cause such a break, and the distributors would be free
to patch the sources to get the old behavior.

The only remaining question I have is if the directory for font-util's map files
should be called util or maps.  Calling it maps would clearly denote its purpose
and hopefully prevent any abuse that might occurs with a generic directory name
such as util, which could end up with lots of random things in it from many
different packages.  But if the util directory were reserved specifically for
font-util, then I would agree to using util for storing the map files (& any
other architecture-independent data relevant to font-util).
Comment 4 David Coulthart 2005-12-01 03:14:41 UTC
Created attachment 3955 [details] [review]
patch to encodings to move to datadir & toplevel encodings dir
Comment 5 David Coulthart 2005-12-01 03:15:53 UTC
Created attachment 3956 [details] [review]
patch to font-util to move to datadir & toplevel util dir
Comment 6 David Coulthart 2005-12-01 03:16:28 UTC
Created attachment 3957 [details] [review]
patch to libfontenc to move to datadir & toplevel encodings dir
Comment 7 David Coulthart 2005-12-03 03:23:31 UTC
Created attachment 3972 [details] [review]
update patch to encodings to also adjust large encodingsdir

I would think there should be a way to get the encodingsdirs set in Makefile.am
in the large subdirectory to be based off that in the top-level Makefile.am,
but I don't know the correct autofoo to do that, so this patch just hardcodes
it.
Comment 8 Donnie Berkholz 2005-12-09 07:29:38 UTC
Comment on attachment 3914 [details] [review]
patch to font-util's configure.ac & Makefile.am to make mapdir configurable

Requesting a commit on the original patch, as it's less drastic and shouldn't
require much thought or discussion.
Comment 9 Donnie Berkholz 2005-12-09 09:52:16 UTC
Comment on attachment 3914 [details] [review]
patch to font-util's configure.ac & Makefile.am to make mapdir configurable

Removing request, as the pkgconfig file also needs to be changed from mapdir to
MAPDIR.
Comment 10 Donnie Berkholz 2005-12-09 09:55:32 UTC
Created attachment 4051 [details] [review]
configurable-mapdir.patch

Update from comment #4; also fix fontutil.pc.in so other packages can detect
mapdir.
Comment 11 Donnie Berkholz 2005-12-09 09:56:09 UTC
Comment on attachment 4051 [details] [review]
configurable-mapdir.patch

Fix pkgconfig file as well.
Comment 12 Kevin E. Martin 2005-12-09 17:52:16 UTC
I've checked in the patches to make the dirs configurable.  Thanks!
We can discuss changing the default locations of the font files for 7.1.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.