[svn] r5050 - in trunk/rpms: . magicpoint
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Mon Jan 8 17:01:55 CET 2007
Author: dag
Date: 2007-01-08 17:01:54 +0100 (Mon, 08 Jan 2007)
New Revision: 5050
Added:
trunk/rpms/magicpoint/
trunk/rpms/magicpoint/magicpoint-1.08a-redhat.patch
trunk/rpms/magicpoint/magicpoint-1.09a-rpath.patch
trunk/rpms/magicpoint/magicpoint-1.10a-fix-gcc34.patch
trunk/rpms/magicpoint/magicpoint-1.10a-fix-usleep.patch
trunk/rpms/magicpoint/magicpoint-1.10a-longline.patch
trunk/rpms/magicpoint/magicpoint-1.11a-fix-gcc-warnings.patch
trunk/rpms/magicpoint/magicpoint.spec
Log:
Initial import
Added: trunk/rpms/magicpoint/magicpoint-1.08a-redhat.patch
===================================================================
--- trunk/rpms/magicpoint/magicpoint-1.08a-redhat.patch (rev 0)
+++ trunk/rpms/magicpoint/magicpoint-1.08a-redhat.patch 2007-01-08 16:01:54 UTC (rev 5050)
@@ -0,0 +1,11 @@
+--- magicpoint-1.08a/Imakefile.in.orig Wed Jul 11 15:25:11 2001
++++ magicpoint-1.08a/Imakefile.in Wed Jul 11 15:26:09 2001
+@@ -19,7 +19,7 @@
+ LEX= @LEX@
+ # NOTE: we must not define CC here, since imake may assume other CC to be used.
+
+-OPTFLAGS= @OPTFLAGS@
++OPTFLAGS= @OPTFLAGS@ -I/usr/include/freetype1/freetype
+ DEFS= @DEFS@ -DMGPLIBDIR=\"$(LIBDIR)/mgp\"
+ #DEFS+= -DGLYPHEDGE
+
Added: trunk/rpms/magicpoint/magicpoint-1.09a-rpath.patch
===================================================================
--- trunk/rpms/magicpoint/magicpoint-1.09a-rpath.patch (rev 0)
+++ trunk/rpms/magicpoint/magicpoint-1.09a-rpath.patch 2007-01-08 16:01:54 UTC (rev 5050)
@@ -0,0 +1,12 @@
+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"
Added: trunk/rpms/magicpoint/magicpoint-1.10a-fix-gcc34.patch
===================================================================
--- trunk/rpms/magicpoint/magicpoint-1.10a-fix-gcc34.patch (rev 0)
+++ trunk/rpms/magicpoint/magicpoint-1.10a-fix-gcc34.patch 2007-01-08 16:01:54 UTC (rev 5050)
@@ -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 <X11/Xutil.h>
+ #include <X11/cursorfont.h>
+ #include <stdio.h>
++#include <stdarg.h>
+ /*
+ * 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;
Added: trunk/rpms/magicpoint/magicpoint-1.10a-fix-usleep.patch
===================================================================
--- trunk/rpms/magicpoint/magicpoint-1.10a-fix-usleep.patch (rev 0)
+++ trunk/rpms/magicpoint/magicpoint-1.10a-fix-usleep.patch 2007-01-08 16:01:54 UTC (rev 5050)
@@ -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
Added: trunk/rpms/magicpoint/magicpoint-1.10a-longline.patch
===================================================================
--- trunk/rpms/magicpoint/magicpoint-1.10a-longline.patch (rev 0)
+++ trunk/rpms/magicpoint/magicpoint-1.10a-longline.patch 2007-01-08 16:01:54 UTC (rev 5050)
@@ -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)
Added: trunk/rpms/magicpoint/magicpoint-1.11a-fix-gcc-warnings.patch
===================================================================
--- trunk/rpms/magicpoint/magicpoint-1.11a-fix-gcc-warnings.patch (rev 0)
+++ trunk/rpms/magicpoint/magicpoint-1.11a-fix-gcc-warnings.patch 2007-01-08 16:01:54 UTC (rev 5050)
@@ -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)
Added: trunk/rpms/magicpoint/magicpoint.spec
===================================================================
--- trunk/rpms/magicpoint/magicpoint.spec (rev 0)
+++ trunk/rpms/magicpoint/magicpoint.spec 2007-01-08 16:01:54 UTC (rev 5050)
@@ -0,0 +1,104 @@
+# $Id$
+# Authority: dag
+
+%{?dist: %{expand: %%define %dist 1}}
+%{?fedora: %{expand: %%define fc%{fedora} 1}}
+
+%{!?dist:%define _with_modxorg 1}
+%{?fc6: %define _with_modxorg 1}
+%{?fc5: %define _with_modxorg 1}
+
+Summary: Presentation software
+Name: magicpoint
+Version: 1.11b
+Release: 1
+License: BSD
+Group: Applications/Productivity
+URL: http://member.wide.ad.jp/wg/mgp/
+
+Source: 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
+
+BuildPrereq: freetype-devel
+BuildRequires: autoconf, automake, libtool, byacc, flex
+BuildRequires: libungif-devel, libpng-devel, libmng-devel, imlib-devel
+BuildRequires: fontconfig-devel
+#Requires: VFlib2 >= 2.25.6-8, VFlib2-conf-ja >= 2.25.6-8
+%{?_with_modxorg:BuildRequires: libXt-devel, libXext-devel, libXft-devel}
+%{!?_with_modxorg:BuildRequires: XFree86-devel}
+Requires: imlib
+Obsoletes: mgp <= %{version}-%{release}
+Obsoletes: MagicPoint <= %{version}-%{release}
+Provides: mgp = %{version}-%{release}
+Provides: 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
+%patch0 -p1
+%patch1 -p1 -z .64bit
+%patch2 -p1 -b .rpath
+%patch3 -p1 -b .warnings
+%patch4 -p1 -z .embed
+%patch6 -p1 -b .longline
+%patch10 -p1 -b .usleep
+%patch11 -p1 -b .gcc34
+
+%build
+%configure \
+ --x-libraries="%{_libdir}/X11" \
+ --x-includes="%{_includedir}/X11" \
+ --disable-vflib \
+ --enable-freetype \
+ --enable-freetype-charset16 \
+ --enable-gif \
+ --enable-imlib \
+ --enable-locale \
+ --enable-xft2
+xmkmf -a
+%{__make} %{?_smp_mflags} LIBDIR="%{_datadir}"
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} install install.man DESTDIR="%{buildroot}" LIBDIR="%{_datadir}" BINDIR="%{_bindir}" MANDIR="%{_mandir}/man1"
+%{__install} -Dp -m0755 contrib/mgp2html.pl %{buildroot}%{_bindir}/mgp2html
+%{__install} -Dp -m0755 contrib/mgp2latex.pl %{buildroot}%{_bindir}/mgp2latex
+
+### Clean up docdir
+%{__rm} -rf sample/{.cvsignore,Imakefile*,Makefile}
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-, root, root, 0755)
+%doc COPYRIGHT* FAQ README* RELNOTES SYNTAX TODO* USAGE* sample/
+%doc %{_mandir}/man1/mgp.1x*
+%doc %{_mandir}/man1/mgp2ps.1x*
+%doc %{_mandir}/man1/mgpembed.1x*
+%doc %{_mandir}/man1/mgpnet.1x*
+%doc %{_mandir}/man1/xwintoppm.1x*
+%{_bindir}/mgp
+%{_bindir}/mgp2html
+%{_bindir}/mgp2latex
+%{_bindir}/mgp2ps
+%{_bindir}/mgpembed
+%{_bindir}/mgpnet
+%{_bindir}/xwintoppm
+%{_datadir}/mgp/
+
+%changelog
+* Mon Jan 08 2006 Dag Wieers <dag at wieers.com> - 1.11b-1
+- Initial package. (using DAR)
Property changes on: trunk/rpms/magicpoint/magicpoint.spec
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
More information about the svn-commits
mailing list