- make LDFLAGS=$RPM_OPT_FLAGS - Use own makefile define - Fixing 216784 with upstream patchepel9
parent
2dbb387515
commit
3d2a34b928
@ -0,0 +1,29 @@
|
||||
diff -ru optipng-0.5.4/src/scripts/gcc.mak optipng-0.5.4.patched/src/scripts/gcc.mak
|
||||
--- optipng-0.5.4/src/scripts/gcc.mak 2006-11-23 11:55:25.000000000 +0100
|
||||
+++ optipng-0.5.4.patched/src/scripts/gcc.mak 2006-11-23 11:56:28.000000000 +0100
|
||||
@@ -64,17 +64,17 @@
|
||||
|
||||
|
||||
install: $(OPTIPNG)
|
||||
- -@if [ ! -d ${bindir} ]; then mkdir -p ${bindir}; fi
|
||||
- -@if [ ! -d ${man1dir} ]; then mkdir -p ${man1dir}; fi
|
||||
- -@rm -f ${bindir}/$(OPTIPNG)
|
||||
- -@rm -f ${man1dir}/optipng.1
|
||||
- cp -p $(OPTIPNG) ${bindir}
|
||||
- cp -p ../man/optipng.1 ${man1dir}
|
||||
+ -@if [ ! -d ${DESTDIR}/${bindir} ]; then mkdir -p ${DESTDIR}/${bindir}; fi
|
||||
+ -@if [ ! -d ${DESTDIR}/${man1dir} ]; then mkdir -p ${DESTDIR}/${man1dir}; fi
|
||||
+ -@rm -f ${DESTDIR}/${bindir}/$(OPTIPNG)
|
||||
+ -@rm -f ${DESTDIR}/${man1dir}/optipng.1
|
||||
+ cp -p $(OPTIPNG) ${DESTDIR}/${bindir}
|
||||
+ cp -p ../man/optipng.1 ${DESTDIR}/${man1dir}
|
||||
|
||||
|
||||
uninstall:
|
||||
- rm -f ${bindir}/$(OPTIPNG)
|
||||
- rm -f ${man1dir}/optipng.1
|
||||
+ rm -f ${DESTDIR}/${bindir}/$(OPTIPNG)
|
||||
+ rm -f ${DESTDIR}/${man1dir}/optipng.1
|
||||
|
||||
|
||||
clean:
|
@ -0,0 +1,78 @@
|
||||
diff -ru optipng-0.5.4/lib/pngxtern/scripts/gcc.mak optipng-0.5.4.patched/lib/pngxtern/scripts/gcc.mak
|
||||
--- optipng-0.5.4/lib/pngxtern/scripts/gcc.mak 2006-11-23 12:05:53.000000000 +0100
|
||||
+++ optipng-0.5.4.patched/lib/pngxtern/scripts/gcc.mak 2006-11-23 12:05:55.000000000 +0100
|
||||
@@ -39,7 +39,7 @@
|
||||
all: pngxtern$(A)
|
||||
|
||||
.c$(O):
|
||||
- $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) $<
|
||||
+ $(CC) -c $(CFLAGS) $<
|
||||
|
||||
pngxtern$(A): $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
diff -ru optipng-0.5.4/src/scripts/gcc.mak optipng-0.5.4.patched/src/scripts/gcc.mak
|
||||
--- optipng-0.5.4/src/scripts/gcc.mak 2006-11-23 12:05:22.000000000 +0100
|
||||
+++ optipng-0.5.4.patched/src/scripts/gcc.mak 2006-11-23 12:05:21.000000000 +0100
|
||||
@@ -19,24 +19,20 @@
|
||||
ZLIB = libz.a
|
||||
PNGLIB = libpng.a
|
||||
PNGXLIB = pngxtern.a
|
||||
-ZMAK = Makefile
|
||||
-PNGMAK = scripts/makefile.gcc
|
||||
PNGXMAK = scripts/gcc.mak
|
||||
-ZDIR = ../lib/zlib
|
||||
-PNGDIR = ../lib/libpng
|
||||
PNGXDIR = ../lib/pngxtern
|
||||
BACKHERE = ../../src
|
||||
|
||||
OBJS = optipng.o opngio.o opngreduc.o cbitset.o osys.o strutil.o
|
||||
-LIBS = $(PNGXDIR)/$(PNGXLIB) $(PNGDIR)/$(PNGLIB) $(ZDIR)/$(ZLIB)
|
||||
+LIBS = $(PNGXDIR)/$(PNGXLIB)
|
||||
|
||||
|
||||
$(OPTIPNG): $(OBJS) $(LIBS)
|
||||
- $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
+ $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS) -lpng -lz
|
||||
|
||||
|
||||
.c.o:
|
||||
- $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR) $*.c
|
||||
+ $(CC) -c $(CFLAGS) -I$(PNGXDIR) $*.c
|
||||
|
||||
optipng.o : optipng.c proginfo.h opng.h cexcept.h cbitset.h osys.h strutil.h
|
||||
opngio.o : opngio.c opng.h
|
||||
@@ -46,23 +42,11 @@
|
||||
strutil.o : strutil.c strutil.h
|
||||
|
||||
|
||||
-$(PNGXDIR)/$(PNGXLIB): $(ZDIR)/$(ZLIB) $(PNGDIR)/$(PNGLIB)
|
||||
+$(PNGXDIR)/$(PNGXLIB):
|
||||
cd $(PNGXDIR); \
|
||||
$(MAKE) -f $(PNGXMAK) $(PNGXLIB); \
|
||||
cd $(BACKHERE)
|
||||
|
||||
-$(PNGDIR)/$(PNGLIB): $(ZDIR)/$(ZLIB)
|
||||
- cd $(PNGDIR); \
|
||||
- $(MAKE) -f $(PNGMAK) $(PNGLIB); \
|
||||
- cd $(BACKHERE)
|
||||
-
|
||||
-$(ZDIR)/$(ZLIB):
|
||||
- cd $(ZDIR); \
|
||||
- ./configure; \
|
||||
- $(MAKE) -f $(ZMAK) $(ZLIB); \
|
||||
- cd $(BACKHERE)
|
||||
-
|
||||
-
|
||||
install: $(OPTIPNG)
|
||||
-@if [ ! -d ${bindir} ]; then mkdir -p ${bindir}; fi
|
||||
-@if [ ! -d ${man1dir} ]; then mkdir -p ${man1dir}; fi
|
||||
@@ -82,9 +66,3 @@
|
||||
cd $(PNGXDIR); \
|
||||
$(MAKE) -f $(PNGXMAK) clean; \
|
||||
cd $(BACKHERE)
|
||||
- cd $(PNGDIR); \
|
||||
- $(MAKE) -f $(PNGMAK) clean; \
|
||||
- cd $(BACKHERE)
|
||||
- cd $(ZDIR); \
|
||||
- $(MAKE) -f $(ZMAK) clean; \
|
||||
- cd $(BACKHERE)
|
@ -1,117 +0,0 @@
|
||||
diff -ru optipng-0.5.4.orig/lib/pngxtern/scripts/gcc.mak optipng-0.5.4/lib/pngxtern/scripts/gcc.mak
|
||||
--- optipng-0.5.4.orig/lib/pngxtern/scripts/gcc.mak 2006-05-10 21:15:00.000000000 +0200
|
||||
+++ optipng-0.5.4/lib/pngxtern/scripts/gcc.mak 2006-09-14 22:17:47.528801620 +0200
|
||||
@@ -17,7 +17,9 @@
|
||||
CDEBUG = -g
|
||||
LDDEBUG =
|
||||
CRELEASE = -O2
|
||||
-LDRELEASE = -s
|
||||
+
|
||||
+# remove -s from LDRELEASE to prevent stripping
|
||||
+LDRELEASE =
|
||||
CFLAGS = -Wall $(CRELEASE)
|
||||
LDFLAGS = $(LDRELEASE)
|
||||
LIBS = -lpng -lz -lm
|
||||
@@ -37,7 +39,7 @@
|
||||
all: pngxtern$(A)
|
||||
|
||||
.c$(O):
|
||||
- $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) $<
|
||||
+ $(CC) -c $(CFLAGS) $<
|
||||
|
||||
pngxtern$(A): $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
diff -ru optipng-0.5.4.orig/src/scripts/gcc.mak optipng-0.5.4/src/scripts/gcc.mak
|
||||
--- optipng-0.5.4.orig/src/scripts/gcc.mak 2006-07-15 16:25:00.000000000 +0200
|
||||
+++ optipng-0.5.4/src/scripts/gcc.mak 2006-09-14 22:17:06.910263120 +0200
|
||||
@@ -13,30 +13,27 @@
|
||||
CC = gcc
|
||||
LD = $(CC)
|
||||
CFLAGS = -O2 -Wall
|
||||
-LDFLAGS = -s
|
||||
+# remove -s from LDFLAGS to prevent stripping
|
||||
+LDFLAGS =
|
||||
|
||||
OPTIPNG = optipng$(EXE)
|
||||
ZLIB = libz.a
|
||||
PNGLIB = libpng.a
|
||||
PNGXLIB = pngxtern.a
|
||||
-ZMAK = Makefile
|
||||
-PNGMAK = scripts/makefile.gcc
|
||||
PNGXMAK = scripts/gcc.mak
|
||||
-ZDIR = ../lib/zlib
|
||||
-PNGDIR = ../lib/libpng
|
||||
PNGXDIR = ../lib/pngxtern
|
||||
BACKHERE = ../../src
|
||||
|
||||
OBJS = optipng.o opngio.o opngreduc.o cbitset.o osys.o strutil.o
|
||||
-LIBS = $(PNGXDIR)/$(PNGXLIB) $(PNGDIR)/$(PNGLIB) $(ZDIR)/$(ZLIB)
|
||||
+LIBS = $(PNGXDIR)/$(PNGXLIB)
|
||||
|
||||
|
||||
$(OPTIPNG): $(OBJS) $(LIBS)
|
||||
- $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
+ $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS) -lpng -lz
|
||||
|
||||
|
||||
.c.o:
|
||||
- $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR) $*.c
|
||||
+ $(CC) -c $(CFLAGS) -I$(PNGXDIR) $*.c
|
||||
|
||||
optipng.o : optipng.c proginfo.h opng.h cexcept.h cbitset.h osys.h strutil.h
|
||||
opngio.o : opngio.c opng.h
|
||||
@@ -46,35 +43,23 @@
|
||||
strutil.o : strutil.c strutil.h
|
||||
|
||||
|
||||
-$(PNGXDIR)/$(PNGXLIB): $(ZDIR)/$(ZLIB) $(PNGDIR)/$(PNGLIB)
|
||||
+$(PNGXDIR)/$(PNGXLIB):
|
||||
cd $(PNGXDIR); \
|
||||
$(MAKE) -f $(PNGXMAK) $(PNGXLIB); \
|
||||
cd $(BACKHERE)
|
||||
|
||||
-$(PNGDIR)/$(PNGLIB): $(ZDIR)/$(ZLIB)
|
||||
- cd $(PNGDIR); \
|
||||
- $(MAKE) -f $(PNGMAK) $(PNGLIB); \
|
||||
- cd $(BACKHERE)
|
||||
-
|
||||
-$(ZDIR)/$(ZLIB):
|
||||
- cd $(ZDIR); \
|
||||
- ./configure; \
|
||||
- $(MAKE) -f $(ZMAK) $(ZLIB); \
|
||||
- cd $(BACKHERE)
|
||||
-
|
||||
-
|
||||
install: $(OPTIPNG)
|
||||
- -@if [ ! -d ${bindir} ]; then mkdir -p ${bindir}; fi
|
||||
- -@if [ ! -d ${man1dir} ]; then mkdir -p ${man1dir}; fi
|
||||
- -@rm -f ${bindir}/$(OPTIPNG)
|
||||
- -@rm -f ${man1dir}/optipng.1
|
||||
- cp -p $(OPTIPNG) ${bindir}
|
||||
- cp -p ../man/optipng.1 ${man1dir}
|
||||
+ -@if [ ! -d ${DESTDIR}/${bindir} ]; then mkdir -p ${DESTDIR}/${bindir}; fi
|
||||
+ -@if [ ! -d ${DESTDIR}/${man1dir} ]; then mkdir -p ${DESTDIR}/${man1dir}; fi
|
||||
+ -@rm -f ${DESTDIR}/${bindir}/$(OPTIPNG)
|
||||
+ -@rm -f ${DESTDIR}/${man1dir}/optipng.1
|
||||
+ cp -p $(OPTIPNG) ${DESTDIR}/${bindir}
|
||||
+ cp -p ../man/optipng.1 ${DESTDIR}/${man1dir}
|
||||
|
||||
|
||||
uninstall:
|
||||
- rm -f ${bindir}/$(OPTIPNG)
|
||||
- rm -f ${man1dir}/optipng.1
|
||||
+ rm -f ${DESTDIR}/${bindir}/$(OPTIPNG)
|
||||
+ rm -f ${DESTDIR}/${man1dir}/optipng.1
|
||||
|
||||
|
||||
clean:
|
||||
@@ -82,9 +67,3 @@
|
||||
cd $(PNGXDIR); \
|
||||
$(MAKE) -f $(PNGXMAK) clean; \
|
||||
cd $(BACKHERE)
|
||||
- cd $(PNGDIR); \
|
||||
- $(MAKE) -f $(PNGMAK) clean; \
|
||||
- cd $(BACKHERE)
|
||||
- cd $(ZDIR); \
|
||||
- $(MAKE) -f $(ZMAK) clean; \
|
||||
- cd $(BACKHERE)
|
@ -0,0 +1,14 @@
|
||||
diff -urN optipng-0.5.4.orig/src/opngreduc.c optipng-0.5.4/src/opngreduc.c
|
||||
--- optipng-0.5.4.orig/src/opngreduc.c 2006-11-28 01:55:45.000000000 -0200
|
||||
+++ optipng-0.5.4/src/opngreduc.c 2006-11-28 01:56:54.000000000 -0200
|
||||
@@ -80,10 +80,6 @@
|
||||
if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
|
||||
if (sig_bit != &info_ptr->sig_bit)
|
||||
goto error;
|
||||
- if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &trans_values))
|
||||
- if (trans != info_ptr->trans || num_trans != info_ptr->num_trans ||
|
||||
- trans_values != &info_ptr->trans_values)
|
||||
- goto error;
|
||||
|
||||
/* Also check png_ptr. (It's not much, but we're doing what we can.) */
|
||||
if (png_get_compression_buffer_size(png_ptr) != png_ptr->zbuf_size)
|
Loading…
Reference in new issue