Gentoo Archives: gentoo-commits

From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/hp2xx/files: hp2xx-3.4.4-r1.patch
Date: Tue, 07 Feb 2012 21:36:38
Message-Id: 20120207213628.D11C12004C@flycatcher.gentoo.org
1 dilfridge 12/02/07 21:36:28
2
3 Added: hp2xx-3.4.4-r1.patch
4 Log:
5 New package, bug 58091. Thanks to Konstantin Münning for ebuild and patch.
6
7 (Portage version: 2.1.10.44/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch?rev=1.1&content-type=text/plain
14
15 Index: hp2xx-3.4.4-r1.patch
16 ===================================================================
17 diff -ruN hp2xx-3.4.4.orig/makes/generic.mak hp2xx-3.4.4/makes/generic.mak
18 --- hp2xx-3.4.4.orig/makes/generic.mak 2003-06-21 17:16:35.000000000 +0200
19 +++ hp2xx-3.4.4/makes/generic.mak 2012-02-07 22:30:29.000000000 +0100
20 @@ -30,11 +30,11 @@
21 CP = cp
22 MKINFO = makeinfo
23 RMCMD = rm -f
24 -STRIP = strip
25 +STRIP = true
26
27 # Installation sites (GNU conventions):
28 #
29 -prefix = /usr/local
30 +prefix = /usr
31 bindir = $(prefix)/bin
32 includedir = $(prefix)/include
33 mandir = $(prefix)/man
34 @@ -44,10 +44,10 @@
35 # CC and CFLAGS set for gcc, but any ANSI-C compiler should work.
36 # For non-gcc compilers, simply set CFLAGS = -O (to start with)
37 #
38 -CC = gcc
39 -CFLAGS = -O2 -Wall -finline-functions
40 +#CC = gcc
41 +#CFLAGS = -O2 -Wall -finline-functions
42
43 -LFLAGS = # only sometimes needed; see below for examples
44 +LFLAGS = $(LDFLAGS) # only sometimes needed; see below for examples
45 CPPFLAGS = -I. # only sometimes needed; see below for examples
46 BINDCMD = # only needed for EMX and DJGPP DOS extenders
47
48 @@ -62,7 +62,7 @@
49 #
50 DEFINES = -DUNIX -DHAS_UNIX_X11
51 PREVIEWER = to_x11
52 -ALL_LIBS = -lX11 -lm # Maybe -lX instead of -lX11 is needed?
53 +ALL_LIBS = -L/usr/X11R6/lib/ -lX11 -lm # Maybe -lX instead of -lX11 is needed?
54 #
55 # Generic UNIX, no previewer
56 #
57 @@ -195,31 +195,41 @@
58 EX_SRC =
59 EX_OBJ =
60 EX_DEFS =
61 +EX_LIBS = -lz
62 #
63 # PNG support (requires -lpng and -lz on the ALL_LIBS line)
64 -#EX_SRC = png.c to_png.c
65 -#EX_OBJ = png.o to_png.o
66 -#EX_DEFS= -DPNG
67 +EX_SRC += png.c to_png.c
68 +EX_OBJ += png.o to_png.o
69 +EX_DEFS += -DPNG
70 +EX_LIBS += -lpng
71 #
72 # TIFF support (requires -ltiff and possibly -lz on the ALL_LIBS line)
73 -#EX_SRC = to_tif.c
74 -#EX_OBJ = to_tif.o
75 -#EX_DEFS = -DTIF
76 +EX_SRC += to_tif.c
77 +EX_OBJ += to_tif.o
78 +EX_DEFS += -DTIF
79 +EX_LIBS += -ltiff
80 #
81 # JPEG support (requires -ljpeg)
82 -#EX_SRC = to_jpg.c
83 -#EX_OBJ = to_jpg.o
84 -#EX_DEFS = -DJPG
85 +EX_SRC += to_jpg.c
86 +EX_OBJ += to_jpg.o
87 +EX_DEFS += -DJPG
88 +EX_LIBS += -ljpeg
89 #
90 # PDF support (requires -lpdf)
91 -#EX_SRC = to_pdf.c
92 -#EX_OBJ = to_pdf.o
93 -#EX_DEFS = -DUSEPDF
94 +#EX_SRC += to_pdf.c
95 +#EX_OBJ += to_pdf.o
96 +#EX_DEFS += -DUSEPDF
97 +#EX_LIBS += -lpdf
98 #
99 # Include extras:
100 -# EX_SRC = to_pic.c to_pac.c
101 -# EX_OBJ = to_pic.o to_pac.o
102 -# EX_DEFS = -DPIC_PAC
103 +EX_SRC += to_pic.c to_pac.c
104 +EX_OBJ += to_pic.o to_pac.o
105 +EX_DEFS += -DPIC_PAC
106 +#
107 +# Epson Esc/P2 support
108 +EX_SRC += to_escp2.c
109 +EX_OBJ += to_escp2.o
110 +EX_DEFS += -DEPSON
111 #
112 #############################################################################
113 # No user-serviceable parts below!
114 @@ -245,8 +255,8 @@
115 PROGRAM = hp2xx
116
117 default:
118 - @echo "This makefile needs manual configuration! Edit it now!
119 - @echo "After configuration, you may use the following commands:
120 + @echo "This makefile needs manual configuration! Edit it now!"
121 + @echo "After configuration, you may use the following commands:"
122 @echo ""
123 @echo "make all Compile everything"
124 @echo "make check Run a color application in preview mode"
125 @@ -267,7 +277,7 @@
126 #########################################################################
127
128 all: $(OBJS)
129 - $(CC) $(LFLAGS) $(OBJS) $(ALL_LIBS) -o $(PROGRAM)
130 + $(CC) $(LFLAGS) $(OBJS) $(ALL_LIBS) $(EX_LIBS) -o $(PROGRAM)
131 $(BINDCMD)
132
133
134 diff -ruN hp2xx-3.4.4.orig/sources/png.c hp2xx-3.4.4/sources/png.c
135 --- hp2xx-3.4.4.orig/sources/png.c 2003-06-21 17:31:51.000000000 +0200
136 +++ hp2xx-3.4.4/sources/png.c 2012-02-07 22:26:33.000000000 +0100
137 @@ -5,6 +5,7 @@
138 #include <stdio.h>
139 #include <stdlib.h>
140 #include "to_png.h"
141 +#include <zlib.h>
142 #include <png.h>
143
144 #define PDNCOL 256
145 @@ -36,7 +37,7 @@
146 }
147
148 /* set up error handlimg for libpng */
149 - if (setjmp(png_ptr->jmpbuf)) {
150 + if (setjmp(png_jmpbuf(png_ptr))) {
151 png_destroy_write_struct(&png_ptr, &info_ptr);
152 return;
153 }