/[gentoo-alt]/trunk/prefix-overlay/media-libs/libpng/files/libpng-1.2.8-build.patch
Gentoo

Contents of /trunk/prefix-overlay/media-libs/libpng/files/libpng-1.2.8-build.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 900 - (hide annotations) (download)
Sun Nov 27 18:50:10 2005 UTC (9 years ago) by kito
File size: 3789 byte(s)
Initial import.
1 kito 900 Clean up build system to make cross-compiling easy
2    
3     --- scripts/makefile.linux
4     +++ scripts/makefile.linux
5     @@ -8,12 +8,12 @@
6     PNGMIN = 1.2.8
7     PNGVER = $(PNGMAJ).$(PNGMIN)
8    
9     -CC=gcc
10     +CC?=gcc
11    
12     # where "make install" puts libpng12.a, libpng12.so*,
13     # libpng12/png.h and libpng12/pngconf.h
14     # Prefix must be a full pathname.
15     -prefix=/usr/local
16     +prefix=/usr
17    
18     # Where the zlib library and include files are located.
19     #ZLIBLIB=/usr/local/lib
20     @@ -31,18 +31,25 @@
21    
22     # for pgcc version 2.95.1, -O3 is buggy; don't use it.
23    
24     -CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
25     - $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
26     +CFLAGS += -Wall $(ALIGN)
27     +ifneq ($(ZLIBINC),)
28     +CFLAGS += -I$(ZLIBINC)
29     +endif
30     +
31     +ifneq ($(ZLIBLIB),)
32     +LDFLAGS += -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB)
33     +endif
34     +LDFLAGS += -lz -lm
35     +LDFLAGS_A = $(LDFLAGS) libpng.a
36     +LDFLAGS_SO = $(LDFLAGS) -L. -Wl,-rpath,. -lpng12
37    
38     -LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
39     -LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
40     -
41     -RANLIB=ranlib
42     +AR?=ar
43     +RANLIB?=ranlib
44     #RANLIB=echo
45    
46     INCPATH=$(prefix)/include
47     LIBPATH=$(prefix)/lib
48     -MANPATH=$(prefix)/man
49     +MANPATH=$(prefix)/share/man
50     BINPATH=$(prefix)/bin
51    
52     # override DESTDIR= on the make install command line to easily support
53     @@ -74,7 +81,7 @@
54     all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
55    
56     libpng.a: $(OBJS)
57     - ar rc $@ $(OBJS)
58     + $(AR) rc $@ $(OBJS)
59     $(RANLIB) $@
60    
61     libpng.pc:
62     @@ -104,10 +111,10 @@
63     libpng.so.3.$(PNGMIN): $(OBJSDLL)
64     $(CC) -shared -Wl,-soname,libpng.so.3 \
65     -o libpng.so.3.$(PNGMIN) \
66     - $(OBJSDLL)
67     + $(OBJSDLL) $(LDFLAGS)
68    
69     pngtest: pngtest.o $(LIBNAME).so
70     - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
71     + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS_SO)
72    
73     pngtest-static: pngtest.o libpng.a
74     $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
75     --- scripts/makefile.darwin 2005-10-30 09:55:21.000000000 +0100
76     +++ scripts/makefile.darwin 2005-10-30 10:08:38.000000000 +0100
77     @@ -7,20 +7,30 @@
78     # For conditions of distribution and use, see copyright notice in png.h
79    
80     # where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h
81     -prefix=/usr/local
82     +prefix=/usr
83    
84     # Where the zlib library and include files are located
85     #ZLIBLIB=/usr/local/lib
86     #ZLIBINC=/usr/local/include
87     -ZLIBLIB=../zlib
88     -ZLIBINC=../zlib
89     +ZLIBLIB=./zlib
90     +ZLIBINC=./zlib
91    
92     -CC=cc
93     -CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
94     -LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
95     +CC?=gcc
96     +
97     +CFLAGS += -Wall $(ALIGN)
98     +ifneq ($(ZLIBINC),)
99     +CFLAGS += -I$(ZLIBINC)
100     +endif
101     +
102     +ifneq ($(ZLIBLIB),)
103     +LDFLAGS += -L$(ZLIBLIB)
104     +endif
105     +LDFLAGS += -lz
106     +LDFLAGS_DYLIB = $(LDFLAGS) -L. -lpng12
107    
108     #RANLIB=echo
109     -RANLIB=ranlib
110     +AR?=ar
111     +RANLIB?=ranlib
112    
113     PNGMAJ = 0
114     PNGMIN = 1.2.8
115     @@ -29,7 +39,7 @@
116    
117     INCPATH=$(prefix)/include
118     LIBPATH=$(prefix)/lib
119     -MANPATH=$(prefix)/man
120     +MANPATH=$(prefix)/share/man
121     BINPATH=$(prefix)/bin
122    
123     # override DESTDIR= on the make install command line to easily support
124     @@ -61,7 +71,7 @@
125     all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config
126    
127     libpng.a: $(OBJS)
128     - ar rc $@ $(OBJS)
129     + $(AR) rc $@ $(OBJS)
130     $(RANLIB) $@
131    
132     libpng.pc:
133     @@ -88,17 +98,17 @@
134     -install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
135     -current_version $(PNGVER) -compatibility_version $(PNGVER) \
136     -o $(LIBNAME).$(PNGVER).dylib \
137     - $(OBJSDLL) -L$(ZLIBLIB) -lz
138     + $(OBJSDLL) $(LDFLAGS)
139    
140     libpng.3.$(PNGMIN).dylib: $(OBJSDLL)
141     $(CC) -dynamiclib \
142     -install_name $(LIBPATH)/libpng.3.dylib \
143     -current_version 3 -compatibility_version 3 \
144     -o libpng.3.$(PNGMIN).dylib \
145     - $(OBJSDLL) -L$(ZLIBLIB) -lz
146     + $(OBJSDLL) $(LDFLAGS)
147    
148     pngtest: pngtest.o $(LIBNAME).dylib
149     - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
150     + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS_DYLIB)
151    
152     test: pngtest
153     ./pngtest

  ViewVC Help
Powered by ViewVC 1.1.20