Subject: pkg/22436: graphics/magicpoint needs updating to 1.10a (update included)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 08/11/2003 18:40:47
>Number:         22436
>Category:       pkg
>Synopsis:       graphics/magicpoint needs updating to 1.10a (update included)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 11 11:42:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Robert Elz
>Release:        NetBSD 1.6T  (--pkgsrc of 2003-08-11)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD delta.cs.mu.OZ.AU 1.6T NetBSD 1.6T (DELTA) #42: Thu May 29 12:23:16 ICT 2003 kre@fuchsia.cs.mu.OZ.AU:/usr/obj/sys/DELTA i386
Architecture: i386
Machine: i386
>Description:
	magicpoint in pkgsrc is 1.09a (from May 2002).   The current version
	is 1.10a (June 24, 2003).

>How-To-Repeat:
	By inspection.   While inspecting, note that the home page says
	the differences are...

    * Support for Xft2 + fontconfig.
    * Support for new directive %tab 0 which can be used to apply a list of 
         directives to lines that start with a non-tab character.
    * For security reasons, we have changed mgp so that directives that fork 
         a process are not processed by default. The -U option must be 
         specified in order to process such directives.
    * Introduced %opaque directive. Please see SYNTAX for detailed information.
    * Support for iso8859-2 encoding for mgp2ps
    * Introduced -X option for mgp2ps to suppress the use of the specified 
         rendering engine
    * Introduced escape char '\' to display lines that start with '#'.
    * Many bug fixes.

>Fix:
	Apply the patch below in pkgsrc/graphics/magicpoint

	Note that the "Support for Xft2 + fontconfig" has been explicitly
	disabled for NetBSD pkgsrc (for now anyway).   You will find
	(in the Makefile, and patches/patch-aa) remnants of my attempts to
	make it work.   Unsuccessfully.   Someone (who knows all this
	cruft better than I, which means almost anyone on the planet) could
	perhaps finish this, if there's anything to be gained from having it.

	Please don't neglect the vital update to the DESCR file (included
	in the patch below).

diff -r -u ../magicpoint/DESCR ./DESCR
--- ../magicpoint/DESCR	Thu Nov  1 06:51:59 2001
+++ ./DESCR	Mon Aug 11 18:02:50 2003
@@ -2,4 +2,4 @@
 simple presentations easy while to make complicated presentations
 possible.  Its presentation file (whose suffix is typically .mgp) is
 just text so that you can create presentation files quickly with your
-favorite editor (e.g. Emacs).
+favorite editor (e.g. vi).
diff -r -u ../magicpoint/Makefile ./Makefile
--- ../magicpoint/Makefile	Mon May 12 21:33:30 2003
+++ ./Makefile	Mon Aug 11 18:31:21 2003
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.34 2003/03/02 19:47:23 jschauma Exp $
 
-DISTNAME=		magicpoint-1.09a
-PKGREVISION=		2
+DISTNAME=		magicpoint-1.10a
+PKGREVISION=
 CATEGORIES=		x11 graphics
 MASTER_SITES=		ftp://ftp.mew.org/pub/MagicPoint/
 
@@ -18,6 +18,7 @@
 CONFIGURE_ARGS+=	--disable-vflib
 CONFIGURE_ARGS+=	--enable-locale
 CONFIGURE_ARGS+=	--enable-gif
+CONFIGURE_ARGS+=	--disable-xft2
 
 # We need to perform the steps normally done by ``xmkmf -a'' since some
 # files need to be created before ``make depend''.
@@ -44,6 +45,7 @@
 	${INSTALL_DATA} README* *.jpg *.eps *.mgp *.xbm mgprc-sample \
 		${PREFIX}/share/examples/mgp
 
+#.include "../../fonts/Xft2/buildlink2.mk"
 .include "../../graphics/freetype-lib/buildlink2.mk"
 .include "../../graphics/libungif/buildlink2.mk"
 .include "../../graphics/mng/buildlink2.mk"
diff -r -u ../magicpoint/distinfo ./distinfo
--- ../magicpoint/distinfo	Sun Sep 30 12:11:57 2001
+++ ./distinfo	Mon Aug 11 18:30:30 2003
@@ -1,6 +1,6 @@
 $NetBSD: distinfo,v 1.7 2001/09/30 05:11:57 itojun Exp $
 
