View | Details | Raw Unified | Return to bug 17742
Collapse All | Expand All

(-)graphics/netpbm/Makefile (-30 / +38 lines)
Lines 1-57 Link Here
1
# New ports collection makefile for:	netpbm
1
# New ports collection makefile for:	netpbm
2
# Version required:	8.0
2
# Version required:	8.3
3
# Date created:		?
3
# Date created:		?
4
# Whom:			jmz (original)
4
# Whom:			jmz (original)
5
#
5
#
6
# $FreeBSD: ports/graphics/netpbm/Makefile,v 1.23 2000/02/13 10:49:10 reg Exp $
6
# $FreeBSD: ports/graphics/netpbm/Makefile,v 1.23 2000/02/13 10:49:10 reg Exp $
7
#
7
#
8
8
9
DISTNAME=	netpbm-8.0
9
DISTNAME=	netpbm-8.3
10
CATEGORIES=	graphics
10
CATEGORIES=	graphics
11
MASTER_SITES=	${MASTER_SITE_SUNSITE}
11
MASTER_SITES=	${MASTER_SITE_SUNSITE}
12
MASTER_SITE_SUBDIR=	apps/graphics/convert
12
MASTER_SITE_SUBDIR=	apps/graphics/convert
13
EXTRACT_SUFX=	.tgz
13
14
14
MAINTAINER=	ports@FreeBSD.org
15
MAINTAINER=	ports@FreeBSD.org
15
16
16
LIB_DEPENDS=	tiff.4:${PORTSDIR}/graphics/tiff
17
LIB_DEPENDS=	tiff.4:${PORTSDIR}/graphics/tiff \
18
		png.3:${PORTSDIR}/graphics/png
17
19
18
WRKSRC=		${WRKDIR}/netpbm
20
USE_GMAKE=	yes
19
USE_IMAKE=	yes
21
ALL_TARGET=	merge
22
INSTALL_TARGET=	install-merge
20
23
21
MAN1=	anytopnm.1 asciitopgm.1 atktopbm.1 bioradtopgm.1 bmptoppm.1 \
24
MAN1=	anytopnm.1 asciitopgm.1 atktopbm.1 bioradtopgm.1 bmptoppm.1 \
22
	brushtopbm.1 cmuwmtopbm.1 fitstopnm.1 fstopgm.1 g3topbm.1 gemtopbm.1 \
25
	brushtopbm.1 cmuwmtopbm.1 fitstopnm.1 fstopgm.1 g3topbm.1 gemtopbm.1 \
23
	giftopnm.1 gouldtoppm.1 hipstopgm.1 hpcdtoppm.1 icontopbm.1 \
26
	giftopnm.1 gouldtoppm.1 hipstopgm.1 hpcdtoppm.1 icontopbm.1 \
24
	ilbmtoppm.1 imgtoppm.1 lispmtopgm.1 macptopbm.1 mgrtopbm.1 mtvtoppm.1 \
27
	ilbmtoppm.1 imgtoppm.1 jpegtopnm.1 lispmtopgm.1 macptopbm.1 \
25
	pbmclean.1 pbmlife.1 pbmmake.1 pbmmask.1 pbmpscale.1 pbmreduce.1 \
28
	mgrtopbm.1 mtvtoppm.1 pbmclean.1 pbmlife.1 pbmmake.1 pbmmask.1 \
26
	pbmtext.1 pbmto10x.1 pbmto4425.1 pbmtoascii.1 pbmtoatk.1 pbmtobbnbg.1 \
29
	pbmpscale.1 pbmreduce.1 pbmtext.1 pbmto10x.1 pbmto4425.1 pbmtoascii.1 \
27
	pbmtocmuwm.1 pbmtoepsi.1 pbmtoepson.1 pbmtog3.1 pbmtogem.1 pbmtogo.1 \
30
	pbmtoatk.1 pbmtobbnbg.1 pbmtocmuwm.1 pbmtoepsi.1 pbmtoepson.1 \
28
	pbmtoicon.1 pbmtolj.1 pbmtoln03.1 pbmtolps.1 pbmtomacp.1 pbmtomgr.1 \
31
	pbmtog3.1 pbmtogem.1 pbmtogo.1 pbmtoicon.1 pbmtolj.1 pbmtoln03.1 \
29
	pbmtopgm.1 pbmtopi3.1 pbmtopk.1 pbmtoplot.1 pbmtoptx.1 pbmtox10bm.1 \
32
	pbmtolps.1 pbmtomacp.1 pbmtomgr.1 pbmtopgm.1 pbmtopi3.1 pbmtopk.1 \
30
	pbmtoxbm.1 pbmtoybm.1 pbmtozinc.1 pbmupc.1 pcxtoppm.1 pgmbentley.1 \
33
	pbmtoplot.1 pbmtoptx.1 pbmtox10bm.1 pbmtoxbm.1 pbmtoybm.1 pbmtozinc.1 \
31
	pgmcrater.1 pgmedge.1 pgmenhance.1 pgmhist.1 pgmkernel.1 pgmnoise.1 \
34
	pbmupc.1 pcxtoppm.1 pgmbentley.1 pgmcrater.1 pgmedge.1 pgmenhance.1 \
32
	pgmnorm.1 pgmoil.1 pgmramp.1 pgmtexture.1 pgmtofs.1 pgmtolispm.1 \
35
	pgmhist.1 pgmkernel.1 pgmnoise.1 pgmnorm.1 pgmoil.1 pgmramp.1 \
33
	pgmtopbm.1 pgmtoppm.1 pi1toppm.1 pi3topbm.1 picttoppm.1 pjtoppm.1 \
36
	pgmtexture.1 pgmtofs.1 pgmtolispm.1 pgmtopbm.1 pgmtoppm.1 pi1toppm.1 \
34
	pktopbm.1 pnmalias.1 pnmarith.1 pnmcat.1 pnmcomp.1 pnmconvol.1 \
37
	pi3topbm.1 picttoppm.1 pjtoppm.1 pktopbm.1 pngtopnm.1 pnmalias.1 \
35
	pnmcrop.1 pnmcut.1 pnmdepth.1 pnmenlarge.1 pnmfile.1 pnmflip.1 \
38
	pnmarith.1 pnmcat.1 pnmcomp.1 pnmconvol.1 pnmcrop.1 pnmcut.1 \
36
	pnmgamma.1 pnmhisteq.1 pnmhistmap.1 pnmindex.1 pnminvert.1 pnmmargin.1 \
39
	pnmdepth.1 pnmenlarge.1 pnmfile.1 pnmflip.1 pnmgamma.1 pnmhisteq.1 \
37
	pnmnlfilt.1 pnmnoraw.1 pnmpad.1 pnmpaste.1 pnmrotate.1 pnmscale.1 \
40
	pnmhistmap.1 pnmindex.1 pnminvert.1 pnmmargin.1 pnmnlfilt.1 pnmpad.1 \
38
	pnmshear.1 pnmsmooth.1 pnmtile.1 pnmtoddif.1 pnmtofits.1 pnmtops.1 \
41
	pnmpaste.1 pnmrotate.1 pnmscale.1 pnmshear.1 pnmsmooth.1 pnmtile.1 \
39
	pnmtorast.1 pnmtosgi.1 pnmtosir.1 pnmtotiff.1 pnmtoxwd.1 ppm3d.1 \
42
	pnmtoddif.1 pnmtofits.1 pnmtoplainpnm.1 pnmtopng.1 pnmtops.1 \
40
	ppmbrighten.1 ppmchange.1 ppmdim.1 ppmdist.1 ppmdither.1 ppmflash.1 \
43
	pnmtorast.1 pnmtosgi.1 pnmtosir.1 pnmtotiff.1 pnmtotiffcmyk.1 \
41
	ppmforge.1 ppmhist.1 ppmmake.1 ppmmix.1 ppmnorm.1 ppmntsc.1 ppmpat.1 \
44
	pnmtoxwd.1 ppm3d.1 ppmbrighten.1 ppmchange.1 ppmcie.1 ppmdim.1 \
42
	ppmquant.1 ppmquantall.1 ppmqvga.1 ppmrelief.1 ppmshift.1 ppmspread.1 \
45
	ppmdist.1 ppmdither.1 ppmflash.1 ppmforge.1 ppmhist.1 ppmmake.1 \
43
	ppmtoacad.1 ppmtobmp.1 ppmtogif.1 ppmtoicr.1 ppmtoilbm.1 ppmtomap.1 \
46
	ppmmix.1 ppmnorm.1 ppmntsc.1 ppmpat.1 ppmquant.1 ppmquantall.1 \
47
	ppmqvga.1 ppmrelief.1 ppmshadow.1 ppmshift.1 ppmspread.1 ppmtoacad.1 \
48
	ppmtobmp.1 ppmtogif.1 ppmtoicr.1 ppmtojpeg.1 ppmtoilbm.1 ppmtomap.1 \
44
	ppmtomitsu.1 ppmtopcx.1 ppmtopgm.1 ppmtopi1.1 ppmtopict.1 ppmtopj.1 \
49
	ppmtomitsu.1 ppmtopcx.1 ppmtopgm.1 ppmtopi1.1 ppmtopict.1 ppmtopj.1 \
45
	ppmtopjxl.1 ppmtopuzz.1 ppmtorgb3.1 ppmtosixel.1 ppmtotga.1 \
50
	ppmtopjxl.1 ppmtopuzz.1 ppmtorgb3.1 ppmtosixel.1 ppmtotga.1 \
46
	ppmtouil.1 ppmtoxpm.1 ppmtoyuv.1 ppmtoyuvsplit.1 psidtopgm.1 pstopnm.1 \
51
	ppmtouil.1 ppmtoxpm.1 ppmtoyuv.1 ppmtoyuvsplit.1 psidtopgm.1 \
47
	qrttoppm.1 rasttopnm.1 rawtopgm.1 rawtoppm.1 rgb3toppm.1 sgitopnm.1 \
52
	pstopnm.1 qrttoppm.1 rasttopnm.1 rawtopgm.1 rawtoppm.1 rgb3toppm.1 \
48
	sirtopnm.1 sldtoppm.1 spctoppm.1 spottopgm.1 sputoppm.1 tgatoppm.1 \
53
	sgitopnm.1 sirtopnm.1 sldtoppm.1 spctoppm.1 spottopgm.1 sputoppm.1 \
49
	tifftopnm.1 xbmtopbm.1 ximtoppm.1 xpmtoppm.1 xvminitoppm.1 \
54
	tgatoppm.1 tifftopnm.1 xbmtopbm.1 ximtoppm.1 xpmtoppm.1 xvminitoppm.1 \
50
	xwdtopnm.1 ybmtopbm.1 yuvsplittoppm.1 yuvtoppm.1 zeisstopnm.1
55
	xwdtopnm.1 ybmtopbm.1 yuvsplittoppm.1 yuvtoppm.1 zeisstopnm.1
