summaryrefslogtreecommitdiff
path: root/fonts
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-01-27 06:07:59 +0000
committerobache <obache@pkgsrc.org>2014-01-27 06:07:59 +0000
commit1b9b9f0869823c9b217b32a7892036f2226a7793 (patch)
tree8cfae7f35ecae83881e41040912c625b7b2a5bfb /fonts
parent1e0fba383d88d948213eeb433af19eaeacac6804 (diff)
downloadpkgsrc-1b9b9f0869823c9b217b32a7892036f2226a7793.tar.gz
Import p5-Font-FreeType-0.03 as fonts/p5-Font-FreeType.
This module allows Perl programs to conveniently read information from font files. All the font access is done through the FreeType2 library, which supports many formats. It can render images of characters with high-quality hinting and antialiasing, extract metrics information, and extract the outlines of characters in scalable formats like TrueType.
Diffstat (limited to 'fonts')
-rw-r--r--fonts/p5-Font-FreeType/DESCR5
-rw-r--r--fonts/p5-Font-FreeType/Makefile18
-rw-r--r--fonts/p5-Font-FreeType/distinfo7
-rw-r--r--fonts/p5-Font-FreeType/patches/patch-FreeType.xs52
-rw-r--r--fonts/p5-Font-FreeType/patches/patch-Makefile.PL17
5 files changed, 99 insertions, 0 deletions
diff --git a/fonts/p5-Font-FreeType/DESCR b/fonts/p5-Font-FreeType/DESCR
new file mode 100644
index 00000000000..405c7602f67
--- /dev/null
+++ b/fonts/p5-Font-FreeType/DESCR
@@ -0,0 +1,5 @@
+This module allows Perl programs to conveniently read information from
+font files. All the font access is done through the FreeType2 library,
+which supports many formats. It can render images of characters with
+high-quality hinting and antialiasing, extract metrics information, and
+extract the outlines of characters in scalable formats like TrueType.
diff --git a/fonts/p5-Font-FreeType/Makefile b/fonts/p5-Font-FreeType/Makefile
new file mode 100644
index 00000000000..d582ee3d27d
--- /dev/null
+++ b/fonts/p5-Font-FreeType/Makefile
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2014/01/27 06:07:59 obache Exp $
+#
+
+DISTNAME= Font-FreeType-0.03
+PKGNAME= p5-${DISTNAME}
+CATEGORIES= perl5 fonts graphics
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Font/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://search.cpan.org/dist/Font-FreeType/
+COMMENT= Read font files and render glyphs from Perl using FreeType2
+LICENSE= ${PERL_LICENSE}
+
+PERL5_PACKLIST= auto/Font/FreeType/.packlist
+
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/fonts/p5-Font-FreeType/distinfo b/fonts/p5-Font-FreeType/distinfo
new file mode 100644
index 00000000000..bb6632ac6c2
--- /dev/null
+++ b/fonts/p5-Font-FreeType/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2014/01/27 06:07:59 obache Exp $
+
+SHA1 (Font-FreeType-0.03.tar.gz) = 7309f72ddf569b5868c49a8b407a5739b158e4d1
+RMD160 (Font-FreeType-0.03.tar.gz) = 6bd13f34505a1c04a8050eec4b72dc763e284031
+Size (Font-FreeType-0.03.tar.gz) = 95275 bytes
+SHA1 (patch-FreeType.xs) = 7a42e516040e26aa692b4e4fdc520711aa57b148
+SHA1 (patch-Makefile.PL) = c7737c389acb0f38b8a1367118ba62c653536c9f
diff --git a/fonts/p5-Font-FreeType/patches/patch-FreeType.xs b/fonts/p5-Font-FreeType/patches/patch-FreeType.xs
new file mode 100644
index 00000000000..f53e3379da3
--- /dev/null
+++ b/fonts/p5-Font-FreeType/patches/patch-FreeType.xs
@@ -0,0 +1,52 @@
+$NetBSD: patch-FreeType.xs,v 1.1 2014/01/27 06:07:59 obache Exp $
+
+* https://rt.cpan.org/Public/Bug/Display.html?id=32713
+
+--- FreeType.xs.orig 2004-09-11 20:50:44.000000000 +0000
++++ FreeType.xs
+@@ -226,7 +226,7 @@ ensure_outline_loaded (FT_Face face, Fon
+ #define QEFFT2_CALL_TIDY FREETMPS; LEAVE;
+
+ static int
+-handle_move_to (FT_Vector *to, void *data)
++handle_move_to (const FT_Vector *to, void *data)
+ {
+ struct QefFT2_Outline_Decompose_Extra_ *extra = data;
+ double x = QEFFT2_NUM(to->x), y = QEFFT2_NUM(to->y);
+@@ -243,7 +243,7 @@ handle_move_to (FT_Vector *to, void *dat
+ }
+
+ static int
+-handle_line_to (FT_Vector *to, void *data)
++handle_line_to (const FT_Vector *to, void *data)
+ {
+ struct QefFT2_Outline_Decompose_Extra_ *extra = data;
+ double x = QEFFT2_NUM(to->x), y = QEFFT2_NUM(to->y);
+@@ -260,7 +260,7 @@ handle_line_to (FT_Vector *to, void *dat
+ }
+
+ static int
+-handle_conic_to (FT_Vector *control, FT_Vector *to, void *data)
++handle_conic_to (const FT_Vector *control, FT_Vector *to, void *data)
+ {
+ struct QefFT2_Outline_Decompose_Extra_ *extra = data;
+ double x = QEFFT2_NUM(to->x), y = QEFFT2_NUM(to->y);
+@@ -292,7 +292,7 @@ handle_conic_to (FT_Vector *control, FT_
+ }
+
+ static int
+-handle_cubic_to (FT_Vector *control1, FT_Vector *control2, FT_Vector *to,
++handle_cubic_to (const FT_Vector *control1, FT_Vector *control2, FT_Vector *to,
+ void *data)
+ {
+ struct QefFT2_Outline_Decompose_Extra_ *extra = data;
+@@ -805,7 +805,8 @@ qefft2_glyph_char_code (Font_FreeType_Gl
+ char_code = FT_Get_First_Char(face, &glyph_idx);
+ while (glyph_idx) {
+ if (glyph_idx == glyph->index) {
+- RETVAL = newSVuv((UV) glyph->char_code = char_code);
++ glyph->char_code = char_code;
++ RETVAL = newSVuv((UV) glyph->char_code);
+ break;
+ }
+ char_code = FT_Get_Next_Char(face, char_code, &glyph_idx);
diff --git a/fonts/p5-Font-FreeType/patches/patch-Makefile.PL b/fonts/p5-Font-FreeType/patches/patch-Makefile.PL
new file mode 100644
index 00000000000..b06cd5d1ac7
--- /dev/null
+++ b/fonts/p5-Font-FreeType/patches/patch-Makefile.PL
@@ -0,0 +1,17 @@
+$NetBSD: patch-Makefile.PL,v 1.1 2014/01/27 06:07:59 obache Exp $
+
+* get freetype2 configuration with "freetype-config" command.
+
+--- Makefile.PL.orig 2004-09-10 00:43:29.000000000 +0000
++++ Makefile.PL
+@@ -5,8 +5,8 @@ WriteMakefile(
+ NAME => 'Font::FreeType',
+ AUTHOR => 'Geoff Richards <qef@laxan.com>',
+ VERSION_FROM => 'lib/Font/FreeType.pm',
+- LIBS => [ '-lfreetype' ],
+- INC => '-I/usr/include/freetype2',
++ LIBS => `freetype-config --libs`,
++ INC => `freetype-config --cflags`,
+ NO_META => 1,
+ );
+