avatar
Rosa has added ae30fc06d1
initial: add from SRPM
... ... --- /dev/null
... ... +++ b/.abf.yml
... ... @@ -0,0 +1,2 @@
1
sources:
2
  "mpage-2.5.6.tgz": 6be20c2892523814198cb12b1689781638a2c230
view file @ ae30fc06d1
... ... --- /dev/null
... ... +++ b/mpage-2.5.3-j.patch
... ... @@ -0,0 +1,11 @@
1
--- ./Makefile.jp	2002-11-05 09:07:17.000000000 +0100
2
+++ ./Makefile	2002-11-05 09:07:53.000000000 +0100
3
@@ -73,7 +73,7 @@
4
 #
5
 DEFAULT_DUPLEX=0
6
 
7
-DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULT_DUPLEX=${DEFAULT_DUPLEX} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE} # -DKANJI
8
+DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULT_DUPLEX=${DEFAULT_DUPLEX} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE} -DKANJI
9
 
10
 
11
 ############################################################################
view file @ ae30fc06d1
... ... --- /dev/null
... ... +++ b/mpage-2.5.3-japanese-fix.patch
... ... @@ -0,0 +1,25 @@
1
diff -Naurp mpage-2.5.6/mpage.c mpage-2.5.6.oden/mpage.c
2
--- mpage-2.5.6/mpage.c	2008-01-09 11:47:07.000000000 +0100
3
+++ mpage-2.5.6.oden/mpage.c	2008-12-29 15:42:37.000000000 +0100
4
@@ -44,7 +44,8 @@ char **argv;
5
     struct sheet *thesheet;
6
     char outcommand[LINESIZE]; /* the command which is the output filter */
7
 
8
-    current_locale = setlocale(LC_ALL,"");
9
+    setlocale(LC_ALL,"");
10
+    current_locale = setlocale(LC_ALL,NULL);
11
 
12
    
13
 #ifdef __EMX__
14
diff -Naurp mpage-2.5.6/text.c mpage-2.5.6.oden/text.c
15
--- mpage-2.5.6/text.c	2004-05-30 21:35:04.000000000 +0200
16
+++ mpage-2.5.6.oden/text.c	2008-12-29 15:42:37.000000000 +0100
17
@@ -465,7 +465,7 @@ mp_get_text(infile, locp, asheet, kp)
18
 	    }
19
 	} else {
20
 #ifdef KANJI
21
-        if (current_locale && !strncmp(current_locale,"ja_JP",5)) {
22
+        if (current_locale && !strncmp(current_locale,"ja",2)) {
23
             if (prevkanj) {
24
                 *kp = prevkanj;
25
                 if (prevkanj >= 0x0100)
view file @ ae30fc06d1
... ... --- /dev/null
... ... +++ b/mpage-2.5.4-config.patch
... ... @@ -0,0 +1,55 @@
1
--- mpage-2.5.4/Makefile.config	2004-05-30 15:38:31.000000000 -0400
2
+++ mpage-2.5.4/Makefile	2005-08-21 16:21:15.000000000 -0400
3
@@ -39,8 +39,8 @@ CC=gcc
4
 #          A4 for European A4
5
 #  See glob.c for all possibilities
6
 #
7
-# PAGESIZE=Letter
8
-PAGESIZE=A4
9
+PAGESIZE=Letter
10
+# PAGESIZE=A4
11
 
12
 #
13
 # Define your spooler type
14
@@ -50,11 +50,11 @@ PAGESIZE=A4
15
 SPOOL_TYPE=BSD_SPOOLER
16
 
17
 # PREFIX=e:/usr		# OS/2 type
18
-PREFIX=/usr/local
19
-#PREFIX=/usr
20
+# PREFIX=/usr/local
21
+PREFIX=/usr
22
 BINDIR=$(PREFIX)/bin
23
 LIBDIR=$(PREFIX)/share
24
-MANDIR=$(PREFIX)/man/man1
25
+MANDIR=$(PREFIX)/share/man/man1
26
 
27
 #
28
 # A default encoding is given in encoding.h. Setting ENCODING=1 will
29
@@ -107,7 +107,7 @@ O = .o
30
 # If you are using gcc, you probably don't need to change anything here.
31
 
32
 # Linux:
33
-CFLAGS = -O2 -s $(DEFS) -Wall
34
+CFLAGS = -s $(DEFS) $(RPM_OPT_FLAGS) -Wall
35
 
36
 # AIX (xlC on aix 4):
37
 #CFLAGS = -O2 -s $(DEFS)
38
@@ -178,10 +178,10 @@ mpage.ps:	mpage.1
39
 # add your proper install stuff
40
 #
41
 install:
42
-	if [ ! -d $(LIBDIR)/mpage ] ; then mkdir -p $(LIBDIR)/mpage ; fi
43
-	if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR) ; fi
44
-	if [ ! -d $(MANDIR) ] ; then mkdir -p $(MANDIR) ; fi
45
-	cp mpage$(E) $(BINDIR)
46
-	cp mpage.1 $(MANDIR)
47
-	-cp Encodings/* $(LIBDIR)/mpage
48
-	-chmod 644 $(LIBDIR)/mpage/*
49
+	if [ ! -d $(DESTDIR)$(LIBDIR)/mpage ] ; then mkdir -p $(DESTDIR)$(LIBDIR)/mpage ; fi
50
+	if [ ! -d $(DESTDIR)$(BINDIR) ] ; then mkdir -p $(DESTDIR)$(BINDIR) ; fi
51
+	if [ ! -d $(DESTDIR)$(MANDIR) ] ; then mkdir -p $(DESTDIR)$(MANDIR) ; fi
52
+	cp mpage$(E) $(DESTDIR)$(BINDIR)/
53
+	cp mpage.1 $(DESTDIR)$(MANDIR)/
54
+	-cp Encodings/* $(DESTDIR)$(LIBDIR)/mpage/
55
+	-chmod 644 $(DESTDIR)$(LIBDIR)/mpage/*
view file @ ae30fc06d1
... ... --- /dev/null
... ... +++ b/mpage-2.5.6-LDFLAGS.diff
... ... @@ -0,0 +1,23 @@
1
--- Makefile	2008-12-29 15:44:35.000000000 +0100
2
+++ Makefile.oden	2008-12-29 15:46:07.000000000 +0100
3
@@ -128,6 +128,7 @@
4
 # OS X (10.2.2):
5
 #CFLAGS = -O2  $(DEFS) -Wall
6
 
7
+LDFLAGS=
8
 
9
 ############################################################################
10
 #
11
@@ -150,10 +151,10 @@
12
 	@echo Done!
13
 
14
 mpage$(E):	$(MOBJ)
15
-	$(CC) $(CFLAGS) -o mpage$(E) $(MOBJ) $(LIBS)
16
+	$(CC) $(CFLAGS) $(LDFLAGS) -o mpage$(E) $(MOBJ) $(LIBS)
17
 
18
 msample$(E):	$(SOBJ)
19
-	$(CC) $(CFLAGS) -o msample$(E) $(SOBJ) $(LIBS)
20
+	$(CC) $(CFLAGS) $(LDFLAGS) -o msample$(E) $(SOBJ) $(LIBS)
21
 
22
 mpage.1: mpage.1.in
23
 	sed 's:PREFIX:${PREFIX}:' < mpage.1.in > mpage.1
view file @ ae30fc06d1
... ... --- /dev/null
... ... +++ b/mpage-mfix.patch
... ... @@ -0,0 +1,21 @@
1
--- mpage-2.5.1pre.orig/Contrib/mfix/mfix.c
2
+++ mpage-2.5.1pre/Contrib/mfix/mfix.c
3
@@ -1,7 +1,7 @@
4
 #include <stdio.h>
5
 
6
-FILE *in=stdin,*out=stdout;
7
-char line[200]; line2[200];
8
+FILE *in,*out;
9
+char line[200], line2[200];
10
 
11
 int
12
 strcp(st1,st2)
13
@@ -15,6 +15,8 @@
14
 main()
15
 {
16
   int i;
17
+  in = stdin;
18
+  out = stdout;
19
   for(i=0; i<10; i=1)
20
   {
21
     if (fgets(line,200,in)==NULL) { close(in); close(out); exit(1); }
view file @ ae30fc06d1
... ... --- /dev/null
... ... +++ b/mpage-psprint.patch
... ... @@ -0,0 +1,23 @@
1
--- mpage-2.5.1pre.orig/Contrib/psprint
2
+++ mpage-2.5.1pre/Contrib/psprint
3
@@ -1,10 +1,9 @@
4
-#!/bin/ksh -
5
+#!/bin/sh -
6
 
7
 STDIN_TMP_FILE=/tmp/psprint.$$
8
 
9
 GS=/usr/local/bin/gs
10
 GSLIB=/usr/local/lib/ghostscript/3.53
11
-RM=/bin/rm
12
 #
13
 # define print command (SYSV or BSD ish)
14
 # PRINT="lp -or -s"
15
@@ -20,7 +19,7 @@
16
     ${GSLIB}/quit.ps
17
 done
18
 
19
-${RM} -f "${STDIN_TMP_FILE}"
20
+rm -f "${STDIN_TMP_FILE}"
21
 
22
 exit 0
23
 
... ... --- /dev/null
... ... +++ b/mpage.spec
... ... @@ -0,0 +1,118 @@
1
Summary: A tool for printing multiple pages of text on each printed page
2
Name: mpage
3
Version: 2.5.6
4
Release: %mkrel 5
5
License: BSD
6
Group: System/Printing
7
Source: http://www.mesa.nl/pub/mpage/%name-%version.tgz
8
Patch0: mpage-2.5.4-config.patch
9
#Patch1: mpage-2.5.4-gcc4.patch
10
# Japanese patch.bz2
11
Patch10: mpage-2.5.3-j.patch
12
Patch20: mpage-mfix.patch
13
Patch21: mpage-psprint.patch
14
Patch22: mpage-2.5.3-japanese-fix.patch
15
Patch23: mpage-2.5.6-LDFLAGS.diff
16
URL: http://www.mesa.nl/pub/mpage
17
BuildRoot: %{_tmppath}/%{name}-%{version}-root
18
19
%description
20
The mpage utility takes plain text files or PostScript(TM) documents
21
as input, reduces the size of the text, and prints the files on a
22
PostScript printer with several pages on each sheet of paper.  Mpage
23
is very useful for viewing large printouts without using up tons of
24
paper.  Mpage supports many different layout options for the printed
25
pages.
26
27
Mpage should be installed if you need a useful utility for viewing
28
long text documents without wasting paper.
29
30
%prep
31
%setup -q
32
%patch0 -p1 -b .config
33
#%patch1 -p1 -b .gcc4
34
%patch10 -p1 -b .jp
35
%patch20 -p1 -b .fix
36
%patch21 -p1
37
%patch22 -p1
38
%patch23 -p0
39
40
%build
41
%make RPM_OPT_FLAGS="%{optflags}" LDFLAGS="%{ldflags}"
42
43
%install
44
rm -rf $RPM_BUILD_ROOT
45
46
%makeinstall_std
47
48
%clean
49
rm -rf $RPM_BUILD_ROOT
50
51
%files
52
%defattr(-,root,root)
53
%doc CHANGES Copyright README NEWS TODO
54
%_bindir/mpage
55
%_mandir/man1/mpage.1*
56
%dir %_datadir/mpage
57
%_datadir/mpage/*
58
59
60
61
62
%changelog
63
* Wed May 04 2011 Oden Eriksson <oeriksson@mandriva.com> 2.5.6-5mdv2011.0
64
+ Revision: 666486
65
- mass rebuild
66
67
* Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 2.5.6-4mdv2011.0
68
+ Revision: 606659
69
- rebuild
70
71
* Wed Mar 17 2010 Oden Eriksson <oeriksson@mandriva.com> 2.5.6-3mdv2010.1
72
+ Revision: 523383
73
- rebuilt for 2010.1
74
75
* Thu Sep 03 2009 Christophe Fergeau <cfergeau@mandriva.com> 2.5.6-2mdv2010.0
76
+ Revision: 426165
77
- rebuild
78
79
* Mon Dec 29 2008 Oden Eriksson <oeriksson@mandriva.com> 2.5.6-1mdv2009.1
80
+ Revision: 321041
81
- 2.5.6
82
- rediffed one fuzzy patch
83
- use %%ldflags
84
85
* Tue Jun 17 2008 Thierry Vignaud <tv@mandriva.org> 2.5.5-5mdv2009.0
86
+ Revision: 223317
87
- rebuild
88
89
* Tue Jan 15 2008 Thierry Vignaud <tv@mandriva.org> 2.5.5-4mdv2008.1
90
+ Revision: 153245
91
- rebuild
92
- kill re-definition of %%buildroot on Pixel's request
93
94
  + Olivier Blin <oblin@mandriva.com>
95
    - restore BuildRoot
96
97
* Wed Aug 29 2007 Oden Eriksson <oeriksson@mandriva.com> 2.5.5-2mdv2008.0
98
+ Revision: 74573
99
- use the new System/Printing RPM GROUP
100
101
102
* Mon Dec 11 2006 Emmanuel Andry <eandry@mandriva.org> 2.5.5-1mdv2007.0
103
+ Revision: 94573
104
- New version 2.5.5
105
  bunzip patches
106
  drop patch 1
107
- Import mpage
108
109
* Tue May 02 2006 Stefan van der Eijk <stefan@eijk.nu> 2.5.4-3mdk
110
- rebuild for sparc
111
112
* Mon Aug 22 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 2.5.4-2mdk
113
- gcc4 & makefilery fixes
114
- move encodings where they are expected to be: /usr/share/mpage
115
116
* Fri Jun 25 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.5.4-1mdk
117
- new release
118

Comments