[packages/mpage] - updated to 2.5.8

qboosh qboosh at pld-linux.org
Wed May 29 19:20:42 CEST 2024


commit a2919e56b25c73d14b055bc623a7344fe5f209bb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed May 29 18:59:41 2024 +0200

    - updated to 2.5.8

 mpage-config.patch          |  11 --
 mpage-debian.patch          |  10 --
 mpage-incomplete-type.patch |  20 ---
 mpage-j.patch               | 327 +-------------------------------------------
 mpage-make.patch            |  29 ++--
 mpage-tempfile.patch        |  25 ----
 mpage.spec                  |  30 ++--
 7 files changed, 27 insertions(+), 425 deletions(-)
---
diff --git a/mpage.spec b/mpage.spec
index 89ce935..ba4557e 100644
--- a/mpage.spec
+++ b/mpage.spec
@@ -4,20 +4,16 @@ Summary(fr.UTF-8):	Place plusieurs pages de texte sur une simple page postscript
 Summary(pl.UTF-8):	Narzędzie pozwalające umieścić wiele stron na jednym wydruku
 Summary(tr.UTF-8):	Birden fazla metin sayfasını tek bir PostScript sayfasına yerleştirir
 Name:		mpage
-Version:	2.5.1
-Release:	8
+Version:	2.5.8
+Release:	1
 License:	BSD
 Group:		Applications/Publishing
-Source0:	http://www.mesa.nl/pub/mpage/%{name}251pre.tgz
-# Source0-md5:	04460353ae61405a8fc58545bad143a9
+Source0:	https://www.mesa.nl/pub/mpage/%{name}-%{version}.tgz
+# Source0-md5:	b697bf0ead7bbe32f1588e3a1155aec4
 Patch0:		%{name}-make.patch
-Patch1:		%{name}-config.patch
-Patch2:		%{name}-debian.patch
-Patch3:		%{name}-tempfile.patch
 Patch4:		%{name}-j.patch
 Patch5:		%{name}-level3.patch
-Patch6:		%{name}-incomplete-type.patch
-URL:		http://www.mesa.nl/index_e.html
+URL:		https://www.mesa.nl/pub/mpage/
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -54,25 +50,19 @@ olanak verir.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
 
 %build
 %{__make} \
-	OPT_FLAGS="%{rpmcflags}" \
-	LIBDIR="%{_libdir}"
+	OPT_FLAGS="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/mpage,%{_mandir}/man1}
+#install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
 
 %{__make} install \
-	PREFIX=$RPM_BUILD_ROOT%{_prefix} \
-	LIBDIR=$RPM_BUILD_ROOT%{_libdir}
+	PREFIX=$RPM_BUILD_ROOT%{_prefix}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -81,5 +71,5 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc CHANGES README NEWS TODO
 %attr(755,root,root) %{_bindir}/mpage