-SHA1 (magicpoint-1.09a.tar.gz) = 2903f7c42a30d558677fc1a93607fe7fc8c1fc0f
-Size (magicpoint-1.09a.tar.gz) = 816234 bytes
-SHA1 (patch-aa) = 8576e5caaa9a32c769cddab1779b43b8432e658a
+SHA1 (magicpoint-1.10a.tar.gz) = 7510ee965316cb52eac7a430f0e19a87a337fe5c
+Size (magicpoint-1.10a.tar.gz) = 843657 bytes
+SHA1 (patch-aa) = 4af31568a6592a0740a3b079c6aa8c8bb8a0135d
 SHA1 (patch-ac) = ec4a83e3d9a7f39a4a632a87d45b0cbcf761e526
diff -r -u ../magicpoint/patches/patch-aa ./patches/patch-aa
--- ../magicpoint/patches/patch-aa	Fri Sep 14 12:41:06 2001
+++ ./patches/patch-aa	Mon Aug 11 18:22:13 2003
@@ -1,53 +1,101 @@
 $NetBSD: patch-aa,v 1.8 2001/09/14 05:41:06 jlam Exp $
 
---- configure.orig	Tue May 22 02:09:41 2001
-+++ configure	Fri Sep 14 01:34:23 2001
-@@ -1763,7 +1763,7 @@
- if test "$mgp_use_freetype" = "yes"; then
-  	echo $ac_n "checking for freetype library/header""... $ac_c" 1>&6
- echo "configure:1766: checking for freetype library/header" >&5
-- 	for dir in /usr/local/freetype /usr/local /opt/freetype /usr/pkg /usr; do
+--- configure.orig	Wed May 28 12:34:23 2003
++++ configure	Mon Aug 11 18:21:57 2003
+@@ -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
+- 	for dir in /usr/local/freetype /usr/local /opt/freetype /usr/pkg /usr /usr/include/freetype1 ; do
 + 	for dir in ${BUILDLINK_DIR}; do
   		ac_cv_ft_lib=no
   		ac_cv_ft_include=no
  		shlib1=`echo $dir/lib/libttf.so* | head -1 | sed -e 's/.*\///'`
-@@ -1958,7 +1958,7 @@
+@@ -4391,33 +4391,40 @@
+   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
+-	for dir in /usr/include /usr/include/Xft2 /usr/X11R6/include \
+-					/usr/local/include /usr/include/freetype2; do
++	for dir in ${BUILDLINK_DIR}/include; do
+ 		if test -f $dir/X11/Xft/Xft.h; then
+ 			ac_cv_xft2_hdrdir="$dir"
+ 		fi
+ 		if test -f $dir/fontconfig/fontconfig.h; then
+ 			ac_cv_fc_hdrdir="$dir"
+ 		fi
+-		if test -f $dir/freetype/freetype.h; then
++		if test -f $dir/freetype2/freetype/freetype.h; then
++			ac_cv_ft2_hdrdir="$dir/freetype2"
++		elif test -f $dir/freetype/freetype.h; then
+ 			ac_cv_ft2_hdrdir="$dir"
+ 		fi
+ 	done
+-	if test -z $ac_cv_xft2_hdrdir -o -z $ac_cv_fc_hdrdir; then
++	if test -z "$ac_cv_xft2_hdrdir" -o -z "$ac_cv_fc_hdrdir"; then
+ 		echo "$as_me:$LINENO: result: no - not using xft2" >&5
+ echo "${ECHO_T}no - not using xft2" >&6
+ 		mgp_use_xft2=no
+ 	else
+ 		echo "$as_me:$LINENO: result: $ac_cv_xft2_hdrdir and $ac_cv_ft2_hdrdir and $ac_cv_fc_hdrdir" >&5
+ echo "${ECHO_T}$ac_cv_xft2_hdrdir and $ac_cv_ft2_hdrdir and $ac_cv_fc_hdrdir" >&6
+-		if test $ac_cv_xft2_hdrdir != "/usr/include" ; then
++		if test "$ac_cv_xft2_hdrdir" != "/usr/include" ; then
+ 			OPTFLAGS="-I$ac_cv_xft2_hdrdir $OPTFLAGS"
+ 		fi
+-		if test $ac_cv_ft2_hdrdir != "/usr/include" ; then
++		if test "$ac_cv_ft2_hdrdir" != "/usr/include" ; then
++		    if test "$ac_cv_ft2_hdrdir" != "$ac_cv_xft2_hdrdir"; then
+ 			OPTFLAGS="-I$ac_cv_ft2_hdrdir $OPTFLAGS"
++		    fi
+ 		fi
+-		if test $ac_cv_fc_hdrdir != "/usr/include" ; then
++		if test "$ac_cv_fc_hdrdir" != "/usr/include" ; then
++		    if test "$ac_cv_fc_hdrdir" != "$ac_cv_xft2_hdrdir"; then
++		      if test "$ac_cv_fc_hdrdir" != "$ac_cv_ft2_hdrdir"; then
+ 			OPTFLAGS="-I$ac_cv_fc_hdrdir $OPTFLAGS"
++		      fi
++		    fi
+ 		fi
+ 	fi
+         if test "$mgp_use_xft2" = "yes"; then
+@@ -4643,7 +4650,7 @@
  if test "$mgp_use_vflib" = "yes"; then