51
MAN3=	libpbm.3 libpgm.3 libpnm.3 libppm.3
56
MAN3=	libpbm.3 libpgm.3 libpnm.3 libppm.3
52
MAN5=	pbm.5 pgm.5 pnm.5 ppm.5
57
MAN5=	pbm.5 pgm.5 pnm.5 ppm.5
53
58
54
post-patch:
59
post-patch:
55
	@${PERL} -pi -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/Pbmplus.tmpl
60
	@${PERL} -pi -e "s|%%X11BASE%%|${X11BASE}|g" ${WRKSRC}/pbmplus.h
61
62
post-install:
63
	${LDCONFIG} -m ${PREFIX}/lib
56
64
57
.include <bsd.port.mk>
65
.include <bsd.port.mk>
(-)graphics/netpbm/files/md5 (-1 / +1 lines)
Line 1 Link Here
1
MD5 (netpbm-8.0.tar.gz) = 1aa88eb0d1f86b5793fde0317c95ed68
1
MD5 (netpbm-8.3.tgz) = 829f9e3f38850ddbe64a975c89d6cb7b
(-)graphics/netpbm/patches/patch-aa (-57 lines)
Lines 1-57 Link Here
1
--- Imakefile.orig	Sat Aug 19 10:50:13 1995
2
+++ Imakefile	Mon Oct 18 01:01:11 1999
3
@@ -15,54 +15,10 @@
4
 #define IHaveSubdirs
5
 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
6
 
7
-#if BuildLibTiff
8
-SUBDIRS = libtiff pbm pgm ppm pnm
9
-#else
10
 SUBDIRS = pbm pgm ppm pnm
11
-#endif
12
 
13
 MakeSubdirs($(SUBDIRS))
14
 DependSubdirs($(SUBDIRS))
15
-
16
-World::
17
-	@echo ""
18
-	@echo "Building PBMPLUS"
19
-	@echo ""
20
-	@date
21
-	@echo ""
22
-	$(MAKE) $(MFLAGS) Makefiles
23
-	$(MAKE) $(MFLAGS) clean
24
-	$(MAKE) $(MFLAGS) includes
25
-	$(MAKE) $(MFLAGS) depend
26
-	$(MAKE) $(MFLAGS)
27
-	@echo ""
28
-	@date
29
-	@echo ""
30
-	@echo "Full build of PBMPLUS complete."
31
-	@echo ""
32
-
33
-Everything::
34
-	@echo ""
35
-	@echo "Rebuilding PBMPLUS"
36
-	@echo ""
37
-	@date
38
-	@echo ""
39
-	$(MAKE) $(MFLAGS) Makefiles
40
-	$(MAKE) $(MFLAGS) includes
41
-	$(MAKE) $(MFLAGS) depend
42
-	$(MAKE) $(MFLAGS)
43
-	@echo ""
44
-	@date
45
-	@echo ""
46
-	@echo "Rebuild of PBMPLUS complete."
47
-	@echo ""
48
-
49
-realclean: clean
50
-	@echo ""
51
-	@echo "Removing Makefiles"
52
-	@echo ""
53
-	rm */Makefile Makefile
54
-	@echo ""
55
 
56
 #if InstallIncludes
57
 InstallMultipleFlags(pbmplus.h,$(PBMPLUSDIR)$(PBMPLUSINCDIR),$(INSTINCFLAGS))
(-)graphics/netpbm/patches/patch-ab (-19 lines)
Lines 1-19 Link Here
1
*** pbm/libpbm1.c.orig	Mon Jan 10 09:37:22 1994
2
--- pbm/libpbm1.c	Fri Oct 14 17:01:15 1994
3
***************
4
*** 332,338 ****
5
      char* reason;
6
      {
7
  #ifndef A_STRERROR
8
!     extern char* sys_errlist[];
9
  #endif /* A_STRERROR */
10
      extern int errno;
11
      char* e;
12
--- 332,338 ----
13
      char* reason;
14
      {
15
  #ifndef A_STRERROR
16
! /*    extern char* sys_errlist[]; */
17
  #endif /* A_STRERROR */
18
      extern int errno;
19
      char* e;
(-)graphics/netpbm/patches/patch-ac (-16 lines)
Lines 1-16 Link Here
1
--- pbm/pbmtext.c.orig	Wed Oct 27 16:27:04 1993
2
+++ pbm/pbmtext.c	Mon Oct 18 00:39:47 1999
3
@@ -105,10 +105,12 @@
4
     else
5
 	{ /* Read text from stdin. */
6
 	lines = 0;
7
-	while ( gets( buf ) != NULL )
8
+	while ( fgets( buf, sizeof(buf), stdin ) != NULL )
9
 	    {
10
 	    int l;
11
+            char *nl = strchr(buf, '\n');
12
 
13
+            if (nl) *nl = 0;
14
 	    fix_control_chars( buf );
15
 	    l = strlen( buf );
16
 	    if ( lines >= maxlines )
(-)graphics/netpbm/patches/patch-af (-5 / +7 lines)
Lines 1-12 Link Here
1
--- pnm/pnmmerge.c.orig	Sun Aug 13 12:51:50 1995
1
--- pnm/pnmmerge.c.orig	Fri Mar 24 07:02:48 2000
2
+++ pnm/pnmmerge.c	Mon Oct 18 00:14:51 1999
2
+++ pnm/pnmmerge.c	Sat Apr  1 12:00:00 2000
3
@@ -55,12 +55,15 @@
3
@@ -54,14 +54,17 @@
4
     TRY("pnmflip", pnmflip_main);
4
     TRY("pnmgamma", pnmgamma_main);
5
     TRY("pnmgamma", pnmgamma_main);
5
     TRY("pnminvert", pnminvert_main);
6
     TRY("pnminvert", pnminvert_main);
7
+    TRY("pnmhisteq", pnmhisteq_main);
6
     TRY("pnmhistmap", pnmhistmap_main);
8
     TRY("pnmhistmap", pnmhistmap_main);
7
+    TRY("pnmhistep", pnmhisteq_main);
8
     TRY("pnmnlfilt", pnmnlfilt_main);
9
     TRY("pnmnlfilt", pnmnlfilt_main);
9
     TRY("pnmnoraw", pnmnoraw_main);
10
     TRY("pnmtoplainpnm", pnmtoplainpnm_main);
11
     TRY("pnmnoraw", pnmtoplainpnm_main);
10
+    TRY("pnmpad", pnmpad_main);
12
+    TRY("pnmpad", pnmpad_main);
11
     TRY("pnmpaste", pnmpaste_main);
13
     TRY("pnmpaste", pnmpaste_main);
12
     TRY("pnmrotate", pnmrotate_main);
14
     TRY("pnmrotate", pnmrotate_main);
(-)graphics/netpbm/patches/patch-ag (-143 lines)
Lines 1-143 Link Here
1
--- Pbmplus.tmpl.orig	Sat Aug 19 13:57:43 1995
2
+++ Pbmplus.tmpl	Sun Oct 17 18:41:14 1999
3
@@ -13,11 +13,6 @@
4
  * purpose. It is provided "as is" without express or implied warranty.
5
  */
6
 
7
-/* Set where to install PbmPLus */
8
-         BINDIR = /usr/X11R6/pbmplus
9
-         MANDIR = /usr/X11R6/man
10
-      MANSUFFIX = 1p
11
-
12
 /* CONFIGURE: PBMPLUS's support for TIFF files depends on the library from
13
  * Sam Leffler's TIFF Software package - see the OTHER.SYSTEMS file for a
14
  * full description and access information.  To configure PBMPLUS to use the
15
@@ -48,10 +43,10 @@
16
 #define InstallManuals   YES
17
 #endif
18
 #ifndef InstallLibraries
19
-#define InstallLibraries NO
20
+#define InstallLibraries YES
21
 #endif
22
 #ifndef InstallIncludes
23
-#define InstallIncludes  NO
24
+#define InstallIncludes  YES
25
 #endif
26
 
27
 /* CONFIGURE: Normally the Imakefiles build and install separate binaries for
28
@@ -68,7 +63,7 @@
29
  * until you do the install.
30
  */
31
 #ifndef InstallMerged
32
-#define InstallMerged NO
33
+#define InstallMerged YES
34
 #endif
35
 
36
 
37
@@ -80,7 +75,7 @@
38
 #define PbmplusBinDir $(BINDIR)
39
 #endif
40
 #ifndef PbmplusManDir
41
-#define PbmplusManDir $(MANDIR)
42
+#define PbmplusManDir $(MANPATH)
43
 #endif
44
 #ifndef PbmplusLibDir
45
 #define PbmplusLibDir $(USRLIBDIR)
46
@@ -105,7 +100,10 @@
47
 #define PnmDir TOPDIR/pnm
48
 #endif
49
 #ifndef TiffDir
50
-#define TiffDir TOPDIR/libtiff
51
+#define TiffDir %%LOCALBASE%%/lib
52
+#endif
53
+#ifndef TiffIncDir
54
+#define TiffIncDir %%LOCALBASE%%/include
55
 #endif
56
 
57
 /* Libraries: */
58
@@ -122,7 +120,11 @@
59
 #define LibPnm $(PNMDIR)/libpnm.a
60
 #endif
61
 #ifndef LibTiff
62
-#define LibTiff $(TIFFDIR)/libtiff.a
63
+#if UseElfFormat
64
+#define LibTiff -L$(TIFFDIR) -ltiff -ljpeg -lz
65
+#else
66
+#define LibTiff -L$(TIFFDIR) -ltiff
67
+#endif
68
 #endif
69
 
70
 /* Dependency libraries: */
71
@@ -139,7 +141,7 @@
72
 #define DepLibPnm LibPnm
73
 #endif
74
 #ifndef DepLibTiff
75
-#define DepLibTiff LibTiff
76
+#define DepLibTiff $(TIFFDIR)/libtiff.a
77
 #endif
78
 
79
    PBMPLUSDIR = PbmplusDir
80
@@ -153,6 +155,7 @@
81
        PPMDIR = PpmDir
82
        PNMDIR = PnmDir
83
       TIFFDIR = TiffDir
84
+   TIFFINCDIR = TiffIncDir
85
 
86
        LIBPBM = LibPbm
87
        LIBPGM = LibPgm
88
@@ -171,8 +174,8 @@
89
 #define InstallPbmplusPrograms(list,dest,flags)                             @@\
90
 install:: list                                                              @@\
91
 	MakeDir($(DESTDIR)dest)                                             @@\
92
-	stamp-date                                                          @@\
93
-	@case '${MFLAGS}' in *[i]*) set +e;; esac; \                        @@\
94
+	TOPDIR/stamp-date                                                   @@\
95
+	@case '${MFLAGS}' in *[i]*) set +e;; esac;                          @@\
96
 	for i in list; do \                                                 @@\
97
 		(set -x; cd $(DESTDIR)dest; $(RM) $$i;  \                   @@\
98
 		$(LN) $(MERGE) $$i); \                                      @@\
99
@@ -187,14 +190,14 @@
100
 #endif /* NormalPbmplusProgramTarget */
101
 
102
 #ifndef NormalPbmplusMathProgramTarget
103
-#define NormalPbmplusMathProgramTarget(program) \                           @@\
104
+#define NormalPbmplusMathProgramTarget(program)                             @@\
105
 NormalPbmplusProgramTarget(program)
106
 #endif /* NormalPbmplusMathProgramTarget */
107
 
108
 #else
109
 
110
 #ifndef NormalPbmplusProgramTarget
111
-#define NormalPbmplusProgramTarget(program) \                               @@\
112
+#define NormalPbmplusProgramTarget(program)                                 @@\
113
 NormalProgramTarget(program,program.o,$(CURRENTDEPLIBS),$(CURRENTLIBS),)
114
 #endif /* NormalPbmplusProgramTarget */
115
 
116
@@ -207,7 +210,7 @@
117
 #define InstallPbmplusPrograms(list,dest,flags)                             @@\
118
 install:: list                                                              @@\
119
 	MakeDir($(DESTDIR)dest)                                             @@\
120
-	@case '${MFLAGS}' in *[i]*) set +e;; esac; \                        @@\
121
+	@case '${MFLAGS}' in *[i]*) set +e;; esac;                          @@\
122
 	for i in list; do \                                                 @@\
