rpms/optipng/devel optipng-0.5.4-makefile-destdir.patch, NONE, 1.1 optipng-0.5.4-makefile-externlibs.patch, NONE, 1.1 optipngr.txt, NONE, 1.1 optipng.spec, 1.3, 1.4 optipng-0.5.4-makefile.patch, 1.1, NONE

Till Maas (till) fedora-extras-commits at redhat.com
Wed Nov 29 12:29:34 UTC 2006


Author: till

Update of /cvs/extras/rpms/optipng/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23632/devel

Modified Files:
	optipng.spec 
Added Files:
	optipng-0.5.4-makefile-destdir.patch 
	optipng-0.5.4-makefile-externlibs.patch optipngr.txt 
Removed Files:
	optipng-0.5.4-makefile.patch 
Log Message:
- splitting makefile patches
- make LDFLAGS=$RPM_OPT_FLAGS
- Use own makefile define
- Fixing 216784 with upstream patch


optipng-0.5.4-makefile-destdir.patch:

--- NEW FILE optipng-0.5.4-makefile-destdir.patch ---
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)
-	- at if [ ! -d ${bindir} ]; then mkdir -p ${bindir}; fi
-	- at if [ ! -d ${man1dir} ]; then mkdir -p ${man1dir}; fi
-	- at rm -f ${bindir}/$(OPTIPNG)
-	- at rm -f ${man1dir}/optipng.1
-	cp -p $(OPTIPNG) ${bindir}
-	cp -p ../man/optipng.1 ${man1dir}
+	- at if [ ! -d ${DESTDIR}/${bindir} ]; then mkdir -p ${DESTDIR}/${bindir}; fi
+	- at if [ ! -d ${DESTDIR}/${man1dir} ]; then mkdir -p ${DESTDIR}/${man1dir}; fi
+	- at rm -f ${DESTDIR}/${bindir}/$(OPTIPNG)
+	- at 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:

optipng-0.5.4-makefile-externlibs.patch:

--- NEW FILE optipng-0.5.4-makefile-externlibs.patch ---
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)
 	- at if [ ! -d ${bindir} ]; then mkdir -p ${bindir}; fi
 	- at 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)


--- NEW FILE optipngr.txt ---
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)


Index: optipng.spec
===================================================================
RCS file: /cvs/extras/rpms/optipng/devel/optipng.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- optipng.spec	11 Oct 2006 20:38:24 -0000	1.3
+++ optipng.spec	29 Nov 2006 12:29:04 -0000	1.4
@@ -1,13 +1,15 @@
 Name:           optipng
 Version:        0.5.4
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        A PNG optimizer and converter
 
 Group:          Applications/Multimedia
 License:        zlib/libpng
 URL:            http://optipng.sourceforge.net/
 Source0:        http://surfnet.dl.sourceforge.net/sourceforge/optipng/optipng-%{version}.tar.gz
-Patch0:         optipng-0.5.4-makefile.patch
+Patch0:         optipng-0.5.4-makefile-destdir.patch
+Patch1:         optipng-0.5.4-makefile-externlibs.patch
+Patch2:         http://www.icmc.usp.br/~naoliv/optipngr.txt
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  zlib-devel libpng-devel
@@ -22,18 +24,23 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%define makefile gcc.mak
 
 %build
 cd src/
-make -f scripts/gcc.mak %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
+make -f scripts/%{makefile} %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"\
+                                            LDFLAGS="$RPM_OPT_FLAGS"
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 cd src/
-make -f scripts/gcc.mak install DESTDIR="$RPM_BUILD_ROOT"\
-                                prefix="%{_prefix}" \
-                                man1dir="%{_mandir}/man1"
+make -f scripts/%{makefile} install DESTDIR="$RPM_BUILD_ROOT"\
+                                    prefix="%{_prefix}" \
+                                    man1dir="%{_mandir}/man1"
 
 
 %clean
@@ -48,20 +55,31 @@
 
 
 %changelog
+* Wed Nov 29 2006 Till Maas <opensource[AT]till.name> - 0.5.4-4
+- splitting makefile patches
+- make LDFLAGS=$RPM_OPT_FLAGS
+- Use own makefile define
+- Fixing 216784 with upstream patch
+
 * Wed Oct 11 2006 Till Maas <opensource[AT]till.name> - 0.5.4-3
 - bumping release because of errors while importing to extras
+
 * Tue Oct 10 2006 Till Maas <opensource[AT]till.name> - 0.5.4-2
 - shortening Summary
+
 * Thu Sep 14 2006 Till Maas <opensource[AT]till.name> - 0.5.4-1
 - version bump
 - use system zlib and libpng
 - link without "-s" flag for non-empty debuginfo
 - use DESTDIR
+
 * Fri Jul 28 2006 Till Maas <opensource[AT]till.name> - 0.5.3-1
 - version bump
 - Changed license tag back to zlib/libpng (#198616 rpmlint) 
 - use $RPM_OPT_FLAGS instead of %%{optflags}
+
 * Thu Jul 06 2006 Till Maas <opensource[AT]till.name> - 0.5.2-2
 - Changed license tag from zlib/libpng to zlib
+
 * Tue Jul 04 2006 Till Maas <opensource[AT]till.name> - 0.5.2-1
 - Created from scratch for fedora extras


--- optipng-0.5.4-makefile.patch DELETED ---




More information about the scm-commits mailing list