summaryrefslogtreecommitdiff
path: root/media-fonts/pcf2bdf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-fonts/pcf2bdf
reinit the tree, so we can have metadata
Diffstat (limited to 'media-fonts/pcf2bdf')
-rw-r--r--media-fonts/pcf2bdf/Manifest7
-rw-r--r--media-fonts/pcf2bdf/files/pcf2bdf-1.04-64bit.patch216
-rw-r--r--media-fonts/pcf2bdf/files/pcf2bdf-1.04-gzip.patch12
-rw-r--r--media-fonts/pcf2bdf/metadata.xml8
-rw-r--r--media-fonts/pcf2bdf/pcf2bdf-1.04-r1.ebuild33
5 files changed, 276 insertions, 0 deletions
diff --git a/media-fonts/pcf2bdf/Manifest b/media-fonts/pcf2bdf/Manifest
new file mode 100644
index 000000000000..d2244d149d92
--- /dev/null
+++ b/media-fonts/pcf2bdf/Manifest
@@ -0,0 +1,7 @@
+AUX pcf2bdf-1.04-64bit.patch 8844 SHA256 07d7ef6607196a23be08814d143269fdd67b59e84386ea633e12787be594e6c1 SHA512 4bb7241e52a0de3445aa2ce08529e9954cfefcbe5edd41d6331a7e2ce86667bd3d4afdae7f346e3d877665a19385783810668f986546a27fd343bb6ec6be1ce6 WHIRLPOOL e7ad4b5bcd64d0e14e7a7aea072a88e572fa67061474411a2ef442930826320bc8bc68a2f529f8c4066bed6ab53b4e17c90170635f1324bfe43c44f3d24a46a0
+AUX pcf2bdf-1.04-gzip.patch 419 SHA256 306e83b3f09b40f300129fc2edb9cc0925c534484c6be26462987103da889d48 SHA512 91b7ae36113fe8c9d637137d06ee657074aa9e7dc8cc07676f7286a7d4b7679b4cb5d0a4de8b48a943e82806c201564724c276df0ee3e08ed4c231faf12c2a53 WHIRLPOOL 6e85dec1020bc03a46d9920c1fc0455d1a8fb43a662c388796f7b7f83d20a97c100cab0c4a7807ded9829499519db66caaefb5c477d347a649407920a415bd9b
+DIST pcf2bdf-1.04.tgz 9686 SHA256 64d37fa8c8f3db53034e746a04928c18fb3494a7091aa6b70141008a9e2e893e SHA512 dc8329047ec8529410fdb4e15cbf409293b31ed7d50a2f6771a17c0abef3c393f2566590eca133856abefd03b09247859c4e055368e9c19e20972ab2e30991b5 WHIRLPOOL 5891e61a6ebf51b2a7ef5cc0a5684a5f8d3ff40d6d400a0d306a8b0e5bb594864775d63c79fd979fcdc30ed1aabe82de732b506308b92528c7c53ebf0eaa140b
+EBUILD pcf2bdf-1.04-r1.ebuild 748 SHA256 e607ac0f18177c41a2a609133948a37a8e6331f3d735a3b306f869321cf0ae50 SHA512 8a4bde02366a62e092fa36d7b1d6b243a18d5cc904839724354efdfacc7158a1e4a2f32a92fa4a6f041308599b13360112146da3e1e770dcf9f7aec77d552294 WHIRLPOOL a0f425e2a64be7b4b12ba4eee15430c2318457cbf950b122ef812e1c42a2d55068dcd24816f503b7df847b2ba8acd1941b21c443d8ca9d4d8d3bff45d75109b7
+MISC ChangeLog 2501 SHA256 398789ea9d9aa666643393633faec172b90b5c24e6beb0a783689109796f9178 SHA512 a6bb1cf7435e5980a920779b37da33efe33196600f697c5317d7ed202be9ca1f08d7263f55e07ef053b7e5a8627e86b474f63d7eb50f7586728bac9c68ccaf60 WHIRLPOOL ae2864f0af40ad995d4b5368812556a8d5ef17eca8e2f88ea65edbda5920305beff581d64d7350305aad74fc598eed8b5c9a5aa3abd1841342a6431a57bbab8e
+MISC ChangeLog-2015 1758 SHA256 4eec7b3b5b0bcaec6e7564d4a50e8aaf44773e44d39803daf37b38599bdb10de SHA512 2e89097baca9b14d6c364304678c175f44418e6a21ce6c808f02229e183cfd6e8c7644e99a17cf4cf8d661ac2d9e9e36f8a0c95e46fc3aabe7e4cac7cd68ca9f WHIRLPOOL 6c198b2944735f578fd34fcb51c5c6f4de404eeee63e2287f04d360de8dad22f64f2f8046dc874ee3532808fb9f244b4b2981033291e8b69ef2318fac5606a07
+MISC metadata.xml 234 SHA256 e4848031eef3f8cb5089319b804a2c1cc2aba578c8cf7fc8323b9782c98d04dd SHA512 582b5859e81dd9914f3a2665bcdec86d1ba10026f0b0c8207fa0a6a621eaedd40286fc01250e8fed3d63750a4f39c6c8e4e5d358d360c0113e0904f297624ff5 WHIRLPOOL c11a2368b5137f9ae0226b17808f9d0dbb31821b850bbfc8cb9cb33963e54f33ba9362b0ba39abb48a469c5dc62d1a79686eb401a47a2c02fd73c09dfb6c325e
diff --git a/media-fonts/pcf2bdf/files/pcf2bdf-1.04-64bit.patch b/media-fonts/pcf2bdf/files/pcf2bdf-1.04-64bit.patch
new file mode 100644
index 000000000000..86d486560dca
--- /dev/null
+++ b/media-fonts/pcf2bdf/files/pcf2bdf-1.04-64bit.patch
@@ -0,0 +1,216 @@
+diff -urN pcf2bdf-1.04~/pcf2bdf.cc pcf2bdf-1.04/pcf2bdf.cc
+--- pcf2bdf-1.04~/pcf2bdf.cc 2002-10-20 18:35:29.000000000 +0200
++++ pcf2bdf-1.04/pcf2bdf.cc 2006-07-11 22:51:12.000000000 +0200
+@@ -4,9 +4,12 @@
+ * see xc/lib/font/bitmap/pcfread.c,pcfwrite.c for detail
+ */
+
++#define __STDC_FORMAT_MACROS
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <inttypes.h>
+
+ #if defined(_MSC_VER) // Microsoft Visual C++
+ # include <io.h>
+@@ -28,13 +31,14 @@
+ // miscellaneous definition ///////////////////////////////////////////////////
+
+
+-typedef bool bool8;
+-typedef unsigned char uint8;
+-typedef unsigned char byte8;
+-typedef short int16;
+-typedef unsigned short uint16;
+-typedef long int32;
+-typedef unsigned long uint32;
++typedef uint8_t bool8;
++typedef int8_t int8;
++typedef uint8_t uint8;
++typedef uint8_t byte8;
++typedef int16_t int16;
++typedef uint16_t uint16;
++typedef int32_t int32;
++typedef uint32_t uint32;
+
+ // section ID
+ enum type32 {
+@@ -436,12 +440,12 @@
+ {
+ if (verbose)
+ {
+- fprintf(stderr, "\t%s.leftSideBearing = %d\n", name, m->leftSideBearing);
+- fprintf(stderr, "\t%s.rightSideBearing = %d\n", name, m->rightSideBearing);
+- fprintf(stderr, "\t%s.characterWidth = %d\n", name, m->characterWidth);
+- fprintf(stderr, "\t%s.ascent = %d\n", name, m->ascent);
+- fprintf(stderr, "\t%s.descent = %d\n", name, m->descent);
+- fprintf(stderr, "\t%s.attributes = %04x\n", name, m->attributes);
++ fprintf(stderr, "\t%s.leftSideBearing = %" PRId16 "\n", name, m->leftSideBearing);
++ fprintf(stderr, "\t%s.rightSideBearing = %" PRId16 "\n", name, m->rightSideBearing);
++ fprintf(stderr, "\t%s.characterWidth = %" PRId16 "\n", name, m->characterWidth);
++ fprintf(stderr, "\t%s.ascent = %" PRId16 "\n", name, m->ascent);
++ fprintf(stderr, "\t%s.descent = %" PRId16 "\n", name, m->descent);
++ fprintf(stderr, "\t%s.attributes = %04" PRIx16 "\n", name, m->attributes);
+ }
+ }
+
+@@ -467,20 +471,20 @@
+ accelerators.maxOverlap = read_int32();
+ if (verbose)
+ {
+- fprintf(stderr, "\tnoOverlap = %d\n", (int)accelerators.noOverlap);
+- fprintf(stderr, "\tconstantMetrics = %d\n",
+- (int)accelerators.constantMetrics);
+- fprintf(stderr, "\tterminalFont = %d\n",
+- (int)accelerators.terminalFont);
+- fprintf(stderr, "\tconstantWidth = %d\n",
+- (int)accelerators.constantWidth);
+- fprintf(stderr, "\tinkInside = %d\n", (int)accelerators.inkInside);
+- fprintf(stderr, "\tinkMetrics = %d\n", (int)accelerators.inkMetrics);
+- fprintf(stderr, "\tdrawDirection = %d\n",
+- (int)accelerators.drawDirection);
+- fprintf(stderr, "\tfontAscent = %d\n", (int)accelerators.fontAscent);
+- fprintf(stderr, "\tfontDescent = %d\n", (int)accelerators.fontDescent);
+- fprintf(stderr, "\tmaxOverlap = %d\n", (int)accelerators.maxOverlap);
++ fprintf(stderr, "\tnoOverlap = %" PRId8 "\n", (int8)accelerators.noOverlap);
++ fprintf(stderr, "\tconstantMetrics = %" PRId8 "\n",
++ (int8)accelerators.constantMetrics);
++ fprintf(stderr, "\tterminalFont = %" PRId8 "\n",
++ (int8)accelerators.terminalFont);
++ fprintf(stderr, "\tconstantWidth = %" PRId8 "\n",
++ (int8)accelerators.constantWidth);
++ fprintf(stderr, "\tinkInside = %" PRId8 "\n", (int8)accelerators.inkInside);
++ fprintf(stderr, "\tinkMetrics = %" PRId8 "\n", (int8)accelerators.inkMetrics);
++ fprintf(stderr, "\tdrawDirection = %" PRId8 "\n",
++ (int8)accelerators.drawDirection);
++ fprintf(stderr, "\tfontAscent = %" PRId8 "\n", (int8)accelerators.fontAscent);
++ fprintf(stderr, "\tfontDescent = %" PRId8 "\n", (int8)accelerators.fontDescent);
++ fprintf(stderr, "\tmaxOverlap = %" PRId8 "\n", (int8)accelerators.maxOverlap);
+ }
+ read_metric(&accelerators.minBounds);
+ read_metric(&accelerators.maxBounds);
+@@ -667,7 +671,7 @@
+ }
+ else
+ if (verbose)
+- fprintf(stderr, "%ld\n", props[i].value.v);
++ fprintf(stderr, "%" PRId32 "\n", props[i].value.v);
+ }
+
+ // read old accelerators section
+@@ -711,7 +715,7 @@
+ break;
+ }
+ if (verbose)
+- fprintf(stderr, "\tnMetrics = %ld\n", nMetrics);
++ fprintf(stderr, "\tnMetrics = %" PRId32 "\n", nMetrics);
+ fontbbx = metrics[0];
+ for (i = 1; i < nMetrics; i++)
+ {
+@@ -746,10 +750,10 @@
+ //
+ if (verbose)
+ {
+- fprintf(stderr, "\t1<<format.scan = %d\n", 1 << format.scan);
++ fprintf(stderr, "\t1<<format.scan = %" PRId8 "\n", (int8)1 << format.scan);
+ fprintf(stderr, "\t%sSBit first\n", format.bit ? "M" : "L");
+ fprintf(stderr, "\t%sSByte first\n", format.byte ? "M" : "L");
+- fprintf(stderr, "\t1<<format.glyph = %d\n", 1 << format.glyph);
++ fprintf(stderr, "\t1<<format.glyph = %" PRId8 "\n", (int8)1 << format.glyph);
+ }
+ if (format.bit != BDF_format.bit)
+ {
+@@ -798,11 +802,11 @@
+ defaultCh = read_int16();
+ if (verbose)
+ {
+- fprintf(stderr, "\tfirstCol = %X\n", firstCol);
+- fprintf(stderr, "\tlastCol = %X\n", lastCol);
+- fprintf(stderr, "\tfirstRow = %X\n", firstRow);
+- fprintf(stderr, "\tlastRow = %X\n", lastRow);
+- fprintf(stderr, "\tdefaultCh = %X\n", defaultCh);
++ fprintf(stderr, "\tfirstCol = %" PRIX16 "\n", firstCol);
++ fprintf(stderr, "\tlastCol = %" PRIX16 "\n", lastCol);
++ fprintf(stderr, "\tfirstRow = %" PRIX16 "\n", firstRow);
++ fprintf(stderr, "\tlastRow = %" PRIX16 "\n", lastRow);
++ fprintf(stderr, "\tdefaultCh = %" PRIX16 "\n", defaultCh);
+ }
+ nEncodings = (lastCol - firstCol + 1) * (lastRow - firstRow + 1);
+ check_memory((encodings = new int16[nEncodings]));
+@@ -888,12 +892,12 @@
+ if (!is_exist_property_value("RESOLUTION_X") ||
+ !is_exist_property_value("RESOLUTION_Y"))
+ rx = ry = (int)(get_property_value("RESOLUTION") / 100.0 * 72.27) ;
+- fprintf(ofp, "SIZE %ld %ld %ld\n", get_property_value("PIXEL_SIZE"), rx, ry);
+- fprintf(ofp, "FONTBOUNDINGBOX %d %d %d %d\n\n",
++ fprintf(ofp, "SIZE %" PRId32 " %" PRId32 " %" PRId32 "\n", get_property_value("PIXEL_SIZE"), rx, ry);
++ fprintf(ofp, "FONTBOUNDINGBOX %" PRId16 " %" PRId16 " %" PRId16 " %" PRId16 "\n\n",
+ fontbbx.widthBits(), fontbbx.height(),
+ fontbbx.leftSideBearing, -fontbbx.descent);
+
+- int nPropsd = -1;
++ int32 nPropsd = -1;
+ if (!is_exist_property_value("DEFAULT_CHAR") &&
+ defaultCh != NO_SUCH_CHAR)
+ nPropsd ++;
+@@ -904,7 +908,7 @@
+ is_exist_property_value("RESOLUTION"))
+ nPropsd --;
+
+- fprintf(ofp, "STARTPROPERTIES %ld\n", nProps + nPropsd);
++ fprintf(ofp, "STARTPROPERTIES %" PRId32 "\n", nProps + nPropsd);
+ for (i = 0; i < nProps; i++)
+ {
+ if (strcmp(props[i].name.s, "FONT") == 0)
+@@ -917,16 +921,16 @@
+ if (props[i].isStringProp)
+ fprintf(ofp, "\"%s\"\n", props[i].value.s);
+ else
+- fprintf(ofp, "%ld\n", props[i].value.v);
++ fprintf(ofp, "%" PRId32 "\n", props[i].value.v);
+ }
+
+ if (!is_exist_property_value("DEFAULT_CHAR") &&
+ defaultCh != NO_SUCH_CHAR)
+- fprintf(ofp, "DEFAULT_CHAR %d\n", defaultCh);
++ fprintf(ofp, "DEFAULT_CHAR %" PRId16 "\n", defaultCh);
+ if (!is_exist_property_value("FONT_DESCENT"))
+- fprintf(ofp, "FONT_DESCENT %ld\n", accelerators.fontDescent);
++ fprintf(ofp, "FONT_DESCENT %" PRId32 "\n", accelerators.fontDescent);
+ if (!is_exist_property_value("FONT_ASCENT"))
+- fprintf(ofp, "FONT_ASCENT %ld\n", accelerators.fontAscent);
++ fprintf(ofp, "FONT_ASCENT %" PRId32 "\n", accelerators.fontAscent);
+ fprintf(ofp, "ENDPROPERTIES\n\n");
+
+ fprintf(ofp, "CHARS %d\n\n", nValidEncodings);
+@@ -945,14 +949,14 @@
+ else if (0x21 <= charcode && charcode <= 0x7e)
+ fprintf(ofp, "STARTCHAR %c\n", (char)charcode);
+ else
+- fprintf(ofp, "STARTCHAR %04X\n", charcode);
+- fprintf(ofp, "ENCODING %d\n", charcode);
+- fprintf(ofp, "SWIDTH %ld %d\n", m.swidth, 0);
+- fprintf(ofp, "DWIDTH %d %d\n", m.characterWidth, 0);
+- fprintf(ofp, "BBX %d %d %d %d\n",
++ fprintf(ofp, "STARTCHAR %04" PRIX16 "\n", charcode);
++ fprintf(ofp, "ENCODING %" PRId16 "\n", charcode);
++ fprintf(ofp, "SWIDTH %" PRId32 " %d\n", m.swidth, 0);
++ fprintf(ofp, "DWIDTH %" PRId16 " %d\n", m.characterWidth, 0);
++ fprintf(ofp, "BBX %" PRId16 " %" PRId16" %" PRId16 " %" PRId16"\n",
+ m.widthBits(), m.height(), m.leftSideBearing, -m.descent);
+ if (0 < m.attributes)
+- fprintf(ofp, "ATTRIBUTES %4X\n", (uint16)m.attributes);
++ fprintf(ofp, "ATTRIBUTES %4" PRIX16 "\n", (uint16)m.attributes);
+ fprintf(ofp, "BITMAP\n");
+
+ int widthBytes = m.widthBytes(format);
+@@ -964,7 +968,7 @@
+ for (int c = 0; c < widthBytes; c++)
+ {
+ if (c < w)
+- fprintf(ofp, "%02X", *b);
++ fprintf(ofp, "%02" PRIX8, *b);
+ b++;
+ }
+ fprintf(ofp, "\n");
diff --git a/media-fonts/pcf2bdf/files/pcf2bdf-1.04-gzip.patch b/media-fonts/pcf2bdf/files/pcf2bdf-1.04-gzip.patch
new file mode 100644
index 000000000000..01e7f5ec29e7
--- /dev/null
+++ b/media-fonts/pcf2bdf/files/pcf2bdf-1.04-gzip.patch
@@ -0,0 +1,12 @@
+diff -Nru pcf2bdf-orig/pcf2bdf.cc pcf2bdf/pcf2bdf.cc
+--- pcf2bdf-orig/pcf2bdf.cc 2006-10-08 21:12:13.000000000 +0200
++++ pcf2bdf/pcf2bdf.cc 2006-10-08 21:12:40.000000000 +0200
+@@ -599,7 +599,7 @@
+ fclose(ifp);
+ char buf[1024];
+ sprintf(buf, "gzip -dc %s", ifilename); // TODO
+- ifp = popen(buf, "rb");
++ ifp = popen(buf, "r");
+ _setmode(fileno(ifp), O_BINARY);
+ read_bytes = 0;
+ if (!ifp)
diff --git a/media-fonts/pcf2bdf/metadata.xml b/media-fonts/pcf2bdf/metadata.xml
new file mode 100644
index 000000000000..13ee79314597
--- /dev/null
+++ b/media-fonts/pcf2bdf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>fonts@gentoo.org</email>
+ <name>Fonts</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-fonts/pcf2bdf/pcf2bdf-1.04-r1.ebuild b/media-fonts/pcf2bdf/pcf2bdf-1.04-r1.ebuild
new file mode 100644
index 000000000000..f1ca21f3b7c2
--- /dev/null
+++ b/media-fonts/pcf2bdf/pcf2bdf-1.04-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Converts PCF fonts to BDF fonts"
+HOMEPAGE="http://www.tsg.ne.jp/GANA/S/pcf2bdf/"
+SRC_URI="http://www.tsg.ne.jp/GANA/S/pcf2bdf/${P}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~ppc s390 sh sparc x86 ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-64bit.patch
+ epatch "${FILESDIR}"/${P}-gzip.patch
+}
+
+src_compile() {
+ emake -f Makefile.gcc CC="$(tc-getCXX)" CFLAGS="${CXXFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ emake -f Makefile.gcc \
+ PREFIX="${D}/usr" \
+ MANPATH="${D}/usr/share/man/man1" \
+ install || die
+}