From 1552c724158955730881d1edbe246aa24ea3e7d3 Mon Sep 17 00:00:00 2001 From: Lingning Zhang Date: Thu, 15 Jun 2006 10:20:11 +0000 Subject: [PATCH] - add ttmkfdir-3.0.9-encoding-dir.patch to fix bug #173705 - modify ttmkfdir-3.0.9/Makefile to delete the compiling flag of "ggdb" --- ttmkfdir-3.0.9-encoding-dir.patch | 52 +++++++++++++++++++++++++++++++ ttmkfdir.spec | 8 ++++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 ttmkfdir-3.0.9-encoding-dir.patch diff --git a/ttmkfdir-3.0.9-encoding-dir.patch b/ttmkfdir-3.0.9-encoding-dir.patch new file mode 100644 index 0000000..257dfa9 --- /dev/null +++ b/ttmkfdir-3.0.9-encoding-dir.patch @@ -0,0 +1,52 @@ +--- ttmkfdir-3.0.9/Makefile.Origin 2006-06-15 17:58:26.000000000 +0800 ++++ ttmkfdir-3.0.9/Makefile 2006-06-15 17:58:57.000000000 +0800 +@@ -27,8 +27,8 @@ + OPTFLAGS= + DEBUG=-ggdb + CXX=g++ +-CXXFLAGS=-Wall -pedantic $(FREETYPE_INCL) $(DEBUG) $(OPTFLAGS) +-LDFLAGS=$(FREETYPE_LIB) $(DEBUG) -lz ++CXXFLAGS=-Wall -pedantic $(FREETYPE_INCL) $(OPTFLAGS) ++LDFLAGS=$(FREETYPE_LIB) -lz + + DESTDIR= + PREFIX=/usr +--- ttmkfdir-3.0.9/ttmkfdir.cpp.Origin 2006-06-15 17:58:43.000000000 +0800 ++++ ttmkfdir-3.0.9/ttmkfdir.cpp 2006-06-15 17:59:07.000000000 +0800 +@@ -16,7 +16,7 @@ + + cerr << "This Program is (C) Joerg Pommnitz, 2000" << endl; + cerr << "Usage: " << program << " [OPTION]" << endl; +- cerr << "-e, --encoding\t\tname of the encoding directory file, default is \"/usr/X11R6/lib/X11/fonts/encodings/encodings.dir\"" << endl; ++ cerr << "-e, --encoding\t\tname of the encoding directory file, default is \"/usr/X11R6/lib/X11/fonts/encodings/encodings.dir\" or \"/usr/share/X11/fonts/encodings/encodings.dir\"" << endl; + cerr << "-o, --output\t\tname of the destination file, default is \"fonts.scale\"" << endl; + cerr << "-d, --font-dir\t\tname of the TrueType font directory, default is \".\"" << endl; + cerr << "-f, --default-foundry\tname of the default font foundry, default is \"misc\"" << endl; +@@ -32,7 +32,26 @@ + void + ParseCommandline (int argc, char *argv[]) + { +- cmdline::instance()->AddOption (new Commandline::Option ("encoding", 'e', "/usr/X11R6/lib/X11/fonts/encodings/encodings.dir")); ++ FILE *tmp = fopen ("/usr/X11R6/lib/X11/fonts/encodings/encodings.dir", "r"); ++ if (tmp) ++ { ++ cmdline::instance()->AddOption (new Commandline::Option ("encoding", 'e', "/usr/X11R6/lib/X11/fonts/encodings/encodings.dir")); ++ fclose (tmp); ++ } ++ else ++ { ++ tmp = fopen ("/usr/share/X11/fonts/encodings/encodings.dir", "r"); ++ if (tmp) ++ { ++ cmdline::instance()->AddOption (new Commandline::Option ("encoding", 'e', "/usr/share/X11/fonts/encodings/encodings.dir")); ++ fclose (tmp); ++ } ++ else ++ { ++ cmdline::instance()->AddOption (new Commandline::Option ("encoding", 'e', "/usr/X11R6/lib/X11/fonts/encodings/encodings.dir")); ++ } ++ } ++ + cmdline::instance()->AddOption (new Commandline::Option ("output", 'o', "fonts.scale")); + cmdline::instance()->AddOption (new Commandline::Option ("font-dir", 'd', ".")); + cmdline::instance()->AddOption (new Commandline::Option ("default-foundry", 'f', "misc")); diff --git a/ttmkfdir.spec b/ttmkfdir.spec index e64b0c1..31c3677 100644 --- a/ttmkfdir.spec +++ b/ttmkfdir.spec @@ -1,7 +1,7 @@ Summary: Utility to create fonts.scale files for truetype fonts Name: ttmkfdir Version: 3.0.9 -Release: 19.2.1 +Release: 20.0 Source0: %{name}-%{version}.tar.bz2 Patch: ttmkfdir-3.0.9-cpp.patch Patch1: ttmkfdir-3.0.9-zlib.patch @@ -10,6 +10,7 @@ Patch3: ttmkfdir-3.0.9-namespace.patch Patch4: ttmkfdir-3.0.9-fix-crash.patch Patch5: ttmkfdir-3.0.9-warnings.patch Patch6: ttmkfdir-3.0.9-segfaults.patch +Patch7: ttmkfdir-3.0.9-encoding-dir.patch License: GPL Group: Applications/System BuildRoot: %{_tmppath}/%{name}-root @@ -34,6 +35,7 @@ by the font server. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build make OPTFLAGS="$RPM_OPT_FLAGS" @@ -51,6 +53,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/ttmkfdir %changelog +* Thu Jun 15 2006 Lingning Zhang - 3.0.9-20 +- add ttmkfdir-3.0.9-encoding-dir.patch to fix bug #173705 +- modify ttmkfdir-3.0.9/Makefile to delete the compiling flag of "ggdb" + * Fri Feb 10 2006 Jesse Keating - 3.0.9-19.2.1 - bump again for double-long bug on ppc(64)