[fontmatrix] Resolves:rh#893080-Fontmatrix creates a deprecated $HOME/.fonts.conf file
pnemade
pnemade at fedoraproject.org
Sun Jan 20 10:28:22 UTC 2013
commit 53dae0d932085957c37d540100a31682209ac2f1
Author: Parag Nemade <pnemade at redhat.com>
Date: Sun Jan 20 16:00:11 2013 +0530
Resolves:rh#893080-Fontmatrix creates a deprecated $HOME/.fonts.conf file
...44_532882_remove-broken-fontmatrix-shaper.patch | 87 --------------------
...ix-0.9.99-rh893080-move-fonts-config-file.patch | 70 ++++++++++++++++
fontmatrix.spec | 15 +++-
3 files changed, 81 insertions(+), 91 deletions(-)
---
diff --git a/fontmatrix-0.9.99-rh893080-move-fonts-config-file.patch b/fontmatrix-0.9.99-rh893080-move-fonts-config-file.patch
new file mode 100644
index 0000000..40ea592
--- /dev/null
+++ b/fontmatrix-0.9.99-rh893080-move-fonts-config-file.patch
@@ -0,0 +1,70 @@
+diff -urN fontmatrix-0.9.99-Source.old/fontmatrix.1 fontmatrix-0.9.99-Source/fontmatrix.1
+--- fontmatrix-0.9.99-Source.old/fontmatrix.1 2011-10-03 11:32:54.357203868 +0530
++++ fontmatrix-0.9.99-Source/fontmatrix.1 2013-01-08 21:27:30.704581547 +0530
+@@ -53,10 +53,10 @@
+ User preferences are stored in $HOME/.fontmatrix/ on Unix or Linux. Most other paths are configurable from the Fontmatrix preferences.
+ .B $HOME/.fonts/
+ .TP
+-.B $HOME/.fonts.conf
++.B $HOME/.config/fontconfig/fonts.conf
+ .TP
+ .B /etc/fonts
+-Fontconfig, the library used by Fontmatrix to locate fonts, is normally configured with files in /etc/fonts, mainly /etc/fonts/fonts.conf and /etc/fonts/local.conf . It may also use a config file $HOME/.fonts.conf and fonts in $HOME/.fonts/ . See fonts.conf(5) and the fontconfig documentation for more information. Note that Fontmatrix may also use its internal font path to locate more fonts \- see the Preferences dialog and fontmatrix help.
++Fontconfig, the library used by Fontmatrix to locate fonts, is normally configured with files in /etc/fonts, mainly /etc/fonts/fonts.conf and /etc/fonts/local.conf . It may also use a config file $HOME/.config/fontconfig/fonts.conf and fonts in $HOME/.fonts/ . See fonts.conf(5) and the fontconfig documentation for more information. Note that Fontmatrix may also use its internal font path to locate more fonts \- see the Preferences dialog and fontmatrix help.
+ .SH "RELATED SOFTWARE AND AFFILIATES"
+ Scribus \- http://www.scribus.net
+
+diff -urN fontmatrix-0.9.99-Source.old/src/fmactivate.cpp fontmatrix-0.9.99-Source/src/fmactivate.cpp
+--- fontmatrix-0.9.99-Source.old/src/fmactivate.cpp 2011-10-03 11:32:54.428204383 +0530
++++ fontmatrix-0.9.99-Source/src/fmactivate.cpp 2013-01-08 20:58:56.616642198 +0530
+@@ -285,7 +285,7 @@
+ bool FMActivate::addFcReject(const QString & path)
+ {
+ #ifdef HAVE_FONTCONFIG
+- QFile fcfile ( QDir::homePath() + "/.fonts.conf" );
++ QFile fcfile ( QDir::homePath() + "/.config/fontconfig/fonts.conf" );
+ if ( !fcfile.open ( QFile::ReadWrite ) )
+ {
+ qWarning()<<"Cannot open"<< fcfile.fileName();
+@@ -380,7 +380,7 @@
+ bool FMActivate::remFcReject(const QString & path)
+ {
+ #ifdef HAVE_FONTCONFIG
+- QFile fcfile ( QDir::homePath() + "/.fonts.conf" );
++ QFile fcfile ( QDir::homePath() + "/.config/fontconfig/fonts.conf" );
+ if ( !fcfile.open ( QFile::ReadWrite ) )
+ {
+ return false;
+diff -urN fontmatrix-0.9.99-Source.old/src/fmactivate.h fontmatrix-0.9.99-Source/src/fmactivate.h
+--- fontmatrix-0.9.99-Source.old/src/fmactivate.h 2011-10-03 11:32:54.434204428 +0530
++++ fontmatrix-0.9.99-Source/src/fmactivate.h 2013-01-08 20:58:16.264618945 +0530
+@@ -52,7 +52,7 @@
+
+ private:
+ /*
+- Add and Remove fonts in ~/.fonts.conf
++ Add and Remove fonts in ~/.config/fontconfig/fonts.conf
+ with <selecfont><rejectfont><glob> sequence
+ */
+ bool addFcReject(const QString& path);
+diff -urN fontmatrix-0.9.99-Source.old/src/typotek.cpp fontmatrix-0.9.99-Source/src/typotek.cpp
+--- fontmatrix-0.9.99-Source.old/src/typotek.cpp 2011-10-03 11:32:54.366203934 +0530
++++ fontmatrix-0.9.99-Source/src/typotek.cpp 2013-01-08 20:59:58.561676631 +0530
+@@ -1093,7 +1093,7 @@
+ void typotek::addFcDirItem(const QString & dirPath)
+ {
+ #ifdef HAVE_FONTCONFIG
+- QFile fcfile ( QDir::homePath() + "/.fonts.conf" );
++ QFile fcfile ( QDir::homePath() + "/.config/fontconfig/fonts.conf" );
+ if ( !fcfile.open ( QFile::ReadWrite ) )
+ {
+ return;
+@@ -1102,7 +1102,7 @@
+ {
+ QDomDocument fc ( "fontconfig" );
+
+- // .fonts.conf is empty, it seems that we just created it.
++ // ~/.config/fontconfig/fonts.conf is empty, it seems that we just created it.
+ // Wed have to populate it a bit
+ if ( fcfile.size() == 0 )
+ {
diff --git a/fontmatrix.spec b/fontmatrix.spec
index f4bce0d..c848a6f 100644
--- a/fontmatrix.spec
+++ b/fontmatrix.spec
@@ -3,9 +3,9 @@
Name: fontmatrix
Summary: A fonts manager
Version: 0.9.99
-Release: 7.r%{svnrev}%{?dist}
+Release: 8.r%{svnrev}%{?dist}
License: GPLv2+
-Group: User Interface/X
+
##### svn checkout HOWTO #####
##### $ svn export -r %{svnrev} http://svn.gna.org/svn/undertype/trunk/tools/typotek fontmatrix #####
##### $ mkdir ../fontmatrix-build #####
@@ -20,9 +20,12 @@ Group: User Interface/X
Source0: %{name}-%{version}-Source.tar.gz
Patch0: bug_564904_fix-missing-DSO-icuuc.patch
Patch1: fontmatrix-0.9.99-arm.patch
+Patch2: fontmatrix-0.9.99-rh893080-move-fonts-config-file.patch
+
BuildRequires: qt-devel freetype-devel qt-webkit-devel
-BuildRequires: desktop-file-utils cmake python-devel
+BuildRequires: desktop-file-utils cmake python2-devel
BuildRequires: openssl-devel podofo-devel libicu-devel
+
##Following is needed to ensure that enduser can edit font with fontforge application
Requires: fontforge
@@ -33,6 +36,7 @@ A powerful and well designed fonts manager
%setup -q -n %{name}-%{version}-Source
%patch0 -p0
%patch1 -p0
+%patch2 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
@@ -46,7 +50,7 @@ make VERBOSE=1 %{?_smp_mflags}
ctest
%install
-make DESTDIR=$RPM_BUILD_ROOT install
+make DESTDIR=$RPM_BUILD_ROOT install INSTALL="install -p"
#rpmlint complains Zero-length file
rm -f $RPM_BUILD_ROOT%{_datadir}/fontmatrix/help/en/what_fonts_are.html
@@ -78,6 +82,9 @@ fi
%changelog
+* Sun Jan 20 2013 Parag Nemade <pnemade AT redhat DOT com> - 0.9.99-8.r1218
+- Resolves:rh#893080-Fontmatrix creates a deprecated $HOME/.fonts.conf file
+
* Wed Sep 19 2012 Jon Ciesla <limburgher at gmail.com> - 0.9.99-7.r1218
- Fix FTBFS on ARM.
More information about the fonts-bugs
mailing list