aboutsummaryrefslogtreecommitdiffstats
path: root/print/libotf
diff options
context:
space:
mode:
authorsylvio <sylvio@FreeBSD.org>2011-02-11 20:21:08 +0800
committersylvio <sylvio@FreeBSD.org>2011-02-11 20:21:08 +0800
commitc350de489626b067fc66c1409ad11094dab51eae (patch)
tree1eeb95cebdbc24fc336f9ae34932782bc8c14333 /print/libotf
parentbe23e50dd5afd693d925e4625bacadb907629792 (diff)
downloadfreebsd-ports-gnome-c350de489626b067fc66c1409ad11094dab51eae.tar.gz
freebsd-ports-gnome-c350de489626b067fc66c1409ad11094dab51eae.tar.zst
freebsd-ports-gnome-c350de489626b067fc66c1409ad11094dab51eae.zip
- Update print/libotf to 0.9.12.
- Fixed otfdump crashes with some fonts, patches from Kenichi Handa <handa@m17n.org>. PR: ports/154675 Submitted by: Nikola Lecic <nikola.lecic@anthesphoria.net> (maintainer)
Diffstat (limited to 'print/libotf')
-rw-r--r--print/libotf/Makefile4
-rw-r--r--print/libotf/distinfo5
-rw-r--r--print/libotf/files/patch-example_otfdump.c25
-rw-r--r--print/libotf/files/patch-src_otfopen.c45
4 files changed, 74 insertions, 5 deletions
diff --git a/print/libotf/Makefile b/print/libotf/Makefile
index e09e192c4ad1..93016235bbc6 100644
--- a/print/libotf/Makefile
+++ b/print/libotf/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= libotf
-PORTVERSION= 0.9.11
+PORTVERSION= 0.9.12
CATEGORIES= print devel
MASTER_SITES= http://www.m17n.org/libotf/ \
http://anthesphoria.net/FreeBSD/ports/distfiles/
@@ -20,7 +20,7 @@ USE_XORG= x11 xt xaw xmu
USE_GNOME= pkgconfig
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
-CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include"
+CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include"
post-patch:
@${REINPLACE_CMD} -e 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
diff --git a/print/libotf/distinfo b/print/libotf/distinfo
index 11dabf31760d..ca7981fd4fa9 100644
--- a/print/libotf/distinfo
+++ b/print/libotf/distinfo
@@ -1,3 +1,2 @@
-MD5 (libotf-0.9.11.tar.gz) = c966e8ac1c64a01de0a66d9b9aadbb63
-SHA256 (libotf-0.9.11.tar.gz) = 34aa22564049edb154588a25c38bc044297ec6c3a5f7a76919076a32ec0f53a8
-SIZE (libotf-0.9.11.tar.gz) = 360687
+SHA256 (libotf-0.9.12.tar.gz) = a4a04cccf84955242202a4a7e50314259030c1f1573675085ba1c5a95b529297
+SIZE (libotf-0.9.12.tar.gz) = 363974
diff --git a/print/libotf/files/patch-example_otfdump.c b/print/libotf/files/patch-example_otfdump.c
new file mode 100644
index 000000000000..038ab02edfc2
--- /dev/null
+++ b/print/libotf/files/patch-example_otfdump.c
@@ -0,0 +1,25 @@
+--- example/otfdump.c 19 Mar 2010 12:27:02 -0000 1.27
++++ example/otfdump.c 11 Feb 2011 02:52:37 -0000 1.28
+@@ -32,12 +32,8 @@
+
+ #include <otf.h>
+
+-char *indent_spaces[] =
+- { "", " ", " ", " ", " ", " ", " ",
+- " ", " ", " " };
+-
+ /* Indented print. */
+-#define IPRINT printf("\n%s", indent_spaces[indent]), printf
++#define IPRINT printf("\n%*s", indent * 2, ""), printf
+
+ static void
+ dump_tag (OTF_Tag tag)
+@@ -457,6 +453,8 @@
+ static void
+ dump_anchor (int indent, OTF_Anchor *anchor)
+ {
++ if (anchor->offset == 0)
++ return;
+ IPRINT ("(Anchor (offset #x%04X) (AnchorFormat %d)",
+ anchor->offset, anchor->AnchorFormat);
+ indent++;
diff --git a/print/libotf/files/patch-src_otfopen.c b/print/libotf/files/patch-src_otfopen.c
new file mode 100644
index 000000000000..319b92a958b9
--- /dev/null
+++ b/print/libotf/files/patch-src_otfopen.c
@@ -0,0 +1,45 @@
+--- src/otfopen.c 22 Sep 2010 03:46:17 -0000 1.62
++++ src/otfopen.c 11 Feb 2011 02:55:05 -0000 1.63
+@@ -2336,8 +2336,9 @@
+ }
+ for (i = 0; i < array->Count; i++)
+ for (j = 0; j < ClassCount; j++)
+- if (read_anchor (otf, stream, offset + array->offset,
+- &array->AnchorRecord[i].Anchor[j]) < 0)
++ if (array->AnchorRecord[i].Anchor[j].offset > 0
++ && read_anchor (otf, stream, offset + array->offset,
++ &array->AnchorRecord[i].Anchor[j]) < 0)
+ return -1;
+ RESTORE_STREAM (stream, state);
+ return 0;
+@@ -2437,7 +2438,7 @@
+ unsigned ClassCount, OTF_LigatureAttach *attach)
+ {
+ char *errfmt = "LigatureAttach%s";
+- int errret = 1;
++ int errret = -1;
+ int i, j;
+
+ SEEK_STREAM (stream, offset + attach->offset);
+@@ -2483,8 +2484,10 @@
+ for (i = 0; i < array->LigatureCount; i++)
+ READ_OFFSET (stream, array->LigatureAttach[i].offset);
+ for (i = 0; i < array->LigatureCount; i++)
+- read_ligature_attach (otf, stream, offset + array->offset,
+- class_count, array->LigatureAttach + i);
++ if (array->LigatureAttach[i].offset > 0
++ && read_ligature_attach (otf, stream, offset + array->offset,
++ class_count, array->LigatureAttach + i) < 0)
++ return -1;
+ RESTORE_STREAM (stream, state);
+ return 0;
+ }
+@@ -2625,7 +2628,7 @@
+ read_coverage (otf, stream, offset, &subtable->Coverage);
+ read_coverage (otf, stream, offset,
+ &subtable->u.mark_mark1.Mark2Coverage);
+- READ_UINT16 (stream, subtable->u.mark_base1.ClassCount);
++ READ_UINT16 (stream, subtable->u.mark_mark1.ClassCount);
+ read_mark_array (otf, stream, offset,
+ &subtable->u.mark_mark1.Mark1Array);
+ read_anchor_array (otf, stream, offset,