From c136e6a41436c82f3848fcba412d584630ff7711 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 22 Mar 2015 22:16:56 +0000 Subject: [PATCH] Remove ttmkfdir, it has been replaced long ago by mkfontdir/mkfontscale --- MOVED | 1 + x11-fonts/Makefile | 1 - x11-fonts/ttmkfdir/Makefile | 26 ------ x11-fonts/ttmkfdir/distinfo | 2 - x11-fonts/ttmkfdir/files/patch-Makefile | 41 ---------- x11-fonts/ttmkfdir/files/patch-builtin.cpp | 11 --- x11-fonts/ttmkfdir/files/patch-directory.cpp | 47 ----------- x11-fonts/ttmkfdir/files/patch-encoding.cpp | 79 ------------------- x11-fonts/ttmkfdir/files/patch-encoding.h | 12 --- x11-fonts/ttmkfdir/files/patch-encoding.l | 44 ----------- x11-fonts/ttmkfdir/files/patch-ttf.cpp | 83 -------------------- x11-fonts/ttmkfdir/files/patch-ttf.h | 37 --------- x11-fonts/ttmkfdir/files/patch-util.h | 10 --- x11-fonts/ttmkfdir/pkg-descr | 4 - 14 files changed, 1 insertion(+), 397 deletions(-) delete mode 100644 x11-fonts/ttmkfdir/Makefile delete mode 100644 x11-fonts/ttmkfdir/distinfo delete mode 100644 x11-fonts/ttmkfdir/files/patch-Makefile delete mode 100644 x11-fonts/ttmkfdir/files/patch-builtin.cpp delete mode 100644 x11-fonts/ttmkfdir/files/patch-directory.cpp delete mode 100644 x11-fonts/ttmkfdir/files/patch-encoding.cpp delete mode 100644 x11-fonts/ttmkfdir/files/patch-encoding.h delete mode 100644 x11-fonts/ttmkfdir/files/patch-encoding.l delete mode 100644 x11-fonts/ttmkfdir/files/patch-ttf.cpp delete mode 100644 x11-fonts/ttmkfdir/files/patch-ttf.h delete mode 100644 x11-fonts/ttmkfdir/files/patch-util.h delete mode 100644 x11-fonts/ttmkfdir/pkg-descr diff --git a/MOVED b/MOVED index 67e523af579a..e781b53b737e 100644 --- a/MOVED +++ b/MOVED @@ -7441,3 +7441,4 @@ devel/p5-Errno||2015-03-09|Errno is part of Perl devel/p5-Class-XSAccessor-Array||2015-03-09|Has been a part of devel/p5-Class-XSAccessor for >5 years. Use that port instead multimedia/ffmpeg25|multimedia/ffmpeg26|2015-03-14|ffmpeg upstream now points to 2.6.x series www/squid33|www/squid|2015-03-15|Has expired: Reached EOL on 28 August 2014, use www/squid (v3.4) instead +x11-fonts/ttmkfdir|x11-fonts/mkfontdir|2015-03-22|Has been replaced by mkfontdir/mkfontscale long ago diff --git a/x11-fonts/Makefile b/x11-fonts/Makefile index e9e20dc38373..2d95304ff502 100644 --- a/x11-fonts/Makefile +++ b/x11-fonts/Makefile @@ -162,7 +162,6 @@ SUBDIR += tkfont SUBDIR += tlwg-ttf SUBDIR += tmu - SUBDIR += ttmkfdir SUBDIR += tv-fonts SUBDIR += ubuntu-font SUBDIR += urwfonts diff --git a/x11-fonts/ttmkfdir/Makefile b/x11-fonts/ttmkfdir/Makefile deleted file mode 100644 index 4dcdd35de498..000000000000 --- a/x11-fonts/ttmkfdir/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Created by: Thomas Gellekum -# $FreeBSD$ - -PORTNAME= ttmkfdir -PORTVERSION= 3.0.9 -PORTREVISION= 3 -PORTEPOCH= 1 -CATEGORIES= x11-fonts -MASTER_SITES= ${MASTER_SITE_GENTOO}/distfiles/ \ - http://www.skysmurf.nl/comp/FreeBSD/distfiles/ - -MAINTAINER= freebsd@skysmurf.nl -COMMENT= Create fonts.scale file for use with TrueType font server - -LICENSE= LGPL21 - -LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 - -PLIST_FILES= bin/ttmkfdir -USE_XORG= x11 -USES= gmake tar:bzip2 - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/ttmkfdir ${STAGEDIR}${PREFIX}/bin - -.include diff --git a/x11-fonts/ttmkfdir/distinfo b/x11-fonts/ttmkfdir/distinfo deleted file mode 100644 index 3f98addcbc41..000000000000 --- a/x11-fonts/ttmkfdir/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (ttmkfdir-3.0.9.tar.bz2) = c65f8e2ba5522c896df2eb7256852bf0a5855109deec0f874379474ef76c1c1c -SIZE (ttmkfdir-3.0.9.tar.bz2) = 20160 diff --git a/x11-fonts/ttmkfdir/files/patch-Makefile b/x11-fonts/ttmkfdir/files/patch-Makefile deleted file mode 100644 index a379aea3f16d..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-Makefile +++ /dev/null @@ -1,41 +0,0 @@ ---- Makefile.orig Mon Dec 9 19:07:14 2002 -+++ Makefile Wed Jul 19 11:35:12 2006 -@@ -16,7 +16,6 @@ - RELEASE=$(shell rpm -q --qf "%{release}\n" --specfile $(NAME).spec | head -1) - - CVSTAG = r$(subst .,_,$(VERSION)) --CVSROOT = $(shell cat CVS/Root) - - # Autodetec the proper command used to build RPM packages - RPMBUILD=$(shell [ -x /usr/bin/rpmbuild ] && echo rpmbuild || echo rpm) -@@ -24,11 +23,8 @@ - FREETYPE_INCL=$(shell freetype-config --cflags) - FREETYPE_LIB=$(shell freetype-config --libs) - --OPTFLAGS= --DEBUG=-ggdb --CXX=g++ --CXXFLAGS=-Wall -pedantic $(FREETYPE_INCL) $(DEBUG) $(OPTFLAGS) --LDFLAGS=$(FREETYPE_LIB) $(DEBUG) -+CXXFLAGS+=-Wall $(FREETYPE_INCL) -+LDFLAGS+=$(FREETYPE_LIB) -lz - - DESTDIR= - PREFIX=/usr -@@ -39,13 +35,13 @@ - all: ttmkfdir - - .cpp.o: -- libtool --mode=compile $(CXX) $(CXXFLAGS) -o $@ -c $^ -+ $(CXX) $(CXXFLAGS) -o $@ -c $^ - - ttmkfdir: ttmkfdir.o directory.o commandline.o ttf.o encoding.o parser.o builtin.o -- libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS) -+ $(CXX) -o $@ $^ $(LDFLAGS) - - parser.cpp: encoding.l -- flex -i -8 -o$@ $< -+ lex -i -8 -o$@ $< - - install: - mkdir -p $(DESTDIR)$(BINDIR) diff --git a/x11-fonts/ttmkfdir/files/patch-builtin.cpp b/x11-fonts/ttmkfdir/files/patch-builtin.cpp deleted file mode 100644 index 15092fe683ff..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-builtin.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- builtin.cpp.orig Mon Jan 13 04:11:10 2003 -+++ builtin.cpp Wed Jul 19 11:27:41 2006 -@@ -600,7 +600,7 @@ - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff - }; - --}; -+} - - Encoding::BuiltinEncoding_t Encoding::builtin_encodings[] = { - {256,191,32,{TT_PLATFORM_MICROSOFT,TT_MS_ID_UNICODE_CS,iso8859_1},{"iso8859-1",}}, diff --git a/x11-fonts/ttmkfdir/files/patch-directory.cpp b/x11-fonts/ttmkfdir/files/patch-directory.cpp deleted file mode 100644 index a0b35b7fbb20..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-directory.cpp +++ /dev/null @@ -1,47 +0,0 @@ ---- directory.cpp.orig 2002-12-09 03:29:11.000000000 -0500 -+++ directory.cpp -@@ -1,7 +1,10 @@ - #include - #include -+#include - #include - #include -+#include -+#include - - #include "directory.h" - -@@ -37,19 +40,24 @@ directory::select (const char *name) con - bool - ttfdirectory::select (const char *name) const - { -- int len; -+ int fd; -+ unsigned int n; - struct stat buf; -+ char sigdata[8]; -+ char TTsig[] = "\000\001\000\000\000", OTsig[] = "OTTO"; - - /* must be a regular file */ - if (::stat (name, &buf) || !(S_ISREG (buf.st_mode))) { - return false; - } -- -- /* we make the decision by the extension of the file name */ -- return (((len = strlen (name)) > 4) && -- (name[len - 4] == '.') && -- (std::toupper(name[len - 3]) == 'T') && -- (std::toupper(name[len - 2]) == 'T') && -- ((std::toupper(name[len - 1]) == 'F') || -- (std::toupper(name[len - 1]) == 'C'))); -+ -+ fd = ::open(name, O_RDONLY); -+ if (fd < 0) return false; -+ n = read(fd, sigdata, sizeof(sigdata)); -+ close(fd); -+ if (n < sizeof(sigdata)) -+ return false; -+ -+ return (!memcmp(sigdata, TTsig, 5) -+ || !memcmp(sigdata, OTsig, 4)); - } diff --git a/x11-fonts/ttmkfdir/files/patch-encoding.cpp b/x11-fonts/ttmkfdir/files/patch-encoding.cpp deleted file mode 100644 index 871ea696642f..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-encoding.cpp +++ /dev/null @@ -1,79 +0,0 @@ ---- encoding.cpp.orig Wed Jul 19 11:30:05 2006 -+++ encoding.cpp Wed Jul 19 11:30:28 2006 -@@ -2,7 +2,9 @@ - #include - #include - #include --#include "freetype/freetype.h" -+#include -+#include -+#include - - #include "ttmkfdir.h" - #include "encoding.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); -@@ -97,7 +122,7 @@ - - NumericMapping *m = new NumericMapping (size, b->mapdata.platform, b->mapdata.encoding); - -- for (int i = 0; i < size; i++) -+ for (unsigned int i = 0; i < size; i++) - (*m)[i] = b->mapdata.mappingtable[i]; - - AddMapping (m); diff --git a/x11-fonts/ttmkfdir/files/patch-encoding.h b/x11-fonts/ttmkfdir/files/patch-encoding.h deleted file mode 100644 index 9f0f53ae57b2..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-encoding.h +++ /dev/null @@ -1,12 +0,0 @@ ---- encoding.h.orig Tue Mar 12 15:41:27 2002 -+++ encoding.h Sun Mar 21 22:35:15 2004 -@@ -6,7 +6,8 @@ - #include - #include - --#include "freetype/freetype.h" -+#include -+#include FT_FREETYPE_H - - #include "util.h" - diff --git a/x11-fonts/ttmkfdir/files/patch-encoding.l b/x11-fonts/ttmkfdir/files/patch-encoding.l deleted file mode 100644 index 574cdbb3f1be..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-encoding.l +++ /dev/null @@ -1,44 +0,0 @@ ---- encoding.l.orig Wed Jul 19 11:39:18 2006 -+++ encoding.l Wed Jul 19 11:39:22 2006 -@@ -8,7 +8,7 @@ - #include "ttmkfdir.h" - #include "encoding.h" - --#define DEFAULT_SIZE 0x100 /* 8 bit encoding */ -+#define DEFAULT_SIZE 0xFFFF /* 8 bit encoding */ - #define YY_DECL int yylex (char *current_file, Encodings_t &dest) - - static unsigned int line_number = 1; -@@ -43,6 +43,7 @@ - STARTENCODING{WHITESPACES}{STRING} { - cur_enc = new Encoding; - cur_enc->names.push_back (strip_first (yytext)); -+ cur_enc->size = DEFAULT_SIZE; - BEGIN(INSIDE_ENC_BLOCK); - } - -@@ -97,6 +98,7 @@ - UNDEFINE{WHITESPACES}{NUMBER}({WHITESPACES}{NUMBER})? { - char *startptr = strip_first (yytext); - char *endptr; -+ long msize = cur_map->size(); - - int i1 = std::strtol (startptr, &endptr, 0); - startptr = endptr; -@@ -108,13 +110,14 @@ - } - - /* now mark all the unassigned codes */ -- for (long i = i1; i <= i2; i++) { -+ for (long i = i1; i <= i2 && i < msize; i++) { - (*cur_map)[i] = -1; - } - } - - {NUMBER}({WHITESPACES}{NUMBER}){0,2} { -- int numbers[3], i = 0, start_range, end_range, target, res; -+ int numbers[3], target, res; -+ unsigned int i = 0, start_range, end_range; - char *startptr; - char *endptr = yytext; - diff --git a/x11-fonts/ttmkfdir/files/patch-ttf.cpp b/x11-fonts/ttmkfdir/files/patch-ttf.cpp deleted file mode 100644 index da260f32bd09..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-ttf.cpp +++ /dev/null @@ -1,83 +0,0 @@ ---- ttf.cpp.orig 2003-01-08 06:25:25.000000000 +0100 -+++ ttf.cpp 2013-12-17 00:08:13.000000000 +0100 -@@ -3,7 +3,8 @@ - #include - #include - --#include "freetype/tttables.h" -+#include -+#include FT_TRUETYPE_TABLES_H - #include "ttmkfdir.h" - #include "ttf.h" - #include "ttos2val.h" -@@ -51,20 +52,27 @@ - bool - Face::MappingPresent (int cmapidx, NumericMapping *m, int enc_size, int start_code, bool enc_comp) - { -- int idx, missing = 0; -+ int idx; -+ unsigned int missing = 0, bail_at, msize; -+ - FT_Set_Charmap (face, face->charmaps[cmapidx]); - -- for (unsigned int i = start_code; i < m->size (); i++) { -+ msize = m->size(); -+ if (enc_size <= 256) { -+ bail_at = int (cmdline::instance()->option ("max-missing")); -+ } else { -+ bail_at = ((int (cmdline::instance()->option ("max-missing-percentage")) -+& enc_comp)*enc_size)/100; -+ } -+ -+ for (unsigned int i = start_code; i < msize && missing < bail_at; i++) { - if ((*m)[i] < 0) - continue; - if ((idx = FT_Get_Char_Index (face, (*m)[i])) == 0) - missing++; - } -- if (enc_size <= 256) { -- return (missing <= int (cmdline::instance()->option ("max-missing"))); -- } else { -- return ((100 * missing/enc_size) <= int (cmdline::instance()->option ("max-missing-percentage")) & enc_comp); -- } -+ -+ return missing < bail_at; - } - - Face::Face (const std::string &filename) -@@ -239,7 +247,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; -@@ -483,7 +491,7 @@ - const char * - Face::PanoseWeight (void) const - { -- static char *panose_weight_latin[] = { -+ static const char *panose_weight_latin[] = { - "any", - "no fit", - "very light", -@@ -548,7 +556,7 @@ - const char * - Face::PanoseWidth (void) const - { -- static char *panose_spacing_latin_text [] = { -+ static const char *panose_spacing_latin_text [] = { - "any", - "no fit", - "old style", -@@ -561,7 +569,7 @@ - "monospaced", - }; - -- static char *panose_spacing_latin_decorative [] = { -+ static const char *panose_spacing_latin_decorative [] = { - "any", - "no fit", - "super condensed", diff --git a/x11-fonts/ttmkfdir/files/patch-ttf.h b/x11-fonts/ttmkfdir/files/patch-ttf.h deleted file mode 100644 index dabeee1f3848..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-ttf.h +++ /dev/null @@ -1,37 +0,0 @@ ---- ttf.h.orig Wed Jul 19 11:36:47 2006 -+++ ttf.h Wed Jul 19 11:36:50 2006 -@@ -3,16 +3,19 @@ - #define TTF_H__ - - #include --#include "freetype/freetype.h" --#include "freetype/tttables.h" --#include "freetype/ftsnames.h" --#include "freetype/ttnameid.h" --#include "freetype/fterrors.h" --#include "freetype/ftmodule.h" -+#include -+#include FT_FREETYPE_H -+#include FT_TRUETYPE_TABLES_H -+#include FT_SFNT_NAMES_H -+#include FT_TRUETYPE_IDS_H -+#include FT_ERRORS_H -+#include FT_MODULE_H - - #include "util.h" - #include "encoding.h" - -+using namespace std; -+ - namespace ttf { - - class Face { -@@ -49,7 +52,7 @@ - TT_Postscript *post; - std::string FileName; - }; --}; -+} - - #endif /* TTF_H__ */ - diff --git a/x11-fonts/ttmkfdir/files/patch-util.h b/x11-fonts/ttmkfdir/files/patch-util.h deleted file mode 100644 index 7c6f6dd9548d..000000000000 --- a/x11-fonts/ttmkfdir/files/patch-util.h +++ /dev/null @@ -1,10 +0,0 @@ ---- util.h.orig Mon Dec 9 11:29:11 2002 -+++ util.h Wed Jul 19 11:27:37 2006 -@@ -17,6 +17,6 @@ - Singleton (void) {}; - ~Singleton (void) {}; - }; --}; -+} - - #endif // TTMKFDIRUTIL_H__ diff --git a/x11-fonts/ttmkfdir/pkg-descr b/x11-fonts/ttmkfdir/pkg-descr deleted file mode 100644 index f35a3a1eba7b..000000000000 --- a/x11-fonts/ttmkfdir/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -This program reads TrueType fonts and creates a -suitable fonts.scale file for use with an X font server. - -WWW: http://people.redhat.com/yshao/