From: Erwin Rol <[email protected]>

Add custom fonts.conf option via the alternatives mechanism.
Add menu option to instell fonts.dtd file

Signed-off-by: Erwin Rol <[email protected]>
---
 generic/etc/fonts/fonts.conf |    3 +++
 rules/fontconfig.in          |   31 +++++++++++++++++++++++++++----
 rules/fontconfig.make        |   13 ++++++++++++-
 3 files changed, 42 insertions(+), 5 deletions(-)
 create mode 100644 generic/etc/fonts/fonts.conf

diff --git a/generic/etc/fonts/fonts.conf b/generic/etc/fonts/fonts.conf
new file mode 100644
index 0000000..710e595
--- /dev/null
+++ b/generic/etc/fonts/fonts.conf
@@ -0,0 +1,3 @@
+#
+# Dummy file, to inform the user he has no projectroot/etc/fonts/fonts.conf 
file
+#
diff --git a/rules/fontconfig.in b/rules/fontconfig.in
index dbb716c..fe84f2f 100644
--- a/rules/fontconfig.in
+++ b/rules/fontconfig.in
@@ -34,11 +34,34 @@ config FONTCONFIG_UTILS
            builds font information cache files for applications
            using fontconfig for their font handling.
 
-config FONTCONFIG_CONFS
-       bool "install configuration files for Fontconfig"
+config FONTCONFIG_DTD
+       bool "install DTD file for Fontconfig"
        default y
        help
-         This installs configuration files of fontconfig,
-         subpixeling is turned on by default
+         This installs the fonts.dtd file.
+
+choice
+       prompt "install configuration files for Fontconfig"
+       default FONTCONFIG_CONFS_DEFAULT
+
+       config FONTCONFIG_CONFS_NONE
+               bool "don't install config file"
+               help
+                 Choose this if you don't want to install
+                 a fonts.conf file.
+
+       config FONTCONFIG_CONFS_DEFAULT
+               bool "default config"
+               help
+                 This installs a default fonts.conf file of fontconfig,
+                 subpixeling is turned on by default.
+
+       config FONTCONFIG_CONFS_CUSTOM
+               bool "custom config"
+               help
+                 This installs a custom fonts.conf file of fontconfig.
+
+endchoice
 
 endif
+
diff --git a/rules/fontconfig.make b/rules/fontconfig.make
index 31abf60..d35be1d 100644
--- a/rules/fontconfig.make
+++ b/rules/fontconfig.make
@@ -86,7 +86,13 @@ $(STATEDIR)/fontconfig.targetinstall:
                libfontconfig.so.1.3.0, \
                /usr/lib/libfontconfig.so)
 
-ifdef PTXCONF_FONTCONFIG_CONFS
+
+ifdef PTXCONF_FONTCONFIG_DTD
+       @$(call install_copy, fontconfig, 0, 0, 0644, -, \
+               /etc/fonts/fonts.dtd,n)
+endif
+
+ifdef PTXCONF_FONTCONFIG_CONFS_DEFAULT
        @$(call install_copy, fontconfig, 0, 0, 0644, -, \
                /etc/fonts/fonts.conf,n)
 
@@ -99,6 +105,11 @@ ifdef PTXCONF_FONTCONFIG_CONFS
 #              /etc/fonts/conf.d/autohint.conf,n)
 endif
 
+ifdef PTXCONF_FONTCONFIG_CONFS_CUSTOM
+       @$(call install_alternative, fontconfig, 0, 0, 0644, \
+               /etc/fonts/fonts.conf)
+endif
+
 ifdef PTXCONF_FONTCONFIG_UTILS
        @$(call install_copy, fontconfig, 0, 0, 0755, -, \
                /usr/bin/fc-cache)
-- 
1.6.0.6


--
ptxdist mailing list
[email protected]

Reply via email to