We compile png with -DPNG_NO_ASSEMBLER_CODE. Unfortunately, the libpng build

system doesn't install a pngconf.h appropriate to the options passed to the
build.
So we have to put a PNG_NO_ASSEMBLER_CODE define into pngconf.h manually.
This unbreaks (at least) ImageMagick on amd64.

Some more information about this problem can be found here:

http://sourceforge.net/mailarchive/forum.php?thread_id=10314069&forum_id=43850

Since we don't want to compile pentium specific code,
remove -DPNG_USE_PNGGCCRD.

Bump major lib version and PKGNAME.

with help & ok steven@, naddy@
This commit is contained in:
bernd 2006-05-13 13:52:48 +00:00
parent 80ff99b551
commit 0875288c2e
3 changed files with 28 additions and 6 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.55 2006/05/10 13:50:01 bernd Exp $
# $OpenBSD: Makefile,v 1.56 2006/05/13 13:52:48 bernd Exp $
COMMENT= "library for manipulating PNG images"
VERSION= 1.2.10
DISTNAME= libpng-${VERSION}
PKGNAME= ${DISTNAME:S/lib//}
SHARED_LIBS= png 4.3
PKGNAME= ${DISTNAME:S/lib//}p0
SHARED_LIBS= png 5.0
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/}

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-pngconf_h,v 1.4 2006/05/13 13:52:48 bernd Exp $
--- pngconf.h.orig Sun Apr 23 20:45:34 2006
+++ pngconf.h Fri May 12 10:16:39 2006
@@ -720,6 +720,13 @@
# define PNG_EASY_ACCESS_SUPPORTED
#endif
+/*
+ * Disable assembler and MMX code on OpenBSD
+ */
+#ifndef PNG_NO_ASSEMBLER_CODE
+# define PNG_NO_ASSEMBLER_CODE
+#endif
+
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-scripts_makefile_openbsd,v 1.14 2006/05/10 13:50:01 bernd Exp $
$OpenBSD: patch-scripts_makefile_openbsd,v 1.15 2006/05/13 13:52:48 bernd Exp $
--- scripts/makefile.openbsd.orig Sun Apr 23 20:45:40 2006
+++ scripts/makefile.openbsd Tue May 9 15:07:40 2006
+++ scripts/makefile.openbsd Sat May 13 13:21:46 2006
@@ -3,12 +3,12 @@
# For conditions of distribution and use, see copyright notice in png.h
@ -17,7 +17,12 @@ $OpenBSD: patch-scripts_makefile_openbsd,v 1.14 2006/05/10 13:50:01 bernd Exp $
LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
@@ -21,24 +21,42 @@ CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBL
@@ -17,28 +17,46 @@ SRCS= png.c pngerror.c pnggccrd.c pngget
HDRS= png.h pngconf.h
CFLAGS+= -Wall
-CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD
+CPPFLAGS+= -I${.CURDIR}
NOPROFILE= Yes