From 15f8682febe8a00a4d364a3a63926a7ab4e36a68 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 13:35:41 +0000 Subject: [PATCH] auto-import changelog data from ttmkfdir-3.0.9-7.src.rpm * Mon Sep 15 2003 Yu Shao 3.0.9-6 - updated zlib patch from Nalin Dahyabhai #104331 * Thu Aug 21 2003 Yu Shao 3.0.9-4 - added zlib build requirement, partly releated to #100560 - other fixes * Thu Aug 07 2003 Elliot Lee - Fix compile error (cpp.patch) * Wed Jun 04 2003 Elliot Lee - rebuilt --- ttmkfdir-3.0.9-cpp.patch | 11 ++++++ ttmkfdir-3.0.9-zlib.patch | 80 +++++++++++++++++++++++++++++++++++++++ ttmkfdir.spec | 21 +++++++++- 3 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 ttmkfdir-3.0.9-cpp.patch create mode 100644 ttmkfdir-3.0.9-zlib.patch diff --git a/ttmkfdir-3.0.9-cpp.patch b/ttmkfdir-3.0.9-cpp.patch new file mode 100644 index 0000000..58839ed --- /dev/null +++ b/ttmkfdir-3.0.9-cpp.patch @@ -0,0 +1,11 @@ +--- ttmkfdir-3.0.9/ttf.cpp.sopwith Thu Aug 7 12:49:08 2003 ++++ ttmkfdir-3.0.9/ttf.cpp Thu Aug 7 12:50:01 2003 +@@ -239,7 +239,7 @@ + for (i = 0; i < n; i++) { + if ((fterror = FT_Get_Sfnt_Name (face, i, &NamePtr)) != FT_Err_Ok) { + std::cout << "Warning: Can't SFNT name : " << FileName << "(" << fterror << ")" << std::endl; +- return; ++ return NULL; + }; + platform = NamePtr.platform_id; + encoding = NamePtr.encoding_id; diff --git a/ttmkfdir-3.0.9-zlib.patch b/ttmkfdir-3.0.9-zlib.patch new file mode 100644 index 0000000..548a49e --- /dev/null +++ b/ttmkfdir-3.0.9-zlib.patch @@ -0,0 +1,80 @@ +--- ttmkfdir-3.0.9/encoding.cpp 2002-12-09 03:52:48.000000000 -0500 ++++ ttmkfdir-3.0.9/encoding.cpp 2003-09-12 12:32:29.000000000 -0400 +@@ -2,6 +2,8 @@ + #include + #include + #include ++#include ++#include + #include "freetype/freetype.h" + + #include "ttmkfdir.h" +@@ -32,9 +34,16 @@ + NextFile (FILE *f, char *name) + { + char file_name [1024]; +- char command[1024]; ++ char line_buf [1024]; ++ char tmp_file_name[] = "/tmp/ttmkfdir_XXXXXX"; ++ char inbuf[300000]; ++ FILE *od; ++ gzFile fd; ++ int rvalue, tmpfd; + +- if (fscanf (f, "%*s %[^\n]\n", file_name) == 1) { ++ if (fgets (line_buf, sizeof(line_buf), f) != NULL) { ++ ++ sscanf (line_buf, "%*s %[^\n]\n", file_name); + + if (file_name[0] == '/') { + name[0] = 0; +@@ -44,9 +53,25 @@ + + strcat (name, file_name); + +- sprintf (command, "exec %s < %s", (toupper(name[strlen (name) - 1]) == 'Z') +- ? "gzip -d" : "cat", name); +- return popen (command, "r"); ++ bzero(inbuf, sizeof(inbuf)); ++ ++ fd = gzopen (name,"rb"); ++ rvalue = gzread (fd, inbuf, sizeof(inbuf)); ++ ++ tmpfd = mkstemp (tmp_file_name); ++ if (tmpfd == -1) { ++ return 0; ++ } ++ ++ od = fdopen (tmpfd,"w"); ++ fputs (inbuf, od); ++ fflush (od); ++ fclose (od); ++ ++ od = fopen (tmp_file_name,"r"); ++ unlink (tmp_file_name); ++ return od; ++ + } + + return 0; +@@ -75,7 +100,7 @@ + yyrestart (input); + yylex (name, *this); + +- pclose (input); ++ fclose (input); + } + + fclose (f); +diff -uNr ttmkfdir-3.0.9.orig/Makefile ttmkfdir-3.0.9/Makefile +--- ttmkfdir-3.0.9.orig/Makefile 2003-08-21 17:43:13.000000000 +1000 ++++ ttmkfdir-3.0.9/Makefile 2003-08-21 17:40:16.000000000 +1000 +@@ -28,7 +28,7 @@ + DEBUG=-ggdb + CXX=g++ + CXXFLAGS=-Wall -pedantic $(FREETYPE_INCL) $(DEBUG) $(OPTFLAGS) +-LDFLAGS=$(FREETYPE_LIB) $(DEBUG) ++LDFLAGS=$(FREETYPE_LIB) $(DEBUG) -lz + + DESTDIR= + PREFIX=/usr diff --git a/ttmkfdir.spec b/ttmkfdir.spec index e117d48..89f45b0 100644 --- a/ttmkfdir.spec +++ b/ttmkfdir.spec @@ -1,13 +1,15 @@ Summary: Utility used to create fonts.scale files for truetype fonts Name: ttmkfdir Version: 3.0.9 -Release: 1 -#URL: +Release: 7 Source0: %{name}-%{version}.tar.bz2 +Patch: ttmkfdir-3.0.9-cpp.patch +Patch1: ttmkfdir-3.0.9-zlib.patch License: GPL Group: Applications/System BuildRoot: %{_tmppath}/%{name}-root BuildRequires: freetype-devel >= 2.0 +BuildRequires: zlib # ttmkfdir used to be in the following packages at one point Conflicts: XFree86-font-utils < 4.2.99.2-0.20021126.3 @@ -20,6 +22,8 @@ by the font server. %prep %setup -q +%patch -p1 +%patch1 -p1 %build make OPTFLAGS="$RPM_OPT_FLAGS" @@ -38,6 +42,19 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/ttmkfdir %changelog +* Mon Sep 15 2003 Yu Shao 3.0.9-6 +- updated zlib patch from Nalin Dahyabhai #104331 + +* Thu Aug 21 2003 Yu Shao 3.0.9-4 +- added zlib build requirement, partly releated to #100560 +- other fixes + +* Thu Aug 7 2003 Elliot Lee +- Fix compile error (cpp.patch) + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + * Thu Jan 23 2003 Yu Shao 3.0.9-1 - added freetype-devel build requirement #82468