-%{_mandir}/*/*
-%{_libdir}/mpage
+%{_datadir}/mpage
+%{_mandir}/man1/mpage.1*
diff --git a/mpage-config.patch b/mpage-config.patch
deleted file mode 100644
index ce58e26..0000000
--- a/mpage-config.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mpage-2.5.1/Makefile.config	Mon Mar 16 17:52:40 1998
-+++ mpage-2.5.1/Makefile	Sat Jun 10 15:29:41 2000
-@@ -71,7 +71,7 @@
- #
- # Set the default sheet margin in 1/72 inches. 
- #
--SHEETMARGIN=20 
-+SHEETMARGIN=18
- 
- 
- DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE}
diff --git a/mpage-debian.patch b/mpage-debian.patch
deleted file mode 100644
index 9a0f2a4..0000000
--- a/mpage-debian.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- mpage-2.5.1pre.orig/post.c
-+++ mpage-2.5.1pre/post.c
-@@ -251,7 +251,6 @@
-             }
-             else if (!strncmp(currline+11, "dvips", 5)) {
-                 Debug(DB_PSDOC, "%%ps_gettype: idvips\n", 0);
--                ps_type = PS_TEX;
-             }
-         }
-         /*
diff --git a/mpage-incomplete-type.patch b/mpage-incomplete-type.patch
deleted file mode 100644
index b728b2f..0000000
--- a/mpage-incomplete-type.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- mpage-2.5.1/mpage.h~	1998-03-24 23:07:58.000000000 +0100
-+++ mpage-2.5.1/mpage.h	2007-02-15 21:43:42.000000000 +0100
-@@ -159,7 +159,6 @@
- extern int ps_width;	/* number of points in the X direction (8.5 inches) */
- extern int ps_height;	/* number of points in the Y direction (11 inches) */
- extern char * media;	/* name of output page media */
--extern struct page_desc paper[];
- 
- /*
-  * a sheet describes the measurements and orientatation of a page for
-@@ -208,7 +207,8 @@
-     int width;
-     int height;
- };
--    
-+
-+extern struct page_desc paper[];
- 
- /* array of sheets where pages are ordered for coli ??? */
- extern struct sheet coli[];
diff --git a/mpage-j.patch b/mpage-j.patch
index 3b5db94..840c617 100644
--- a/mpage-j.patch
+++ b/mpage-j.patch
@@ -1,324 +1,11 @@
---- mpage-2.5.1/Makefile.jp	Fri Aug 11 20:04:49 2000
-+++ mpage-2.5.1/Makefile	Fri Aug 11 20:08:42 2000
-@@ -74,7 +74,7 @@
- SHEETMARGIN=18
+--- mpage-2.5.8/Makefile.orig	2024-05-29 18:51:29.020399049 +0200
++++ mpage-2.5.8/Makefile	2024-05-29 18:51:59.230235388 +0200
+@@ -79,7 +79,7 @@ SHEETMARGIN=18
+ #
+ DEFAULT_DUPLEX=0
  
- 
--DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE}
-+DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE} -DKANJI
+-DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULT_DUPLEX=${DEFAULT_DUPLEX} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE} # -DKANJI
++DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULT_DUPLEX=${DEFAULT_DUPLEX} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE} -DKANJI
  
  
  ############################################################################