- 	echo $ac_n "checking for VFlib library/header""... $ac_c" 1>&6
- echo "configure:1961: checking for VFlib library/header" >&5
+ 	echo "$as_me:$LINENO: checking for VFlib library/header" >&5
+ echo $ECHO_N "checking for VFlib library/header... $ECHO_C" >&6
 -	for dir in /usr/local/VFlib /usr/local/vflib /usr/local /usr/pkg /usr; do
 +	for dir in ${BUILDLINK_DIR}; do
  		ac_cv_vf_libname=VFlib
  		ac_cv_vf_libdir=no
  		ac_cv_vf_hdrdir=no
-@@ -2128,7 +2128,7 @@
- 	fi
- fi
+@@ -4867,7 +4874,7 @@
  
--for i in /usr/pkg /usr/local /usr; do
-+for i in ${BUILDLINK_DIR}; do
- 	if test -f $i/include/png.h; then 
+   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"
-@@ -2231,7 +2231,7 @@
- 	fi
- done
+@@ -5010,7 +5017,7 @@
+   done
+ fi
  
 -for i in /usr/pkg /usr/local /usr; do
 +for i in ${BUILDLINK_DIR}; do
- 	if test -f $i/include/libmng.h; then 
+ 	if test -f $i/include/libmng.h; then
  		if test -f $i/lib/libmng.a ; then
  			DEPLIBS="$DEPLIBS $i/lib/libmng.a"
-@@ -2277,7 +2277,7 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
+@@ -5077,7 +5084,7 @@
+ echo "$as_me:$LINENO: result: $ac_cv_lib_mng_mng_initialize" >&5
+ echo "${ECHO_T}$ac_cv_lib_mng_mng_initialize" >&6
+ if test $ac_cv_lib_mng_mng_initialize = yes; then
 -  LIBS="$LIBS -Wl,-rpath,$i/lib -lmng"
 +  LIBS="$LIBS -lmng"
- 			 cat >> confdefs.h <<\EOF
+ 			 cat >>confdefs.h <<\_ACEOF
  #define MNG 1
- EOF
-@@ -2764,7 +2764,7 @@
+ _ACEOF
+@@ -5647,7 +5654,7 @@
  		echo 'FATAL: You need libungif to use gif images.  pass proper LIBS to configure.'
  		exit 1
  	fi
@@ -56,7 +104,7 @@
  		if test -f $i/include/gif_lib.h; then
  			gif_h_ok=yes
  			OPTFLAGS="$OPTFLAGS -I$i/include"
-@@ -2844,7 +2844,7 @@
+@@ -5757,7 +5764,7 @@
  		echo 'FATAL: You need libImlib to use Imlib loading.  pass proper LIBS to configure.'
  		exit 1
  	fi
>Release-Note:
>Audit-Trail:
>Unformatted: