diff options
author | taca <taca> | 2008-09-10 13:32:47 +0000 |
---|---|---|
committer | taca <taca> | 2008-09-10 13:32:47 +0000 |
commit | c388b267dd90f2e631d35879aaf8e91290da6f7a (patch) | |
tree | a821d5d1317f022948d4ecae9556a5885821e528 /graphics | |
parent | 3804e9108a3489bf0a6232868989f77250116bc6 (diff) | |
download | pkgsrc-c388b267dd90f2e631d35879aaf8e91290da6f7a.tar.gz |
Update magicpoint to 1.13a.
* Fix build error with xft2 option and graphics/freetype-lib package is
installed. Shoud be fix PR pkg/32656.
* Refering PR pkg/38552 adpot some of patches.
* Move PKG_OPTIONS related item to options.mk.
* More pkgsrc clean up.
* Try to reduce compile warnings.
What's new in 1.13a?
* m17n library support enhancement
* MacOS support enhancement
* add new environment variable MGPRC for the path of the .mgprc file.
* add "psfont" directive to specify the font used by mgp2ps
* add -g option for mgp2ps to allow users to adjust line distanc
* add -zoomonclk option for newimage
* allow to handle gif format images by default
* many bug fixes
Dedication
Magicpoint 1.13a is dedicated to the memory of Dr. Jun-ichiro
"itojun" Hagino, who was known for his enormous contribution to
the Internet and the Open Source Software community. He was the
developer of Magicpoint from its infancy. Magicpoint could not
exist without his devoted work.
What's new in 1.12a?
* add %tsystem directive which might be more stable than %xsystem
* add -rotate option for newimage
* allow to use non-ASCI filename in slides (use -U to enable this feature)
* many bug fixes
Diffstat (limited to 'graphics')
30 files changed, 961 insertions, 225 deletions
diff --git a/graphics/magicpoint/Makefile b/graphics/magicpoint/Makefile index e180ac7660c..2f41302c889 100644 --- a/graphics/magicpoint/Makefile +++ b/graphics/magicpoint/Makefile @@ -1,8 +1,6 @@ -# $NetBSD: Makefile,v 1.61 2008/05/24 13:53:33 tnn Exp $ +# $NetBSD: Makefile,v 1.62 2008/09/10 13:32:47 taca Exp $ -DISTNAME= magicpoint-1.10a -PKGREVISION= 11 -#DISTNAME= magicpoint-1.11b.tar.gz +DISTNAME= magicpoint-1.13a CATEGORIES= x11 graphics MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/ @@ -18,21 +16,27 @@ USE_LANGUAGES+= c99 USE_TOOLS+= perl USE_TOOLS+= pkg-config -PKG_OPTIONS_VAR= PKG_OPTIONS.magicpoint -PKG_SUPPORTED_OPTIONS= freetype vflib xft2 -PKG_SUGGESTED_OPTIONS= xft2 - -.include "../../mk/bsd.options.mk" - CONFIGURE_ARGS+= --enable-freetype-charset16 CONFIGURE_ARGS+= --enable-locale CONFIGURE_ARGS+= --enable-gif +CONFIGURE_ARGS+= --with-searchpath=${BUILDLINK_DIR:Q} CONFIGURE_ENV+= BUILDLINK_DIR=${BUILDLINK_DIR:Q} CONFIGURE_ENV+= mgp_cv_path_perl=${TOOLS_PERL5:Q} -MGP_RENDERING_ENGINES= freetype graphics/freetype-lib \ - xft2 x11/libXft \ - vflib print/ja-vflib-lib +DOCDIR= share/doc/mgp +EGDIR= share/examples/mgp +INSTALLATION_DIRS+= ${DOCDIR} ${EGDIR} + +DOCS= COPYRIGHT COPYRIGHT.jp FAQ README README.fonts \ + README.fonts.jp README.lang SYNTAX USAGE USAGE.jp +EXAMPLES= README README.jp cloud.jpg dad.eps dad.jpg \ + default.mgp embed-jp.mgp embed.mgp gradation-jp.mgp \ + gradation.mgp m17n-lib.mgp mgp-old1.jpg mgp-old2.jpg \ + mgp-old3.jpg mgp1.jpg mgp2.jpg mgp3.jpg mgp3.xbm \ + mgprc-sample multilingual.mgp sample-fr.mgp \ + sample-jp-xft.mgp sample-jp.mgp sample.mgp \ + sendmail6-jp.mgp sendmail6.mgp tutorial-jp.mgp \ + tutorial.mgp v6-jp.mgp v6.mgp v6header.eps v6header.jpg # We need to perform the steps normally done by ``xmkmf -a'' since some # files need to be created before ``make depend''. @@ -42,42 +46,29 @@ XMKMF= ${XMKMF_CMD} ${XMKMF_FLAGS} MGP_PRE_STAGE= ctlwords.h grammar.c scanner.c tokdefs.h \ Makefiles includes depend +.include "options.mk" + +SUBST_CLASSES+= conf +SUBST_FILES.conf+= sample/default.mgp +SUBST_SED.conf+= -e 's|@MGP_TFONT@|${MGP_TFONT}|g' +SUBST_SED.conf+= -e 's|@MGP_VFONT@|${MGP_VFONT}|g' +SUBST_SED.conf+= -e 's|@MGP_XFONT@|${MGP_XFONT}|g' +SUBST_STAGE.conf= post-configure + post-configure: .for s in ${MGP_PRE_STAGE} cd ${WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ${s} .endfor -pre-install: - ${SED} -e "/^%% Default.*${PKG_OPTIONS}\./,/^%%%/s/^%% %/%/" \ - ${WRKSRC}/sample/default.mgp.template > \ - ${WRKSRC}/sample/default.mgp - post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mgp - cd ${WRKSRC}; \ - for f in COPYRIGHT COPYRIGHT.jp FAQ README README.fonts \ - README.fonts.jp README.lang SYNTAX USAGE USAGE.jp; do \ - ${INSTALL_DATA} $$f ${PREFIX}/share/doc/mgp; \ - done - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mgp - cd ${WRKSRC}/sample; \ - for f in README* *.jpg *.eps *.mgp *.xbm mgprc-sample; do \ - ${INSTALL_DATA} $$f ${PREFIX}/share/examples/mgp; \ - done - -.for engine pkg in ${MGP_RENDERING_ENGINES} -. if !empty(PKG_OPTIONS:M${engine}) -CONFIGURE_ARGS+= --enable-${engine} -.include "../../${pkg}/buildlink3.mk" -. else -CONFIGURE_ARGS+= --disable-${engine} -. endif +.for f in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${DOCDIR} +.endfor +.for f in ${EXAMPLES} + ${INSTALL_DATA} ${WRKSRC}/sample/${f} ${DESTDIR}${PREFIX}/${EGDIR} .endfor -.if !empty(PKG_OPTIONS:Mxft2) -.include "../../graphics/freetype2/buildlink3.mk" -.endif .include "../../graphics/libungif/buildlink3.mk" .include "../../graphics/mng/buildlink3.mk" .include "../../graphics/netpbm/buildlink3.mk" diff --git a/graphics/magicpoint/PLIST b/graphics/magicpoint/PLIST index 307b493cbe5..a3866c915a8 100644 --- a/graphics/magicpoint/PLIST +++ b/graphics/magicpoint/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2003/03/02 19:47:23 jschauma Exp $ +@comment $NetBSD: PLIST,v 1.3 2008/09/10 13:32:47 taca Exp $ bin/mgp bin/mgp2ps bin/mgpembed @@ -33,6 +33,7 @@ share/examples/mgp/embed-jp.mgp share/examples/mgp/embed.mgp share/examples/mgp/gradation-jp.mgp share/examples/mgp/gradation.mgp +share/examples/mgp/m17n-lib.mgp share/examples/mgp/mgp-old1.jpg share/examples/mgp/mgp-old2.jpg share/examples/mgp/mgp-old3.jpg @@ -44,6 +45,7 @@ share/examples/mgp/mgprc-sample share/examples/mgp/multilingual.mgp share/examples/mgp/sample-fr.mgp share/examples/mgp/sample-jp.mgp +share/examples/mgp/sample-jp-xft.mgp share/examples/mgp/sample.mgp share/examples/mgp/sendmail6-jp.mgp share/examples/mgp/sendmail6.mgp diff --git a/graphics/magicpoint/distinfo b/graphics/magicpoint/distinfo index d53380e1302..6e53eb97b06 100644 --- a/graphics/magicpoint/distinfo +++ b/graphics/magicpoint/distinfo @@ -1,18 +1,31 @@ -$NetBSD: distinfo,v 1.15 2006/02/23 20:49:49 joerg Exp $ +$NetBSD: distinfo,v 1.16 2008/09/10 13:32:47 taca Exp $ -SHA1 (magicpoint-1.10a.tar.gz) = 7510ee965316cb52eac7a430f0e19a87a337fe5c -RMD160 (magicpoint-1.10a.tar.gz) = 167bf8b57bd4bb98c8f4fdba82a5733dda1f8a6a -Size (magicpoint-1.10a.tar.gz) = 843657 bytes -SHA1 (patch-aa) = f4d97279e878a58900ceff5ea07c61ca678e61f5 -SHA1 (patch-ab) = 0553e8369f3337e53ecd8a8926ceeed9757953b8 -SHA1 (patch-ac) = 1b2de41c2a8da28c9023552eff676c40069630fe -SHA1 (patch-ad) = d6dd11bee4091de4f1c8d5fffa61987d16a063e1 -SHA1 (patch-ae) = c293c8f9c406fe8f090378b328b6bdbe89050eee -SHA1 (patch-af) = b52455c3018d5de4ee7d20c42680df8978f15b55 -SHA1 (patch-ag) = 02e53e3e498b150d528349c9712978f164e8836f -SHA1 (patch-ah) = 2cd87d9697be2ebd9d7c0a936d49583286de62d3 +SHA1 (magicpoint-1.13a.tar.gz) = 2bc662ad0a482d42578766258a143b06a4718ae3 +RMD160 (magicpoint-1.13a.tar.gz) = 067d7dee3b90ec354975d9ad4ea0c0df48cca191 +Size (magicpoint-1.13a.tar.gz) = 890670 bytes +SHA1 (patch-aa) = 7270255c2002c66d10ab911ed22ce67067183e17 +SHA1 (patch-ab) = eb6558d6981e5d5f41f55dddc1b3debc9ca27d36 +SHA1 (patch-ac) = 9442e1893475ff53180f7facce0f31bf2e412759 +SHA1 (patch-ad) = 33c8fa61cb03cb53ad8783d2d79fa457cb21d235 +SHA1 (patch-ae) = ca59b94955f2de6f19ea1e2210ede7eaeba50a95 +SHA1 (patch-af) = 615e845dfbeba9b35c5a138841962631dac3b4bb +SHA1 (patch-ag) = 96d7cac9157b9183dd2ba76b12f0927fc15dd5a6 SHA1 (patch-ai) = 809b2cf509bab0ee1bed1fecb2cf2d8df912ce8b SHA1 (patch-aj) = 07ed5e995bf35dcbe65fc7c0ab800d1b8905e004 -SHA1 (patch-ak) = bb1364f9fec905e09eb7453a4bc0a8cab557b3b3 -SHA1 (patch-al) = a0956fc353d38f937d3829fa0e6cd70c9cb60faa -SHA1 (patch-am) = ba255a9e749f627d777cebbd29521b8c368d69dc +SHA1 (patch-al) = 25faf28b240d90ead9a4283e46d1461118c509df +SHA1 (patch-am) = dcc58a02946353262a78d5dfd81f81b25990019e +SHA1 (patch-an) = f5e3158b972feb20bf464e57c703e871537d074e +SHA1 (patch-ao) = 64ba2d7ceaf6429f4bb8b88bebb26a83c12fbacd +SHA1 (patch-ap) = 6c81429affe9dce518c304178dd6dfe571e5e44c +SHA1 (patch-aq) = 1c67df7538626e9a497e702e246291155417892a +SHA1 (patch-ar) = 8279fba385c3013626aa74401201e37246c9cc82 +SHA1 (patch-as) = 05a1f6ab546127a94a34fd371c455461a46ffdd7 +SHA1 (patch-at) = 61a70481cbc370589f695109d9a593c97644617b +SHA1 (patch-au) = 9c15ef5fa369d4513a46192eeea1b7c4a73bce8e +SHA1 (patch-av) = 05d19e06a2f1341da063da537d46232e99fae35d +SHA1 (patch-aw) = 44e83a46c170b632ec576995fc6a0b752a4caf42 +SHA1 (patch-ax) = 130159e6b03f5d6acf39de108c91dbb87302832a +SHA1 (patch-ay) = 4c618b7c51f8b41a472ddd6cba938a2ccb3d91e1 +SHA1 (patch-az) = 893ec7e21199205c07933d5525a6eb394114fd11 +SHA1 (patch-ba) = 938e5714ddfcb8ca64d1cc6f756eeb69e592905d +SHA1 (patch-bb) = 3a6c328adcb49aef0d4792ceff08407fcbc80c16 diff --git a/graphics/magicpoint/options.mk b/graphics/magicpoint/options.mk new file mode 100644 index 00000000000..0f8ee97ee07 --- /dev/null +++ b/graphics/magicpoint/options.mk @@ -0,0 +1,48 @@ +# $NetBSD: options.mk,v 1.1 2008/09/10 13:32:47 taca Exp $ + +.include "../../mk/bsd.prefs.mk" + +PKG_OPTIONS_VAR= PKG_OPTIONS.magicpoint +PKG_SUPPORTED_OPTIONS= freetype vflib xft2 +PKG_SUGGESTED_OPTIONS= xft2 + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mfreetype) +CONFIGURE_ARGS+= --enable-freetype +MGP_TFONT= % % +MGP_VFONT= # empty +.include "../../graphics/freetype-lib/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-freetype +.endif + +.if !empty(PKG_OPTIONS:Mvflib) +CONFIGURE_ARGS+= --enable-vflib +MGP_TFONT= # empty +MGP_VFONT= % % +.include "../../print/ja-vflib-lib/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-vflib +.endif + +.if !empty(PKG_OPTIONS:Mxft2) +CONFIGURE_ARGS+= --enable-xft2 +MGP_XFONT= # empty +MGP_TFONT= % % +MGP_VFONT= % % + +.include "../../x11/libXft/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-xft2 +.endif + +.include "../../graphics/imlib/buildlink3.mk" + + +# +# fall back defaults +# +MGP_VFONT?= % % +MGP_TFONT?= % % +MGP_XFONT?= % % diff --git a/graphics/magicpoint/patches/patch-aa b/graphics/magicpoint/patches/patch-aa index 6ac2325b19e..7eb8d22f41a 100644 --- a/graphics/magicpoint/patches/patch-aa +++ b/graphics/magicpoint/patches/patch-aa @@ -1,62 +1,50 @@ -$NetBSD: patch-aa,v 1.10 2004/01/12 15:19:28 wennmach Exp $ +$NetBSD: patch-aa,v 1.11 2008/09/10 13:32:47 taca Exp $ ---- configure.orig 2003-05-28 14:34:23.000000000 +0900 -+++ configure 2004-01-11 04:18:35.000000000 +0900 -@@ -4108,7 +4108,7 @@ +--- configure.orig 2007-12-29 05:31:26.000000000 +0900 ++++ configure +@@ -5090,7 +5090,7 @@ if test "$mgp_use_freetype" = "yes"; the # 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 + { echo "$as_me:$LINENO: checking for freetype1 library/header" >&5 + echo $ECHO_N "checking for freetype1 library/header... $ECHO_C" >&6; } +- for dir in $SEARCHPATH /usr/local/freetype /usr/local /opt/freetype /usr/pkg /usr /usr/include/freetype1 /sw; 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/.*\///'` -@@ -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 @@ + shlib=`echo $dir/lib/libttf.$SHLIBEXT* | head -n 1 | sed -e 's/.*\///'` +@@ -5384,7 +5384,7 @@ echo "${ECHO_T}$mgp_use_vflib" >&6; } 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 -- for dir in /usr/local/VFlib /usr/local/vflib /usr/local /usr/pkg /usr; do + { echo "$as_me:$LINENO: checking for VFlib library/header" >&5 + echo $ECHO_N "checking for VFlib library/header... $ECHO_C" >&6; } +- for dir in $SEARCHPATH /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 -@@ -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 +@@ -5562,12 +5562,7 @@ fi + if test -f "$with_vfontcap"; then + ac_cv_vf_fontcap=$with_vfontcap; + else +- for ac_dir in /usr/local/lib /usr/local/lib/tex \ +- /usr/local/lib/VFlib /usr/local/lib/fonts/vf \ +- /usr/local/lib /usr/local/etc /etc \ +- /usr/local/libdata/vflib /usr/local/share/VFlib \ +- /usr/local/share/VFlib/* \ +- ../../VFlib* ../VFlib* VFlib*; do ++ for ac_dir in ${prefix}/share/VFlib/*; do if test -d $ac_dir -a -f $ac_dir/vfontcap; then ac_cv_vf_fontcap=$ac_dir/vfontcap; -@@ -4857,17 +4856,15 @@ + break +@@ -5609,22 +5604,17 @@ _ACEOF 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 +- for pnglib in libpng libpng12 libpng10 +- do +- if pkg-config $pnglib; then +- LIBS="$LIBS `pkg-config --libs $pnglib`" +- OPTFLAGS="$OPTFLAGS `pkg-config --cflags $pnglib`" +- 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`" @@ -64,14 +52,17 @@ $NetBSD: patch-aa,v 1.10 2004/01/12 15:19:28 wennmach Exp $ #define USE_PNG 1 _ACEOF -- fi - else -- for i in /usr/pkg /usr/local /usr; do -+ for i in ${BUILDLINK_DIR}; do + break +- fi +- done + fi + if test "$use_libpng" = ""; then +-for i in $SEARCHPATH /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 +5007,7 @@ +@@ -5779,7 +5769,7 @@ fi done fi @@ -80,7 +71,36 @@ $NetBSD: patch-aa,v 1.10 2004/01/12 15:19:28 wennmach 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 +5644,7 @@ +@@ -6193,23 +6183,19 @@ fi + { 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 + + mgp_xft2_found="yes"; +- fi + fi + if test "$mgp_xft2_found" != "yes"; then + { 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/X11R6/include/freetype2 \ +- /usr/local/include /usr/include/freetype2; do ++ for dir in ${BUILDLINK_DIR}; do + if test -f $dir/X11/Xft/Xft.h; then + ac_cv_xft2_hdrdir="$dir" + fi +@@ -6984,7 +6970,7 @@ fi echo 'FATAL: You need libungif to use gif images. pass proper LIBS to configure.' exit 1 fi @@ -89,9 +109,9 @@ $NetBSD: patch-aa,v 1.10 2004/01/12 15:19:28 wennmach Exp $ if test -f $i/include/gif_lib.h; then gif_h_ok=yes OPTFLAGS="$OPTFLAGS -I$i/include" -@@ -5677,16 +5674,14 @@ - echo "$as_me:$LINENO: result: $mgp_imlib" >&5 - echo "${ECHO_T}$mgp_imlib" >&6 +@@ -7146,16 +7132,14 @@ fi + { 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 @@ -108,9 +128,9 @@ $NetBSD: patch-aa,v 1.10 2004/01/12 15:19:28 wennmach Exp $ 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 "$as_me:$LINENO: checking for Imlib_init in -lImlib" >&5 + echo $ECHO_N "checking for Imlib_init in -lImlib... $ECHO_C" >&6; } +@@ -7232,7 +7216,7 @@ fi echo 'FATAL: You need libImlib to use Imlib loading. pass proper LIBS to configure.' exit 1 fi diff --git a/graphics/magicpoint/patches/patch-ab b/graphics/magicpoint/patches/patch-ab index 32239b345ba..9796ca47e7d 100644 --- a/graphics/magicpoint/patches/patch-ab +++ b/graphics/magicpoint/patches/patch-ab @@ -1,12 +1,53 @@ -$NetBSD: patch-ab,v 1.3 2004/04/27 15:42:58 adam Exp $ +$NetBSD: patch-ab,v 1.4 2008/09/10 13:32:47 taca Exp $ ---- mgp.h.orig 2004-04-27 17:39:53.000000000 +0000 +--- mgp.h.orig 2008-01-19 02:43:20.000000000 +0900 +++ mgp.h -@@ -62,6 +62,7 @@ - #include <X11/cursorfont.h> - #include <X11/Xatom.h> +@@ -64,7 +64,9 @@ #ifdef USE_XFT2 -+#include <ft2build.h> - #include <freetype/freetype.h> - #include <fontconfig/fontconfig.h> + #include <ft2build.h> + #include FT_FREETYPE_H +-#include <fontconfig/fontconfig.h> ++#include FT_CONFIG_CONFIG_H ++#include <freetype2/freetype/fterrors.h> ++#include <freetype2/freetype/freetype.h> #include <X11/Xft/Xft.h> + #ifdef HAVE_ICONV + #include <iconv.h> +@@ -308,6 +310,12 @@ struct ctrl_pcache { + struct ctrl { + u_char ct_op; + u_char ct_flag; ++ enum { ++ CTRL_DOUBLE, CTRL_INT, CTRL_INT2, CTRL_INT3, ++ CTRL_LONG, CTRL_CHAR, CTRL_CHAR2, CTRL_IMAGE, ++ CTRL_GRAD, CTRL_BAR, CTRL_ARGS, CTRL_ICON, ++ CTRL_AREA, CTRL_PCACHE, CTRL_VOID ++ } ct_type; + u_int ct_page; + struct ctrl *ct_next; + union { +@@ -745,6 +753,11 @@ extern int get_regid __P((char *)); + extern void draw_line_itemsize __P((struct render_state *, int, int, int)); + extern void draw_line_start __P((struct render_state *)); + extern void draw_line_end __P ((struct render_state *)); ++#ifdef USE_IMLIB ++int search_zimage(int, int, int); ++void zoomin_zimage(int); ++void zoomout_zimage(int); ++#endif + + #ifdef USE_M17N + extern int obj_new_mtext __P((struct render_state *, int, int, +@@ -843,6 +856,12 @@ extern void usleep __P((u_int)); + #define COLOR_BUGFIX + #endif + ++#ifdef MNG ++/*mng.c*/ ++void mngload(char *, int, int, int, int); ++void mngpreload(struct render_state *, char *, int *, int *); ++#endif ++ + #ifdef USE_M17N + /*m17n.c*/ + extern void M17N_init __P((void)); diff --git a/graphics/magicpoint/patches/patch-ac b/graphics/magicpoint/patches/patch-ac index b6cc6cb231e..03d3fc8dfb9 100644 --- a/graphics/magicpoint/patches/patch-ac +++ b/graphics/magicpoint/patches/patch-ac @@ -1,9 +1,9 @@ -$NetBSD: patch-ac,v 1.2 2003/09/11 16:09:41 jmmv Exp $ +$NetBSD: patch-ac,v 1.3 2008/09/10 13:32:47 taca Exp $ ---- Imakefile.in.orig 2001-02-03 19:46:49.000000000 +0100 +--- Imakefile.in.orig 2007-12-03 18:08:40.000000000 +0900 +++ Imakefile.in @@ -22,8 +22,9 @@ LEX= @LEX@ - OPTFLAGS= @OPTFLAGS@ + OPTFLAGS= @OPTFLAGS@ ${CPPFLAGS} DEFS= @DEFS@ -DMGPLIBDIR=\"$(LIBDIR)/mgp\" #DEFS+= -DGLYPHEDGE +DEPENDFLAGS= $(DEFS) $(OPTFLAGS) diff --git a/graphics/magicpoint/patches/patch-ad b/graphics/magicpoint/patches/patch-ad index a5f84da3d89..874e18c3474 100644 --- a/graphics/magicpoint/patches/patch-ad +++ b/graphics/magicpoint/patches/patch-ad @@ -1,13 +1,26 @@ -$NetBSD: patch-ad,v 1.1 2004/01/12 15:19:28 wennmach Exp $ +$NetBSD: patch-ad,v 1.2 2008/09/10 13:32:47 taca 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 +--- parse.c.orig 2007-11-25 02:35:28.000000000 +0900 ++++ parse.c +@@ -470,13 +470,14 @@ read_file(fp, filename, page, line, prea + case CTL_TAB: + { + int i = root->cti_value; +- if (i < 0) { +- fprintf(stderr, "%s:%d: " +- "invalid tab index %d\n", +- filename, lineno, root->cti_value); +- exit(-1); +- } +- if (i >= MAXTAB) { /*XXX*/ ++ if (root->ct_type == CTRL_INT) { ++ if (i < 0 || i >= MAXTAB ) { ++ fprintf(stderr, "%s:%d: " ++ "invalid tab index %d\n", ++ filename, lineno, root->cti_value); ++ exit(-1); ++ } ++ } else { + /* must be a string */ + /* find a free entry */ + for (i = MAXTAB ; i < MAXTAB + MAXSTYLE ; i++) { diff --git a/graphics/magicpoint/patches/patch-ae b/graphics/magicpoint/patches/patch-ae index 05bf14096f0..8c576694be5 100644 --- a/graphics/magicpoint/patches/patch-ae +++ b/graphics/magicpoint/patches/patch-ae @@ -1,14 +1,8 @@ -$NetBSD: patch-ae,v 1.2 2005/04/07 23:11:57 hira Exp $ +$NetBSD: patch-ae,v 1.3 2008/09/10 13:32:47 taca Exp $ ---- draw.c.orig 2003-05-14 16:45:35.000000000 +0900 -+++ draw.c 2005-04-08 07:31:28.000000000 +0900 -@@ -4498,12 +4498,12 @@ - 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"}; +--- draw.c.orig 2008-01-25 00:43:17.000000000 +0900 ++++ draw.c +@@ -5243,7 +5243,7 @@ xft_draw_fragment(state, p, len, registr static char prefix[3][20] = { "\033$B", "\033$A", "\033$(C"}; char buf16[1024], *p16; char out16[1024], *o16; @@ -17,14 +11,18 @@ $NetBSD: patch-ae,v 1.2 2005/04/07 23:11:57 hira Exp $ #ifdef HAVE_ICONV static iconv_t icv[3]; #endif -@@ -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; - } +@@ -5471,12 +5471,12 @@ xft_setfont(xfontarg, csize, registry) + XFT_FAMILY, XftTypeString, font, + XFT_ENCODING, XftTypeString, registry, + XFT_STYLE, XftTypeString, style, +- XFT_PIXEL_SIZE, XftTypeDouble, (float)csize, 0); ++ XFT_PIXEL_SIZE, XftTypeDouble, (double)csize, NULL); + } else { + xftfont = XftFontOpen(display, screen, + XFT_FAMILY, XftTypeString, font, + XFT_ENCODING, XftTypeString, registry, +- XFT_PIXEL_SIZE, XftTypeDouble, (float)csize, 0); ++ XFT_PIXEL_SIZE, XftTypeDouble, (double)csize, NULL); + } + if (xftfont == 0) { + free(xfont); diff --git a/graphics/magicpoint/patches/patch-af b/graphics/magicpoint/patches/patch-af index f5419218202..56560a99e08 100644 --- a/graphics/magicpoint/patches/patch-af +++ b/graphics/magicpoint/patches/patch-af @@ -1,13 +1,28 @@ -$NetBSD: patch-af,v 1.1 2004/05/25 01:30:22 danw Exp $ +$NetBSD: patch-af,v 1.2 2008/09/10 13:32:47 taca Exp $ ---- image/image.h.orig Mon May 24 21:09:56 2004 +--- image/image.h.orig 2004-07-29 00:47:31.000000000 +0900 +++ image/image.h -@@ -182,6 +182,8 @@ unsigned long doMemToValLSB(); +@@ -10,6 +10,9 @@ + + #include "copyright.h" + #include <stdio.h> ++#ifdef HAVE_STDLIB_H ++#include <stdlib.h> ++#endif + + #if defined(SYSV) || defined(VMS) || 1 + #include <string.h> +@@ -182,13 +185,8 @@ unsigned long doMemToValLSB(); unsigned long doValToMemLSB(); void flipBits(); -+#define zopen mgp_zopen -+ - ZFILE *zopen(); +-#ifdef __APPLE__ +-/* darwin has zopen() */ + ZFILE *zzopen(); /* zio.c */ + #define zopen zzopen +-#else +-ZFILE *zopen(); /* zio.c */ +-#endif int zread(); - void zreset(); + int zgetc(); + char *zgets(); diff --git a/graphics/magicpoint/patches/patch-ag b/graphics/magicpoint/patches/patch-ag index 29405757d4f..a7b8e91c483 100644 --- a/graphics/magicpoint/patches/patch-ag +++ b/graphics/magicpoint/patches/patch-ag @@ -1,13 +1,16 @@ -$NetBSD: patch-ag,v 1.1 2004/05/25 01:30:22 danw Exp $ +$NetBSD: patch-ag,v 1.2 2008/09/10 13:32:47 taca Exp $ ---- image/new.c.orig Mon Dec 28 03:23:13 1998 +--- image/new.c.orig 2004-09-01 12:50:32.000000000 +0900 +++ image/new.c -@@ -11,7 +11,7 @@ +@@ -11,11 +11,7 @@ #include "copyright.h" #include "image.h" +-#ifdef __APPLE__ + #include <stdlib.h> +-#else -#include <malloc.h> -+#include <stdlib.h> +-#endif extern int _Xdebug; extern void memoryExhausted(void); diff --git a/graphics/magicpoint/patches/patch-ah b/graphics/magicpoint/patches/patch-ah deleted file mode 100644 index e6656b3a331..00000000000 --- a/graphics/magicpoint/patches/patch-ah +++ /dev/null @@ -1,41 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2004/11/30 17:29:30 taca Exp $ - ---- sample/default.mgp.template.orig 2004-10-20 00:33:13.000000000 +0900 -+++ sample/default.mgp.template -@@ -0,0 +1,36 @@ -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+%% -+%% Default font settings for xft2. -+%% -+%% %deffont "standard" xfont "serif" "iso8859-1", xfont "serif" "jisx0208.1983" -+%% %deffont "thick" xfont "sans-serif" "iso8859-1", xfont "sans-serif" "jisx0208.1983" -+%% %deffont "typewriter" xfont "sans-serif" "iso8859-1", xfont "sans-serif" "jisx0208.1983" -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+%% -+%% Default font settings for vflib. -+%% -+%% %deffont "standard" vfont "min" -+%% %deffont "thick" vfont "goth" -+%% %deffont "typewriter" vfont "goth" -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+%% -+%% Default font settings for freetype. -+%% -+%% %deffont "standard" tfont "standard.ttf", tmfont "kochi-mincho.ttf" -+%% %deffont "thick" tfont "thick.ttf", tmfont "goth.ttf" -+%% %deffont "typewriter" tfont "typewriter.ttf", tmfont "goth.ttf" -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+%% -+%% Default settings per each line numbers. -+%% -+%default 1 area 90 90, leftfill, size 2, fore "white", back "black", font "thick" -+%default 2 size 7, vgap 10, prefix " " -+%default 3 size 2, bar "gray70", vgap 10 -+%default 4 size 5, fore "white", vgap 30, prefix " ", font "standard" -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+%% -+%% Default settings that are applied to TAB-indented lines. -+%% -+%tab 1 size 5, vgap 40, prefix " ", icon box "green" 50 -+%tab 2 size 4, vgap 40, prefix " ", icon arc "yellow" 50 -+%tab 3 size 3, vgap 40, prefix " ", icon delta3 "white" 40 diff --git a/graphics/magicpoint/patches/patch-ak b/graphics/magicpoint/patches/patch-ak deleted file mode 100644 index f20cb2c0c17..00000000000 --- a/graphics/magicpoint/patches/patch-ak +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2006/02/23 20:49:49 joerg Exp $ - ---- mng.c.orig 2006-02-23 20:22:29.000000000 +0000 -+++ mng.c -@@ -43,6 +43,8 @@ typedef struct { - mng_uint32 delay; /* ticks to wait before resuming decode */ - } mngstuff; - -+void mng_window_setup(mngstuff *, int, int, int, int); -+ - /* callbacks for the mng decoder */ - - /* memory allocation; data must be zeroed */ diff --git a/graphics/magicpoint/patches/patch-al b/graphics/magicpoint/patches/patch-al index 0a5674d0546..f4cf895db2c 100644 --- a/graphics/magicpoint/patches/patch-al +++ b/graphics/magicpoint/patches/patch-al @@ -1,6 +1,6 @@ -$NetBSD: patch-al,v 1.1 2006/02/23 20:49:49 joerg Exp $ +$NetBSD: patch-al,v 1.2 2008/09/10 13:32:47 taca Exp $ ---- image/imagetypes.c.orig 2006-02-23 20:28:04.000000000 +0000 +--- image/imagetypes.c.orig 2001-01-18 18:07:14.000000000 +0900 +++ image/imagetypes.c @@ -50,7 +50,6 @@ static struct imagetypes { }; diff --git a/graphics/magicpoint/patches/patch-am b/graphics/magicpoint/patches/patch-am index b2c9267e685..b465888770c 100644 --- a/graphics/magicpoint/patches/patch-am +++ b/graphics/magicpoint/patches/patch-am @@ -1,8 +1,8 @@ -$NetBSD: patch-am,v 1.1 2006/02/23 20:49:49 joerg Exp $ +$NetBSD: patch-am,v 1.2 2008/09/10 13:32:47 taca Exp $ ---- image/path.c.orig 2006-02-23 20:30:55.000000000 +0000 +--- image/path.c.orig 2004-07-29 00:47:31.000000000 +0900 +++ image/path.c -@@ -24,8 +24,6 @@ +@@ -27,8 +27,6 @@ /* SUPPRESS 530 */ /* SUPPRESS 560 */ diff --git a/graphics/magicpoint/patches/patch-an b/graphics/magicpoint/patches/patch-an new file mode 100644 index 00000000000..b1f9dec5fec --- /dev/null +++ b/graphics/magicpoint/patches/patch-an @@ -0,0 +1,15 @@ +$NetBSD: patch-an,v 1.1 2008/09/10 13:32:47 taca Exp $ + +--- ctlwords.c.orig 1999-02-15 08:02:25.000000000 +0900 ++++ ctlwords.c +@@ -24,7 +24,10 @@ BEGIN { + + #include <stdio.h> + #include <string.h> ++#include <ctype.h> ++#include <stdlib.h> + ++int + main(int argc, char *argv[]) + { + char buf[1024]; diff --git a/graphics/magicpoint/patches/patch-ao b/graphics/magicpoint/patches/patch-ao new file mode 100644 index 00000000000..bef6945f57c --- /dev/null +++ b/graphics/magicpoint/patches/patch-ao @@ -0,0 +1,158 @@ +$NetBSD: patch-ao,v 1.1 2008/09/10 13:32:47 taca Exp $ + +--- grammar.y.orig 2008-01-19 02:43:20.000000000 +0900 ++++ grammar.y +@@ -130,6 +130,7 @@ gen_void(op) + yyerror("cannot allocate void node"); + return ct; + } ++ ct->ct_type = CTRL_VOID; + return ct; + } + +@@ -145,6 +146,7 @@ gen_double_int(op, v) + return ct; + } + ct->ctf_value = (double)v; ++ ct->ct_type = CTRL_DOUBLE; + return ct; + } + +@@ -160,6 +162,7 @@ gen_double(op, v) + return ct; + } + ct->ctf_value = v; ++ ct->ct_type = CTRL_DOUBLE; + return ct; + } + +@@ -175,6 +178,7 @@ gen_int(op, v) + return ct; + } + ct->cti_value = v; ++ ct->ct_type = CTRL_INT; + return ct; + } + +@@ -192,6 +196,7 @@ gen_int2(op, v1, v2) + } + ct->cti2_value1 = v1; + ct->cti2_value2 = v2; ++ ct->ct_type = CTRL_INT2; + return ct; + } + +@@ -210,7 +215,8 @@ gen_int3(op, v1, v2, v3) + } + ct->cti3_value1 = v1; + ct->cti3_value2 = v2; +- ct->cti3_value3 = v3; ++ ct->cti3_value3 = v3; ++ ct->ct_type = CTRL_INT3; + return ct; + } + +@@ -226,6 +232,7 @@ gen_str(op, str) + return ct; + } + ct->ctc_value = strdup(str); ++ ct->ct_type = CTRL_CHAR; + return ct; + } + +@@ -243,6 +250,7 @@ gen_str2(op, str1, str2) + } + ct->ctc2_value1 = strdup(str1); + ct->ctc2_value2 = strdup(str2); ++ ct->ct_type = CTRL_CHAR2; + return ct; + } + +@@ -259,6 +267,7 @@ gen_color(op, color) + } + if (get_color(color, &ct->ctl_value) < 0) + yyerror("cannot allocate color \"%s\"", color); ++ ct->ct_type = CTRL_LONG; + return ct; + } + +@@ -284,6 +293,7 @@ gen_bgrad(w, h, colors, dir, zoomflg, ex + ct->ctd_numcolor = colors; + ct->ctd_dir = dir; + ct->ctd_zoomflag = zoomflg; ++ ct->ct_type = CTRL_GRAD; + + /* process color list. */ + siz = ct->ctd_g_colors = 0; +@@ -353,6 +363,7 @@ gen_newimage(arg) + } + + /* default setting */ ++ ct->ct_type = CTRL_IMAGE; + ct->ctm_ximagesize = 100; + ct->ctm_yimagesize = 100; + ct->ctm_zoomflag = Z_NORMAL | (Z_NORMAL << Z_YSHIFT); +@@ -463,6 +474,7 @@ gen_image(op, fname, colors, xsiz, ysiz, + yyerror("cannot allocate node (op=IMAGE)"); + return ct; + } ++ ct->ct_type = CTRL_IMAGE; + ct->ctm_fname = embed_fname(fname); + ct->ctm_numcolor = colors; + ct->ctm_ximagesize = xsiz; +@@ -511,6 +523,7 @@ gen_bar(color, thick, start, len) + } + if (get_color(color, &ct->ctb_color) < 0) + yyerror("cannot allocate color %s", color); ++ ct->ct_type = CTRL_BAR; + ct->ctb_width = thick; + ct->ctb_start = start; + ct->ctb_length = len; +@@ -542,6 +555,7 @@ gen_icon(n, color, siz) + yyerror("cannot allocate node (op=ICON)"); + return ct; + } ++ ct->ct_type = CTRL_ICON; + ct->ctic_value = n; + if (get_color(color, &ct->ctic_color) < 0) + yyerror("cannot allocate color %s", color); +@@ -562,6 +576,7 @@ gen_pcache(flag, mode, effect, value) + yyerror("cannot allocate node (op=PCACHE)"); + return ct; + } ++ ct->ct_type = CTRL_PCACHE; + ct->ctch_flag = flag; + ct->ctch_mode = mode; + ct->ctch_effect = effect; +@@ -580,6 +595,7 @@ gen_valign(align) + yyerror("cannot allocate node (op=VALIGN)"); + return ct; + } ++ ct->ct_type = CTRL_INT; + if (!strcmp(align, "center")) + ct->cti_value = VL_CENTER; + else { +@@ -629,6 +645,7 @@ gen_area(width, height, xoff, yoff) + ct->ctar_height = height; + ct->ctar_xoff = xoff; + ct->ctar_yoff = yoff; ++ ct->ct_type = CTRL_AREA; + return ct; + } + +@@ -663,6 +680,7 @@ gen_argsfromnid(op, nid) + siz++; + } + ct->cta_argv[siz] = NULL; ++ ct->ct_type = CTRL_ARGS; + + if (nid) + ctlfree(nid); +@@ -712,6 +730,7 @@ gen_argsfromstr(op, str, flag) + } + } + ct->cta_argv[ct->cta_argc] = NULL; ++ ct->ct_type = CTRL_ARGS; + + return ct; + } diff --git a/graphics/magicpoint/patches/patch-ap b/graphics/magicpoint/patches/patch-ap new file mode 100644 index 00000000000..dede6cb6d49 --- /dev/null +++ b/graphics/magicpoint/patches/patch-ap @@ -0,0 +1,60 @@ +$NetBSD: patch-ap,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- contrib/xwintoppm/dsimple.h.orig 1998-02-13 16:48:30.000000000 +0900 ++++ contrib/xwintoppm/dsimple.h +@@ -41,25 +41,25 @@ from the X Consortium. + + /* Global variables used by routines in just_display.c */ + +-char *program_name = "unknown_program"; /* Name of this program */ +-Display *dpy; /* The current display */ +-int screen; /* The current screen */ ++extern char *program_name; ++extern Display *dpy; ++extern int screen; + + #define INIT_NAME program_name=argv[0] /* use this in main to setup + program_name */ + + /* Declaritions for functions in just_display.c */ + +-void Fatal_Error(); +-char *Malloc(); +-char *Realloc(); +-char *Get_Display_Name(); +-Display *Open_Display(); +-void Setup_Display_And_Screen(); +-XFontStruct *Open_Font(); +-Pixmap ReadBitmapFile(); +-void WriteBitmapFile(); +-Window Select_Window_Args(); ++void Fatal_Error(char *msg, ...); ++char *Malloc(unsigned int); ++char *Realloc(char *, int); ++char *Get_Display_Name(int *, char **); ++Display *Open_Display(char *); ++void Setup_Display_And_Screen(int *, char **); ++XFontStruct *Open_Font(char *); ++Pixmap ReadBitmapFile(Drawable, char *, int*, int*, int*, int*); ++void WriteBitmapFile(char *, Pixmap, int, int, int, int); ++Window Select_Window_Args(int *, char **); + + #define X_USAGE "[host:display]" /* X arguments handled by + Get_Display_Name */ +@@ -73,9 +73,10 @@ Window Select_Window_Args(); + * Send bugs, etc. to chariot@athena.mit.edu. + */ + +-unsigned long Resolve_Color(); +-Pixmap Bitmap_To_Pixmap(); +-Window Select_Window(); +-void out(); +-void blip(); +-Window Window_With_Name(); ++unsigned long Resolve_Color(Window, char *); ++Pixmap Bitmap_To_Pixmap(Display *, Drawable, GC, Pixmap, int, int); ++Window Select_Window(Display *); ++void blip(void); ++Window Window_With_Name(Display *, Window, char *); ++void outl(char *, ...); ++void usage(void); diff --git a/graphics/magicpoint/patches/patch-aq b/graphics/magicpoint/patches/patch-aq new file mode 100644 index 00000000000..3468e2eb421 --- /dev/null +++ b/graphics/magicpoint/patches/patch-aq @@ -0,0 +1,101 @@ +$NetBSD: patch-aq,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- contrib/xwintoppm/dsimple.c.orig 1998-02-13 16:48:29.000000000 +0900 ++++ contrib/xwintoppm/dsimple.c +@@ -35,6 +35,8 @@ from the X Consortium. + #include <X11/Xutil.h> + #include <X11/cursorfont.h> + #include <stdio.h> ++#include <stdarg.h> ++ + /* + * Other_stuff.h: Definitions of routines in other_stuff. + * +@@ -47,14 +49,9 @@ char *malloc(), realloc(); + #include <stdlib.h> + #endif + ++#include "dsimple.h" ++ + extern Bool silent; +-unsigned long Resolve_Color(); +-Pixmap Bitmap_To_Pixmap(); +-Window Select_Window(); +-void out(); +-void blip(); +-Window Window_With_Name(); +-void Fatal_Error(); + + /* + * Just_display: A group of routines designed to make the writting of simple +@@ -68,16 +65,16 @@ void Fatal_Error(); + + + /* This stuff is defined in the calling program by just_display.h */ +-extern char *program_name; +-extern Display *dpy; +-extern int screen; ++char *program_name = "unknown_program"; /* Name of this program */ ++Display *dpy; /* The current display */ ++int screen; /* The current screen */ + + + /* + * Malloc: like malloc but handles out of memory using Fatal_Error. + */ + char *Malloc(size) +- unsigned size; ++ unsigned int size; + { + char *data; + +@@ -401,7 +398,7 @@ Pixmap Bitmap_To_Pixmap(dpy, d, gc, bitm + /* + * blip: a debugging routine. Prints Blip! on stderr with flushing. + */ +-void blip() ++void blip(void) + { + outl("blip!"); + } +@@ -495,12 +492,15 @@ Window Window_With_Name(dpy, top, name) + * printf with up to 7 arguments. + */ + /* VARARGS1 */ +-outl(msg, arg0,arg1,arg2,arg3,arg4,arg5,arg6) +- char *msg; +- char *arg0, *arg1, *arg2, *arg3, *arg4, *arg5, *arg6; ++void ++outl(char *msg, ...) + { ++ va_list ap; ++ ++ va_start(ap, msg); + fflush(stdout); +- fprintf(stderr, msg, arg0, arg1, arg2, arg3, arg4, arg5, arg6); ++ fprintf(stderr, msg, ap); ++ va_end(ap); + fprintf(stderr, "\n"); + fflush(stderr); + } +@@ -511,14 +511,16 @@ outl(msg, arg0,arg1,arg2,arg3,arg4,arg5, + * Does not require dpy or screen defined. + */ + /* VARARGS1 */ +-void Fatal_Error(msg, arg0,arg1,arg2,arg3,arg4,arg5,arg6) +-char *msg; +-char *arg0, *arg1, *arg2, *arg3, *arg4, *arg5, *arg6; ++void Fatal_Error(char *msg, ...) + { ++ va_list ap; ++ ++ va_start(ap, msg); + fflush(stdout); + fflush(stderr); + fprintf(stderr, "%s: error: ", program_name); +- fprintf(stderr, msg, arg0, arg1, arg2, arg3, arg4, arg5, arg6); ++ vfprintf(stderr, msg, ap); ++ va_end(ap); + fprintf(stderr, "\n"); + exit(1); + } diff --git a/graphics/magicpoint/patches/patch-ar b/graphics/magicpoint/patches/patch-ar new file mode 100644 index 00000000000..e4c3784b601 --- /dev/null +++ b/graphics/magicpoint/patches/patch-ar @@ -0,0 +1,73 @@ +$NetBSD: patch-ar,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- contrib/xwintoppm/xwintoppm.c.orig 1998-08-26 14:30:16.000000000 +0900 ++++ contrib/xwintoppm/xwintoppm.c +@@ -136,8 +136,10 @@ Bool silent = False; + Bool use_installed = False; + long add_pixel_value = 0; + +-extern int (*_XErrorFunction)(); +-extern int _XDefaultError(); ++void Error(char *); ++void Window_Dump(Window, FILE *); ++int Image_Size(XImage *); ++int Get_XColors(XWindowAttributes *, XColor **); + + static long parse_long (s) + char *s; +@@ -155,11 +157,12 @@ static long parse_long (s) + return (thesign * retval); + } + ++int + main(argc, argv) + int argc; + char **argv; + { +- register i; ++ register int i; + Window target_win; + FILE *out_file = stdout; + Bool frame_only = False; +@@ -280,7 +283,7 @@ XColor **colors ; + * Window_Dump: dump a window to a file which must already be open for + * writting. + */ +- ++void + Window_Dump(window, out) + Window window; + FILE *out; +@@ -609,6 +612,7 @@ Window_Dump(window, out) + /* + * Report the syntax for calling xwd. + */ ++void + usage() + { + fprintf (stderr, +@@ -622,7 +626,7 @@ usage() + /* + * Error - Fatal xwd error. + */ +- ++void + Error(string) + char *string; /* Error description string. */ + { +@@ -716,6 +720,7 @@ int Get_XColors(win_info, colors) + return ncolors ; + } + ++void + _swapshort (bp, n) + register char *bp; + register unsigned n; +@@ -731,6 +736,7 @@ _swapshort (bp, n) + } + } + ++void + _swaplong (bp, n) + register char *bp; + register unsigned n; diff --git a/graphics/magicpoint/patches/patch-as b/graphics/magicpoint/patches/patch-as new file mode 100644 index 00000000000..a44a85fdddd --- /dev/null +++ b/graphics/magicpoint/patches/patch-as @@ -0,0 +1,12 @@ +$NetBSD: patch-as,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/bright.c.orig 1998-12-28 17:22:53.000000000 +0900 ++++ image/bright.c +@@ -248,6 +248,7 @@ Image *normalize(image, verbose) + + void gray(image, verbose) + Image *image; ++ int verbose; + { int a; + unsigned int size; + Intensity intensity, red, green, blue; diff --git a/graphics/magicpoint/patches/patch-at b/graphics/magicpoint/patches/patch-at new file mode 100644 index 00000000000..e56ec157545 --- /dev/null +++ b/graphics/magicpoint/patches/patch-at @@ -0,0 +1,12 @@ +$NetBSD: patch-at,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/faces.c.orig 2001-08-31 02:10:30.000000000 +0900 ++++ image/faces.c +@@ -86,6 +86,7 @@ static int nextInt(zf, len) + + Image *facesLoad(fullname, name, verbose) + char *fullname, *name; ++ int verbose; + { ZFILE *zf; + Image *image; + char fname[BUFSIZ]; diff --git a/graphics/magicpoint/patches/patch-au b/graphics/magicpoint/patches/patch-au new file mode 100644 index 00000000000..cd906ed67a2 --- /dev/null +++ b/graphics/magicpoint/patches/patch-au @@ -0,0 +1,84 @@ +$NetBSD: patch-au,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/rlelib.c.orig 2007-05-18 01:47:33.000000000 +0900 ++++ image/rlelib.c +@@ -428,6 +428,7 @@ register struct sv_globals * globals; + */ + void + RunSkipBlankLines(nblank, globals) ++int nblank; + register struct sv_globals * globals; + { + } +@@ -439,6 +440,7 @@ register struct sv_globals * globals; + */ + void + RunSetColor(c, globals) ++int c; + register struct sv_globals * globals; + { + } +@@ -451,6 +453,7 @@ register struct sv_globals * globals; + /* ARGSUSED */ + void + RunSkipPixels(nskip, last, wasrun, globals) ++int nskip, last, wasrun; + register struct sv_globals * globals; + { + } +@@ -462,6 +465,7 @@ register struct sv_globals * globals; + */ + void + RunNewScanLine(flag, globals) ++int flag; + register struct sv_globals * globals; + { + } +@@ -473,6 +477,7 @@ register struct sv_globals * globals; + void + Runputdata(buf, n, globals) + rle_pixel * buf; ++int n; + register struct sv_globals * globals; + { + } +@@ -485,6 +490,7 @@ register struct sv_globals * globals; + /* ARGSUSED */ + void + Runputrun(color, n, last, globals) ++int color, n, last; + register struct sv_globals * globals; + { + } +@@ -1391,6 +1397,7 @@ int dith_size = 16; + */ + void + dithermap(levels, gamma, rgbmap, divN, modN, magic) ++int levels; + double gamma; + int rgbmap[][3]; + int divN[256]; +@@ -1451,6 +1458,7 @@ int magic[16][16]; + */ + void + bwdithermap(levels, gamma, bwmap, divN, modN, magic) ++int levels; + double gamma; + int bwmap[]; + int divN[256]; +@@ -1677,6 +1685,7 @@ int gammamap[256]; + */ + int + dithergb(x, y, r, g, b, levels, divN, modN, magic) ++int x, y, r, g, b, levels; + int divN[256]; + int modN[256]; + int magic[16][16]; +@@ -1708,6 +1717,7 @@ int magic[16][16]; + */ + int + ditherbw(x, y, val, divN, modN, magic) ++int x, y, val; + int divN[256]; + int modN[256]; + int magic[16][16]; diff --git a/graphics/magicpoint/patches/patch-av b/graphics/magicpoint/patches/patch-av new file mode 100644 index 00000000000..5f071775f63 --- /dev/null +++ b/graphics/magicpoint/patches/patch-av @@ -0,0 +1,12 @@ +$NetBSD: patch-av,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/rotate.c.orig 2003-08-23 15:22:09.000000000 +0900 ++++ image/rotate.c +@@ -40,6 +40,7 @@ int *new_pos; /* Destination bit posi + Image *rotate(simage, degrees, verbose) + Image *simage; /* Image to rotate */ + int degrees; /* Number of degrees to rotate */ ++int verbose; + { + char buf[BUFSIZ]; /* New title */ + Image *image1; /* Source image */ diff --git a/graphics/magicpoint/patches/patch-aw b/graphics/magicpoint/patches/patch-aw new file mode 100644 index 00000000000..3d8e86cf1ff --- /dev/null +++ b/graphics/magicpoint/patches/patch-aw @@ -0,0 +1,12 @@ +$NetBSD: patch-aw,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/smooth.c.orig 1998-02-13 16:49:04.000000000 +0900 ++++ image/smooth.c +@@ -74,6 +74,7 @@ static Image *doSmooth(image) + + Image *smooth(image, iterations, verbose) + Image *image; ++ int iterations; + int verbose; + { int a; + Image *old, *new; diff --git a/graphics/magicpoint/patches/patch-ax b/graphics/magicpoint/patches/patch-ax new file mode 100644 index 00000000000..22d46a76652 --- /dev/null +++ b/graphics/magicpoint/patches/patch-ax @@ -0,0 +1,22 @@ +$NetBSD: patch-ax,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/window.c.orig 2004-07-29 00:47:31.000000000 +0900 ++++ image/window.c +@@ -16,7 +16,7 @@ + #include <signal.h> + #include <errno.h> + #include <sys/types.h> +-#ifdef SYSV ++#if HAVE_UNISTD_H + #include <unistd.h> + #endif + #if TIME_WITH_SYS_TIME +@@ -224,7 +224,7 @@ void setViewportColormap(disp, scrn, vis + int scrn; + Visual *visual; + { XSetWindowAttributes swa; +- static cmap_atom= None; ++ static int cmap_atom= None; + Window cmap_windows[2]; + + if (cmap_atom == None) diff --git a/graphics/magicpoint/patches/patch-ay b/graphics/magicpoint/patches/patch-ay new file mode 100644 index 00000000000..88605acb634 --- /dev/null +++ b/graphics/magicpoint/patches/patch-ay @@ -0,0 +1,16 @@ +$NetBSD: patch-ay,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/zio.c.orig 2004-07-29 00:47:31.000000000 +0900 ++++ image/zio.c +@@ -134,11 +134,7 @@ void zreset(filename) + } + } + +-#ifdef __APPLE__ + ZFILE *zzopen(name) +-#else +-ZFILE *zopen(name) +-#endif + char *name; + { int a; + ZFILE *zf; diff --git a/graphics/magicpoint/patches/patch-az b/graphics/magicpoint/patches/patch-az new file mode 100644 index 00000000000..1f931ef38b7 --- /dev/null +++ b/graphics/magicpoint/patches/patch-az @@ -0,0 +1,12 @@ +$NetBSD: patch-az,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- image/zoom.c.orig 2003-08-23 15:22:09.000000000 +0900 ++++ image/zoom.c +@@ -39,6 +39,7 @@ static unsigned int *buildIndex(width, z + Image *zoom(oimage, xzoom, yzoom, verbose) + Image *oimage; + float xzoom, yzoom; ++ int verbose; + { char buf[BUFSIZ]; + Image *image=NULL; + unsigned int *xindex, *yindex; diff --git a/graphics/magicpoint/patches/patch-ba b/graphics/magicpoint/patches/patch-ba new file mode 100644 index 00000000000..fcc3b8a4610 --- /dev/null +++ b/graphics/magicpoint/patches/patch-ba @@ -0,0 +1,44 @@ +$NetBSD: patch-ba,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- sample/default.mgp.orig 2001-08-11 01:40:54.000000000 +0900 ++++ sample/default.mgp +@@ -1,20 +1,24 @@ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %% +-%% This default.mgp is "TrueType fonts" oriented. +-%% First, you should create "~/.mgprc" whose contents are: +-%% tfdir "/path/to/truetype/fonts" +-%% +-%% To visualize English, install "standard.ttf", "thick.ttf", and +-%% "typewriter.ttf" into the "tfdir" directory above: +-%% ftp://ftp.mew.org/pub/mgp/ttf-us.tar.gz +-%% +-%% To visualize Japanese, install "kochi-mincho.ttf" and "goth.ttf" +-%% into the "tfdir" directory above: +-%% ftp://ftp.mew.org/pub/mgp/ttf-jp.tar.gz +-%% +-%deffont "standard" tfont "standard.ttf", tmfont "kochi-mincho.ttf" +-%deffont "thick" tfont "thick.ttf", tmfont "goth.ttf" +-%deffont "typewriter" tfont "typewriter.ttf", tmfont "goth.ttf" ++%% Default font settings for xft2. ++%% ++%@MGP_XFONT@deffont "standard" xfont "serif" "iso8859-1", xfont "serif" "jisx0208.1983" ++%@MGP_XFONT@deffont "thick" xfont "sans-serif" "iso8859-1", xfont "sans-serif" "jisx0208.1983" ++%% %ddeffont "typewriter" xfont "sans-serif" "iso8859-1", xfont "sans-serif" "jisx0208.1983" ++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++%% ++%% Default font settings for vflib. ++%% ++%@MGP_VFONT@deffont "standard" vfont "min" ++%@MGP_VFONT@deffont "thick" vfont "goth" ++%@MGP_VFONT@deffont "typewriter" vfont "goth" ++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++%% ++%% Default font settings for freetype. ++%% ++%@MGP_TFONT@deffont "standard" tfont "standard.ttf", tmfont "kochi-mincho.ttf" ++%@MGP_TFONT@deffont "thick" tfont "thick.ttf", tmfont "goth.ttf" ++%@MGP_TFONT@deffont "typewriter" tfont "typewriter.ttf", tmfont "goth.ttf" + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %% + %% Default settings per each line numbers. diff --git a/graphics/magicpoint/patches/patch-bb b/graphics/magicpoint/patches/patch-bb new file mode 100644 index 00000000000..549c3d433d0 --- /dev/null +++ b/graphics/magicpoint/patches/patch-bb @@ -0,0 +1,13 @@ +$NetBSD: patch-bb,v 1.1 2008/09/10 13:32:48 taca Exp $ + +--- x11.c.orig 2008-01-25 00:43:17.000000000 +0900 ++++ x11.c +@@ -355,7 +355,7 @@ init_win3() + void + toggle_fullscreen() + { +- static fullscreen = 0; ++ static int fullscreen = 0; + XClientMessageEvent xev; + + fullscreen = ++fullscreen % 2; |