diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..7e18029 --- /dev/null +++ b/.cvsignore @@ -0,0 +1 @@ +magicpoint-1.11b.tar.gz diff --git a/MagicPoint.spec b/MagicPoint.spec new file mode 100644 index 0000000..4e314d6 --- /dev/null +++ b/MagicPoint.spec @@ -0,0 +1,237 @@ +Name: MagicPoint +Version: 1.11b +Release: 4%{?dist} +Summary: X based presentation software +Group: Applications/Productivity +License: BSD +URL: http://member.wide.ad.jp/wg/mgp/ +Source0: ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/magicpoint-%{version}.tar.gz +Patch0: magicpoint-1.11b-debian.patch +Patch1: magicpoint-1.11b-64bit.patch +Patch2: magicpoint-1.09a-rpath.patch +Patch3: magicpoint-1.11a-fix-gcc-warnings.patch +Patch4: magicpoint-1.11b-embed.patch +Patch6: magicpoint-1.10a-longline.patch +Patch10: magicpoint-1.10a-fix-usleep.patch +Patch11: magicpoint-1.10a-fix-gcc34.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: freetype1-devel libungif-devel libpng-devel libmng-devel imake +BuildRequires: imlib-devel libXt-devel libXft-devel bison flex perl sharutils +Requires: sharutils +Obsoletes: mgp < %{version}-%{release}, magicpoint < %{version}-%{release} +Provides: mgp = %{version}-%{release}, magicpoint = %{version}-%{release} + +%description +MagicPoint is an X11 based presentation tool. MagicPoint's +presentation files (typically .mgp files) are plain text so you can +create presentation files quickly with your favorite editor. + + +%prep +%setup -q -n magicpoint-%{version} +%patch0 -p1 +%patch1 -p1 -z .64bit +%patch2 -p1 -z .rpath +%patch3 -p1 -z .warnings +%patch4 -p1 -z .embed +%patch6 -p1 -z .longline +%patch10 -p1 -z .usleep +%patch11 -p1 -z .gcc34 +# fix hopelessly broken way configure searches for libttf +sed -i 's:$dir/lib:%{_libdir}:g' configure +sed -i 's:$dir/include/freetype:/usr/include/freetype1/freetype:g' configure + + +%build +export CFLAGS="$RPM_OPT_FLAGS -I/usr/include/freetype1/freetype" +%configure --enable-locale --enable-freetype --enable-freetype-charset16 \ + --enable-xft2 --disable-vflib --enable-gif --enable-imlib +xmkmf -a +# LIBDIR is used by the makefile to determine where to install data files +make CDEBUGFLAGS="$RPM_OPT_FLAGS" LIBDIR=%{_datadir} + + +%install +rm -rf $RPM_BUILD_ROOT +make install install.man DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_datadir} +install -m 755 contrib/mgp2html.pl $RPM_BUILD_ROOT%{_bindir}/mgp2html +install -m 755 contrib/mgp2latex.pl $RPM_BUILD_ROOT%{_bindir}/mgp2latex +# stop these from ending up in %doc +rm sample/.cvsignore sample/*akefile* + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYRIGHT README SYNTAX USAGE sample +%{_bindir}/* +%{_datadir}/mgp +%{_mandir}/*/* + + +%changelog +* Sat Oct 21 2006 Hans de Goede 1.11b-4 +- Unorphan +- Take some patches from Debian +- Actually make ./configure detect and use freetype1, it was testing for it + but the test failed +- Package mgp2html and mgp2latex from the contrib dir + +* Fri Aug 5 2005 Colin Charles - 1.11b-3 +- Re-enable debuginfo builds +- Ralf Corsepius watchful eyes fixes - cleaning up the spec + +* Thu Aug 4 2005 Colin Charles - 1.11b-2 +- Removed Patch12 to fix undefined operation +- Bump spec to somewhat match work from Rui Miguel Silva Seabra +- Remove requirement on VFlib2, seeing that we disable it in configure + +* Mon Sep 27 2004 Akira TAGOH - 1.11b-1 +- New upstream release. + +* Wed Sep 15 2004 Akira TAGOH - 1.11a-1 +- New upstream release. +- magicpoint-1.11a-fix-gcc-warnings.patch: updated from 1.10a. +- magicpoint-1.10a-fixtypo-opaque.patch: removed, it's no lnger needed. +- magicpoint-1.10a-fix-ft2build.patch: removed, it's no longer needed. +- magicpoint-1.10a-png.patch: removed, it's no longer needed. +- XFree4.0-freetype.patch: removed, freetype1 is no longer available. + +* Mon Jun 21 2004 Akira TAGOH 1.10a-10 +- magicpoint-1.10a-fix-gcc34.patch: applied to build with gcc 3.4. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Wed Feb 18 2004 Akira TAGOH 1.10a-8 +- fix wrong license description. (#115947: Miloslav Trmac) +- included COPYRIGHT file. + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Mon Feb 09 2004 Akira TAGOH 1.10a-6 +- magicpoint-1.10a-fix-gcc-warnings2.patch: applied to fix gcc warnings (#115161) +- magicpoint-1.10a-fix-ft2build.patch: applied to fix build error for freetype. +- magicpoint-1.10a-fix-usleep.patch: applied to fix missing compile options. + +* Fri Nov 28 2003 Akira TAGOH 1.10a-5 +- magicpoint-1.10a-fix-gcc-warnings.patch: updated for more gcc3 compliant. (#110773) + +* Fri Sep 19 2003 Akira TAGOH 1.10a-4 +- added some missing BuildRequires. + +* Tue Sep 02 2003 Akira TAGOH 1.10a-3 +- magicpoint-1.10a-fixtypo-opaque.patch: applied a patch to work the opaque. + +* Wed Aug 20 2003 Akira TAGOH 1.10a-2 +- magicpoint-1.10a-longline.patch: fixed the freeze if the line is too long. (#100736) + +* Wed Jun 25 2003 Akira TAGOH 1.10a-1 +- New upstream release. +- removed the dependency of watanabe-vf due to the copyright issue. +- add fontconfig-devel and XFree86-devel to BuildReqruies. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Thu May 22 2003 Jeremy Katz 1.09a-12 +- gcc 3.3 doesn't implement varargs.h, include stdarg.h instead + +* Fri Apr 18 2003 Akira TAGOH 1.09a-11 +- rebuild. + +* Fri Apr 18 2003 Akira TAGOH 1.09a-10 +- magicpoint-1.09a-rpath.patch: don't specify -rpath. (#65966) +- magicpoint-1.09a-fix-gcc-warnings.patch: applied to fix gcc warnings. (#79642) + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Dec 11 2002 Tim Powers 1.09a-8 +- add VFlib2-conf-ja >=2.25.6-8 as a requirement to fix bug 74105 + +* Wed Nov 20 2002 Tim Powers +- rebuild on all arches + +* Tue Jun 25 2002 Owen Taylor +- Remove extraneous ttfonts dependency; VFlib already has that dependency + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Mon May 27 2002 Yukihiro Nakai +- Remove .cvsignore file(#65241) + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Mar 26 2002 Yukihiro Nakai +- Update to 1.09a + +* Tue Mar 5 2002 Jeremy Katz +- Add ttfonts to Requires (#24868) +- rebuild in new environment + +* Thu Jan 31 2002 Bill Nottingham +- rebuild in new environment + +* Wed Sep 05 2001 Yukihiro Nakai +- Add magicpoint to Obsoletes. + +* Tue Sep 04 2001 Yukihiro Nakai +- Add --enable-gif +- Add watanabe-vf to Requires. + +* Wed Jul 18 2001 Yukihiro Nakai +- Delete require ttfont-ja + +* Mon Jul 9 2001 Yukihiro Nakai +- Rebuild against RHL7.2 +- Rename to MagicPoint +- Update to 1.08a +- Enable vflib + +* Wed Jan 24 2001 Tim Powers +- fixed bug 24868 + +* Mon Aug 7 2000 Tim Powers +- disable vflib to fix bug #15607 + +* Wed Aug 2 2000 Tim Powers +- rebuilt against libpng-1.0.8 + +* Mon Jul 24 2000 Prospector +- rebuilt + +* Thu Jul 13 2000 Nalin Dahyabhai +- stop disabling freetype support + +* Mon Jul 10 2000 Tim Powers +- rebuilt + +* Mon Jul 03 2000 Prospector +- automatic rebuild + +* Wed May 24 2000 Tim Powers +- updated to 1.07a +- cleaned up files list +- using %%configure +- fixed to use XFree86 4.0 + +* Mon Jul 19 1999 Tim Powers +- updated source to 1.05a +- built for 6.1 + +* Thu Apr 15 1999 Michael Maher +- built package for 6.0 + +* Fri Oct 08 1998 Michael Maher +- updated source to 1.04a +- built for 5.2 + +* Fri May 22 1998 Cristian Gafton +- built for PowerTools diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..57920b3 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: MagicPoint +# $Id: Makefile,v 1.1 2005/06/27 05:45:52 byte Exp $ +NAME := MagicPoint +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/dead.package b/dead.package deleted file mode 100644 index 815fd29..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild diff --git a/magicpoint-1.09a-rpath.patch b/magicpoint-1.09a-rpath.patch new file mode 100644 index 0000000..694e7b9 --- /dev/null +++ b/magicpoint-1.09a-rpath.patch @@ -0,0 +1,23 @@ +diff -ruN magicpoint-1.09a.orig/configure.in magicpoint-1.09a/configure.in +--- magicpoint-1.09a.orig/configure.in 2003-04-18 16:49:30.000000000 +0900 ++++ magicpoint-1.09a/configure.in 2003-04-18 17:14:12.000000000 +0900 +@@ -277,7 +277,7 @@ + LIBS="$LIBS -L$i/lib" + OPTFLAGS="$OPTFLAGS -I$i/include" + AC_CHECK_LIB(mng, mng_initialize, +- [LIBS="$LIBS -Wl,-rpath,$i/lib -lmng" ++ [LIBS="$LIBS -lmng" + AC_DEFINE(MNG)], + [AC_CHECK_LIB(mng, mng_readdisplay, + [LIBS="$LIBS -lmng -ljpeg" +--- magicpoint-1.11b/configure~ 2006-10-07 17:31:51.000000000 +0200 ++++ magicpoint-1.11b/configure 2006-10-07 17:31:51.000000000 +0200 +@@ -4831,7 +4831,7 @@ + echo "$as_me:$LINENO: result: $ac_cv_lib_mng_mng_initialize" >&5 + echo "${ECHO_T}$ac_cv_lib_mng_mng_initialize" >&6 + if test $ac_cv_lib_mng_mng_initialize = yes; then +- LIBS="$LIBS -Wl,-rpath,$i/lib -lmng" ++ LIBS="$LIBS -lmng" + cat >>confdefs.h <<\_ACEOF + #define MNG 1 + _ACEOF diff --git a/magicpoint-1.10a-fix-gcc34.patch b/magicpoint-1.10a-fix-gcc34.patch new file mode 100644 index 0000000..a23882d --- /dev/null +++ b/magicpoint-1.10a-fix-gcc34.patch @@ -0,0 +1,51 @@ +diff -ruN magicpoint-1.10a.orig/contrib/xwintoppm/dsimple.c magicpoint-1.10a/contrib/xwintoppm/dsimple.c +--- magicpoint-1.10a.orig/contrib/xwintoppm/dsimple.c 2004-06-21 22:05:39.870925000 +0900 ++++ magicpoint-1.10a/contrib/xwintoppm/dsimple.c 2004-06-21 22:05:32.567891488 +0900 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + /* + * Other_stuff.h: Definitions of routines in other_stuff. + * +@@ -55,6 +56,7 @@ + void blip(); + Window Window_With_Name(); + void Fatal_Error(); ++void outl(char *msg, ...); + + /* + * Just_display: A group of routines designed to make the writting of simple +@@ -496,12 +498,16 @@ + */ + /* VARARGS1 */ + void +-outl(msg, arg0,arg1,arg2,arg3,arg4,arg5,arg6) +- char *msg; +- char *arg0, *arg1, *arg2, *arg3, *arg4, *arg5, *arg6; ++outl(char *msg, ...) + { ++ va_list args; ++ + fflush(stdout); +- fprintf(stderr, msg, arg0, arg1, arg2, arg3, arg4, arg5, arg6); ++ ++ va_start(args, msg); ++ vfprintf(stderr, msg, args); ++ va_end(args); ++ + fprintf(stderr, "\n"); + fflush(stderr); + } +diff -ruN magicpoint-1.10a.orig/contrib/xwintoppm/xwintoppm.c magicpoint-1.10a/contrib/xwintoppm/xwintoppm.c +--- magicpoint-1.10a.orig/contrib/xwintoppm/xwintoppm.c 2004-06-21 22:05:39.871924000 +0900 ++++ magicpoint-1.10a/contrib/xwintoppm/xwintoppm.c 2004-06-21 22:05:32.568891356 +0900 +@@ -138,6 +138,7 @@ + + extern int (*_XErrorFunction)(); + extern int _XDefaultError(); ++void Window_Dump(Window window, FILE *out); + + static long parse_long (s) + char *s; diff --git a/magicpoint-1.10a-fix-usleep.patch b/magicpoint-1.10a-fix-usleep.patch new file mode 100644 index 0000000..a370ffc --- /dev/null +++ b/magicpoint-1.10a-fix-usleep.patch @@ -0,0 +1,11 @@ +diff -ruN magicpoint-1.10a.orig/image/Imakefile.in magicpoint-1.10a/image/Imakefile.in +--- magicpoint-1.10a.orig/image/Imakefile.in 2001-01-18 18:07:14.000000000 +0900 ++++ magicpoint-1.10a/image/Imakefile.in 2004-02-09 11:10:02.127523603 +0900 +@@ -32,6 +32,7 @@ + SpecialObjectRule(imagetypes.o,imagetypes.c,$(DEFS)) + #SpecialObjectRule(png.o,png.c,$(DEFS) $(OPTFLAGS)) + SpecialObjectRule(imlib_loader.o,imlib_loader.c,$(DEFS)) ++SpecialObjectRule(send.o,send.c,$(DEFS) $(OPTFLAGS)) + + #ifndef NullParameter + #define NullParameter diff --git a/magicpoint-1.10a-longline.patch b/magicpoint-1.10a-longline.patch new file mode 100644 index 0000000..094a9cf --- /dev/null +++ b/magicpoint-1.10a-longline.patch @@ -0,0 +1,63 @@ +diff -ruN magicpoint-1.10a.orig/draw.c magicpoint-1.10a/draw.c +--- magicpoint-1.10a.orig/draw.c 2003-05-14 16:45:35.000000000 +0900 ++++ magicpoint-1.10a/draw.c 2003-08-20 19:02:19.000000000 +0900 +@@ -4504,6 +4504,7 @@ + char buf16[1024], *p16; + char out16[1024], *o16; + int ileft, oleft; ++ int forcefolding = 0; + #ifdef HAVE_ICONV + static iconv_t icv[3]; + #endif +@@ -4569,6 +4570,29 @@ + if (isspace(*(p + len -1))) { + XftTextExtents8(display, xft_font, (XftChar8 *)p, len -1, &extents); + if (state->width - state->leftfillpos / 2 - state->linewidth >= extents.xOff) goto nofolding; ++ } else { ++ /* the specified line might be too long. enforce to split the line in order to avoid the freeze. */ ++ wchar_t *wcstr; ++ char *mbstr; ++ int wclength, mblength, i; ++ ++ /* converting the strings to wchar to handle the multibyte characters correctly */ ++ wcstr = (wchar_t *) malloc (sizeof (wchar_t) * (strlen (p) + 1)); ++ wclength = mbstowcs (wcstr, p, len); ++ for (i = wclength - 1; i >= 1; i--) { ++ mbstr = (char *) malloc (sizeof (char) * (i + 1)); ++ mblength = wcstombs (mbstr, wcstr, i); ++ XftTextExtents8 (display, xft_font, (XftChar8 *)p, mblength, &extents); ++ if (state->width - state->leftfillpos / 2 - state->linewidth < extents.xOff) { ++ free (mbstr); ++ free (wcstr); ++ len = mblength; ++ forcefolding = 1; ++ goto nofolding; ++ } ++ free (mbstr); ++ } ++ free (wcstr); + } + + draw_line_end(state); +@@ -4588,9 +4612,20 @@ + if (obj_new_xftfont(state, state->linewidth, 0, p, len, + fontname, registry, char_size[caching], charset16, xft_font)){ + state->linewidth += extents.xOff; ++ if (forcefolding == 1) { ++ draw_line_end (state); ++ draw_line_start (state); ++ state->linewidth = state->leftfillpos; ++ } + return p + len; +- } else ++ } else { ++ if (forcefolding == 1) { ++ draw_line_end (state); ++ draw_line_start (state); ++ state->linewidth = state->leftfillpos; ++ } + return NULL; ++ } + } + static int + obj_new_xftfont(state, x, y, p, len, fontname, registry, size, charset16, xft_font) diff --git a/magicpoint-1.11a-fix-gcc-warnings.patch b/magicpoint-1.11a-fix-gcc-warnings.patch new file mode 100644 index 0000000..80e976a --- /dev/null +++ b/magicpoint-1.11a-fix-gcc-warnings.patch @@ -0,0 +1,98 @@ +diff -ruN magicpoint-1.11a.orig/contrib/xwintoppm/dsimple.c magicpoint-1.11a/contrib/xwintoppm/dsimple.c +--- magicpoint-1.11a.orig/contrib/xwintoppm/dsimple.c 1998-02-13 16:48:29.000000000 +0900 ++++ magicpoint-1.11a/contrib/xwintoppm/dsimple.c 2004-09-15 21:09:10.000000000 +0900 +@@ -495,6 +495,7 @@ + * printf with up to 7 arguments. + */ + /* VARARGS1 */ ++void + outl(msg, arg0,arg1,arg2,arg3,arg4,arg5,arg6) + char *msg; + char *arg0, *arg1, *arg2, *arg3, *arg4, *arg5, *arg6; +diff -ruN magicpoint-1.11a.orig/contrib/xwintoppm/xwintoppm.c magicpoint-1.11a/contrib/xwintoppm/xwintoppm.c +--- magicpoint-1.11a.orig/contrib/xwintoppm/xwintoppm.c 1998-08-26 14:30:16.000000000 +0900 ++++ magicpoint-1.11a/contrib/xwintoppm/xwintoppm.c 2004-09-15 21:09:10.000000000 +0900 +@@ -281,6 +281,7 @@ + * writting. + */ + ++void + Window_Dump(window, out) + Window window; + FILE *out; +@@ -716,9 +717,9 @@ + return ncolors ; + } + +-_swapshort (bp, n) +- register char *bp; +- register unsigned n; ++void ++_swapshort (register char *bp, ++ register unsigned n) + { + register char c; + register char *ep = bp + n; +@@ -731,9 +732,9 @@ + } + } + +-_swaplong (bp, n) +- register char *bp; +- register unsigned n; ++void ++_swaplong (register char *bp, ++ register unsigned n) + { + register char c; + register char *ep = bp + n; +diff -ruN magicpoint-1.11a.orig/image/gif.c magicpoint-1.11a/image/gif.c +--- magicpoint-1.11a.orig/image/gif.c 2000-03-07 15:59:56.000000000 +0900 ++++ magicpoint-1.11a/image/gif.c 2004-09-15 21:09:11.000000000 +0900 +@@ -103,7 +103,7 @@ + if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth || + GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) { + fprintf(stderr, +-"Image %d is not confined to screen dimension, aborted.\n"); ++"Image %d is not confined to screen dimension, aborted.\n", GifFile->ImageCount); + exit(-2); + } + if (GifFile->Image.Interlace) { +@@ -200,8 +200,8 @@ + if (gifp == NULL) + ret = 0; + else { ++ tellAboutImage(name, gifp); + DGifCloseFile(gifp); +- tellAboutImage(name); + ret = 1; + } + return ret; +diff -ruN magicpoint-1.11a.orig/image/pbm.c magicpoint-1.11a/image/pbm.c +--- magicpoint-1.11a.orig/image/pbm.c 1998-12-28 17:23:14.000000000 +0900 ++++ magicpoint-1.11a/image/pbm.c 2004-09-15 21:05:27.000000000 +0900 +@@ -359,8 +359,10 @@ + */ + + destptr = image->data; +- for (y = 0; y < size; y++) +- *(destptr++) = PM_SCALE(*destptr, maxval, 0xff); ++ for (y = 0; y < size; y++) { ++ *destptr = PM_SCALE(*destptr, maxval, 0xff); ++ destptr++; ++ } + break; + + case ITRUE: +diff -ruN magicpoint-1.11a.orig/image/png.c magicpoint-1.11a/image/png.c +--- magicpoint-1.11a.orig/image/png.c 2001-04-11 17:37:00.000000000 +0900 ++++ magicpoint-1.11a/image/png.c 2004-09-15 21:09:11.000000000 +0900 +@@ -44,7 +44,7 @@ + #define PNG_CHECK_BYTES 4 + + int +-pngIdent(char *fullname, char *name) {} ++pngIdent(char *fullname, char *name) {return 0;} + + Image * + pngLoad(fullname, name, verbose) diff --git a/magicpoint-1.11b-64bit.patch b/magicpoint-1.11b-64bit.patch new file mode 100644 index 0000000..1fccb9a --- /dev/null +++ b/magicpoint-1.11b-64bit.patch @@ -0,0 +1,38 @@ +--- magicpoint-1.11b/draw.c.64bit 2006-10-21 13:29:24.000000000 +0200 ++++ magicpoint-1.11b/draw.c 2006-10-21 13:27:28.000000000 +0200 +@@ -4884,8 +4884,8 @@ + char *registry; + { + char *xfont; +- static XftFont *last_xftfont; +- static char lastfont[100]; ++ static XftFont *last_xftfont = NULL; ++ static char lastfont[100] = ""; + static int lastsize = 0; + XftFont *xftfont; + char *p, *p2; +@@ -4934,12 +4934,12 @@ + 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); +@@ -4950,6 +4950,9 @@ + fprintf(stderr, "using xftfont [%s] size: %d\n", lastfont, + csize); + } ++ if (last_xftfont) ++ XftFontClose(display, last_xftfont); ++ + lastsize = csize; + last_xftfont = xftfont; + free(xfont); diff --git a/magicpoint-1.11b-debian.patch b/magicpoint-1.11b-debian.patch new file mode 100644 index 0000000..20dccfd --- /dev/null +++ b/magicpoint-1.11b-debian.patch @@ -0,0 +1,281 @@ +--- mgp-1.11b.orig/contrib/mgp2html.pl.in ++++ mgp-1.11b/contrib/mgp2html.pl.in +@@ -79,10 +79,18 @@ + + &prologue; + while (<>) { +- s/\n$//; ++ s/[\n\r]*$//; # trim CR and LF ++ s/; # concatenate next line ++ s/[\n\r]*$//; # trim CR and LF ++ } ++ + if ($_ eq '' || $_ =~ /^[^%]/) { + $line++; + $cont = 0 if ($cont == 2); +@@ -103,6 +111,8 @@ + next; + } + ++ $cont = 0 if ($cont == 2); ++ $cont = 2 if ($cont == 1); + &cmds($_); + } + &pageepilogue; +@@ -152,14 +162,15 @@ + if (!$doimage) { + # don't use images + } elsif (scalar(@dir) == 2 || scalar(@dir) == 3) { +- print "\"$dir[1]\"\n"; ++ &output("\"$dir[1]\"\n"); + } elsif (scalar(@dir) == 4) { + # interpretation wrong +- print "\"$dir[1]\"\n"; ++ &output("\"$dir[1]\"\n"); + } elsif (scalar(@dir) >= 5) { + # interpretation wrong +- print "\"$dir[1]\"\n"; ++ &output("\"$dir[1]\"\n"); + } ++ $endline = "
\n"; + } elsif ($dir[0] eq 'nodefault') { + $nodefault++; + } elsif ($dir[0] =~ /^(left|leftfill|right|center)$/) { +--- mgp-1.11b.orig/contrib/mgpnet.in ++++ mgp-1.11b/contrib/mgpnet.in +@@ -32,7 +32,7 @@ + + # configurations + $tmpdir = '/tmp'; +-$httpdatestr = "date '+\%a, \%d \%b \%Y \%H:\%M:\%S \%Z'"; ++$httpdatestr = "env LC_ALL=C date '+\%a, \%d \%b \%Y \%H:\%M:\%S \%Z'"; + $seltimeout = 1; + $refreshtimeout = 10; + $debug = 0; +@@ -53,6 +53,7 @@ + } while ($hostname =~ /^127\./); + close(IN); + }; ++ $hostname =~ s/^addr://; # for GNU/Linux, by ukai + print "http://$hostname:$port/\n"; + exit 0; + } +@@ -150,19 +151,19 @@ + vec($rin, fileno(S), 1) = 1; + vec($win, fileno(S), 1) = 1; + $ewin = $rin | $win; +- print STDERR "waiting for connetion...\n" if ($debug); ++ print STDERR "waiting for connection...\n" if ($debug); + ($nfound, $timeleft) = + select($rout = $rin, $wout = $win, $eout = $ein, $seltimeout); + next if ($nfound <= 0); + if (vec($rout, fileno(S), 1)) { +- print STDERR "accepting connetion...\n" if ($debug); ++ print STDERR "accepting connection...\n" if ($debug); + accept(NS, S) || do { + print STDERR "server: accept fail\n" if ($debug); + next; + }; + + $acceptstat++; +- print STDERR "connetion accepted...\n" if ($debug); ++ print STDERR "connection accepted...\n" if ($debug); + + $pid = fork; + if ($pid < 0) { +@@ -185,7 +186,7 @@ + } + } + print STDERR "leaving MagicPoint Netserver...\n"; +-print STDERR "accepted $acceptstat connetions so far.\n"; ++print STDERR "accepted $acceptstat connections so far.\n"; + close(NS); + close(S); + unlink($imagefile); +@@ -256,7 +257,7 @@ + $httpmethod = $httppath = $httpver = ''; + ($httpmethod, $httppath, $httpver) = split(/\s+/, $httpreq); + $httppath =~ s/http:\/\/[^:\/]+(:\d+)\//\//; +- if ($httpver eq '' || $httpver eq 'HTTP/1.0') { ++ if ($httpver eq '' || $httpver =~ m'HTTP/1.[01]') { + ; # ok + } else { + &httpheader(501, $cthtml) if ($httpver); +@@ -350,7 +351,7 @@ + File Not found +

