Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
MagicPoint is an X11 based presentation tool. It is designed to make
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).

View File

@@ -0,0 +1,80 @@
# $NetBSD: Makefile,v 1.87 2013/06/23 14:58:27 wiz Exp $
DISTNAME= magicpoint-1.13a
PKGREVISION= 18
CATEGORIES= x11 graphics
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://member.wide.ad.jp/wg/mgp/
COMMENT= X11 based presentation tool
LICENSE= modified-bsd
CONFLICTS= mgp-[0-9]*
GNU_CONFIGURE= yes
USE_IMAKE= yes
USE_LANGUAGES+= c99
USE_TOOLS+= perl
USE_TOOLS+= pkg-config
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}
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''.
#
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
post-install:
.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
.include "../../mk/giflib.buildlink3.mk"
.include "../../graphics/mng/buildlink3.mk"
.include "../../graphics/netpbm/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXmu/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

57
graphics/magicpoint/PLIST Normal file
View File

@@ -0,0 +1,57 @@
@comment $NetBSD: PLIST,v 1.4 2009/06/14 17:59:23 joerg Exp $
bin/mgp
bin/mgp2ps
bin/mgpembed
bin/mgpnet
bin/xwintoppm
lib/X11/mgp/default.mgp
lib/X11/mgp/mgp1.jpg
lib/X11/mgp/mgp2.jpg
lib/X11/mgp/mgp3.jpg
${IMAKE_MAN_DIR}/mgp.${IMAKE_MANNEWSUFFIX}
${IMAKE_MAN_DIR}/mgp2ps.${IMAKE_MANNEWSUFFIX}
${IMAKE_MAN_DIR}/mgpembed.${IMAKE_MANNEWSUFFIX}
${IMAKE_MAN_DIR}/mgpnet.${IMAKE_MANNEWSUFFIX}
${IMAKE_MAN_DIR}/xwintoppm.${IMAKE_MANNEWSUFFIX}
share/doc/mgp/COPYRIGHT
share/doc/mgp/COPYRIGHT.jp
share/doc/mgp/FAQ
share/doc/mgp/README
share/doc/mgp/README.fonts
share/doc/mgp/README.fonts.jp
share/doc/mgp/README.lang
share/doc/mgp/SYNTAX
share/doc/mgp/USAGE
share/doc/mgp/USAGE.jp
share/examples/mgp/README
share/examples/mgp/README.jp
share/examples/mgp/cloud.jpg
share/examples/mgp/dad.eps
share/examples/mgp/dad.jpg
share/examples/mgp/default.mgp
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
share/examples/mgp/mgp1.jpg
share/examples/mgp/mgp2.jpg
share/examples/mgp/mgp3.jpg
share/examples/mgp/mgp3.xbm
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
share/examples/mgp/tutorial-jp.mgp
share/examples/mgp/tutorial.mgp
share/examples/mgp/v6-jp.mgp
share/examples/mgp/v6.mgp
share/examples/mgp/v6header.eps
share/examples/mgp/v6header.jpg

View File

@@ -0,0 +1,34 @@
$NetBSD: distinfo,v 1.19 2013/06/23 14:58:27 wiz Exp $
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) = 59bc5a8bce25ac27a77ae8d03dd42f354d1d1bff
SHA1 (patch-ab) = 6622ca95dfcf059d9464f8cc959d23c9c787d8b6
SHA1 (patch-ac) = b886607033a89e3ab46c41a2a5a8368b473682f4
SHA1 (patch-ad) = 33c8fa61cb03cb53ad8783d2d79fa457cb21d235
SHA1 (patch-ae) = 49aab80a13d7daf99671c69cf62f432c03054dad
SHA1 (patch-af) = 615e845dfbeba9b35c5a138841962631dac3b4bb
SHA1 (patch-ag) = 96d7cac9157b9183dd2ba76b12f0927fc15dd5a6
SHA1 (patch-ai) = 809b2cf509bab0ee1bed1fecb2cf2d8df912ce8b
SHA1 (patch-aj) = 07ed5e995bf35dcbe65fc7c0ab800d1b8905e004
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
SHA1 (patch-image_imlib__loader.c) = 99aa122d4d4f474c448fa2767bee3496ca97110a
SHA1 (patch-image_xloadimage.h) = 05a1caeedca9c33beecffb8f078270d88fc7184c
SHA1 (patch-mgpembed.pl.in) = e3c9da5e10bc812b9a77a3ca9b8918595708e8c7

