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 versions of Windows, and cross-platform (works both with
Linux and Mac OS X).

ok laurent@
This commit is contained in:
eric 2009-03-20 13:53:04 +00:00
parent 3a935144d3
commit 12d03b7de6
6 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# $OpenBSD: Makefile,v 1.1.1.1 2009/03/20 13:53:04 eric Exp $
COMMENT= c++ library for common image format
DISTNAME= FreeImage3110
PKGNAME= freeimage-3.11.0
CATEGORIES= graphics
SHARED_LIBS+= freeimage 1.0
HOMEPAGE= http://freeimage.sourceforge.net/
MAINTAINER= Eric Faurot <eric@openbsd.org>
# GPL / "FreeImage Public Nons^WLicense"
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= stdc++
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeimage/}
EXTRACT_SUFX= .zip
WRKDIST= ${WRKDIR}/FreeImage
USE_GMAKE= Yes
MAKE_ENV= LIBfreeimage_VERSION=${LIBfreeimage_VERSION}
MAKE_TARGET= Makefile.gnu
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (FreeImage3110.zip) = rR2zZBQ5FBdlS6e/HAJ30w==
RMD160 (FreeImage3110.zip) = PA7Y9sb96f1/qE1hqo7+yxpjcno=
SHA1 (FreeImage3110.zip) = WcrsW2KUtNprZBh4fxW0vpppp/w=
SHA256 (FreeImage3110.zip) = hAIbjAuG5YAUeUdK2amcGNEhUI7hbTY+At3L8kGVNAw=
SIZE (FreeImage3110.zip) = 4250382

View File

@ -0,0 +1,60 @@
$OpenBSD: patch-Makefile_gnu,v 1.1.1.1 2009/03/20 13:53:04 eric Exp $
--- Makefile.gnu.orig Sun Aug 26 07:44:24 2007
+++ Makefile.gnu Tue Feb 17 18:02:33 2009
@@ -8,13 +8,13 @@ CC = gcc
CXX = g++
AR = ar
-INCDIR = /usr/include
-INSTALLDIR = /usr/lib
+INCDIR = ${PREFIX}/include
+INSTALLDIR = ${PREFIX}/lib
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
-COMPILERFLAGS = -O3 -fPIC -fexceptions -fvisibility=hidden
+COMPILERFLAGS = -O2 -fPIC
LIBRARIES = -lstdc++
MODULES = $(SRCS:.c=.o)
@@ -24,9 +24,8 @@ CXXFLAGS = $(COMPILERFLAGS) -Wno-ctor-dtor-privacy $(
TARGET = freeimage
STATICLIB = lib$(TARGET).a
-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+SHAREDLIB = lib$(TARGET).so.$(LIBfreeimage_VERSION)
LIBNAME = lib$(TARGET).so
-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
HEADER = Source/FreeImage.h
@@ -37,7 +36,7 @@ all: dist
dist: FreeImage
cp *.a Dist
- cp *.so Dist
+ cp *.so.* Dist
cp Source/FreeImage.h Dist
dos2unix:
@@ -55,15 +54,12 @@ $(STATICLIB): $(MODULES)
$(AR) r $@ $(MODULES)
$(SHAREDLIB): $(MODULES)
- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES)
+ $(CC) -O2 -fPIC -s -shared -o $@ $(MODULES) $(LIBRARIES)
install:
- 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)
- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
- ldconfig
+ install -m 644 -o root -g bin $(HEADER) $(INCDIR)
+ install -m 644 -o root -g bin $(STATICLIB) $(INSTALLDIR)
+ install -m 755 -o root -g bin $(SHAREDLIB) $(INSTALLDIR)
clean:
rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)

View File

@ -0,0 +1,6 @@
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 versions of Windows, and cross-platform (works both with
Linux and Mac OS X).

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2009/03/20 13:53:04 eric Exp $
@lib lib/libfreeimage.so.${LIBfreeimage_VERSION}

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2009/03/20 13:53:04 eric Exp $
%%SHARED%%
include/FreeImage.h
lib/libfreeimage.a