123
 		(set -x; $(RM) $(DESTDIR)dest/$$i; \                        @@\
124
 		$(INSTALL) -c flags $$i $(DESTDIR)dest); \                  @@\
125
@@ -215,3 +218,18 @@
126
 #endif /* InstallPbmplusPrograms */
127
 
128
 #endif /* InstallMerged */
129
+
130
+#ifndef InstallMultipleManSuff
131
+#define InstallMultipleManSuff(list,dest,suff)                              @@\
132
+install.man:: list                                                          @@\
133
+	MakeDir($(DESTDIR)dest)                                             @@\
134
+	@case '${MFLAGS}' in *[i]*) set +e;; esac; \                        @@\
135
+	for i in list; do \                                                 @@\
136
+		(set -x; \                                                  @@\
137
+		MNAME=`echo $$i | cut -f1 -d.`; \                           @@\
138
+		$(RM) $(DESTDIR)dest/$${MNAME}*; \                          @@\
139
+		$(INSTALL) -c $(INSTMANFLAGS) $$i \                         @@\
140
+		  $(DESTDIR)dest/$${MNAME}.suff; \                          @@\
141
+		$(COMPRESSMANCMD) $(DESTDIR)dest/$${MNAME}.suff); \         @@\
142
+	done
143
+#endif
(-)graphics/netpbm/patches/patch-ah (-4 / +4 lines)
Lines 1-10 Link Here
1
--- pgm/pgmmerge.c.orig	Fri Jan 28 19:17:38 1994
1
--- pgm/pgmmerge.c.orig	Fri Mar 24 06:41:25 2000
2
+++ pgm/pgmmerge.c	Thu Feb 12 15:35:45 1998
2
+++ pgm/pgmmerge.c	Sat Apr  1 12:00:00 2000
3
@@ -34,6 +34,7 @@
3
@@ -38,6 +38,7 @@
4
 
4
 
5
 #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) exit( m( argc, argv ) ); }
5
 #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) exit( m( argc, argv ) ); }
6
 
6
 
7
+    TRY("asciitopgm", asciitopgm_main);
7
+    TRY("asciitopgm", asciitopgm_main);
8
     TRY("sbigtopgm", sbigtopgm_main);
8
     TRY("bioradtopgm", bioradtopgm_main);
9
     TRY("bioradtopgm", bioradtopgm_main);
9
     TRY("fstopgm", fstopgm_main);
10
     TRY("fstopgm", fstopgm_main);
10
     TRY("hipstopgm", hipstopgm_main);
(-)graphics/netpbm/patches/patch-aj (-11 / +19 lines)
Lines 1-36 Link Here
1
--- pbmplus.h.orig	Tue Mar  1 18:46:36 1994
1
--- pbmplus.h.orig	Fri Mar 24 09:08:33 2000
2
+++ pbmplus.h	Thu Jan  7 19:23:15 1999
2
+++ pbmplus.h	Sat Apr  1 10:32:36 2000
3
@@ -20,6 +20,9 @@
3
@@ -24,6 +24,9 @@
4
 #include <perror.h>
5
 #include <errno.h>
4
 #include <errno.h>
6
 #endif
5
 #endif
6
 #endif
7
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
7
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
8
+#include <sys/param.h>
8
+#include <sys/param.h>
9
+#endif
9
+#endif
10
 
10
 
11
 #if defined(USG) || defined(SVR4) || defined(VMS)
11
 #if defined(USG) || defined(SVR4) || defined(VMS) || defined(__SVR4)
12
 #define SYSV
12
 #define SYSV
13
@@ -30,7 +33,9 @@
13
@@ -34,7 +37,7 @@
14
 ** and if you run on an Amiga, set AMIGA. If your compiler is ANSI C, you're
14
 ** and if you run on an Amiga, set AMIGA. If your compiler is ANSI C, you're
15
 ** probably better off setting SYSV - all it affects is string handling.
15
 ** probably better off setting SYSV - all it affects is string handling.
16
 */
16
 */
17
-#define BSD
17
-#define BSD
18
+#ifndef BSD
18
+/* #define BSD */
19
+#define BSD 1
20
+#endif
21
 /* #define SYSV */
19
 /* #define SYSV */
22
 /* #define MSDOS */
20
 /* #define MSDOS */
23
 /* #define AMIGA */
21
 /* #define AMIGA */
24
@@ -119,10 +124,12 @@
22
@@ -46,7 +49,7 @@
23
 ** hex and decimal forms to specify colors (see ppm/pgmtoppm.1 for details).
24
 */
25
 #ifndef RGB_DB
26
-#define RGB_DB "/usr/lib/X11/rgb"
27
+#define RGB_DB "%%X11BASE%%/lib/X11/rgb"
28
 /*#define RGB_DB "/usr/openwin/lib/rgb.txt"*/
29
 #ifdef VMS
30
 #define RGB_DB "PBMplus_Dir:RGB.TXT"
31
@@ -117,11 +120,13 @@
25
 #ifndef VMS
32
 #ifndef VMS
26
 #include <unistd.h>
33
 #include <unistd.h>
27
 #endif
34
 #endif
28
+#if !(defined(BSD) && (BSD >= 199306))
35
+#if !(defined(BSD) && (BSD >= 199306))
29
 extern int atoi();
36
 extern int atoi();
30
 extern void exit();
37
 extern void exit();
38
 #ifndef __osf__
31
 extern long time();
39
 extern long time();
32
 extern int write();
40
 extern int write();
33
+#endif
41
+#endif
34
 #endif
42
 #endif
43
 #endif
35
 
44
 
36
 /* CONFIGURE: On most BSD systems, malloc() gets declared in stdlib.h, on
(-)graphics/netpbm/patches/patch-ak (-11 / +3 lines)
Lines 1-14 Link Here
1
--- ppm/libppm4.c.orig	Mon Oct  4 18:12:13 1993
1
--- ppm/libppm4.c.orig	Fri Mar 24 14:47:01 2000
2
+++ ppm/libppm4.c	Thu Nov  5 16:17:48 1998
2
+++ ppm/libppm4.c	Sat Apr  1 12:00:00 2000
3
@@ -217,6 +217,7 @@
3
@@ -307,6 +307,7 @@
4
 #endif /* A_RGBENV */
5
         canonstr( colorname );
6
         while ( fgets( buf1, sizeof(buf1), f ) != NULL )
7
+        if (buf1[0] != '!')
8
             {
9
             if ( sscanf( buf1, "%ld %ld %ld %[^\n]", &r, &g, &b, buf2 ) != 4 )
10
                 {
11
@@ -298,6 +299,7 @@
12
 #endif /* A_RGBENV */
4
 #endif /* A_RGBENV */
13
     best_diff = 32767;
5
     best_diff = 32767;
14
     while ( fgets( buf, sizeof(buf), f ) != NULL )
6
     while ( fgets( buf, sizeof(buf), f ) != NULL )
(-)graphics/netpbm/patches/patch-am (-38 lines)
Lines 1-38 Link Here
1
--- pnm/Imakefile.orig	Sun Aug 13 13:31:14 1995
2
+++ pnm/Imakefile	Sat Oct 16 03:08:07 1999
3
@@ -20,7 +20,7 @@
4
 #if BuildLibTiff
5
    CURRENTLIBS = $(LIBTIFF) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
6
 CURRENTDEPLIBS = $(DEPLIBTIFF) $(DEPLIBPNM) $(DEPLIBPPM) $(DEPLIBPGM) $(DEPLIBPBM)
7
-     INCLUDES  = -I.. -I$(PBMDIR) -I$(PGMDIR) -I$(PPMDIR) -I$(TIFFDIR)
8
+     INCLUDES  = -I.. -I$(PBMDIR) -I$(PGMDIR) -I$(PPMDIR) -I$(TIFFINCDIR)
9
        DEFINES = -DLIBTIFF
10
          MERGE = pnmmerge
11
       TIFFMAN1 = tifftopnm.1 pnmtotiff.1
12
@@ -44,9 +44,10 @@
13
 		 pnmflip.1 pnmhisteq.1 pnmhistmap.1 pnminvert.1 \
14
 		 pnmnlfilt.1 pnmnoraw.1 pnmpad.1 pnmpaste.1 pnmscale.1 \
15
 		 pnmsmooth.1 pnmtile.1 pnmtoddif.1 pnmtofits.1 pnmtops.1 \
16
-		 pnmtorast.1 pnmtosgi.1 pnmtosir.1 pnmtoxwd.1 rasttopnm.1 \
17
-		 sgitopnm.1 sirtopnm.1 xwdtopnm.1 zeisstopnm.1 pnmgamma.1 \
18
-		 pnmrotate.1 pnmshear.1 anytopnm.1 pnmindex.1 pnmmargin.1 \
19
+		 pnmtorast.1 pnmtosgi.1 pnmtosir.1 pnmtoxwd.1 pstopnm.1 \
20
+		 rasttopnm.1 sgitopnm.1 sirtopnm.1 xwdtopnm.1 zeisstopnm.1 \
21
+		 pnmgamma.1 pnmrotate.1 pnmshear.1 anytopnm.1 pnmindex.1 \
22
+		 pnmmargin.1 \
23
 		 $(TIFFMAN1)
24
           MAN3 = libpnm.3
25
           MAN5 = pnm.5
26
@@ -164,9 +165,9 @@
27
 #endif
28
 
29
 #if InstallManuals
30
-InstallMultipleMan($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1)
31
-InstallMultipleMan($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3)
32
-InstallMultipleMan($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5)
33
+InstallMultipleManSuff($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1,1)
34
+InstallMultipleManSuff($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3,3)
35
+InstallMultipleManSuff($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5,5)
36
 #endif
37
 
38
 #if InstallLibraries
(-)graphics/netpbm/patches/patch-an (-15 lines)
Lines 1-15 Link Here
1
--- pbm/Imakefile.orig	Sat Aug 19 13:20:37 1995
2
+++ pbm/Imakefile	Sat Oct 16 02:29:50 1999
3
@@ -142,9 +142,9 @@
4
 #endif
5
 
6
 #if InstallManuals
7
-InstallMultipleMan($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1)
8
-InstallMultipleMan($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3)
9
-InstallMultipleMan($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5)
10
+InstallMultipleManSuff($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1,1)
11
+InstallMultipleManSuff($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3,3)
12
+InstallMultipleManSuff($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5,5)
13
 #endif
14
 
15
 #if InstallLibraries
(-)graphics/netpbm/patches/patch-ao (-15 lines)
Lines 1-15 Link Here
1
--- pgm/Imakefile.orig	Sun Aug 13 14:25:01 1995
2
+++ pgm/Imakefile	Sat Oct 16 02:31:11 1999
3
@@ -99,9 +99,9 @@
4
 #endif
5
 
6
 #if InstallManuals
7
-InstallMultipleMan($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1)
8
-InstallMultipleMan($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3)
9
-InstallMultipleMan($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5)
10
+InstallMultipleManSuff($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1,1)
11
+InstallMultipleManSuff($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3,3)
12
+InstallMultipleManSuff($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5,5)
13
 #endif
14
 
15
 #if InstallLibraries
(-)graphics/netpbm/patches/patch-aq (-21 lines)
Lines 1-21 Link Here
1
--- ppm/Imakefile.orig	Sun Aug 13 14:25:18 1995
2
+++ ppm/Imakefile	Sat Oct 16 06:36:23 1999
3
@@ -184,9 +184,9 @@
4
 #endif
5
 
6
 #if InstallManuals
7
-InstallMultipleMan($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1)
8
-InstallMultipleMan($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3)
9
-InstallMultipleMan($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5)
10
+InstallMultipleManSuff($(MAN1),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man1,1)
11
+InstallMultipleManSuff($(MAN3),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man3,3)
12
+InstallMultipleManSuff($(MAN5),$(PBMPLUSDIR)$(PBMPLUSMANDIR)/man5,5)
13
 #endif
14
 
15
 #if InstallLibraries
16
@@ -195,4 +195,5 @@
17
 
18
 #if InstallIncludes
19
 InstallMultipleFlags(ppm.h,$(PBMPLUSDIR)$(PBMPLUSINCDIR),$(INSTINCFLAGS))
20
+InstallMultipleFlags(ppmcmap.h,$(PBMPLUSDIR)$(PBMPLUSINCDIR),$(INSTINCFLAGS))
21
 #endif
(-)graphics/netpbm/patches/patch-ar (-6 / +6 lines)
Lines 1-11 Link Here
1
--- ppm/bmp.h.orig	Mon Oct  4 18:12:07 1993
1
--- ppm/bmp.h.orig	Thu Mar 23 16:34:34 2000
2
+++ ppm/bmp.h	Sat Oct 16 02:53:18 1999
2
+++ ppm/bmp.h	Sat Apr  1 12:00:00 2000
3
@@ -108,6 +108,8 @@
3
@@ -109,6 +109,8 @@
4
 		return 0;
4
 		return 0;
5
 	}
5
 	}
