Magicpoint segfaults when the presentation is using unicode chars and
ttf fonts (tested with x11/msttcorefonts), this diff fixes that.
Tested @amd64
Comments ? Ok ?
Cheers
Giovanni
Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/magicpoint/Makefile,v
retrieving revision 1.46
diff -u -p -r1.46 Makefile
--- Makefile 14 Nov 2007 09:43:40 -0000 1.46
+++ Makefile 12 Feb 2009 07:31:07 -0000
@@ -4,7 +4,7 @@ COMMENT= X11-based presentation tool
DISTNAME= magicpoint-1.09a
# hack
-PKGNAME= magicpoint-1.11bp6
+PKGNAME= magicpoint-1.11bp7
CATEGORIES= misc productivity
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/
Index: patches/patch-configure_in
===================================================================
RCS file: /cvs/ports/misc/magicpoint/patches/patch-configure_in,v
retrieving revision 1.5
diff -u -p -r1.5 patch-configure_in
--- patches/patch-configure_in 3 Nov 2005 14:46:01 -0000 1.5
+++ patches/patch-configure_in 12 Feb 2009 07:31:07 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-configure_in,v 1.5 2005/11/03 14:46:01 espie Exp $
--- configure.in.orig Tue May 22 08:09:42 2001
-+++ configure.in Thu Nov 3 15:00:38 2005
-@@ -103,6 +103,8 @@ if test "$mgp_use_freetype" = "yes"; the
++++ configure.in Wed Feb 11 15:43:02 2009
+@@ -103,6 +103,8 @@ if test "$mgp_use_freetype" = "yes"; then
ac_cv_ft_include="$dir/include"
elif test -d $dir/include/freetype -a -f
$dir/include/freetype/freetype.h; then
ac_cv_ft_include="$dir/include/freetype"
@@ -10,7 +10,7 @@ $OpenBSD: patch-configure_in,v 1.5 2005/
fi
if test "$ac_cv_ft_lib" != "no" -a "$ac_cv_ft_include" != "no";
then
LIBS="-L$ac_cv_ft_lib $LIBS"
-@@ -118,7 +120,7 @@ if test "$mgp_use_freetype" = "yes"; the
+@@ -118,7 +120,7 @@ if test "$mgp_use_freetype" = "yes"; then
fi
fi
if test "$mgp_use_freetype" = "yes"; then
@@ -19,7 +19,7 @@ $OpenBSD: patch-configure_in,v 1.5 2005/
OPTFLAGS="-I$ac_cv_ft_include $OPTFLAGS"
DEPLIBS="$ac_cv_ft_lib/$ac_cv_ft_libpath $DEPLIBS"
AC_CHECK_LIB(intl, dgettext)
-@@ -244,7 +246,7 @@ if test "$mgp_use_freetype" = "yes"; the
+@@ -244,7 +246,7 @@ if test "$mgp_use_freetype" = "yes"; then
fi
for i in /usr/pkg /usr/local /usr; do
Index: patches/patch-parse_c
===================================================================
RCS file: /cvs/ports/misc/magicpoint/patches/patch-parse_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-parse_c
--- patches/patch-parse_c 5 Nov 2005 09:28:42 -0000 1.1
+++ patches/patch-parse_c 12 Feb 2009 07:31:07 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-parse_c,v 1.1 2005/11/05 09:28:42 espie Exp $
---- parse.c.orig Sat Nov 5 10:15:39 2005
-+++ parse.c Sat Nov 5 10:20:57 2005
-@@ -355,14 +355,17 @@ read_file(fp, filename, page, line, prea
+--- parse.c.orig Mon Sep 17 16:48:30 2001
++++ parse.c Wed Feb 11 15:43:02 2009
+@@ -355,14 +355,17 @@ read_file(fp, filename, page, line, preamble)
case CTL_TAB:
{
Index: patches/patch-tfont_c
===================================================================
RCS file: patches/patch-tfont_c
diff -N patches/patch-tfont_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tfont_c 12 Feb 2009 07:31:07 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+--- tfont.c.orig Wed Feb 11 15:48:33 2009
++++ tfont.c Wed Feb 11 15:52:30 2009
+@@ -597,8 +597,14 @@ CharToUnicode(code, registry)
+ if (mgp_charset)
+ regid = get_regid(mgp_charset)
-1;
+ }
++#ifdef FREETYPE_CHARSET16
++ if (unicode_map[code])
++ code = unicode_map[code];
++#else
+ if (latin_unicode_map[regid][code])
+ code = latin_unicode_map[regid][code];
++#endif
++
+ }
+ #endif
+