View File

@@ -0,0 +1,48 @@
# $NetBSD: options.mk,v 1.2 2011/02/25 17:02:53 wiz 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/imlib2/buildlink3.mk"
#
# fall back defaults
#
MGP_VFONT?= % %
MGP_TFONT?= % %
MGP_XFONT?= % %

View File

@@ -0,0 +1,209 @@
$NetBSD: patch-aa,v 1.12 2011/02/25 17:02:53 wiz Exp $
--- configure.orig 2007-12-28 20:31:26.000000000 +0000
+++ configure
@@ -1285,7 +1285,7 @@ Optional Features:
--enable-freetype-charset16 use freetype for chaset16.
--disable-xft2 DON'T use xft2 libraries.
--enable-gif compile gif support in (need libungif).
- --enable-imlib use imlib exclusively to load images.
+ --enable-imlib use imlib2 exclusively to load images.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -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 $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
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 $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
@@ -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;
break
@@ -5609,22 +5604,17 @@ _ACEOF
fi
fi
-if type pkg-config > /dev/null 2>&1; then
- 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`"
+ cat >>confdefs.h <<\_ACEOF
#define USE_PNG 1
_ACEOF
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"
@@ -5779,7 +5769,7 @@ fi
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/lib/libmng.a ; then
DEPLIBS="$DEPLIBS $i/lib/libmng.a"
@@ -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
- for i in /usr/pkg /usr/local /usr; do
+ for i in ${BUILDLINK_DIR}; do
if test -f $i/include/gif_lib.h; then
gif_h_ok=yes
OPTFLAGS="$OPTFLAGS -I$i/include"
@@ -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
- 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 imlib2; then
+ LIBS="$LIBS `pkg-config --libs imlib2`"
+ OPTFLAGS="$OPTFLAGS `pkg-config --cflags imlib2`"
+ 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; }
@@ -7163,7 +7147,7 @@ if test "${ac_cv_lib_Imlib_Imlib_init+se
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lImlib -L$x_libraries -lX11 -lXext $LIBS"
+LIBS="-lImlib2 -L$x_libraries -lX11 -lXext $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7177,11 +7161,11 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char Imlib_init ();
+char imlib_load_image ();
int
main ()
{
-return Imlib_init ();
+return imlib_load_image ();
;
return 0;
}
@@ -7220,7 +7204,7 @@ fi
echo "${ECHO_T}$ac_cv_lib_Imlib_Imlib_init" >&6; }
if test $ac_cv_lib_Imlib_Imlib_init = yes; then
imlib_ok=yes
- LIBS="$LIBS -lImlib"
+ LIBS="$LIBS -lImlib2"
cat >>confdefs.h <<\_ACEOF
#define USE_IMLIB 1
_ACEOF
@@ -7232,14 +7216,14 @@ fi
echo 'FATAL: You need libImlib to use Imlib loading. pass proper LIBS to configure.'
exit 1
fi
- for i in /usr/pkg /usr/local; do
- if test -f $i/include/Imlib.h; then
+ for i in ${BUILDLINK_DIR}; do
+ if test -f $i/include/Imlib2.h; then
imlib_h_ok=yes
OPTFLAGS="$OPTFLAGS -I$i/include"
break
fi
done
- if test -f /usr/include/Imlib.h; then
+ if test -f /usr/include/Imlib2.h; then
imlib_h_ok=yes
fi
if test "x$gif_h_ok" != "xyes"; then
@@ -7262,7 +7246,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <Imlib.h>
+#include <Imlib2.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
@@ -7302,7 +7286,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <Imlib.h>
+#include <Imlib2.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in

View File

@@ -0,0 +1,62 @@
$NetBSD: patch-ab,v 1.5 2011/02/25 17:02:53 wiz Exp $
--- mgp.h.orig 2008-01-18 17:43:20.000000000 +0000
+++ mgp.h
@@ -64,7 +64,9 @@
#ifdef USE_XFT2
#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 {
@@ -507,7 +515,7 @@ struct render_object {
float xzoom, yzoom;
#ifdef USE_IMLIB
int zoomonclk;
- ImlibImage *imimage;
+ Imlib_Image *imimage;
#endif
} image;
struct {
@@ -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));

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-ac,v 1.4 2010/12/15 19:08:22 chuck Exp $
--- Imakefile.in.orig 2007-12-03 18:08:40.000000000 +0900
+++ Imakefile.in
@@ -22,8 +22,9 @@ LEX= @LEX@
OPTFLAGS= @OPTFLAGS@ ${CPPFLAGS}
DEFS= @DEFS@ -DMGPLIBDIR=\"$(LIBDIR)/mgp\"
#DEFS+= -DGLYPHEDGE
+DEPENDFLAGS= $(DEFS) @OPTFLAGS@
-SYS_LIBRARIES= -L$(srcdir)/image -lmgpimage @LIBS@
+SYS_LIBRARIES= -L$(srcdir)/image -lmgpimage @LDFLAGS@ @LIBS@
EXTRA_DEPLIBS= @DEPLIBS@
#undef DefaultCDebugFlags

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-ad,v 1.2 2008/09/10 13:32:47 taca Exp $
--- 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++) {

View File

@@ -0,0 +1,75 @@
$NetBSD: patch-ae,v 1.4 2011/02/25 17:02:53 wiz Exp $
--- draw.c.orig 2008-01-24 15:43:17.000000000 +0000
+++ draw.c
@@ -31,7 +31,7 @@
#include "mgp.h"
#ifdef USE_IMLIB
-#include <Imlib.h>
+#include <Imlib2.h>
#endif
/* state associated with the window - how should we treat this? */
@@ -83,8 +83,8 @@ static int obj_new_xfont __P((struct ren
u_int, char *));
static int obj_new_image __P((struct render_state *, int, int, Image *, int, int));
#ifdef USE_IMLIB
-ImlibImage *search_imdata __P((char *));
-static int obj_new_image2 __P((struct render_state *, int, int, Image *, int, int, ImlibImage *, int));
+Imlib_Image *search_imdata __P((char *));
+static int obj_new_image2 __P((struct render_state *, int, int, Image *, int, int, Imlib_Image *, int));
#endif
static int obj_new_icon __P((struct render_state *, int, int, u_int, u_int, u_long, u_int, XPoint *));
static Pixel obj_image_color __P((Image *, Image *, Pixel, int *));
@@ -168,7 +168,7 @@ static void regist_zimage_position __P((
static void clear_zimage __P((int));
static void clear_region __P((int, int, int, int));
#define ZIMAGENUM 100
-static ImlibImage *zimage[ZIMAGENUM];
+static Imlib_Image *zimage[ZIMAGENUM];
static int zonzoom[ZIMAGENUM];
static int zpage[ZIMAGENUM];
static int zx[ZIMAGENUM];
@@ -1819,7 +1819,7 @@ obj_new_image2(state, x, y, image, xzoom
int x, y;
Image *image;
int xzoom, yzoom;
- ImlibImage *imimage;
+ Imlib_Image *imimage;
int zoomonclk;
{
struct render_object *obj;
@@ -3212,7 +3212,7 @@ image_load(state, filename, numcolor, xi
static char backfile[MAXPATHLEN];
static int backzoom, backnumcolor, backx, backy;
#ifdef USE_IMLIB
- ImlibImage *imimage;
+ Imlib_Image *imimage;
#endif
if (!caching){
@@ -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;
- int ileft, oleft;
+ size_t ileft, oleft;
#ifdef HAVE_ICONV
static iconv_t icv[3];
#endif
@@ -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);

View File

@@ -0,0 +1,28 @@
$NetBSD: patch-af,v 1.2 2008/09/10 13:32:47 taca Exp $
--- image/image.h.orig 2004-07-29 00:47:31.000000000 +0900
+++ image/image.h
@@ -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();
-#ifdef __APPLE__
-/* darwin has zopen() */
ZFILE *zzopen(); /* zio.c */
#define zopen zzopen
-#else
-ZFILE *zopen(); /* zio.c */
-#endif
int zread();
int zgetc();
char *zgets();

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-ag,v 1.2 2008/09/10 13:32:47 taca Exp $
--- image/new.c.orig 2004-09-01 12:50:32.000000000 +0900
+++ image/new.c
@@ -11,11 +11,7 @@
#include "copyright.h"
#include "image.h"
-#ifdef __APPLE__
#include <stdlib.h>
-#else
-#include <malloc.h>
-#endif
extern int _Xdebug;
extern void memoryExhausted(void);

View File

@@ -0,0 +1,50 @@
$NetBSD: patch-ai,v 1.1 2004/11/30 17:29:30 taca Exp $
--- sample/sample-jp.mgp.orig 2001-08-11 18:53:53.000000000 +0900
+++ sample/sample-jp.mgp
@@ -1,35 +1,4 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%% This default.mgp is "TrueType fonts" oriented.
-%% First, you should create "~/.mgprc" whose contents are:
-%% tfdir "/path/to/truetype/fonts"
-%%
-%% To visualize English, install "times.ttf", "arial.ttf", and "cour.ttf"
-%% into the "tfdir" directory above:
-%% http://microsoft.com/typography/fontpack/default.htm
-%%
-%% To visualize Japanese, install "MSMINCHO.ttf" and
-%% "watanabenabe-mincho.ttf" into the "tfdir" directory above:
-%% http://www.mew.org/mgp/xtt-fonts_0.19981020-3.tar.gz
-%%
-%deffont "thick" xfont "helvetica-bold-r", tfont "thick.ttf", tmfont "goth.ttf"
-%deffont "standard" xfont "helvetica-medium-r", tfont "standard.ttf", tmfont "kochi-mincho.ttf"
-%deffont "typewriter" xfont "courier-medium-r", tfont "typewriter.ttf", tmfont "goth.ttf"
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%% Default settings per each line numbers.
-%%
-%default 1 area 90 90, leftfill, size 2, fore "gray20", back "white", font "standard", hgap 0
-%default 2 size 5, hgap 20, vgap 10, prefix " ", ccolor "black"
-%default 3 size 2, hgap 10, bar "gray70", vgap 10
-%default 4 size 4, hgap 10, fore "gray20", vgap 30, prefix " ", font "standard"
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%% Default settings that are applied to TAB-indented lines.
-%%
-%tab 1 size 4, vgap 40, prefix " ", icon box "green" 50
-%tab 2 size 3.5, vgap 40, prefix " ", icon arc "yellow" 50
-%tab 3 size 3, vgap 40, prefix " ", icon delta3 "white" 40
+%include "default.mgp"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%nodefault
@@ -202,7 +171,7 @@ UNIX$B$H$$$&$/$i$$$G!"%=!<%9$N9T$O%P%C%
($BB?J,(B)$BI=<(2DG=$J%$%a!<%8!&%U%)!<%^%C%H$O0J2<$NDL$j$G$9(B
-%CENTER,SIZE 3,FORE "red", xfont "times-medium-r", tfont "times.ttf"
+%CENTER,SIZE 3,FORE "red", font "typewriter"
FBM Image
Sun Rasterfile

View File

@@ -0,0 +1,41 @@
$NetBSD: patch-aj,v 1.1 2004/11/30 17:29:30 taca Exp $
--- sample/sample.mgp.orig 2001-08-11 18:53:53.000000000 +0900
+++ sample/sample.mgp
@@ -1,35 +1,4 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%% This default.mgp is "TrueType fonts" oriented.
-%% First, you should create "~/.mgprc" whose contents are:
-%% tfdir "/path/to/truetype/fonts"
-%%
-%% To visualize English, install "times.ttf", "arial.ttf", and "cour.ttf"
-%% into the "tfdir" directory above:
-%% http://microsoft.com/typography/fontpack/default.htm
-%%
-%% To visualize Japanese, install "MSMINCHO.ttf" and
-%% "watanabenabe-mincho.ttf" into the "tfdir" directory above:
-%% http://www.mew.org/mgp/xtt-fonts_0.19981020-3.tar.gz
-%%
-%deffont "standard" xfont "helvetica-medium-r", tfont "standard.ttf", tmfont "hoso6.ttf"
-%deffont "thick" xfont "helvetica-bold-r", tfont "thick.ttf", tmfont "hoso6.ttf"
-%deffont "typewriter" xfont "courier-medium-r", tfont "typewriter.ttf", tmfont "hoso6.ttf"
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%% Default settings per each line numbers.
-%%
-%default 1 area 90 90, leftfill, size 2, fore "gray20", back "white", font "standard", hgap 0
-%default 2 size 7, vgap 10, prefix " ", ccolor "black"
-%default 3 size 2, bar "gray70", vgap 10
-%default 4 size 5, fore "gray20", 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
+%include "default.mgp"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page
%nodefault

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-al,v 1.2 2008/09/10 13:32:47 taca Exp $
--- image/imagetypes.c.orig 2001-01-18 18:07:14.000000000 +0900
+++ image/imagetypes.c
@@ -50,7 +50,6 @@ static struct imagetypes {
};
/* SUPPRESS 560 */
-extern int errno;
extern int findImage(char *, char *);
/* load a named image

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-am,v 1.2 2008/09/10 13:32:47 taca Exp $
--- image/path.c.orig 2004-07-29 00:47:31.000000000 +0900
+++ image/path.c
@@ -27,8 +27,6 @@
/* SUPPRESS 530 */
/* SUPPRESS 560 */
-extern int errno;
-
/*static*/ unsigned int NumPaths= 0;
static unsigned int NumExts= 0;
/*static*/ char *Paths[BUFSIZ];

View File

@@ -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];

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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];

View File

@@ -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];

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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.

View File

@@ -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;

View File

@@ -0,0 +1,182 @@
$NetBSD: patch-image_imlib__loader.c,v 1.1 2011/02/25 17:02:53 wiz Exp $
imlib2 patch from suse.
--- image/imlib_loader.c.orig 2008-01-16 14:52:14.000000000 +0000
+++ image/imlib_loader.c
@@ -6,13 +6,14 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
-#include <Imlib.h>
+#include <Imlib2.h>
#define IMFILENUM 500
static char imfile[IMFILENUM][1024];
-static ImlibImage *imdata[IMFILENUM];
+static Imlib_Image *imdata[IMFILENUM];
+static Image *imagedata[IMFILENUM];
static int imnum;
-static ImlibData *id;
+static Imlib_Context *id;
int imIdent(char *fullname, char *name)
{
@@ -22,32 +23,71 @@ int imIdent(char *fullname, char *name)
Image *imLoad(char *fullname, char *name, unsigned int verbose)
{
static Display *disp = NULL;
- Image *image;
- ImlibImage *im;
- ImlibColor shape;
- unsigned int w,h, size;
- ImlibImage *search_imdata();
+ Image *image = NULL;
+ Imlib_Image *im;
+ unsigned int w,h, size, i;
+ DATA32 * argb_data;
+ byte * rgb_ptr;
+ Imlib_Image *search_imdata();
void regist_imdata();
if (disp == NULL) {
disp=XOpenDisplay(NULL);
}
- if (id == NULL) id=Imlib_init(disp);
- if ((im = search_imdata(fullname)) == NULL) {
- im = Imlib_load_image(id, fullname);
+ /* if (id == NULL) id=Imlib_init(disp); */
+ /* might needs more work */
+ if (id == NULL) {
+ /* dither for non-truecolor displays */
+ imlib_context_set_dither(1);
+ imlib_context_set_display(disp);
+ imlib_context_set_visual(DefaultVisual(disp, DefaultScreen(disp)));
+ imlib_context_set_colormap(DefaultColormap(disp, DefaultScreen(disp)));
+ }
+ if ((im = search_imdata(fullname), image) == NULL) {
+ /* im = Imlib_load_image(id, fullname); */
+ im = imlib_load_image(fullname);
}
if (im == NULL) {
return NULL;
}
- w = im->rgb_width;
- h = im->rgb_height;
- size = w * h * 3;
-
- image = newTrueImage(w, h);
- memcpy(image->data, im->rgb_data, size);
-
- Imlib_get_image_shape(id, im, &shape);
-
+ imlib_context_set_image(im);
+ w = imlib_image_get_width();
+ h = imlib_image_get_height();
+ size = w * h;
+
+ if (image == NULL) image = newTrueImage(w, h);
+
+ /* Imlib2 stores images in ARGB format (32 bpp). MagicPoint
+ * wants RGB data (24 bpp). So we need a conversion pass. */
+ argb_data = imlib_image_get_data_for_reading_only();
+ rgb_ptr = image->data;
+ for (i = 0; i < size; ++i)
+ {
+ if ((argb_data[i] >> 24) < 128)
+ {
+ /* If this is a transparent pixel, we store #FE00FE. */
+ *rgb_ptr++ = 0xFE;
+ *rgb_ptr++ = 0x00;
+ *rgb_ptr++ = 0xFE;
+ /* Tell mgp we have transparent pixels. */
+ image->trans = 0xFE00FE;
+ }
+ else if ((argb_data[i] & 0x00FFFFFF) == 0x00FE00FE)
+ {
+ /* If that color is actually used, we substitute something close. */
+ *rgb_ptr++ = 0xFF;
+ *rgb_ptr++ = 0x00;
+ *rgb_ptr++ = 0xFE;
+ }
+ else
+ {
+ /* Otherwise, we can copy the pixel. */
+ *rgb_ptr++ = (argb_data[i] >> 16) & 0xFF; /* red */
+ *rgb_ptr++ = (argb_data[i] >> 8) & 0xFF; /* green */
+ *rgb_ptr++ = argb_data[i] & 0xFF; /* blue */
+ }
+ }
+#if 0
/*
* bug fix for transparent gif handling
* suggested by Jose Geraldo Alves Brito Neto <jgabrito@iq.usp.br>
@@ -57,44 +97,52 @@ Image *imLoad(char *fullname, char *name
((shape.r & 0xff) << 16) |
((shape.g & 0xff) << 8) |
((shape.b & 0xff) << 0);
+#endif
image->title = dupString(name);
#if 0
Imlib_kill_image(id, im);
#else
- regist_imdata(name, im);
+ regist_imdata(name, im, image);
#endif
return image;
}
-ImlibImage *search_imdata(char *fullname)
+Imlib_Image *search_imdata(char *fullname, Image *image)
{
int i;
for (i = 0; i < imnum; i ++){
if (!strcmp(imfile[i], fullname)) {
+ image = imagedata[i];
return imdata[i];
}
}
return NULL;
}
-void regist_imdata(fullname, im)
+void regist_imdata(fullname, im, image)
char *fullname;
- ImlibImage *im;
+ Imlib_Image *im;
+ Image *image;
{
strcpy(imfile[imnum], fullname);
imdata[imnum] = im;
+ imagedata[imnum] = image;
imnum ++;
}
Pixmap pixmap_fromimimage(imimage, width, height)
- ImlibImage *imimage;
+ Imlib_Image *imimage;
int width, height;
{
static Pixmap pixmap;
+#if 0
Imlib_render(id, imimage, width, height);
pixmap = Imlib_move_image(id, imimage);
+#else
+ imlib_render_pixmaps_for_whole_image_at_size(&pixmap, NULL, width, height);
+#endif
return pixmap;
}
@@ -125,8 +173,8 @@ manage_pixmap(pixmap, add, page)
ppage[i] = page;
} else {
for (i = 0; i < MAXPMAP; i ++) {
- if (ppage[i] == page){
- Imlib_free_pixmap(id, pmap[i]);
+ if (ppage[i] == page && pmap[i] != 0){
+ imlib_free_pixmap_and_mask(pmap[i]);
pmap[i] = 0;
}
}

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-image_xloadimage.h,v 1.1 2011/02/25 17:02:53 wiz Exp $
imlib2 patch from suse.
--- image/xloadimage.h.orig 2007-12-28 20:31:26.000000000 +0000
+++ image/xloadimage.h
@@ -16,7 +16,7 @@
#include "options.h"
#ifdef USE_IMLIB
-#include <Imlib.h>
+#include <Imlib2.h>
#endif
/* image name and option structure used when processing arguments

View File

@@ -0,0 +1,74 @@
$NetBSD: patch-mgpembed.pl.in,v 1.1 2013/06/23 14:58:27 wiz Exp $
Adapt usage for perl-5.18.
From Marc Espie <espie@nerim.net>.
--- mgpembed.pl.in.orig 2002-07-28 11:52:19.000000000 +0000
+++ mgpembed.pl.in
@@ -16,15 +16,16 @@ if (! -x $gzip || ! -x $uuencode) {
die "external program not found. manual configuration required.\n"
}
-require 'getopts.pl';
+use Getopt::Std;
+use subs (qw(usage readfile));
# specify suffixes we should gzip files before uuencoding
@gzipsuffix = (".ps", ".xbm");
-do Getopts('o:');
+getopts('o:');
if ($#ARGV != 0) {
- do usage();
+ usage();
# NOTREACHED
}
@@ -37,14 +38,14 @@ if (defined($opt_o)) {
die "$outfname already exists\n" if -f $outfname;
die "$outfname is specified for both input/output\n"
if ($outfname eq $infname);
- open(OUT, "> $outfname") || die "Can not open $outfname: $!";
+ open(OUT, ">", $outfname) || die "Can not open $outfname: $!";
} else {
open(OUT, ">& STDOUT");
}
# read the file, process %include directives
-do readfile($infname, 'INPUT000');
+readfile($infname, 'INPUT000');
# append embedded files using %embed/%endembed directives
@@ -76,10 +77,10 @@ foreach $efile (keys %files) {
close(OUT);
sub readfile {
- local($filename, $input) = @_;
- local($fname, $fname0);
+ my($filename, $input) = @_;
+ my($fname, $fname0);
$input++;
- open($input, $filename) || die "Can not open $filename: $!\n";
+ open($input, '<', $filename) || die "Can not open $filename: $!\n";
while (<$input>) {
if (/^%%/) {
print OUT;
@@ -116,7 +117,7 @@ sub readfile {
$incfname = $1;
}
print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE $incfname\n";
- do readfile($incfname, $input);
+ readfile($incfname, $input);
print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE-END $incfname\n";
} else {
print OUT;
@@ -128,5 +129,5 @@ sub readfile {
sub usage {
print STDERR "usage: mgpembed [-o outfile ] mgpfile\n";
- exit -1;
+ exit 1;
}