6
 
6
 
7
+	if( bitcount == 24 ) lenrgb=0;
7
+	if (bitcount == 24) lenrgb=0;
8
+
8
+
9
 	return (1 << bitcount) * lenrgb;
9
 	if (cmapsize < 0) 
10
 }
10
 	    return (1 << bitcount) * lenrgb;
11
 
11
 
(-)graphics/netpbm/patches/patch-as (-6 / +6 lines)
Lines 1-15 Link Here
1
--- ppm/bmptoppm.c.orig	Mon Oct  4 18:12:07 1993
1
--- ppm/bmptoppm.c.orig	Thu Mar 23 16:37:40 2000
2
+++ ppm/bmptoppm.c	Sat Oct 16 02:53:18 1999
2
+++ ppm/bmptoppm.c	Sat Apr  1 12:00:00 2000
3
@@ -348,6 +348,8 @@
3
@@ -304,6 +304,8 @@
4
 
4
 
5
 	long            ncolors = (1 << cBitCount);
5
 	long            ncolors = cmapsize < 0 ? (1 << cBitCount) : cmapsize;
6
 
6
 
7
+	if (cBitCount == 24) return 0;
7
+	if (cBitCount == 24) return 0;
8
+
8
+
9
 	for (i = 0; i < ncolors; i++)
9
 	for (i = 0; i < ncolors; i++)
10
 	{
10
 	{
11
 		B[i] = (pixval) GetByte(fp);
11
 		B[i] = (pixval) GetByte(fp);
12
@@ -385,29 +387,45 @@
12
@@ -336,29 +338,45 @@
13
 	int             rc;
13
 	int             rc;
14
 	unsigned        x;
14
 	unsigned        x;
15
 
15
 
Lines 34-40 Link Here
34
+			PPM_ASSIGN(*row, r, g, b);
34
+			PPM_ASSIGN(*row, r, g, b);
35
+		}
35
+		}
36
+	}
36
+	}
37
+	else 
37
+	else
38
+	{
38
+	{
39
+		if ((b = pm_bitinit(fp, "r")) == (BITSTREAM) 0)
39
+		if ((b = pm_bitinit(fp, "r")) == (BITSTREAM) 0)
40
 		{
40
 		{
(-)graphics/netpbm/patches/patch-au (-161 / +138 lines)
Lines 1-5 Link Here
1
--- ppm/ppmtobmp.c.orig	Mon Oct  4 18:12:36 1993
1
--- ppm/ppmtobmp.c.orig	Thu Mar 23 16:34:34 2000
2
+++ ppm/ppmtobmp.c	Sat Oct 16 02:53:18 1999
2
+++ ppm/ppmtobmp.c	Sun Apr  1 12:00:00 2000
3
@@ -75,7 +75,7 @@
3
@@ -75,7 +75,7 @@
4
     unsigned short cBitCount, pixel **pixels, colorhash_table cht));
4
     unsigned short cBitCount, pixel **pixels, colorhash_table cht));
5
 static int colorstobpp ARGS((int colors));
5
 static int colorstobpp ARGS((int colors));
Lines 7-109 Link Here
7
-    int colors, colorhash_table cht, pixval *R, pixval *G, pixval *B));
7
-    int colors, colorhash_table cht, pixval *R, pixval *G, pixval *B));
8
+    int bpp, int colors, colorhash_table cht, pixval *R, pixval *G, pixval *B));
8
+    int bpp, int colors, colorhash_table cht, pixval *R, pixval *G, pixval *B));
9
 static void
9
 static void
10
 PutByte(fp, v)
10
 PutByte(FILE *fp, char v)
11
         FILE           *fp;
11
 {
12
@@ -253,19 +253,23 @@
12
@@ -244,16 +244,20 @@
13
         int             i;
13
         int             i;
14
         long            ncolors;
14
         long            ncolors;
15
 
15
 
16
-        for (i = 0; i < colors; i++)
16
-        for (i = 0; i < colors; i++)
17
-        {
17
+        if (bpp != 24)
18
         {
18
-                nbyte += BMPwritergb(fp,class,R[i],G[i],B[i]);
19
-                nbyte += BMPwritergb(fp,class,R[i],G[i],B[i]);
19
-        }
20
-        }
20
-
21
 
21
-        ncolors = (1 << bpp);
22
-        ncolors = (1 << bpp);
22
+	if (bpp != 24)
23
+                for (i = 0; i < colors; i++)
23
+	{
24
+                {
25
+                        nbyte += BMPwritergb(fp,class,R[i],G[i],B[i]);
26
+                }
27
+
28
+                ncolors = (1 << bpp);
24
 
29
 
25
-        for (; i < ncolors; i++)
30
-        for (; i < ncolors; i++)
26
-        {
31
-        {
27
-                nbyte += BMPwritergb(fp,class,0,0,0);
32
-                nbyte += BMPwritergb(fp,class,0,0,0);
28
-        }
33
+                for (; i < ncolors; i++)
29
+		for (i = 0; i < colors; i++)
34
+                {
30
+		{
35
+                        nbyte += BMPwritergb(fp,class,0,0,0);
31
+			nbyte += BMPwritergb(fp,class,R[i],G[i],B[i]);
36
+                }
32
+		}
37
         }
33
+
34
+		ncolors = (1 << bpp);
35
+
36
+		for (; i < ncolors; i++)
37
+		{
38
+			nbyte += BMPwritergb(fp,class,0,0,0);
39
+		}
40
+	}
41
 
42
-        return nbyte;
43
+	return nbyte;
44
 }
45
 
38
 
46
 /*
39
         return nbyte;
47
@@ -284,26 +288,38 @@
40
@@ -271,26 +275,38 @@
48
         int             rc;
41
         int             rc;
49
         unsigned        x;
42
         unsigned        x;
50
 
43
 
51
-        if ((b = pm_bitinit(fp, "w")) == (BITSTREAM) 0)
44
-        if ((b = pm_bitinit(fp, "w")) == (BITSTREAM) 0)
52
-        {
45
+        if (bpp != 24)
46
         {
53
-                return -1;
47
-                return -1;
54
-        }
48
-        }
55
-
49
+                if ((b = pm_bitinit(fp, "w")) == (BITSTREAM) 0)
50
+                {
51
+                        return -1;
52
+                }
53
 
56
-        for (x = 0; x < cx; x++, row++)
54
-        for (x = 0; x < cx; x++, row++)
57
-        {
55
-        {
58
-                if ((rc = pm_bitwrite(b, bpp, ppm_lookupcolor(cht, row))) == -1)
56
-                if ((rc = pm_bitwrite(b, bpp, ppm_lookupcolor(cht, row))) == -1)
59
-                {
57
+                for (x = 0; x < cx; x++, row++)
60
-                        return -1;
58
+                {
61
-                }
59
+                        if ((rc = pm_bitwrite(b, bpp, ppm_lookupcolor(cht, row))) == -1)
62
-                nbyte += rc;
60
+                        {
63
-        }
61
+                                return -1;
62
+                        }
63
+                        nbyte += rc;
64
+                }
65
+
66
+                if ((rc = pm_bitfini(b)) == -1)
67
                 {
68
                         return -1;
69
                 }
70
                 nbyte += rc;
71
         }
64
-
72
-
65
-        if ((rc = pm_bitfini(b)) == -1)
73
-        if ((rc = pm_bitfini(b)) == -1)
66
-        {
74
+        else
75
         {
67
-                return -1;
76
-                return -1;
68
-        }
77
+                for (x = 0; x < cx; x++, row++)
78
+                {
79
+                        PutByte(fp, PPM_GETB(*row));
80
+                        PutByte(fp, PPM_GETG(*row));
81
+                        PutByte(fp, PPM_GETR(*row));
82
+                        nbyte += 3;
83
+                }
84
         }
69
-        nbyte += rc;
85
-        nbyte += rc;
70
-
86
-
71
+	if (bpp != 24)
72
+	{
73
+		if ((b = pm_bitinit(fp, "w")) == (BITSTREAM) 0)
74
+		{
75
+			return -1;
76
+		}
77
+
78
+		for (x = 0; x < cx; x++, row++)
79
+		{
80
+			if ((rc = pm_bitwrite(b, bpp, ppm_lookupcolor(cht, row))) == -1)
81
+			{
82
+				return -1;
83
+			}
84
+			nbyte += rc;
85
+		}
86
+
87
+		if ((rc = pm_bitfini(b)) == -1)
88
+		{
89
+			return -1;
90
+		}
91
+		nbyte += rc;
92
+	}
93
+	else
94
+	{
95
+		for (x = 0; x < cx; x++, row++)
96
+		{
97
+			PutByte(fp, PPM_GETB(*row));
98
+			PutByte(fp, PPM_GETG(*row));
99
+			PutByte(fp, PPM_GETR(*row));
100
+			nbyte += 3;
101
+		}
102
+	}
103
         /*
87
         /*
104
          * Make sure we write a multiple of 4 bytes.
88
          * Make sure we write a multiple of 4 bytes.
105
          */
