rpms/MagicPoint/FC-5 magicpoint-1.11b-64bit.patch, NONE, 1.1 magicpoint-1.11b-debian.patch, NONE, 1.1 magicpoint-1.11b-embed.patch, NONE, 1.1 MagicPoint.spec, 1.3, 1.4 magicpoint-1.09a-rpath.patch, 1.1, 1.2 magicpoint-1.08a-redhat.patch, 1.1, NONE magicpoint-1.11b-fix-undefined-operation.patch, 1.1, NONE
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Wed Feb 14 13:00:56 UTC 2007
Author: jwrdegoede
Update of /cvs/extras/rpms/MagicPoint/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15989
Modified Files:
MagicPoint.spec magicpoint-1.09a-rpath.patch
Added Files:
magicpoint-1.11b-64bit.patch magicpoint-1.11b-debian.patch
magicpoint-1.11b-embed.patch
Removed Files:
magicpoint-1.08a-redhat.patch
magicpoint-1.11b-fix-undefined-operation.patch
Log Message:
* Sat Oct 21 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 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
magicpoint-1.11b-64bit.patch:
--- NEW FILE magicpoint-1.11b-64bit.patch ---
--- 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);
magicpoint-1.11b-debian.patch:
--- NEW FILE magicpoint-1.11b-debian.patch ---
--- 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/</</g; # escape < as <
$_ = '' if (/^#/o);
+ # multiline processing (lines ending with '\')
+ while ((/\\$/) && (not eof())) {
+ $_=substr($_,0,-1); # cuts last char (should be '\')
+ $_=$_.<>; # 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 "<IMG SRC=\"$dir[1]\" ALT=\"$dir[1]\">\n";
+ &output("<IMG SRC=\"$dir[1]\" ALT=\"$dir[1]\">\n");
} elsif (scalar(@dir) == 4) {
# interpretation wrong
- print "<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[3]% ALT=\"$dir[1]\">\n";
+ &output("<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[3]% ALT=\"$dir[1]\">\n");
} elsif (scalar(@dir) >= 5) {
# interpretation wrong
- print "<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[4]% ALT=\"$dir[1]\">\n";
+ &output("<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[4]% ALT=\"$dir[1]\">\n");
}
+ $endline = "<BR>\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 @@
<HEAD><TITLE>File Not found</TITLE></HEAD>
<BODY><H1>File Not found</H1>
The requested URL $httppath was not found on this server.<P>
-Looks like a mitake in configuration.
+Looks like a mistake in configuration.
Contact the administrator.<P>
</BODY>
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 <sys/socket.h>\n";
print CPP "#include <sys/wait.h>\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
+
+ $B$3$N%U%#!<%A%c!<$O4m$$$G$9$+$i(B -U $B$,I,MW$G$9!J<!$N#2%9%i%$%I$b!K(B
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%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"
magicpoint-1.11b-embed.patch:
--- NEW FILE magicpoint-1.11b-embed.patch ---
--- 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
}
Index: MagicPoint.spec
===================================================================
RCS file: /cvs/extras/rpms/MagicPoint/FC-5/MagicPoint.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MagicPoint.spec 13 Aug 2005 07:09:02 -0000 1.3
+++ MagicPoint.spec 14 Feb 2007 13:00:24 -0000 1.4
@@ -1,70 +1,87 @@
-%define x11dir %{_prefix}/X11R6
-%define x11bindir %{x11dir}/bin
-%define x11datadir %{x11dir}/lib
-%define x11mandir %{x11dir}/man
-
-Name: MagicPoint
-Version: 1.11b
-Release: 3%{?dist}
-Summary: X based presentation software
-
-Group: Applications/Productivity
-License: BSD
-URL: http://www.mew.org/mgp
-Source0: ftp://ftp.mew.org/pub/MagicPoint/magicpoint-%{version}.tar.gz
-
-Patch1: magicpoint-1.08a-redhat.patch
-Patch2: magicpoint-1.09a-rpath.patch
-Patch3: magicpoint-1.11a-fix-gcc-warnings.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: freetype-devel fontconfig-devel xorg-x11-devel libungif-devel libpng-devel libmng-devel imlib-devel autoconf automake libtool byacc flex
-Requires: imlib
-Obsoletes: mgp,magicpoint
-Provides: mgp,magicpoint
+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: freetype-devel giflib-devel libpng-devel libmng-devel imake
+BuildRequires: imlib-devel libXmu-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}
-%patch1 -p1 -b .rh
-%patch2 -p1 -b .rpath
-%patch3 -p1 -b .warnings
-%patch6 -p1 -b .longline
-%patch10 -p1 -b .usleep
-%patch11 -p1 -b .gcc34
+%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
-CPPFLAGS=-I/usr/include/freetype1/freetype
-autoconf
-cp /usr/share/libtool/config.{sub,guess} .
-%configure --prefix=/usr/X11R6 --enable-gif --disable-vflib --enable-imlib
+export CFLAGS="$RPM_OPT_FLAGS -I/usr/include/freetype1/freetype"
+# the --x-*= because this configure's X detection is broken beyond repair
+%configure --enable-locale --enable-freetype --enable-freetype-charset16 \
+ --enable-xft2 --disable-vflib --enable-gif --enable-imlib \
+ --x-includes=%{_includedir} --x-libraries=%{_libdir}
xmkmf -a
-make
-rm -rf $RPM_BUILD_DIR/magicpoint-%{version}/sample/.cvsignore
+# 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
+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(755,root,root,755)
-%{x11bindir}/*
-%defattr(644,root,root,755)
+%defattr(-,root,root,-)
%doc COPYRIGHT README SYNTAX USAGE sample
-%{x11datadir}/X11/mgp
-%{x11mandir}/*/*
+%{_bindir}/*
+%{_datadir}/mgp
+%{_mandir}/*/*
+
%changelog
+* Sat Oct 21 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 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 <colin at fedoraproject.org> - 1.11b-3
- Re-enable debuginfo builds
- Ralf Corsepius watchful eyes fixes - cleaning up the spec
@@ -204,7 +221,7 @@
* Wed May 24 2000 Tim Powers <timp at redhat.com>
- updated to 1.07a
- cleaned up files list
-- using %configure
+- using %%configure
- fixed to use XFree86 4.0
* Mon Jul 19 1999 Tim Powers <timp at redhat.com>
magicpoint-1.09a-rpath.patch:
Index: magicpoint-1.09a-rpath.patch
===================================================================
RCS file: /cvs/extras/rpms/MagicPoint/FC-5/magicpoint-1.09a-rpath.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- magicpoint-1.09a-rpath.patch 27 Jun 2005 05:48:40 -0000 1.1
+++ magicpoint-1.09a-rpath.patch 14 Feb 2007 13:00:24 -0000 1.2
@@ -10,3 +10,14 @@
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
--- magicpoint-1.08a-redhat.patch DELETED ---
--- magicpoint-1.11b-fix-undefined-operation.patch DELETED ---
More information about the fedora-extras-commits
mailing list