---- mpage-2.5.1/mpage.c.jp	Mon Jan 12 07:29:17 1998
-+++ mpage-2.5.1/mpage.c	Fri Aug 11 20:04:49 2000
-@@ -314,6 +314,15 @@
-                    HSIZE - 2);
-     fprintf(outfd, "textfont setfont\n");
-     fprintf(outfd, "(a) stringwidth pop /mp_a_x exch def\n");
-+#ifdef KANJI
-+#ifdef GOTHIC
-+    fprintf(outfd, "/kanj /GothicBBB-Medium-H findfont %d scalefont def\n", fsize - 1);
-+    fprintf(outfd, "/han /GothicBBB-Medium.Hankaku findfont %d scalefont def\n", fsize - 1);
-+#else
-+    fprintf(outfd, "/kanj /Ryumin-Light-H findfont %d scalefont def\n", fsize - 1);
-+    fprintf(outfd, "/han /Ryumin-Light.Hankaku findfont %d scalefont def\n", fsize - 1);
-+#endif
-+#endif
- # ifdef DEBUG
-     if (Debug_flag & DB_PSMPAGE)
-         fprintf(outfd, "(\\t'a' length ) print mp_a_x ==\nflush\n");
---- mpage-2.5.1/text.c.jp	Fri Mar 13 07:48:58 1998
-+++ mpage-2.5.1/text.c	Fri Aug 11 21:47:33 2000
-@@ -56,7 +56,9 @@
- static int text_onepage();
- static char *mp_get_text();
- 
--
-+#ifdef KANJI
-+int get_wc( FILE * );
-+#endif
- /*
-  * do_text_doc processes an input stream fd, reducing output to fit on
-  * a printed page as decribed by asheet, and prints this on outfd.
-@@ -264,6 +266,11 @@
-  FILE *outfd;
- {
-     char *text;
-+#ifdef KANJI
-+    int kcode;
-+    int loadfont = 0;
-+    int i;
-+#endif
- 
-     /*
-      * Start off with printing any wanted annotation
-@@ -287,7 +294,52 @@
-      * keep getting lines of input, until we have filled a page
-      */
-     while (loc.pl_line <= asheet->sh_plength) {
-+#ifndef KANJI
-         text = mp_get_text(file, &loc, asheet);
-+#else
-+        text = mp_get_text(file, &loc, asheet, &kcode );
-+        if( kcode )
-+        {
-+            if( kcode < 0x0100 )  /* hankaku */
-+            {
-+                if( loadfont != 2 )
-+                {
-+                    fprintf(outfd, "han setfont\n");
-+                    loadfont = 2;
-+                }
-+            }
-+            else                  /* zenkaku */
-+            {
-+                if( loadfont != 1 )
-+                {
-+                     fprintf(outfd, "kanj setfont\n");
-+                     loadfont = 1;
-+                }
-+            }
-+            i = loc.pl_col;
-+            if( kcode >= 0x80 && kcode < 0x100 )
-+		i--;
-+            switch (i) {
-+            /* fprintf(outfd, "(%s\\n) print flush\n", text); */
-+                case 0: putc('0', outfd);
-+                        break;
-+                case 1: fprintf(outfd, "mp_a_x");
-+                        break;
-+                default:
-+                         fprintf(outfd, "%d mp_a_x mul", i);
-+                         break;
-+            }
-+            fprintf(outfd, " %d moveto <%04x> show\n",
-+                (asheet->sh_plength - loc.pl_line) * fsize, kcode);
-+            text[0] = 0;
-+
-+        }
-+        else if( loadfont )
-+        {
-+               fprintf(outfd, "textfont setfont\n");
-+               loadfont = 0;
-+        }
-+#endif
-         Debug(DB_ONEPAGE, "%% text = %d\n", text);
-         if (text == 0) {
-             return FILE_EOF;
-@@ -326,7 +378,12 @@
- 
- 
- static char *
-+#ifndef KANJI
- mp_get_text(infile, locp, asheet)
-+#else
-+mp_get_text(infile, locp, asheet, kp)
-+ int *kp;
-+#endif
-  FILE *infile;
-  struct pageloc *locp;
-  struct sheet *asheet;
-@@ -337,22 +394,72 @@
-     static int prevchar = 0;
-     char *textp;
- 
-+#ifdef KANJI
-+    static int prevkanj=0;
-+#endif
-+
-     textp = text;
-     locp->pl_new_line = locp->pl_line;
-     locp->pl_new_col = locp->pl_col;
--
-+ #ifdef KANJI
-+    *kp = -1;
-+#endif
-     gathering = 1;
-     /*
-      * Make sure there is still enough space in text array (we
-      * may need to put 5 characters plus NULL in it.
-      */
-     while (gathering && textp - text < LINESIZE - 5) {
-+#ifdef KANJI
-+        if( prevkanj )
-+        {
-+            *kp = prevkanj;
-+            if( prevkanj >= 0x0100 )
-+                  locp->pl_new_col++;
-+            locp->pl_new_col++;
-+            prevkanj = 0;
-+            gathering = 0;
-+            return textp;
-+        }
-+      if (prevchar) {
-+          ichr = prevchar;
-+            prevchar = 0;
-+      }
-+      else
-+            ichr = get_wc( infile );
-+        if( ichr >= 0x0080 )
-+        {
-+            if( *kp < 0 )
-+            {
-+               *kp = ichr;
-+               gathering = 0;
-+               if( ichr >= 0x0100 )
-+                   locp->pl_new_col++;
-+               locp->pl_new_col++;
-+             if (opt_fold &&
-+                 (locp->pl_new_col >= asheet->sh_cwidth)) {
-+                 gathering = 1;
-+               locp->pl_new_line += 1;
-+               locp->pl_new_col = opt_indent;
-+             }
-+               return textp;
-+            }
-+            else
-+            {
-+               prevkanj = ichr;
-+               gathering = 0;
-+               goto  loopend;
-+            }
-+        }
-+        else *kp = 0;
-+#else
-         if (prevchar) {
-             ichr = prevchar;
-             prevchar = 0;
-         }
-         else
-             ichr = fgetc(infile);
-+#endif
-         Debug(DB_GETLINE, "%%called fgetc ichr = %d", ichr);
-         /*
-          * this prevents nulls in the input from confusing the
-@@ -426,6 +533,10 @@
-         }
-     }
-     
-+#ifdef KANJI
-+loopend:
-+    *kp = 0;
-+#endif
-     *textp = 0;
-     /*
-      * remove any spaces at the front of the text string by
-@@ -445,3 +556,118 @@
- 
- } /* mp_get_text */
- 
-+
-+
-+
-+
-+#ifdef KANJI
-+
-+#define	ESC	0x1b
-+
-+unsigned short sjtojis(unsigned short, unsigned short);
-+int issjkanji(int );
-+
-+#define UNKOWN  0
-+#define SJIS    1
-+#define EUC     2
-+
-+int get_wc( FILE *infile )
-+{
-+ static int     ext[3];
-+ static unsigned int  rem = 0;
-+ static int in_kanji = 0;
-+ static int coding = UNKOWN;
-+  int c;
-+  if( !rem )
-+  {
-+     while(1)
-+     {
-+         c = fgetc( infile );
-+         ext[rem] = c;
-+         rem++;
-+         if( c == EOF )
-+             break;
-+         if( ext[0] == ESC )
-+         {
-+            if( rem >= 3 )
-+            {
-+                if( ext[1] == '$' /*&& ext[2] == 'B'*/ )
-+                     in_kanji = 1;
-+                else if( ext[1] == '(' /*&& ext[2] == 'B' */)
-+                     in_kanji = 0;
-+                else  goto  loopout;
-+                rem = 0;
-+                continue;
-+            }
-+         }
-+         else
-+         {
-+            if( in_kanji )
-+            {
-+                if( rem >= 2 )
-+                {
-+                    rem = 0;
-+                    return (ext[0]<<8) + ext[1];
-+                }
-+            }
-+            else if( coding != SJIS && c >= 0xa1 && c <= 0xf4 )
-+            {   /* EUC */
-+                rem = 0;
-+                coding = EUC;
-+                return (( c & 0x7f )<<8 )+(fgetc( infile ) & 0x7f);
-+            }
-+            else if( issjkanji( c ))
-+            {
-+                rem = 0;
-+                if( coding != EUC )
-+                     coding = SJIS;
-+                return sjtojis(c,fgetc( infile ));
-+            }
-+            else goto loopout;
-+         }
-+     }
-+  }
-+  loopout:
-+  if( rem )
-+  {
-+     c = ext[0];
-+     ext[0] = ext[1];
-+     ext[1] = ext[2];
-+     rem--;
-+  }
-+  return c;
-+}
-+
-+
-+int issjkanji(int c)
-+{
-+	c &= 0377;
-+	return ((c > 0x80 && c < 0xa0)||(c > 0xdf && c < 0xfd));
-+}
-+
-+#ifdef JIS7
-+iskana(c)
-+ int c;
-+{
-+	c &= 0xff;
-+	return(( c >= 0xa0 ) && ( c <= df ));
-+}
-+#endif
-+
-+unsigned short sjtojis(unsigned short byte1, unsigned short byte2)
-+{
-+unsigned short	c;
-+
-+	byte1 -= ( byte1>=0xa0 ) ? 0xc1 : 0x81;
-+	c = ((byte1 << 1) + 0x21) << 8;
-+	if( byte2 >= 0x9f ) {
-+		c += 0x0100;
-+		c |= (byte2 - 0x7e) & 0xff;
-+	} else {
-+		c |= (byte2 - ( (byte2<=0x7e) ? 0x1f : 0x20 )) & 0xff;
-+	}
-+	return ( c );
-+}
-+
-+
-+#endif
diff --git a/mpage-make.patch b/mpage-make.patch
index d5c8bf7..77fd69c 100644
--- a/mpage-make.patch
+++ b/mpage-make.patch
@@ -1,34 +1,25 @@
-diff -urN mpage-2.4.orig/Makefile mpage-2.4/Makefile
---- mpage-2.4.orig/Makefile	Thu Sep  5 00:20:45 1996
-+++ mpage-2.4/Makefile	Sat Feb 26 18:37:35 2000
-@@ -29,7 +29,7 @@
- 
- # Set this to an ANSI compatible C compiler (preferably gcc)
- #CC=cc
--CC=gcc
-+#CC=gcc
- 
- 
- #
-@@ -48,10 +48,10 @@
+--- mpage-2.5.8/Makefile.orig	2023-05-02 23:53:09.000000000 +0200
++++ mpage-2.5.8/Makefile	2024-05-29 18:42:14.723401933 +0200
+@@ -57,11 +57,10 @@ PAGESIZE=A4
  SPOOL_TYPE=BSD_SPOOLER
  
  # PREFIX=e:/usr		# OS/2 type
 -PREFIX=/usr/local
-+PREFIX=/usr/
+-#PREFIX=/usr
++PREFIX=/usr
  BINDIR=$(PREFIX)/bin
- LIBDIR=$(PREFIX)/lib
+ LIBDIR=$(PREFIX)/share
 -MANDIR=$(PREFIX)/man/man1
 +MANDIR=$(PREFIX)/share/man/man1
  
- 
- # Unix extensions
-@@ -84,7 +84,7 @@
+ #
+ # A default encoding is given in encoding.h. Setting ENCODING=1 will
+@@ -114,7 +113,7 @@ O = .o
  # If you are using gcc, you probably don't need to change anything here.
  
  # Linux:
 -CFLAGS = -O2 -s $(DEFS) -Wall
-+CFLAGS = ${OPT_FLAGS} -s $(DEFS) -Wall
++CFLAGS = ${OPT_FLAGS} $(DEFS) -Wall
  
  # AIX (xlC on aix 4):
  #CFLAGS = -O2 -s $(DEFS)
diff --git a/mpage-tempfile.patch b/mpage-tempfile.patch
deleted file mode 100644
index 8c35451..0000000
--- a/mpage-tempfile.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- mpage-2.5.1/file.c.foo	Mon Jan  8 10:42:55 2001
-+++ mpage-2.5.1/file.c	Mon Jan  8 11:14:18 2001
-@@ -145,6 +145,7 @@
-     char tmpfile[LINESIZE];
-     char buffer[LINESIZE];
-     int incnt, outcnt;
-+    int tmpfd;
- 
-     if (opt_pr) {
-         Debug(DB_STDIN, "%%do_stdin: pr option selects text\n", 0);
-@@ -155,7 +156,13 @@
-          * be used as input to the do_doc routine
-          */
-         (void)strcpy(tmpfile, "/usr/tmp/mpageXXXXXX");
--        (void)mktemp(tmpfile);
-+        if ( (tmpfd = mkstemp(tmpfile)) == -1) {
-+		fprintf(stderr, "%s: cannot create temporary file",
-+			MPAGE);
-+		perror(MPAGE);
-+		return;
-+	}
-+	close(tmpfd);
-         if (opt_header != NULL)
-             (void)sprintf(command, "pr -l%d -w%d -h \"%s\"> %s",
-                       asheet->sh_plength, asheet->sh_cwidth,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mpage.git/commitdiff/a2919e56b25c73d14b055bc623a7344fe5f209bb



More information about the pld-cvs-commit mailing list