From 2b7c2821140c2fb87a39105ca66861b48e3f0bb6 Mon Sep 17 00:00:00 2001 From: wennmach Date: Mon, 12 Jan 2004 15:19:28 +0000 Subject: Apply several bugfixes: 1. fix ifdef symbol in parse.c XFT2 -> USE_XFT2 2. fix codeset names for iconv_open(3) in draw.c Two codeset names of `UTF8' and `iso2022jp' don't work on NetBSD. 3. fix comparison bug in draw.c A integer value should not be compared with a iconv_t variable directly. 4. fix PR pkg/24030 Fixes provided by Kouichirou Hiratsuka in PR pkg/24053. Closes PR pkg/24053 and PR pkg/24030. --- graphics/magicpoint/Makefile | 4 +- graphics/magicpoint/distinfo | 6 ++- graphics/magicpoint/patches/patch-aa | 83 +++++++++++++++++++++++++++++++----- graphics/magicpoint/patches/patch-ad | 13 ++++++ graphics/magicpoint/patches/patch-ae | 24 +++++++++++ 5 files changed, 116 insertions(+), 14 deletions(-) create mode 100644 graphics/magicpoint/patches/patch-ad create mode 100644 graphics/magicpoint/patches/patch-ae diff --git a/graphics/magicpoint/Makefile b/graphics/magicpoint/Makefile index 2c3deea7652..3a200f025c9 100644 --- a/graphics/magicpoint/Makefile +++ b/graphics/magicpoint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.36 2004/01/03 18:49:43 reed Exp $ +# $NetBSD: Makefile,v 1.37 2004/01/12 15:19:28 wennmach Exp $ DISTNAME= magicpoint-1.10a -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= x11 graphics MASTER_SITES= ftp://ftp.mew.org/pub/MagicPoint/ diff --git a/graphics/magicpoint/distinfo b/graphics/magicpoint/distinfo index 34624160b50..538669cf685 100644 --- a/graphics/magicpoint/distinfo +++ b/graphics/magicpoint/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.8 2003/09/11 16:09:40 jmmv Exp $ +$NetBSD: distinfo,v 1.9 2004/01/12 15:19:28 wennmach Exp $ SHA1 (magicpoint-1.10a.tar.gz) = 7510ee965316cb52eac7a430f0e19a87a337fe5c Size (magicpoint-1.10a.tar.gz) = 843657 bytes -SHA1 (patch-aa) = 06415f6277a10320aa5bc7df6dd1e8af9858fd54 +SHA1 (patch-aa) = f4d97279e878a58900ceff5ea07c61ca678e61f5 SHA1 (patch-ac) = 1b2de41c2a8da28c9023552eff676c40069630fe +SHA1 (patch-ad) = d6dd11bee4091de4f1c8d5fffa61987d16a063e1 +SHA1 (patch-ae) = b8c48eddee83f78b24cd10e864e94c3dd39c552f diff --git a/graphics/magicpoint/patches/patch-aa b/graphics/magicpoint/patches/patch-aa index 419b147a5a5..6ac2325b19e 100644 --- a/graphics/magicpoint/patches/patch-aa +++ b/graphics/magicpoint/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.9 2003/09/11 16:09:40 jmmv Exp $ +$NetBSD: patch-aa,v 1.10 2004/01/12 15:19:28 wennmach Exp $ ---- configure.orig 2003-05-28 07:34:23.000000000 +0200 -+++ configure -@@ -4108,7 +4108,7 @@ if test "$mgp_use_freetype" = "yes"; the +--- configure.orig 2003-05-28 14:34:23.000000000 +0900 ++++ configure 2004-01-11 04:18:35.000000000 +0900 +@@ -4108,7 +4108,7 @@ # XXX: freetype2 may use freetype-config echo "$as_me:$LINENO: checking for freetype1 library/header" >&5 echo $ECHO_N "checking for freetype1 library/header... $ECHO_C" >&6 @@ -11,7 +11,27 @@ $NetBSD: patch-aa,v 1.9 2003/09/11 16:09:40 jmmv Exp $ ac_cv_ft_lib=no ac_cv_ft_include=no shlib1=`echo $dir/lib/libttf.so* | head -1 | sed -e 's/.*\///'` -@@ -4643,7 +4643,7 @@ echo "${ECHO_T}$mgp_use_vflib" >&6 +@@ -4379,15 +4379,13 @@ + echo "$as_me:$LINENO: result: $mgp_use_xft2" >&5 + echo "${ECHO_T}$mgp_use_xft2" >&6 + if test "$mgp_use_xft2" = "yes"; then +- if type pkg-config > /dev/null 2>&1; then +- if pkg-config xft; then +- OPTFLAGS="`pkg-config --cflags xft` $OPTFLAGS" +- LIBS="$LIBS `pkg-config --libs xft`" +- cat >>confdefs.h <<\_ACEOF ++ if type pkg-config > /dev/null 2>&1 && pkg-config xft; then ++ OPTFLAGS="`pkg-config --cflags xft` $OPTFLAGS" ++ LIBS="$LIBS `pkg-config --libs xft`" ++ cat >>confdefs.h <<\_ACEOF + #define USE_XFT2 1 + _ACEOF + +- fi + else + echo "$as_me:$LINENO: checking for xft2 and ft2 and fc header.." >&5 + echo $ECHO_N "checking for xft2 and ft2 and fc header..... $ECHO_C" >&6 +@@ -4643,7 +4641,7 @@ if test "$mgp_use_vflib" = "yes"; then echo "$as_me:$LINENO: checking for VFlib library/header" >&5 echo $ECHO_N "checking for VFlib library/header... $ECHO_C" >&6 @@ -20,16 +40,38 @@ $NetBSD: patch-aa,v 1.9 2003/09/11 16:09:40 jmmv Exp $ ac_cv_vf_libname=VFlib ac_cv_vf_libdir=no ac_cv_vf_hdrdir=no -@@ -4867,7 +4867,7 @@ _ACEOF +@@ -4815,6 +4813,7 @@ + /usr/local/lib /usr/local/etc /etc \ + /usr/local/libdata/vflib /usr/local/share/VFlib \ + /usr/local/share/VFlib/* \ ++ ${prefix}/share/VFlib/* \ + ../../VFlib* ../VFlib* VFlib*; do + if test -d $ac_dir -a -f $ac_dir/vfontcap; then + ac_cv_vf_fontcap=$ac_dir/vfontcap; +@@ -4857,17 +4856,15 @@ + fi + fi - fi +-if type pkg-config > /dev/null 2>&1; then +- if pkg-config libpng; then +- LIBS="$LIBS `pkg-config --libs libpng`" +- OPTFLAGS="$OPTFLAGS `pkg-config --cflags libpng`" +- cat >>confdefs.h <<\_ACEOF ++if type pkg-config > /dev/null 2>&1 && pkg-config libpng; then ++ LIBS="$LIBS `pkg-config --libs libpng`" ++ OPTFLAGS="$OPTFLAGS `pkg-config --cflags libpng`" ++ cat >>confdefs.h <<\_ACEOF + #define USE_PNG 1 + _ACEOF + +- fi else - for i in /usr/pkg /usr/local /usr; do + for i in ${BUILDLINK_DIR}; do if test -f $i/include/png.h; then if test -f $i/lib/libpng.a ; then DEPLIBS="$DEPLIBS $i/lib/libpng.a" -@@ -5010,7 +5010,7 @@ fi +@@ -5010,7 +5007,7 @@ done fi @@ -38,7 +80,7 @@ $NetBSD: patch-aa,v 1.9 2003/09/11 16:09:40 jmmv Exp $ if test -f $i/include/libmng.h; then if test -f $i/lib/libmng.a ; then DEPLIBS="$DEPLIBS $i/lib/libmng.a" -@@ -5647,7 +5647,7 @@ fi +@@ -5647,7 +5644,7 @@ echo 'FATAL: You need libungif to use gif images. pass proper LIBS to configure.' exit 1 fi @@ -47,7 +89,28 @@ $NetBSD: patch-aa,v 1.9 2003/09/11 16:09:40 jmmv Exp $ if test -f $i/include/gif_lib.h; then gif_h_ok=yes OPTFLAGS="$OPTFLAGS -I$i/include" -@@ -5757,7 +5757,7 @@ fi +@@ -5677,16 +5674,14 @@ + echo "$as_me:$LINENO: result: $mgp_imlib" >&5 + echo "${ECHO_T}$mgp_imlib" >&6 + if test $mgp_imlib = "yes"; then +- if type pkg-config > /dev/null 2>&1; then +- if pkg-config imlib; then +- LIBS="$LIBS `pkg-config --libs imlib`" +- OPTFLAGS="$OPTFLAGS `pkg-config --cflags imlib`" +- cat >>confdefs.h <<\_ACEOF ++ if type pkg-config > /dev/null 2>&1 && pkg-config imlib; then ++ LIBS="$LIBS `pkg-config --libs imlib`" ++ OPTFLAGS="$OPTFLAGS `pkg-config --cflags imlib`" ++ cat >>confdefs.h <<\_ACEOF + #define USE_IMLIB 1 + _ACEOF + + USE_IMLIB=1 +- fi + else + echo "$as_me:$LINENO: checking for Imlib_init in -lImlib" >&5 + echo $ECHO_N "checking for Imlib_init in -lImlib... $ECHO_C" >&6 +@@ -5757,7 +5752,7 @@ echo 'FATAL: You need libImlib to use Imlib loading. pass proper LIBS to configure.' exit 1 fi diff --git a/graphics/magicpoint/patches/patch-ad b/graphics/magicpoint/patches/patch-ad new file mode 100644 index 00000000000..a5f84da3d89 --- /dev/null +++ b/graphics/magicpoint/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1 2004/01/12 15:19:28 wennmach Exp $ + +--- parse.c.orig 2003-11-24 21:49:38.000000000 +0900 ++++ parse.c 2003-11-24 21:50:13.000000000 +0900 +@@ -848,7 +848,7 @@ + tmpint[2]->cti_value = DEFAULT_VGAP; + tmpint[3] = ctlalloc1(CTL_QUALITY); + tmpint[3]->cti_value = DEFAULT_BQUALITY; +-#ifdef XFT2 ++#ifdef USE_XFT2 + tmpint[4] = ctlalloc1(CTL_OPAQUE); + tmpint[4]->cti_value = DEFAULT_OPAQUE; + #endif diff --git a/graphics/magicpoint/patches/patch-ae b/graphics/magicpoint/patches/patch-ae new file mode 100644 index 00000000000..f349178dd19 --- /dev/null +++ b/graphics/magicpoint/patches/patch-ae @@ -0,0 +1,24 @@ +$NetBSD: patch-ae,v 1.1 2004/01/12 15:19:28 wennmach Exp $ + +--- draw.c.orig 2003-05-14 16:45:35.000000000 +0900 ++++ draw.c 2003-11-25 08:03:15.000000000 +0900 +@@ -4498,7 +4498,7 @@ + struct ctrl *cp; + char *fontname = NULL; + int i; +- static char etab[3][20] = { "iso2022jp", "gb2312", "ksc5601"}; ++ static char etab[3][20] = { "iso-2022-jp", "gb2312", "ksc5601"}; + static char rtab[3][20] = { "jisx208", "gb2312", "ksc5601"}; + static char prefix[3][20] = { "\033$B", "\033$A", "\033$(C"}; + char buf16[1024], *p16; +@@ -4529,8 +4529,8 @@ + } + if (i == 3) return NULL; /* cannot find codeset */ + sprintf(buf16, "%s%s\0", prefix[i], p); +- if (!icv[i]) icv[i] = iconv_open("UTF8", etab[i]); +- if (icv[i] < 0){ ++ if (icv[i] == (iconv_t)0) icv[i] = iconv_open("UTF-8", etab[i]); ++ if (icv[i] == (iconv_t)-1){ + fprintf(stderr, "your iconv doesn't support %s\n", etab[i]); + return NULL; + } -- cgit v1.2.3