update Tue Jun 22 06:37:08 PDT 2010
[pkgsrc.git] / graphics / netpbm / patches / patch-aa
1 $NetBSD: patch-aa,v 1.40 2010/02/19 18:25:44 drochner Exp $
2
3 --- Makefile.config.in.orig     2008-12-07 01:58:20.000000000 +0000
4 +++ Makefile.config.in
5 @@ -24,7 +24,7 @@ DEFAULT_TARGET = nonmerge
6  # and skip it on those systems unless you want to debug it and fix it.
7  # OpenBSD:
8  #BUILD_FIASCO = N
9 -BUILD_FIASCO = Y
10 +BUILD_FIASCO?= Y
11  
12  # The following are commands for the build process to use.  These values
13  # do not get built into anything.
14 @@ -33,7 +33,7 @@ BUILD_FIASCO = Y
15  #CC = gcc
16  # Note that 'cc' is usually an alias for whatever is the main compiler
17  # on a system, e.g. the GNU Compiler on Linux.
18 -CC = cc
19 +#CC = cc
20  
21  # The linker.
22  LD = $(CC)
23 @@ -100,7 +100,7 @@ CFLAGS_FOR_BUILD = $(CFLAGS)
24  
25  # MAKE is set automatically by Make to what was used to invoke Make.
26  
27 -INSTALL = $(SRCDIR)/buildtools/install.sh
28 +#INSTALL = $(SRCDIR)/buildtools/install.sh
29  #Solaris:
30  #INSTALL = /usr/ucb/install
31  #Tru64:
32 @@ -112,7 +112,7 @@ INSTALL = $(SRCDIR)/buildtools/install.s
33  
34  # STRIPFLAG is the option you pass to the above install program to make it
35  # strip unnecessary information out of binaries.
36 -STRIPFLAG = -s
37 +#STRIPFLAG = -s
38  # If you don't want to strip the binaries, just leave it null:
39  #STRIPFLAG = 
40  
41 @@ -131,13 +131,15 @@ MANPAGE_FORMAT = nroff
42  AR = ar
43  RANLIB = ranlib
44  # IRIX, SCO don't have Ranlib:
45 -#RANLIB = true
46 +ifeq ($(OPSYS),IRIX)
47 +RANLIB = ar rs
48 +endif
49  
50  # LEX is the beginning of a shell command that runs a Lex-like
51  # pattern matcher generator.  Null string means there isn't any such
52  # command.  That means the build will skip parts that need one.
53  
54 -LEX = flex
55 +#LEX = flex
56  # Solaris:
57  # LEX = flex -e
58  # Windows Mingw:
59 @@ -228,7 +230,7 @@ EXE =
60  
61  # Here, $(SONAME) resolves to the soname for the shared library being created.
62  # The following are gcc options.  This works on GNU libc systems.
63 -LDSHLIB = -shared -Wl,-soname,$(SONAME)
64 +LDSHLIB = -shared -Wl,-h,$(SONAME)
65  # You need -nostart instead of -shared on BeOS.  Though the BeOS compiler is
66  # ostensibly gcc, it has the -nostart option, which is not mentioned in gcc
67  # documentation and doesn't exist in at least one non-BeOS installation.
68 @@ -261,6 +263,19 @@ LDRELOC = NONE
69  #LDRELOC = ld --reloc
70  #LDRELOC = ld -r
71  
72 +ifeq ($(OPSYS),SunOS)
73 +LDSHLIB = -Wl,-B,dynamic,-G,-h,$(SONAME) 
74 +endif
75 +
76 +ifeq ($(OPSYS),Darwin)
77 +LDSHLIB = -dynamiclib -install_name $(PREFIX)/lib/libnetpbm.$(MAJ).dylib \
78 +       -compatibility_version $(MAJ) -current_version $(MAJ).$(MIN)
79 +endif
80 +
81 +ifeq ($(OPSYS),Interix)
82 +# random base address between 0x6B000000 and 0x6D000000
83 +LDSHLIB+= -Wl,--image-base,$$(($$RANDOM %64/2*1048576+1795162112))
84 +endif
85  
86  # On older systems, you have to make shared libraries out of position
87  # independent code, so you need -fpic or fPIC here.  (The rule is: if
88 @@ -283,11 +298,23 @@ LDRELOC = NONE
89  CFLAGS_SHLIB = 
90  # Gcc:
91  #CFLAGS_SHLIB = -fpic
92 -#CFLAGS_SHLIB = -fPIC
93 +CFLAGS_SHLIB = -fPIC
94  # Sun compiler:
95  #CFLAGS_SHLIB = -Kpic
96  #CFLAGS_SHLIB = -KPIC
97  
98 +ifeq ($(OPSYS),Darwin)
99 +CFLAGS_SHLIB = -fno-common
100 +endif
101 +
102 +ifeq ($(OPSYS),IRIX)
103 +CFLAGS_SHLIB = -KPIC
104 +endif
105 +
106 +ifeq ($(OPSYS),Interix)
107 +CFLAGS_SHLIB = # none!
108 +endif
109 +
110  # SHLIB_CLIB is the link option to include the C library in a shared library,
111  # normally "-lc".  On typical systems, this serves no purpose.  On some,
112  # though, it causes information about which C library to use to be recorded
113 @@ -356,8 +383,8 @@ TIFFHDR_DIR =
114  #TIFFLIB = libtiff.so
115  #TIFFHDR_DIR = /usr/include/libtiff
116  #NetBSD:
117 -#TIFFLIB = $(LOCALBASE)/lib/libtiff.so
118 -#TIFFHDR_DIR = $(LOCALBASE)/include
119 +TIFFLIB = $(BUILDLINK_DIR)/lib/libtiff.so
120 +TIFFHDR_DIR = $(BUILDLINK_DIR)/include
121  # OSF, Tru64:
122  #TIFFLIB = /usr/local1/DEC/lib/libtiff.so
123  #TIFFHDR_DIR = /usr/local1/DEC/include
124 @@ -387,8 +414,8 @@ JPEGHDR_DIR =
125  #JPEGLIB = libjpeg.so
126  #JPEGHDR_DIR = /usr/include/jpeg
127  # Netbsd:
128 -#JPEGLIB = ${LOCALBASE}/lib/libjpeg.so
129 -#JPEGHDR_DIR = ${LOCALBASE}/include
130 +JPEGLIB = ${BUILDLINK_DIR}/lib/libjpeg.so
131 +JPEGHDR_DIR = ${BUILDLINK_DIR}/include
132  # OSF, Tru64:
133  #JPEGLIB = /usr/local1/DEC/libjpeg.so
134  #JPEGHDR_DIR = /usr/local1/DEC/include
135 @@ -415,12 +442,12 @@ JPEGHDR_DIR =
136  
137  PNGLIB = NONE
138  PNGHDR_DIR =
139 -PNGVER = 
140 +PNGVER = 12
141  #PNGLIB = libpng$(PNGVER).so
142  #PNGHDR_DIR = /usr/include/libpng$(PNGVER)
143  # NetBSD:
144 -#PNGLIB = $(LOCALBASE)/lib/libpng$(PNGVER).so
145 -#PNGHDR_DIR = $(LOCALBASE)/include
146 +PNGLIB = $(BUILDLINK_DIR)/lib/libpng$(PNGVER).so
147 +#PNGHDR_DIR = $(BUILDLINK_DIR)/include
148  # OSF/Tru64:
149  #PNGLIB = /usr/local1/DEC/lib/libpng$(PNGVER).so
150  #PNGHDR_DIR = /usr/local1/DEC/include
151 @@ -432,8 +459,8 @@ PNGVER = 
152  #
153  # If you have 'libpng-config' (see above), these are irrelevant.
154  
155 -ZLIB = NONE
156 -ZHDR_DIR = 
157 +ZLIB = $(BUILDLINK_DIR)/lib/libz.so
158 +ZHDR_DIR = $(BUILDLINK_DIR)/include
159  #ZLIB = libz.so
160  
161  # The JBIG lossless image compression library (aka JBIG-KIT):
162 @@ -442,8 +469,8 @@ JBIGLIB = $(BUILDDIR)/converter/other/jb
163  JBIGHDR_DIR = $(SRCDIR)/converter/other/jbig
164  
165  # The Jasper JPEG-2000 image compression library (aka JasPer):
166 -JASPERLIB = $(INTERNAL_JASPERLIB)
167 -JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR)
168 +JASPERLIB = -ljasper
169 +JASPERHDR_DIR = /doesnt-matter
170  # JASPERDEPLIBS is the libraries (-l options or file names) on which
171  # The Jasper library depends -- i.e. what you have to link into any
172  # executable that links in the Jasper library.
173 @@ -488,7 +515,7 @@ OMIT_NETWORK =
174  # built into the standard C library, so this can be null.  This is irrelevant
175  # if OMIT_NETWORK is "y".
176  
177 -NETWORKLD = 
178 +#NETWORKLD = 
179  # Solaris, SunOS:
180  #NETWORKLD = -lsocket -lnsl
181  # SCO:
182 @@ -542,7 +569,7 @@ SUFFIXMANUALS5 = 5
183  #Netpbm library functions.  The value is used only in make file tests.
184  # "unixshared" means a unix-style shared library, typically named like 
185  # libxyz.so.2.3
186 -NETPBMLIBTYPE = unixshared
187 +NETPBMLIBTYPE? = unixshared
188  # "unixstatic" means a unix-style static library, (like libxyz.a)
189  #NETPBMLIBTYPE = unixstatic
190  # "dll" means a Windows DLL shared library
191 @@ -553,7 +580,7 @@ NETPBMLIBTYPE = unixshared
192  #NETPBMLIBSUFFIX is the suffix used on whatever kind of library is 
193  #selected above.  All this is used for is to construct library names.
194  #The make files never examine the actual value.
195 -NETPBMLIBSUFFIX = so
196 +NETPBMLIBSUFFIX?= so
197  
198  # "a" is the suffix for unix-style static libraries.  It is also
199  # traditionally used for shared libraries on AIX.  The Visual Age C