89
          */
106
@@ -394,48 +410,21 @@
90
@@ -376,48 +392,21 @@
107
  * arrays are undefined.
91
  * arrays are undefined.
108
  */
92
  */
109
 static void
93
 static void
Lines 114-120 Link Here
114
         int             x;
98
         int             x;
115
         int             y;
99
         int             y;
116
         pixel         **pixels;
100
         pixel         **pixels;
117
+	int		bpp;	/* bits per pixel */
101
+        int             bpp;    /* bits per pixel */
118
         int             colors; /* number of valid entries in R,G,B */
102
         int             colors; /* number of valid entries in R,G,B */
119
         colorhash_table cht;
103
         colorhash_table cht;
120
         pixval         *R;
104
         pixval         *R;
Lines 154-160 Link Here
154
         nbyte += BMPwritefileheader(fp, class, bpp, x, y);
138
         nbyte += BMPwritefileheader(fp, class, bpp, x, y);
155
         nbyte += BMPwriteinfoheader(fp, class, bpp, x, y);
139
         nbyte += BMPwriteinfoheader(fp, class, bpp, x, y);
156
         nbyte += BMPwritergbtable(fp, class, bpp, colors, R, G, B);
140
         nbyte += BMPwritergbtable(fp, class, bpp, colors, R, G, B);
157
@@ -517,13 +506,15 @@
141
@@ -499,13 +488,15 @@
158
         char          **argv;
142
         char          **argv;
