Thu Feb 12 22:40:05 2015 UTC ()
Import freeimage-3.16.0 as graphics/freeimage.

FreeImage is an Open Source library project for developers who would like to
support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as
needed by today's multimedia applications. FreeImage is easy to use, fast,
multithreading safe, compatible with all 32-bit or 64-bit versions of Windows,
and cross-platform (works both with Linux and Mac OS X).

Thanks to its ANSI C interface, FreeImage is usable in many languages including
C, C++, VB, C#, Delphi, Java and also in common scripting languages such as
Perl, Python, PHP, TCL or Ruby.


(snj)
diff -r0 -r1.1 pkgsrc/graphics/freeimage/DESCR
diff -r0 -r1.1 pkgsrc/graphics/freeimage/Makefile
diff -r0 -r1.1 pkgsrc/graphics/freeimage/PLIST
diff -r0 -r1.1 pkgsrc/graphics/freeimage/buildlink3.mk
diff -r0 -r1.1 pkgsrc/graphics/freeimage/distinfo
diff -r0 -r1.1 pkgsrc/graphics/freeimage/patches/patch-Makefile
diff -r0 -r1.1 pkgsrc/graphics/freeimage/patches/patch-Source_LibOpenJPEG_opj__malloc.h

File Added: pkgsrc/graphics/freeimage/DESCR
FreeImage is an Open Source library project for developers who would like to
support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as
needed by today's multimedia applications. FreeImage is easy to use, fast,
multithreading safe, compatible with all 32-bit or 64-bit versions of Windows,
and cross-platform (works both with Linux and Mac OS X).

Thanks to its ANSI C interface, FreeImage is usable in many languages including
C, C++, VB, C#, Delphi, Java and also in common scripting languages such as
Perl, Python, PHP, TCL or Ruby.

File Added: pkgsrc/graphics/freeimage/Makefile
# $NetBSD: Makefile,v 1.1 2015/02/12 22:40:05 snj Exp $

DISTNAME=	FreeImage3160
PKGNAME=	freeimage-3.16.0
CATEGORIES=	devel graphics
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=freeimage/}
EXTRACT_SUFX=	.zip

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://freeimage.sf.net/
COMMENT=	Library for supporting PNG, BMP, JPEG, and TIFF

USE_LANGUAGES+= c c++
USE_TOOLS+=	gmake

WRKSRC=		${WRKDIR}/FreeImage

INSTALLATION_DIRS+= include lib

PLIST_SUBST+=	PKGVERSION_NOREV=${PKGVERSION_NOREV}

NOT_FOR_PLATFORM=Darwin-*-*

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/graphics/freeimage/PLIST
@comment $NetBSD: PLIST,v 1.1 2015/02/12 22:40:05 snj Exp $
include/FreeImage.h
lib/libfreeimage-${PKGVERSION_NOREV}.so
lib/libfreeimage.a
lib/libfreeimage.so
lib/libfreeimage.so.3

File Added: pkgsrc/graphics/freeimage/buildlink3.mk
# $NetBSD: buildlink3.mk,v 1.1 2015/02/12 22:40:05 snj Exp $

BUILDLINK_TREE+=	freeimage

.if !defined(FREEIMAGE_BUILDLINK3_MK)
FREEIMAGE_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.freeimage+=	freeimage>=3.16.0
BUILDLINK_PKGSRCDIR.freeimage?=	../../graphics/freeimage
.endif	# FREEIMAGE_BUILDLINK3_MK

BUILDLINK_TREE+=	-freeimage

File Added: pkgsrc/graphics/freeimage/distinfo
$NetBSD: distinfo,v 1.1 2015/02/12 22:40:05 snj Exp $

SHA1 (FreeImage3160.zip) = a70600d288fe5bd11131e85e6f857a93bb100ad8
RMD160 (FreeImage3160.zip) = f0dcfb1514a288bbb2bc182130469b91d575e6cd
Size (FreeImage3160.zip) = 5669228 bytes
SHA1 (patch-Makefile) = 719f3539d1e841761c8cf442634d71e792ea7231
SHA1 (patch-Source_LibOpenJPEG_opj__malloc.h) = 4ba7924e5ce04b98c9c249bc31df600b7fbdcde3

File Added: pkgsrc/graphics/freeimage/patches/Attic/patch-Makefile
$NetBSD: patch-Makefile,v 1.1 2015/02/12 22:40:05 snj Exp $

--- Makefile.gnu.orig	2014-03-16 00:02:08.000000000 -0700
+++ Makefile.gnu	2015-02-12 02:12:58.000000000 -0800
@@ -5,8 +5,8 @@ include Makefile.srcs
 
 # General configuration variables:
 DESTDIR ?= /
-INCDIR ?= $(DESTDIR)/usr/include
-INSTALLDIR ?= $(DESTDIR)/usr/lib
+INCDIR ?= $(DESTDIR)/$(PREFIX)/include
+INSTALLDIR ?= $(DESTDIR)/$(PREFIX)/lib
 
 # Converts cr/lf to just lf
 DOS2UNIX = dos2unix
@@ -28,10 +28,8 @@ CXXFLAGS ?= -O3 -fPIC -fexceptions -fvis
 CXXFLAGS += -D__ANSI__
 CXXFLAGS += $(INCLUDE)
 
-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
-	CFLAGS += -fPIC
-	CXXFLAGS += -fPIC
-endif
+CFLAGS += -fPIC
+CXXFLAGS += -fPIC
 
 TARGET  = freeimage
 STATICLIB = lib$(TARGET).a
@@ -69,10 +67,9 @@ $(SHAREDLIB): $(MODULES)
 	$(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
 
 install:
-	install -d $(INCDIR) $(INSTALLDIR)
-	install -m 644 -o root -g root $(HEADER) $(INCDIR)
-	install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
-	install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+	$(BSD_INSTALL_DATA) $(HEADER) $(INCDIR)
+	$(BSD_INSTALL_DATA) $(STATICLIB) $(INSTALLDIR)
+	$(BSD_INSTALL_LIB) $(SHAREDLIB) $(INSTALLDIR)
 	ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
 	ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)	
 #	ldconfig

File Added: pkgsrc/graphics/freeimage/patches/Attic/patch-Source_LibOpenJPEG_opj__malloc.h
$NetBSD: patch-Source_LibOpenJPEG_opj__malloc.h,v 1.1 2015/02/12 22:40:05 snj Exp $

--- Source/LibOpenJPEG/opj_malloc.h.orig	2015-02-12 12:40:33.000000000 -0800
+++ Source/LibOpenJPEG/opj_malloc.h	2015-02-12 12:42:08.000000000 -0800
@@ -95,6 +95,8 @@ Allocate memory aligned to a 16 byte bou
 		#define HAVE_MEMALIGN
   #elif defined(__FreeBSD__)
     #define HAVE_POSIX_MEMALIGN
+  #elif defined(__NetBSD__)
+    #define HAVE_POSIX_MEMALIGN
 	/* Linux x86_64 and OSX always align allocations to 16 bytes */
 	#elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX)
 		#define HAVE_MEMALIGN