File Not found

+ The requested URL $httppath was not found on this server.

+-Looks like a mitake in configuration. ++Looks like a mistake in configuration. + Contact the administrator.

+ + EOF +@@ -415,7 +416,7 @@ + 'XXX4', 'SO_REUSEPORT', 'XXX5', 'SOCK_STREAM', 'XXX6', 'WNOHANG', + ); + $tmpnam = &tmpname; +- open(CPP, "| @CPP@ >$tmpnam") || return; ++ open(CPP, "| @CPP@ - >$tmpnam") || return; + print CPP "#include \n"; + print CPP "#include \n"; + foreach $tmp (keys %varnames) { +@@ -439,12 +440,19 @@ + $havesinlen = 0; $sockaddr = 'S n a4 x8'; + } + ++ use Socket; + foreach $i (keys %varnames) { + if (@tmp2 = grep($_ =~ /^$i/, @tmp1)) { + $tmp = (split(/\s+/, @tmp2[0]))[1]; + $tmp = oct($tmp) if ($tmp =~ /^0/); +- next if ($tmp !~ /^[0-9]+$/); +- eval "\$$varnames{$i} = \$tmp;"; ++ if ($tmp =~ /^[0-9]+$/) { ++ eval "\$$varnames{$i} = \$tmp;"; ++ } else { ++ # some constant defined by enum, so we can not ++ # always use cpp as above. I believe use Socket ++ # is more reliable in these days. ++ eval "\$$varnames{$i} = &$varnames{$i};"; ++ } + } + } + } +--- mgp-1.11b.orig/README.lang ++++ mgp-1.11b/README.lang +@@ -16,6 +16,9 @@ + + %charset "iso8859-1" + ++Note that this directive can be used after %page directive, that is, ++you can't use %charset directive in preamble. ++ + In the future, we will add more encodings to charset directive, like + "iso2022-jp", or "euc-jp" + +--- mgp-1.11b.orig/mgpembed.pl.in ++++ mgp-1.11b/mgpembed.pl.in +@@ -85,12 +85,20 @@ + print OUT; + next; + } +- if (/^%(.*)image\s+/i) { +- $prefix = $1; $postfix = $'; +- if ($postfix =~ /\"([^"]*)\"/) { +- # "]*)\"/) { # (workaround for bug in Emacs Perl-syntax) ++ if (/^%(.*)image\s+([^,]+)/i) { ++ $a = $1; $fname0 = $fname = $2; $b = $'; ++ if ($a =~ /new$/) { ++ if ($fname =~ /\"([^"]*)\"$/) { + $fname = $1; +- } elsif ($b =~ /^(\S+)/) { ++ } ++ } else { ++ if ($fname =~ /\s.*/) { ++ $b = $' . $b; ++ } ++ } ++ if ($fname =~ /^\"([^"]*)\"/) { ++ $fname = $1; ++ } elsif ($fname =~ /^(\S+)/) { + $fname = $1; + } + $base = $fname; +@@ -106,10 +114,11 @@ + } + $files{$base} = $fname; + $embfn = "EMBEDDIR/" . $base; +- $postfix =~ s/\"$fname\"/\"$embfn\"/; ++ $fname0 =~ s/$fname/$embfn/; + print OUT '%'; +- print OUT "$prefix"; +- print OUT "image $postfix"; ++ print OUT "$a"; ++ print OUT "image $fname0"; ++ print OUT "$b"; + } elsif (/^%(.*)include\s+(\S+)(.*)$/i) { + $incfname = $2; + if ($incfname =~ /^\"(.+)\"$/) { +--- mgp-1.11b.orig/parse.c ++++ mgp-1.11b/parse.c +@@ -782,6 +782,10 @@ + } + } + } else { ++#if 1 /* escape % by backslash */ ++ if (buf[0] == 0x5c) ++ memcpy(&buf[0], &buf[1], strlen(buf)); ++#endif + /* this is data */ + + /* +@@ -1091,6 +1099,7 @@ + case CTL_TMFONT: tmpstr[4] = cp; break; + #endif + case CTL_XFONT2: ++ define_font (cp); + if (strcmp(cp->ctc2_value2, + "iso8859-1") == 0) { + tmpstr[2] = cp; +@@ -1913,7 +1922,7 @@ + int i; + + /* find duplicated def */ +- for (i = 0; i < MAXFONTDEF; i++) { ++ for (i = 0; cp->ct_op != CTL_XFONT2 && i < MAXFONTDEF; i++) { + if (!fontdef_control[i]) + continue; + if (strcmp(fontdef_control[i]->ctc_value, +@@ -1949,8 +1958,10 @@ + for (i = 0; i < MAXFONTDEF; i++) { + if (!fontdef_control[i]) + continue; +- if (strcmp(fontdef_control[i]->ctc_value, font) == 0) ++ if (fontdef_control[i]->ct_op != CTL_XFONT2 ++ && strcmp(fontdef_control[i]->ctc_value, font) == 0) { + return fontdef_control[i]; ++ } + } + return NULL; + } +--- mgp-1.11b.orig/sample/sample-fr.mgp ++++ mgp-1.11b/sample/sample-fr.mgp +@@ -182,6 +182,8 @@ + this is test + %endfilter + ++ Pour voir cette feature (et les 2 slides prochains) il faut utiliser -U parce que c'est dangereux. ++ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %PAGE + +--- mgp-1.11b.orig/sample/sample-jp.mgp ++++ mgp-1.11b/sample/sample-jp.mgp +@@ -312,6 +312,9 @@ + %filter "rev" + this is test + %endfilter ++ ++ このフィーチャーは危いですから -U が必要です(次の2スライドも) ++ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %PAGE + +--- mgp-1.11b.orig/sample/sample.mgp ++++ mgp-1.11b/sample/sample.mgp +@@ -229,6 +229,8 @@ + this is test + %endfilter + ++ Note the -U command line option is required to make this (un-secure) feature and the next two slides work. ++ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %PAGE + %bgrad 0 0 256 0 0 "white" "blue" diff --git a/magicpoint-1.11b-embed.patch b/magicpoint-1.11b-embed.patch new file mode 100644 index 0000000..66172e5 --- /dev/null +++ b/magicpoint-1.11b-embed.patch @@ -0,0 +1,11 @@ +--- magicpoint-1.11b/draw.c~ 2006-10-21 15:48:48.000000000 +0200 ++++ magicpoint-1.11b/draw.c 2006-10-21 15:48:48.000000000 +0200 +@@ -3750,7 +3750,7 @@ + target = parent; + } + XReparentWindow(display, child_window, window, x, y); +-#if 0 ++#if 1 + XDestroyWindow(display, target); + #endif + } diff --git a/sources b/sources new file mode 100644 index 0000000..97157ed --- /dev/null +++ b/sources @@ -0,0 +1 @@ +2b627f17443842eb5009304864577a4c magicpoint-1.11b.tar.gz