159
 {
143
 {
160
         FILE           *ifp = stdin;
144
         FILE           *ifp = stdin;
Lines 166-177 Link Here
166
         int             rows;
150
         int             rows;
167
         int             cols;
151
         int             cols;
168
         int             colors;
152
         int             colors;
169
+	int		maxcolors = MAXCOLORS;
153
+        int             maxcolors = MAXCOLORS;
170
+        int		bpp = 0;
154
+        int             bpp = 0;
171
         int             i;
155
         int             i;
172
         pixval          maxval;
156
         pixval          maxval;
173
         colorhist_vector chv;
157
         colorhist_vector chv;
174
@@ -545,6 +536,14 @@
158
@@ -527,6 +518,14 @@
175
                         class = C_WIN;
159
                         class = C_WIN;
176
                 else if (pm_keymatch(argv[argn], "-os2", 2))
160
                 else if (pm_keymatch(argv[argn], "-os2", 2))
177
                         class = C_OS2;
161
                         class = C_OS2;
Lines 186-204 Link Here
186
                 else
170
                 else
187
                         pm_usage(usage);
171
                         pm_usage(usage);
188
                 ++argn;
172
                 ++argn;
189
@@ -585,44 +584,90 @@
173
@@ -567,44 +566,90 @@
190
 #endif
174
 #endif
191
 
175
 
192
         /* Figure out the colormap. */
176
         /* Figure out the colormap. */
193
-        pm_message("computing colormap...");
177
-        pm_message("computing colormap...");
194
-        chv = ppm_computecolorhist(pixels, cols, rows, MAXCOLORS, &colors);
178
-        chv = ppm_computecolorhist(pixels, cols, rows, MAXCOLORS, &colors);
195
+	chv = (colorhist_vector) 0;
179
-        if (chv == (colorhist_vector) 0)
196
+        if(bpp != 24)
197
+	{
198
+		pm_message("computing colormap...");
199
+		chv = ppm_computecolorhist(pixels, cols, rows, maxcolors, &colors);
200
+	}
201
         if (chv == (colorhist_vector) 0)
202
-                pm_error("too many colors - try doing a 'ppmquant %d'"
180
-                pm_error("too many colors - try doing a 'ppmquant %d'"
203
-                        , MAXCOLORS);
181
-                        , MAXCOLORS);
204
-        pm_message("%d colors found", colors);
182
-        pm_message("%d colors found", colors);
Lines 208-307 Link Here
208
-         * colormap.
186
-         * colormap.
209
-         */
187
-         */
210
-        if (maxval > 255)
188
-        if (maxval > 255)
211
-        {
189
+        chv = (colorhist_vector) 0;
190
+        if (bpp != 24)
191
         {
212
-                pm_message("maxval is not 255 - automatically rescaling colors");
192
-                pm_message("maxval is not 255 - automatically rescaling colors");
213
-        }
193
+                pm_message("computing colormap...");
194
+                chv = ppm_computecolorhist(pixels, cols, rows, maxcolors, &colors);
195
         }
214
-        for (i = 0; i < colors; ++i)
196
-        for (i = 0; i < colors; ++i)
215
-        {
197
+        if (chv == (colorhist_vector) 0)
198
         {
216
-                if (maxval == 255)
199
-                if (maxval == 255)
217
-                {
200
+                if (bpp == 0)
201
                 {
218
-                        Red[i] = PPM_GETR(chv[i].color);
202
-                        Red[i] = PPM_GETR(chv[i].color);
219
-                        Green[i] = PPM_GETG(chv[i].color);
203
-                        Green[i] = PPM_GETG(chv[i].color);
220
-                        Blue[i] = PPM_GETB(chv[i].color);
204
-                        Blue[i] = PPM_GETB(chv[i].color);
221
-                }
205
+                        pm_message("over 256 colors found");
206
+                        bpp = 24;
207
                 }
222
-                else
208
-                else
223
-                {
209
+                else if (bpp != 24)
224
-                        Red[i] = (pixval) PPM_GETR(chv[i].color) * 255 / maxval;
210
+                        pm_error("too many colors - try doing a 'ppmquant %d'"
225
-                        Green[i] = (pixval) PPM_GETG(chv[i].color) * 255 / maxval;
211
+                                , maxcolors);
226
-                        Blue[i] = (pixval) PPM_GETB(chv[i].color) * 255 / maxval;
212
+        }
227
-                }
213
+        else
228
-        }
214
+        {
229
+	{
215
+                pm_message("%d colors found", colors);
230
+		if (bpp == 0)
231
+		{
232
+			pm_message("over 256 colors found");
233
+			bpp = 24;
234
+		}
235
+		else if (bpp != 24)
236
+			pm_error("too many colors - try doing a 'ppmquant %d'"
237
+				, maxcolors);
238
+	}
239
+	else
240
+	{
241
+		pm_message("%d colors found", colors);
242
+
216
+
243
+		/*
217
+               /*
244
+		 * I have found empirically at least one BMP-displaying program
218
+                * I have found empirically at least one BMP-displaying program
245
+		 * that can't deal with (for instance) using 3 bits per pixel.
219
+                * that can't deal with (for instance) using 3 bits per pixel.
246
+		 * I have seen no programs that can deal with using 3 bits per
220
+                * I have seen no programs that can deal with using 3 bits per
247
+		 * pixel.  I have seen programs which can deal with 1, 4, and
221
+                * pixel.  I have seen programs which can deal with 1, 4, and
248
+		 * 8 bits per pixel.
222
+                * 8 bits per pixel.
249
+		 *
223
+                *
250
+		 * Based on this, I adjust actual the number of bits per pixel
224
+                * Based on this, I adjust actual the number of bits per pixel
251
+		 * as follows.  If anyone knows better, PLEASE tell me!
225
+                * as follows.  If anyone knows better, PLEASE tell me!
252
+		 */
226
+                */
253
+
227
+
254
+		if (!bpp)
228
+               if (!bpp)
255
+		{
229
+               {
256
+			bpp = colorstobpp(colors);
230
+                       bpp = colorstobpp(colors);
257
+
231
+
258
+			switch(bpp)
232
+                       switch(bpp)
259
+			{
233
+                       {
260
+			case 2:
234
+                       case 2:
261
+			case 3:
235
+                       case 3:
262
+				bpp = 4;
236
+                               bpp = 4;
263
+				break;
237
+                               break;
264
+			case 5:
238
+                       case 5:
265
+			case 6:
239
+                       case 6:
266
+			case 7:
240
+                       case 7:
267
+				bpp = 8;
241
+                               bpp = 8;
268
+				break;
242
+                               break;
269
+			}
243
+                       }
270
+		}
244
+                }
271
+
245
+
272
+		/*
246
+                /*
273
+		 * Now turn the ppm colormap into the appropriate GIF
247
+                 * Now turn the ppm colormap into the appropriate GIF
274
+		 * colormap.
248
+                 * colormap.
275
+		 */
249
+                 */
276
+		if (maxval > 255)
250
+                if (maxval > 255)
277
+		{
251
+                {
278
+			pm_message("maxval is not 255 - automatically rescaling colors");
252
+                        pm_message("maxval is not 255 - automatically rescaling colors");
279
+		}
253
+                }
280
+		for (i = 0; i < colors; ++i)
254
+                for (i = 0; i < colors; ++i)
281
+		{
255
                 {
282
+			if (maxval == 255)
256
-                        Red[i] = (pixval) PPM_GETR(chv[i].color) * 255 / maxval;
283
+			{
257
-                        Green[i] = (pixval) PPM_GETG(chv[i].color) * 255 / maxval;
284
+				Red[i] = PPM_GETR(chv[i].color);
258
-                        Blue[i] = (pixval) PPM_GETB(chv[i].color) * 255 / maxval;
285
+				Green[i] = PPM_GETG(chv[i].color);
259
+                        if (maxval == 255)
286
+				Blue[i] = PPM_GETB(chv[i].color);
260
+                        {
287
+			}
261
+                                Red[i] = PPM_GETR(chv[i].color);
288
+			else
262
+                                Green[i] = PPM_GETG(chv[i].color);
289
+			{
263
+                                Blue[i] = PPM_GETB(chv[i].color);
290
+				Red[i] = (pixval) PPM_GETR(chv[i].color) * 255 / maxval;
264
+                        }
291
+				Green[i] = (pixval) PPM_GETG(chv[i].color) * 255 / maxval;
265
+                        else
292
+				Blue[i] = (pixval) PPM_GETB(chv[i].color) * 255 / maxval;
266
+                        {
293
+			}
267
+                                Red[i] = (pixval) PPM_GETR(chv[i].color) * 255 / maxval;
294
+		}
268
+                                Green[i] = (pixval) PPM_GETG(chv[i].color) * 255 / maxval;
269
+                                Blue[i] = (pixval) PPM_GETB(chv[i].color) * 255 / maxval;
270
+                        }
271
                 }
295
+
272
+
296
+		/* And make a hash table for fast lookup. */
273
+                /* And make a hash table for fast lookup. */
297
+		cht = ppm_colorhisttocolorhash(chv, colors);
274
+                cht = ppm_colorhisttocolorhash(chv, colors);
298
+		ppm_freecolorhist(chv);
275
+                ppm_freecolorhist(chv);
299
+	}
276
         }
300
 
277
 
301
-        /* And make a hash table for fast lookup. */
278
-        /* And make a hash table for fast lookup. */
302
-        cht = ppm_colorhisttocolorhash(chv, colors);
279
-        cht = ppm_colorhisttocolorhash(chv, colors);
303
-        ppm_freecolorhist(chv);
280
-        ppm_freecolorhist(chv);
304
+	pm_message("Using %d bits per pixel", bpp);
281
+        pm_message("Using %d bits per pixel", bpp);
305
 
282
 
306
         /* All set, let's do it. */
283
         /* All set, let's do it. */
307
         BMPEncode(stdout, class
284
         BMPEncode(stdout, class
(-)graphics/netpbm/patches/patch-ax (-8 lines)
Lines 1-8 Link Here
1
--- version.h.orig	Tue Mar  1 18:54:45 1994
2
+++ version.h	Sat Oct 16 07:26:06 1999
3
@@ -1,4 +1,4 @@
4
 /* version.h - define the current version of the package
5
 */
6
 
7
-#define PBMPLUS_VERSION "Netpbm 1 March 1994"
8
+#define PBMPLUS_VERSION "Netpbm 8.0 (23 September 1999)"
(-)graphics/netpbm/patches/patch-ay (+21 lines)
Line 0 Link Here
1
--- pnm/pnmtotiffcmyk.c.orig	Fri Mar 24 09:17:16 2000
2
+++ pnm/pnmtotiffcmyk.c	Sat Apr  1 12:00:00 2000
3
@@ -57,7 +57,7 @@
4
 
5
 #include "pnm.h"
6
 #include <math.h>
7
-#ifdef __osf__
8
+#if defined(__osf__) || defined(__FreeBSD__)
9
 #include <float.h>
10
 #endif
11
 #include <limits.h>
12
@@ -69,7 +69,9 @@
13
 #define VERSION 1.01
14
 
15
 /* beware - these evaluate more than once */
16
+#undef MAX
17
 #define MAX(x, y) ( ( x ) > ( y ) ? ( x ) : ( y ) )
18
+#undef MIN
19
 #define MIN(x, y) ( ( x ) < ( y ) ? ( x ) : ( y ) )
20
 
21
 /* only support 8 bit values */
(-)graphics/netpbm/patches/patch-az (+10 lines)
Line 0 Link Here
1
--- ppm/ppmmerge.c.orig	Fri Mar 24 06:41:52 2000
2
+++ ppm/ppmmerge.c	Sat Apr  1 12:00:00 2000
3
@@ -38,7 +38,6 @@
4
 
5
 #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) exit( m( argc, argv ) ); }
6
 
7
-    TRY("ppmtojpeg", ppmtojpeg_main);
8
     TRY("ppmcie", ppmcie_main);
9
     TRY("ppmlabel", ppmlabel_main);
10
     TRY("bmptoppm", bmptoppm_main);
(-)graphics/netpbm/patches/patch-ba (+28 lines)
Line 0 Link Here
1
--- Makefile.orig	Sat Mar 25 02:47:02 2000
2
+++ Makefile	Sat Apr  1 12:00:00 2000
3
@@ -56,7 +56,10 @@
4
 	./stamp-date
5
 
6
 .PHONY: install
7
-install: install.bin install.lib install.man 
8
+install: install.bin install.lib install.man install.hdr
9
+
10
+.PHONY: install-merge
11
+install-merge: install.merge install.lib install.man install.hdr
12
 
13
 .PHONY: merge
14
 merge:
15
@@ -97,6 +100,13 @@
16
 	-mkdir -p $(INSTALLMANUALS5)
17
 	for i in $(SUBDIRS) ; do \
18
 	    ( echo install.man.$$i ; cd $$i ; $(MAKE) install.man ); \
19
+	done
20
+
21
+.PHONY: install.hdr
22
+install.hdr:
23
+	-mkdir -p $(INSTALLHDRS)
24
+	for i in $(SUBDIRS) ; do \
25
+	    ( echo install.hdr.$$i ; cd $$i ; $(MAKE) install.hdr ); \
26
 	done
27
 
28
 .PHONY: clean
(-)graphics/netpbm/patches/patch-bb (+69 lines)
Line 0 Link Here
1
--- Makefile.common.orig	Sat Mar 25 02:46:12 2000
2
+++ Makefile.common	Sat Apr  1 12:00:00 2000
3
@@ -51,26 +51,22 @@
4
 .PHONY: install.merge
5
 install.merge: $(MERGENAME) $(NOMERGEBINARIES) install.script
6
 	cd $(INSTALLBINARIES) ; rm -f $(BINARIES)
7
-	cp $< $(INSTALLBINARIES)
8
+	${BSD_INSTALL_PROGRAM} $(MERGENAME) $(INSTALLBINARIES)
9
 	cd $(INSTALLBINARIES) ; \
10
 	   for i in $(BINARIES) ; do ln $(MERGENAME) $$i ; done
11
-	rm -f $(INSTALLBINARIES)/$(MERGENAME)
12
 	cd $(INSTALLBINARIES) ; rm -f $(NOMERGEBINARIES)
13
-	cp $(NOMERGEBINARIES) $(INSTALLBINARIES)
14
-	cd $(INSTALLBINARIES) ; strip $(NOMERGEBINARIES)
15
+	${BSD_INSTALL_PROGRAM} $(NOMERGEBINARIES) $(INSTALLBINARIES)
16
 
17
 .PHONY: install.bin.common
18
 install.bin.common: $(BINARIES) install.script
19
 	cd $(INSTALLBINARIES) ; rm -f $(BINARIES)
20
-	cp $(BINARIES) $(INSTALLBINARIES)
21
-	cd $(INSTALLBINARIES) ; strip $(BINARIES)
22
+	${BSD_INSTALL_PROGRAM} $(BINARIES) $(INSTALLBINARIES)
23
 
24
 .PHONY: install.script
25
 install.script: $(SCRIPTS)
26
 ifneq ($(SCRIPTS)x,x)
27
 	cd $(INSTALLSCRIPTS) ; rm -f $(SCRIPTS)
28
-	cp $(SCRIPTS) $(INSTALLSCRIPTS)
29
-	cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS)
30
+	${BSD_INSTALL_SCRIPT} $(SCRIPTS) $(INSTALLSCRIPTS)
31
 endif
32
 
33
 .PHONY: install.man
34
@@ -95,13 +91,12 @@
35
 # prefer not to "install" them, but just to access the Netpbm source
36
 # directory when you compile your programs.
37
 	cd $(INSTALLHDRS) ; rm -f $(INTERFACE_HEADERS)
38
-	cp $(INTERFACE_HEADERS) $(INSTALLHDRS)
39
+	${BSD_INSTALL_DATA} $(INTERFACE_HEADERS) $(INSTALLHDRS)
40
 
41
-lib$(LIBROOT).so: lib$(LIBROOT).so.$(MAJ).$(MIN)
42
-	ln -sf lib$(LIBROOT).so.$(MAJ).$(MIN) $@
43
-lib$(LIBROOT).so.$(MAJ).$(MIN): $(LIBOBJECTS)
44
-	$(LD) $(LDSHLIB) -Wl,-soname,lib$(LIBROOT).so.$(MAJ) -o $@ \
45
-          $(LIBOBJECTS)
46
+lib$(LIBROOT).so: lib$(LIBROOT).so.$(MAJ)
47
+	ln -sf lib$(LIBROOT).so.$(MAJ) $@
48
+lib$(LIBROOT).so.$(MAJ): lib$(LIBROOT).a $(LIBSOBJECTS)
49
+	$(LD) $(LDSHLIB) -Wl,-soname,$@ -o $@ $(LIBSOBJECTS)
50
 
51
 lib$(LIBROOT).a: $(LIBOBJECTS)
52
 	-rm -f $@
53
@@ -109,11 +104,11 @@
54
 	-ranlib $@
55
 
56
 .PHONY: install.lib
57
-install.lib: lib$(LIBROOT).so.$(MAJ).$(MIN) 
58
-	cd $(INSTALLLIBS) ; rm -f lib$(LIBROOT).so.$(MAJ).*
59
-	cp $< $(INSTALLLIBS)
60
-	cd $(INSTALLLIBS) ; ln -sf $< lib$(LIBROOT).so
61
-	cd $(INSTALLLIBS) ; ln -sf $< lib$(LIBROOT).so.$(MAJ)
62
+install.lib: lib$(LIBROOT).so
63
+	cd $(INSTALLLIBS) ; rm -f lib$(LIBROOT).*
64
+	${BSD_INSTALL_DATA} lib$(LIBROOT).a $(INSTALLLIBS)
65
+	${BSD_INSTALL_DATA} lib$(LIBROOT).so.$(MAJ) $(INSTALLLIBS)
66
+	ln -sf lib$(LIBROOT).so.$(MAJ) $(INSTALLLIBS)/lib$(LIBROOT).so
67
 
68
 .PHONY: dep
69
 dep Makefile.depend:
(-)graphics/netpbm/patches/patch-bc (+84 lines)
Line 0 Link Here
1
--- Makefile.config.orig	Sat Mar 25 02:39:40 2000
2
+++ Makefile.config	Sat Apr  1 12:00:00 2000
3
@@ -30,12 +30,12 @@
4
 #CC =		cc
5
 #CC =		gcc
6
 #CC =		gcc -fpcc-struct-return
7
-CC =		gcc -pedantic -fpcc-struct-return
8
+CC ?=		gcc -pedantic -fpcc-struct-return
9
 
10
 # The linker
11
 #LD = ld
12
 #LD = cc
13
-LD = gcc 
14
+LD = ${CC}
15
 
16
 # Normally the man pages are installed using "cp".  But via this
17
 # variable, you can use something else, for example a script that
18
@@ -43,11 +43,11 @@
19
 # systems which use man pages in the "cat" format.
20
 
21
 #MANCP = $(SRCDIR)/mantocat
22
-MANCP =	cp
23
+MANCP =	${BSD_INSTALL_MAN}
24
 
25
 SHELL =	/bin/sh
26
-MAKE = make
27
-INSTALL = install
28
+MAKE ?= make
29
+INSTALL ?= install
30
 AR= ar
31
 RANLIB=	ranlib
32
 
33
@@ -55,7 +55,7 @@
34
 # C compiler options
35
 
36
 #CFLAGS = -O2 -std1 $(CDEBUG)
37
-CFLAGS = -O2 -Wall -Wno-uninitialized $(CDEBUG)
38
+CFLAGS ?= -O2 -Wall -Wno-uninitialized $(CDEBUG)
39
   
40
 # linker options.  Eunice users may want to use -noshare so that
41
 # the executables can run standalone.
42
@@ -78,8 +78,10 @@
43
 
44
 #TIFFINC_DIR = /usr/local1/DEC/include
45
 #TIFFLIB_DIR = /usr/local1/DEC/lib
46
-TIFFHDR_DIR = $(SRCDIR)/libtiff
47
-TIFFLIB_DIR = $(SRCDIR)/libtiff
48
+#TIFFHDR_DIR = $(SRCDIR)/libtiff
49
+#TIFFLIB_DIR = $(SRCDIR)/libtiff
50
+TIFFINC_DIR = ${LOCALBASE}/include
51
+TIFFLIB_DIR = ${LOCALBASE}/lib
52
 
53
 # Put the location of your JPEG library here.
54
 # If you want to build the jpeg converters or tiff
55
@@ -101,16 +103,16 @@
56
 #JPEGHDR_DIR = /usr/local1/DEC/include
57
 #JPEGLIB_DIR = NONE
58
 #JPEGHDR_DIR = NONE
59
-JPEGLIB_DIR = /usr/lib/jpeg
60
-JPEGHDR_DIR = /usr/include/jpeg
61
+JPEGLIB_DIR = ${LOCALBASE}/lib
62
+JPEGHDR_DIR = ${LOCALBASE}/include
63
 
64
 
65
 #PNGLIB_DIR = /usr/local1/DEC/lib
66
 #PNGHDR_DIR = /usr/local1/DEC/include
67
 #PNGLIB_DIR = NONE
68
 #PNGHDR_DIR = NONE
69
-PNGLIB_DIR = /lib
70
-PNGHDR_DIR = /usr/include/png
71
+PNGLIB_DIR = ${LOCALBASE}/lib
72
+PNGHDR_DIR = ${LOCALBASE}/include
73
 
74
 
75
 # The following variables are used only by 'make install' (and the
76
@@ -121,7 +123,7 @@
77
 # you're spreading Netpbm across your system, use "/".
78
 
79
 #INSTALL_PREFIX = /usr/local1/DEC/packages/netpbm
80
-INSTALL_PREFIX = /usr/local/netpbm
81
+INSTALL_PREFIX = ${PREFIX}
82
 
83
 # Specify the directory where you want the executables.
84
 # If you need scripts and binaries to be in different directories, you
(-)graphics/netpbm/patches/patch-bd (+48 lines)
Line 0 Link Here
1
--- pbm/Makefile.orig	Fri Mar 24 07:43:30 2000
2
+++ pbm/Makefile	Sat Apr  1 12:00:00 2000
3
@@ -13,6 +13,7 @@
4
 MIN = 2
5
 
6
 NETPBMLIBS = $(LIBPBM)
7
+NETPBMLD = -L. -lpbm
8
 
9
 PORTBINARIES =	atktopbm brushtopbm cmuwmtopbm g3topbm \
10
 		icontopbm gemtopbm macptopbm mgrtopbm \
11
@@ -34,6 +35,7 @@
12
 MERGE_OBJECTS = $(patsubst %,%.o2, $(BINARIES))
13
 
14
 LIBOBJECTS = libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o
15
+LIBSOBJECTS = libpbm1.so libpbm2.so libpbm3.so libpbm4.so libpbm5.so
16
 
17
 MANUALS1 =	$(BINARIES)
18
 MANUALS3 =	libpbm
19
@@ -41,7 +43,7 @@
20
 
21
 MERGENAME = pbmmerge
22
 
23
-INTERFACE_HEADERS = pbm.h
24
+INTERFACE_HEADERS = pbm.h ../pbmplus.h
25
 
26
 .PHONY: all
27
 all:		$(BINARIES)
28
@@ -51,15 +53,18 @@
29
 
30
 # Rules for plain programs.
31
 $(PORTBINARIES): %: %.o $(NETPBMLIBS)
32
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) $(CDEBUG)
33
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) $(CDEBUG)
34
 
35
 # Rule for math-dependent programs.
36
 $(MATHBINARIES): %: %.o $(NETPBMLIBS)
37
-	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLIBS) $(CDEBUG)
38
+	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLD) $(CDEBUG)
39
 
