Update freeimage to 3.15.2, including many SECURITY fixes to the included image
libraries. Also respect CC, CXX, CFLAGS and CXXFLAGS, get rid of ^M line endings in the patch and fix "make regress". ok eric@ (maintainer)
This commit is contained in:
parent
c2249380a9
commit
6f33cbf65b
@ -1,12 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2009/03/20 13:53:04 eric Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2012/02/27 10:16:26 pascal Exp $
|
||||
|
||||
COMMENT= c++ library for common image format
|
||||
|
||||
DISTNAME= FreeImage3110
|
||||
PKGNAME= freeimage-3.11.0
|
||||
DISTNAME= FreeImage3152
|
||||
PKGNAME= freeimage-3.15.2
|
||||
CATEGORIES= graphics
|
||||
|
||||
SHARED_LIBS+= freeimage 1.0
|
||||
SHARED_LIBS+= freeimage 2.0
|
||||
|
||||
HOMEPAGE= http://freeimage.sourceforge.net/
|
||||
|
||||
@ -27,8 +27,15 @@ WRKDIST= ${WRKDIR}/FreeImage
|
||||
|
||||
USE_GMAKE= Yes
|
||||
|
||||
MAKE_ENV= LIBfreeimage_VERSION=${LIBfreeimage_VERSION}
|
||||
MAKE_ENV= LIBfreeimage_VERSION=${LIBfreeimage_VERSION} \
|
||||
CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" \
|
||||
CXXFLAGS="${CXXFLAGS}"
|
||||
MAKE_TARGET= Makefile.gnu
|
||||
|
||||
post-extract:
|
||||
perl -pi -e 's/\015//g' ${WRKSRC}/Makefile.gnu
|
||||
|
||||
do-regress:
|
||||
cd ${WRKSRC}/TestAPI && ${MAKE_PROGRAM}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +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
|
||||
MD5 (FreeImage3152.zip) = wfb0BPRvD7ZIPANy0UCIMw==
|
||||
RMD160 (FreeImage3152.zip) = u5Da/0uo+w363H9jQENhSzQLk9k=
|
||||
SHA1 (FreeImage3152.zip) = +c08u8UGQkk5zcazROPy1L+O/hw=
|
||||
SHA256 (FreeImage3152.zip) = tV2eTWzGoimq8MBtSfcAHsOn3117xOMLsoT6kvR/Tuc=
|
||||
SIZE (FreeImage3152.zip) = 4618626
|
||||
|
@ -1,24 +1,26 @@
|
||||
$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
|
||||
$OpenBSD: patch-Makefile_gnu,v 1.2 2012/02/27 10:16:26 pascal Exp $
|
||||
--- Makefile.gnu.orig Sun Feb 26 21:53:59 2012
|
||||
+++ Makefile.gnu Sun Feb 26 21:58:20 2012
|
||||
@@ -5,8 +5,8 @@ include Makefile.srcs
|
||||
|
||||
-INCDIR = /usr/include
|
||||
-INSTALLDIR = /usr/lib
|
||||
+INCDIR = ${PREFIX}/include
|
||||
+INSTALLDIR = ${PREFIX}/lib
|
||||
# General configuration variables:
|
||||
DESTDIR ?= /
|
||||
-INCDIR ?= $(DESTDIR)/usr/include
|
||||
-INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||
+INCDIR ?= $(PREFIX)/include
|
||||
+INSTALLDIR ?= $(PREFIX)/lib
|
||||
|
||||
# Converts cr/lf to just lf
|
||||
DOS2UNIX = dos2unix
|
||||
@@ -20,16 +20,15 @@ CFLAGS += $(INCLUDE)
|
||||
CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
|
||||
CXXFLAGS += $(INCLUDE)
|
||||
|
||||
-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 $(
|
||||
-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
|
||||
+ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),amd64)
|
||||
CFLAGS += -fPIC
|
||||
CXXFLAGS += -fPIC
|
||||
endif
|
||||
|
||||
TARGET = freeimage
|
||||
STATICLIB = lib$(TARGET).a
|
||||
@ -29,7 +31,7 @@ $OpenBSD: patch-Makefile_gnu,v 1.1.1.1 2009/03/20 13:53:04 eric Exp $
|
||||
HEADER = Source/FreeImage.h
|
||||
|
||||
|
||||
@@ -37,7 +36,7 @@ all: dist
|
||||
@@ -40,7 +39,7 @@ all: dist
|
||||
|
||||
dist: FreeImage
|
||||
cp *.a Dist
|
||||
@ -38,14 +40,15 @@ $OpenBSD: patch-Makefile_gnu,v 1.1.1.1 2009/03/20 13:53:04 eric Exp $
|
||||
cp Source/FreeImage.h Dist
|
||||
|
||||
dos2unix:
|
||||
@@ -55,15 +54,12 @@ $(STATICLIB): $(MODULES)
|
||||
@@ -58,16 +57,13 @@ $(STATICLIB): $(MODULES)
|
||||
$(AR) r $@ $(MODULES)
|
||||
|
||||
$(SHAREDLIB): $(MODULES)
|
||||
- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
||||
+ $(CC) -O2 -fPIC -s -shared -o $@ $(MODULES) $(LIBRARIES)
|
||||
- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
+ $(CC) $(CFLAGS) -s -shared $(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)
|
||||
|
Loading…
Reference in New Issue
Block a user