zap stupid warnings during further compilation using lcms.

Kill the darn noise !
This commit is contained in:
espie 2008-07-19 11:18:23 +00:00
parent 512dbf696f
commit e86c62c1b1
2 changed files with 51 additions and 18 deletions

View File

@ -1,29 +1,30 @@
# $OpenBSD: Makefile,v 1.16 2008/06/10 00:42:40 okan Exp $
# $OpenBSD: Makefile,v 1.17 2008/07/19 11:18:23 espie Exp $
COMMENT= color management library
COMMENT = color management library
DISTNAME= lcms-1.17
SHARED_LIBS= lcms 2.0
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lcms/}
DISTNAME = lcms-1.17
SHARED_LIBS = lcms 2.0
PKGNAME = ${DISTNAME}p0
CATEGORIES = graphics
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=lcms/}
HOMEPAGE= http://www.littlecms.com/
HOMEPAGE = http://www.littlecms.com/
LIB_DEPENDS+= jpeg::graphics/jpeg \
LIB_DEPENDS += jpeg::graphics/jpeg \
tiff::graphics/tiff
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c m z
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c m z
USE_LIBTOOL= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${WRKBUILD}/src/.libs -L${LOCALBASE}/lib"
USE_LIBTOOL = Yes
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS += ${CONFIGURE_SHARED}
CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${WRKBUILD}/src/.libs -L${LOCALBASE}/lib"
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/lcms

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-include_lcms_h,v 1.7 2008/07/19 11:18:23 espie Exp $
--- include/lcms.h.orig Sat Jul 19 12:52:40 2008
+++ include/lcms.h Sat Jul 19 12:55:23 2008
@@ -143,17 +143,17 @@ typedef pthread_rwlock_t LCMS_RWLOCK_T;
# define USE_BIG_ENDIAN 1
#endif
-#if TARGET_CPU_PPC
+#if defined(TARGET_CPU_PPC) && TARGET_CPU_PPC
# define USE_BIG_ENDIAN 1
#endif
-#if macintosh
+#if defined(macintosh) && macintosh
# ifndef __LITTLE_ENDIAN__
# define USE_BIG_ENDIAN 1
# endif
#endif
-#if __BIG_ENDIAN__
+#if defined(__BIG_ENDIAN__) && __BIG_ENDIAN__
# define USE_BIG_ENDIAN 1
#endif
@@ -1407,7 +1407,6 @@ LCMS_INLINE WORD _cmsClampWord(int in)
LCMS_INLINE void* _cmsMalloc(size_t size)
{
if (size > ((size_t) 1024*1024*500)) return NULL; // Never allow over 500Mb
- if (size < 0) return NULL; // Prevent signed size_t exploits
return (void*) malloc(size);
}