40
 # Rule for objects.
41
 $(OBJECTS) $(LIBOBJECTS): %.o: %.c
42
 	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
43
+
44
+$(LIBSOBJECTS): %.so: %.c
45
+	$(CC) -c -fpic -DPIC $(CFLAGS) $(INCLUDE) -o $@ $<
46
 
47
 $(MERGE_OBJECTS): %.o2: %.c
48
 	$(CC) -c $(CFLAGS) $(INCLUDE) "-Dmain=$*_main" -o $@ $<
(-)graphics/netpbm/patches/patch-be (+47 lines)
Line 0 Link Here
1
--- pgm/Makefile.orig	Fri Mar 24 07:43:44 2000
2
+++ pgm/Makefile	Sat Apr  1 12:00:00 2000
3
@@ -13,6 +13,7 @@
4
 INCLUDE = -I$(SRCDIR) $(INCLUDEPBM)
5
 
6
 NETPBMLIBS = $(LIBPGM) $(PBMDIR)/$(LIBPBM)
7
+NETPBMLD = -L. -lpgm -L$(PBMDIR) -lpbm
8
 
9
 PORTBINARIES =	asciitopgm bioradtopgm fstopgm hipstopgm \
10
 		lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist \
11
@@ -25,6 +26,7 @@
12
 MERGE_OBJECTS = $(patsubst %,%.o2, $(BINARIES))
13
 
14
 LIBOBJECTS = libpgm1.o libpgm2.o
15
+LIBSOBJECTS = libpgm1.so libpgm2.so
16
 
17
 MANUALS1 =	$(BINARIES)
18
 MANUALS3 =	libpgm
19
@@ -41,22 +43,25 @@
20
 
21
 # Rules for plain programs.
22
 $(PORTBINARIES): %: %.o $(NETPBMLIBS)
23
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) $(CDEBUG)
24
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) $(CDEBUG)
25
 
26
 # Rule for math-dependent programs.
27
 $(MATHBINARIES): %: %.o $(NETPBMLIBS)
28
-	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLIBS) $(CDEBUG)
29
+	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLD) $(CDEBUG)
30
 
31
 # Rule for objects.
32
 $(OBJECTS) $(LIBOBJECTS): %.o: %.c
33
 	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
34
 
35
+$(LIBSOBJECTS): %.so: %.c
36
+	$(CC) -c -fpic -DPIC $(CFLAGS) $(INCLUDE) -o $@ $<
37
+
38
 $(MERGE_OBJECTS): %.o2: %.c
39
 	$(CC) -c $(CFLAGS) $(INCLUDE) "-Dmain=$*_main" -o $@ $<
40
 
41
 # And libraries.
42
 $(PBMDIR)/$(LIBPBM):
43
-	cd $(PBMDIR) ; make $(LIBPBM)
44
+	cd $(PBMDIR) ; $(MAKE) $(LIBPBM)
45
 
46
 .PHONY: install.bin
47
 install.bin: install.bin.common
(-)graphics/netpbm/patches/patch-bf (+78 lines)
Line 0 Link Here
1
--- pnm/Makefile.orig	Sat Mar 25 02:27:50 2000
2
+++ pnm/Makefile	Sat Apr  1 12:00:00 2000
3
@@ -35,6 +35,8 @@
4
 
5
 NETPBMLIBS = $(LIBPNM) \
6
            $(PBMDIR)/$(LIBPBM) $(PGMDIR)/$(LIBPGM) $(PPMDIR)/$(LIBPPM)
7
+NETPBMLD = -L. -lpnm \
8
+           -L$(PBMDIR) -lpbm -L$(PGMDIR) -lpgm -L$(PPMDIR) -lppm
9
 
10
 ifeq ($(JPEGLIB_DIR),NONE)
11
   JPEGLD =
12
@@ -87,6 +89,7 @@
13
 MERGE_OBJECTS = $(patsubst %,%.o2, $(PORTBINARIES) $(MATHBINARIES))
14
 
15
 LIBOBJECTS = libpnm1.o libpnm2.o libpnm3.o libpnm4.o
16
+LIBSOBJECTS = libpnm1.so libpnm2.so libpnm3.so libpnm4.so
17
 
18
 MANUALS1 = $(BINARIES) $(SCRIPTS)
19
 MANUALS3 = libpnm
20
@@ -102,45 +105,48 @@
21
 merge:    $(MERGENAME) $(NOMERGEBINARIES)
22
 
23
 tifftopnm pnmtotiff:  %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so
24
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) -L$(TIFFLIB_DIR) -ltiff \
25
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) -lm -L$(TIFFLIB_DIR) -ltiff \
26
 	  $(JPEGLD) $(CDEBUG)
27
 
28
 pnmtotiffcmyk: %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so
29
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) -lm -L$(TIFFLIB_DIR) -ltiff \
30
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) -lm -L$(TIFFLIB_DIR) -ltiff \
31
 	  $(JPEGLD) $(CDEBUG)
32
 
33
 # Rules for plain programs.
34
 $(PORTBINARIES): %: %.o $(NETPBMLIBS) 
35
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) $(CDEBUG) 
36
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) $(CDEBUG) 
37
 
38
 # Rule for math-dependent programs.
39
 $(MATHBINARIES): %: %.o $(NETPBMLIBS)
40
-	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLIBS) $(CDEBUG)
41
+	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLD) $(CDEBUG)
42
 
43
 pngtopnm pnmtopng: %: %.o $(NETPBMLIBS)
44
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) \
45
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) \
46
 	  -L$(PNGLIB_DIR) -lpng -lz -lm $(CDEBUG)
47
 
48
 jpegtopnm: %: %.o $(NETPBMLIBS) $(SRCDIR)/shhopt/libshhopt.a
49
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) $(JPEGLD) -lm \
50
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) $(JPEGLD) -lm \
51
 	    $(SRCDIR)/shhopt/libshhopt.a $(CDEBUG)
52
 
53
 # Rule for objects.
54
 $(OBJECTS) $(LIBOBJECTS): %.o: %.c
55
 	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
56
 
57
+$(LIBSOBJECTS): %.so: %.c
58
+	$(CC) -c -fpic -DPIC $(CFLAGS) $(INCLUDE) -o $@ $<
59
+
60
 $(MERGE_OBJECTS): %.o2: %.c
61
 	$(CC) -c $(CFLAGS) $(INCLUDE) "-Dmain=$*_main" -o $@ $<
62
 
63
 # And libraries.
64
 $(PBMDIR)/$(LIBPBM):
65
-	cd $(PBMDIR) ; make $(LIBPBM)
66
+	cd $(PBMDIR) ; $(MAKE) $(LIBPBM)
67
 $(PGMDIR)/$(LIBPGM):
68
-	cd $(PGMDIR) ; make $(LIBPGM)
69
+	cd $(PGMDIR) ; $(MAKE) $(LIBPGM)
70
 $(PPMDIR)/$(LIBPPM):
71
-	cd $(PPMDIR) ; make $(LIBPPM)
72
+	cd $(PPMDIR) ; $(MAKE) $(LIBPPM)
73
 $(TIFFDIR)/$(LIBTIFF):
