rpms/petitboot/devel petitboot-0.0.1-makefile.patch, NONE, 1.1 libpng-1.2.16-minimal.patch, NONE, 1.1

David Woodhouse (dwmw2) fedora-extras-commits at redhat.com
Mon Apr 9 03:35:05 UTC 2007


Author: dwmw2

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

Added Files:
	petitboot-0.0.1-makefile.patch libpng-1.2.16-minimal.patch 
Log Message:
add missing files

petitboot-0.0.1-makefile.patch:

--- NEW FILE petitboot-0.0.1-makefile.patch ---
--- petitboot-0.0.1/Makefile.orig	2007-04-08 23:11:34.000000000 -0400
+++ petitboot-0.0.1/Makefile	2007-04-08 23:12:05.000000000 -0400
@@ -15,7 +15,7 @@ ARTWORK = background.jpg cdrom.png hdd.p
 all: petitboot udev-helper
 
 petitboot: petitboot.o devices.o
-	$(CC) $(LDFLAGS) -o $@ $^
+	$(CC) -o $@ $^ $(LDFLAGS)
 
 petitboot: LDFLAGS+=$(TWIN_LDFLAGS)
 petitboot: CFLAGS+=$(TWIN_CFLAGS)

libpng-1.2.16-minimal.patch:

--- NEW FILE libpng-1.2.16-minimal.patch ---
Subject: [PATCH] Add some configure options to libpng
From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
To: glennrp at users.sourceforge.net
Cc: Jeremy Kerr <jk at ozlabs.org>, David Woodhouse <dwmw2 at infradead.org>, Ben Collins <ben.collins at ubuntu.com>

Hi !

Here's a patch you may want to consider for future versions of libpng.
I'm definitely not an expert in autoconf, so don't hesitate to bash me
for improper usage though :-)

The goal is to add configure script options to disable read, write and
floating point support. The main reason is to be able to disable write
and floating point support when using libpng in embedded applications
like bootloaders, where size is a constraint (getting rid of libm is a
700K win on powerpc, which is significant in the context of the
bootloader I'm working on for PS3 where only 4MB of flash is available).

Some of those options can be tweaked by just changing CFLAGS in the
environment, though having configure options is nicer imho, but that's
not the case (at least not that I've figured out) with removing the
dependency on libm.

The pach is based on version 1.2.15-beta5 as found in Ubuntu Feisty.

Regards.
Ben.

diff -urN libpng-1.2.15~beta5/configure.ac libpng-1.2.15~beta5-benh/configure.ac
--- libpng-1.2.15~beta5/configure.ac	2006-12-08 12:21:19.000000000 +1100
+++ libpng-1.2.15~beta5-benh/configure.ac	2007-04-08 18:49:08.000000000 +1000
@@ -54,7 +54,6 @@
 # Checks for library functions.
 AC_FUNC_STRTOD
 AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
-AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
 AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
 
 LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
@@ -98,6 +97,29 @@
 AC_SUBST([pkgconfigdir])
 AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
 
+AC_ARG_WITH(write-support,
+	AC_HELP_STRING([--with-write-support],
+		[Supports creating PNG files @<:@default=yes@:>@]),
+	[if test "${withval}" = no; then
+		LIBPNG_DEFINES+=\ -DPNG_NO_WRITE_SUPPORTED
+	fi])
+
+AC_ARG_WITH(read-support,
+        AC_HELP_STRING([--with-read-support],
+                [Supports reading PNG files @<:@default=yes@:>@]),
+        [if test "${withval}" = no; then
+                LIBPNG_DEFINES+=\ -DPNG_NO_READ_SUPPORTED
+        fi])
+
+AC_ARG_WITH(floating-point,
+	AC_HELP_STRING([--with-floating-point],
+		[Use floating point math for image processing @<:@default=yes@:>@]),
+	[if test "${withval}" = no; then
+		LIBPNG_DEFINES+=\ -DPNG_NO_FLOATING_POINT_SUPPORTED
+	else
+		AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
+	fi])
+
 # Make the *-config binary config scripts optional
 AC_ARG_WITH(binconfigs,
 	AC_HELP_STRING([--with-binconfigs],






More information about the scm-commits mailing list