74
-	cd $(TIFFDIR) ; make $(LIBTIFF)
75
+	cd $(TIFFDIR) ; $(MAKE) $(LIBTIFF)
76
 
77
 $(SRCDIR)/shhopt/libshhopt.a:
78
 	cd $(SRCDIR)/shhopt; $(MAKE) libshhopt.a
(-)graphics/netpbm/patches/patch-bg (+92 lines)
Line 0 Link Here
1
--- ppm/Makefile.orig	Fri Mar 24 17:04:20 2000
2
+++ ppm/Makefile	Sat Apr  1 12:00:00 2000
3
@@ -16,7 +16,7 @@
4
 
5
 MERGENAME = ppmmerge
6
 
7
-INCLUDE= -I.. $(INCLUDEPGM) $(INCLUDEPBM) -I../shhopt
8
+INCLUDE= -I$(SRCDIR) $(INCLUDEPGM) $(INCLUDEPBM) -I$(SRCDIR)/shhopt
9
 
10
 ifneq ($(JPEGHDR_DIR), NONE)
11
   INCLUDE+= -I$(JPEGHDR_DIR)
12
@@ -29,6 +29,7 @@
13
 endif
14
 
15
 NETPBMLIBS = $(LIBPPM) $(PBMDIR)/$(LIBPBM) $(PGMDIR)/$(LIBPGM)
16
+NETPBMLD = -L. -lppm -L$(PBMDIR) -lpbm -L$(PGMDIR) -lpgm
17
 
18
 PORTBINARIES =	bmptoppm gouldtoppm hpcdtoppm ilbmtoppm imgtoppm \
19
 		mtvtoppm pcxtoppm pgmtoppm pi1toppm picttoppm \
20
@@ -46,6 +47,7 @@
21
 		sputoppm tgatoppm ximtoppm xpmtoppm xvminitoppm \
22
 		yuvtoppm yuvsplittoppm
23
 
24
+NOMERGEBINARIES =
25
 ifneq ($(JPEGLIB_DIR), NONE)
26
   ifneq ($(JPEGHDR_DIR), NONE)
27
       NOMERGEBINARIES += ppmtojpeg
28
@@ -53,7 +55,7 @@
29
 endif
30
 
31
 MATHBINARIES = ppmcie ppmforge ppmlabel ppmpat ppmqvga ppmtomap
32
-BINARIES = $(PORTBINARIES) $(NOMERGEBINARIES) $(MATHBINARIES)
33
+BINARIES = $(PORTBINARIES) $(MATHBINARIES) $(NOMERGEBINARIES)
34
 SCRIPTS = ppmquantall ppmshadow
35
 
36
 OBJECTS = $(patsubst %, %.o, $(BINARIES))
37
@@ -61,6 +63,7 @@
38
 MERGE_OBJECTS = $(patsubst %,%.o2, $(PORTBINARIES) $(MATHBINARIES))
39
 
40
 LIBOBJECTS = libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o bitio.o
41
+LIBSOBJECTS = libppm1.so libppm2.so libppm3.so libppm4.so libppm5.so bitio.so
42
 
43
 MANUALS1 = $(BINARIES) $(SCRIPTS)
44
 MANUALS3 = libppm
45
@@ -68,7 +71,7 @@
46
 
47
 MERGENAME= ppmmerge
48
 
49
-INTERFACE_HEADERS = ppm.h
50
+INTERFACE_HEADERS = ppm.h ppmcmap.h ppmdraw.h
51
 
52
 .PHONY: all
53
 all:        $(BINARIES)
54
@@ -77,26 +80,32 @@
55
 
56
 
57
 # Rules for plain programs.
58
-$(PORTBINARIES) ppmtojpeg: %: %.o $(NETPBMLIBS) ../shhopt/libshhopt.a
59
-	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) ../shhopt/libshhopt.a \
60
-	  $(JPEGLD) $(CDEBUG)
61
+$(PORTBINARIES): %: %.o $(NETPBMLIBS)
62
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) $(CDEBUG)
63
 
64
 # Rule for math-dependent programs.
65
 $(MATHBINARIES): %: %.o $(NETPBMLIBS)
66
-	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLIBS) $(CDEBUG)
67
+	$(LD) $(LDFLAGS) -o $@ $@.o -lm $(NETPBMLD) $(CDEBUG)
68
+
69
+ppmtojpeg: %: %.o $(NETPBMLIBS) ../shhopt/libshhopt.a
70
+	$(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) ../shhopt/libshhopt.a \
71
+	  $(JPEGLD) $(CDEBUG)
72
 
73
 # Rule for objects.
74
 $(OBJECTS) $(LIBOBJECTS): %.o: %.c
75
 	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
76
 
77
+$(LIBSOBJECTS): %.so: %.c
78
+	$(CC) -c -fpic -DPIC $(CFLAGS) $(INCLUDE) -o $@ $<
79
+
80
 $(MERGE_OBJECTS): %.o2: %.c
81
 	$(CC) -c $(CFLAGS) $(INCLUDE) "-Dmain=$*_main" -o $@ $<
82
 
83
 # And libraries.
84
 $(PBMDIR)/$(LIBPBM):
85
-	cd $(PBMDIR) ; make $(LIBPBM)
86
+	cd $(PBMDIR) ; $(MAKE) $(LIBPBM)
87
 $(PGMDIR)/$(LIBPGM):
88
-	cd $(PGMDIR) ; make $(LIBPGM)
89
+	cd $(PGMDIR) ; $(MAKE) $(LIBPGM)
90
 
91
 ../shhopt/libshhopt.a:
92
 	cd ../shhopt; $(MAKE) libshhopt.a
(-)graphics/netpbm/patches/patch-bh (+13 lines)
Line 0 Link Here
1
--- shhopt/Makefile.orig	Fri Mar 10 17:45:19 2000
2
+++ shhopt/Makefile	Sat Apr  1 12:00:00 2000
3
@@ -27,8 +27,8 @@
4
 INSTALLPROG	= install -m 755
5
 MKDIRP		= install -d -m 755
6
 
7
-CC		= gcc
8
-OPTIM		= -O2
9
+CC		?= gcc
10
+OPTIM		= ${CFLAGS}
11
 
12
 INCDIR		= -I.
13
 
(-)graphics/netpbm/pkg/PLIST (-1 / +21 lines)
Lines 16-21 Link Here
16
bin/icontopbm
16
bin/icontopbm
17
bin/ilbmtoppm
17
bin/ilbmtoppm
18
bin/imgtoppm
18
bin/imgtoppm
19
bin/jpegtopnm
19
bin/lispmtopgm
20
bin/lispmtopgm
20
bin/macptopbm
21
bin/macptopbm
21
bin/mgrtopbm
22
bin/mgrtopbm
Lines 77-82 Link Here
77
bin/picttoppm
78
bin/picttoppm
78
bin/pjtoppm
79
bin/pjtoppm
79
bin/pktopbm
80
bin/pktopbm
81
bin/pngtopnm
80
bin/pnmalias
82
bin/pnmalias
81
bin/pnmarith
83
bin/pnmarith
82
bin/pnmcat
84
bin/pnmcat
Lines 96-102 Link Here
96
bin/pnmmargin
98
bin/pnmmargin
97
bin/pnmmerge
99
bin/pnmmerge
98
bin/pnmnlfilt
100
bin/pnmnlfilt
99
bin/pnmnoraw
100
bin/pnmpad
101
bin/pnmpad
101
bin/pnmpaste
102
bin/pnmpaste
102
bin/pnmrotate
103
bin/pnmrotate
Lines 106-126 Link Here
106
bin/pnmtile
107
bin/pnmtile
107
bin/pnmtoddif
108
bin/pnmtoddif
108
bin/pnmtofits
109
bin/pnmtofits
110
bin/pnmtoplainpnm
111
bin/pnmtopng
109
bin/pnmtops
112
bin/pnmtops
110
bin/pnmtorast
113
bin/pnmtorast
111
bin/pnmtosgi
114
bin/pnmtosgi
112
bin/pnmtosir
115
bin/pnmtosir
113
bin/pnmtotiff
116
bin/pnmtotiff
117
bin/pnmtotiffcmyk
114
bin/pnmtoxwd
118
bin/pnmtoxwd
115
bin/ppm3d
119
bin/ppm3d
116
bin/ppmbrighten
120
bin/ppmbrighten
117
bin/ppmchange
121
bin/ppmchange
122
bin/ppmcie
118
bin/ppmdim
123
bin/ppmdim
119
bin/ppmdist
124
bin/ppmdist
120
bin/ppmdither
125
bin/ppmdither
121
bin/ppmflash
126
bin/ppmflash
122
bin/ppmforge
127
bin/ppmforge
123
bin/ppmhist
128
bin/ppmhist
129
bin/ppmlabel
124
bin/ppmmake
130
bin/ppmmake
125
bin/ppmmerge
131
bin/ppmmerge
126
bin/ppmmix
132
bin/ppmmix
Lines 131-136 Link Here
131
bin/ppmquantall
137
bin/ppmquantall
132
bin/ppmqvga
138
bin/ppmqvga
133
bin/ppmrelief
139
bin/ppmrelief
140
bin/ppmshadow
134
bin/ppmshift
141
bin/ppmshift
135
bin/ppmspread
142
bin/ppmspread
136
bin/ppmtoacad
143
bin/ppmtoacad
Lines 138-143 Link Here
138
bin/ppmtogif
145
bin/ppmtogif
139
bin/ppmtoicr
146
bin/ppmtoicr
140
bin/ppmtoilbm
147
bin/ppmtoilbm
148
bin/ppmtojpeg
141
bin/ppmtomap
149
bin/ppmtomap
142
bin/ppmtomitsu
150
bin/ppmtomitsu
143
bin/ppmtopcx
151
bin/ppmtopcx
Lines 161-166 Link Here
161
bin/rawtopgm
169
bin/rawtopgm
162
bin/rawtoppm
170
bin/rawtoppm
163
bin/rgb3toppm
171
bin/rgb3toppm
172
bin/sbigtopgm
164
bin/sgitopnm
173
bin/sgitopnm
165
bin/sirtopnm
174
bin/sirtopnm
166
bin/sldtoppm
175
bin/sldtoppm
Lines 184-190 Link Here
184
include/pnm.h
193
include/pnm.h
185
include/ppm.h
194
include/ppm.h
186
include/ppmcmap.h
195
include/ppmcmap.h
196
include/ppmdraw.h
187
lib/libpbm.a
197
lib/libpbm.a
198
lib/libpbm.so
199
lib/libpbm.so.1
188
lib/libpgm.a
200
lib/libpgm.a
201
lib/libpgm.so
202
lib/libpgm.so.1
189
lib/libpnm.a
203
lib/libpnm.a
204
lib/libpnm.so
205
lib/libpnm.so.1
190
lib/libppm.a
206
lib/libppm.a
207
lib/libppm.so
208
lib/libppm.so.1
209
@exec /sbin/ldconfig -m %B
210
@unexec /sbin/ldconfig -R

Return to bug 17742