Update freeimage to 3.18.0

OK kn@
This commit is contained in:
rsadowski 2022-07-10 12:27:10 +00:00
parent 93b74c09db
commit 086d9cacb9
7 changed files with 45 additions and 88 deletions

View File

@ -1,11 +1,10 @@
COMMENT= c++ library for common image format
DISTNAME= FreeImage3152
PKGNAME= freeimage-3.15.2
REVISION= 8
DISTNAME= FreeImage3180
PKGNAME= freeimage-3.18.0
CATEGORIES= graphics
SHARED_LIBS+= freeimage 2.0
SHARED_LIBS+= freeimage 3.0
HOMEPAGE= http://freeimage.sourceforge.net/

View File

@ -1,2 +1,2 @@
SHA256 (FreeImage3152.zip) = tV2eTWzGoimq8MBtSfcAHsOn3117xOMLsoT6kvR/Tuc=
SIZE (FreeImage3152.zip) = 4618626
SHA256 (FreeImage3180.zip) = 9BN5aC+a2pTqezT+hr+e4Ak1oxR75BtlaclgWlPkOP0=
SIZE (FreeImage3180.zip) = 7415716

View File

@ -1,7 +1,7 @@
Index: Makefile.gnu
--- Makefile.gnu.orig
+++ Makefile.gnu
@@ -5,13 +5,13 @@ include Makefile.srcs
@@ -5,9 +5,10 @@ include Makefile.srcs
# General configuration variables:
DESTDIR ?= /
@ -10,16 +10,18 @@ Index: Makefile.gnu
+INCDIR ?= $(PREFIX)/include
+INSTALLDIR ?= $(PREFIX)/lib
+
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
-LIBRARIES = -lstdc++
+LIBRARIES =
MODULES = $(SRCS:.c=.o)
MODULES := $(MODULES:.cpp=.o)
@@ -20,16 +20,13 @@ CFLAGS += $(INCLUDE)
CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
@@ -23,19 +24,17 @@ CFLAGS += -DNO_LCMS
# LibJXR
CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
CFLAGS += $(INCLUDE)
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+CXXFLAGS ?= -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
# LibJXR
CXXFLAGS += -D__ANSI__
CXXFLAGS += $(INCLUDE)
-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
@ -34,20 +36,17 @@ Index: Makefile.gnu
-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+SHAREDLIB = lib$(TARGET).so.$(LIBfreeimage_VERSION)
LIBNAME = lib$(TARGET).so
-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
HEADER = Source/FreeImage.h
@@ -40,7 +37,7 @@ all: dist
@@ -49,7 +48,6 @@ all: dist
dist: FreeImage
cp *.a Dist
- cp *.so Dist
+ cp *.so.* Dist
cp Source/FreeImage.h Dist
mkdir -p Dist
cp *.a Dist/
- cp *.so Dist/
cp Source/FreeImage.h Dist/
dos2unix:
@@ -58,16 +55,13 @@ $(STATICLIB): $(MODULES)
@@ -67,16 +65,13 @@ $(STATICLIB): $(MODULES)
$(AR) r $@ $(MODULES)
$(SHAREDLIB): $(MODULES)
@ -61,7 +60,7 @@ Index: Makefile.gnu
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
- ldconfig
-# 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)

View File

@ -0,0 +1,12 @@
Index: Source/FreeImage/PluginPSD.cpp
--- Source/FreeImage/PluginPSD.cpp.orig
+++ Source/FreeImage/PluginPSD.cpp
@@ -127,7 +127,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int
static BOOL DLL_CALLCONV
Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) {
if(!handle) {
- return NULL;
+ return FALSE;
}
try {
psdParser parser;

View File

@ -1,13 +1,12 @@
--- Source/LibOpenJPEG/opj_malloc.h.orig Sat Feb 18 15:33:18 2012
+++ Source/LibOpenJPEG/opj_malloc.h Thu Jan 21 19:13:05 2016
@@ -84,8 +84,8 @@ Allocate memory aligned to a 16 byte boundry
#if defined(__sun)
#define HAVE_MEMALIGN
Index: Source/LibOpenJPEG/opj_malloc.h
--- Source/LibOpenJPEG/opj_malloc.h.orig
+++ Source/LibOpenJPEG/opj_malloc.h
@@ -96,7 +96,7 @@ Allocate memory aligned to a 16 byte boundry
#elif defined(__FreeBSD__)
#define HAVE_POSIX_MEMALIGN
/* Linux x86_64 and OSX always align allocations to 16 bytes */
- #elif !defined(__amd64__) && !defined(__APPLE__)
- #define HAVE_MEMALIGN
+ #elif !defined(__amd64__) && !defined(__APPLE__) && !defined(__OpenBSD__)
+ #define HAVE_POSIX_MEMALIGN
- #elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX)
+ #elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX) && !defined(__OpenBSD__)
#define HAVE_MEMALIGN
#include <malloc.h>
#endif
#endif

View File

@ -1,52 +0,0 @@
Hunk #1: fix the build when char is unsigned by default (ppc, arm)
fix clang>=6 build
Index: Source/LibRawLite/internal/dcraw_common.cpp
--- Source/LibRawLite/internal/dcraw_common.cpp.orig
+++ Source/LibRawLite/internal/dcraw_common.cpp
@@ -2368,7 +2368,7 @@ void CLASS quicktake_100_load_raw()
void CLASS kodak_radc_load_raw()
{
- static const char src[] = {
+ static const signed char src[] = {
1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8,
1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8,
2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8,
@@ -3917,7 +3917,7 @@ void CLASS lin_interpolate()
*/
void CLASS vng_interpolate()
{
- static const signed char *cp, terms[] = {
+ static const int *cp, terms[] = {
-2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01,
-2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01,
-2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,
@@ -6470,7 +6470,7 @@ void CLASS adobe_coeff (const char *p_make, const char
{
static const struct {
const char *prefix;
- short t_black, t_maximum, trans[12];
+ int t_black, t_maximum, trans[12];
} table[] = {
{ "AGFAPHOTO DC-833m", 0, 0, /* DJC */
{ 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } },
@@ -7452,7 +7452,7 @@ void CLASS identify()
parse_fuji (get4());
if (thumb_offset > 120) {
fseek (ifp, 120, SEEK_SET);
- is_raw += (i = get4()) && 1;
+ is_raw += static_cast<bool>(i = get4()) && 1;
if (is_raw == 2 && shot_select)
parse_fuji (i);
}
@@ -9155,7 +9155,7 @@ void CLASS tiff_head (struct tiff_hdr *th, int full)
strncpy (th->t_desc, desc, 512);
strncpy (th->t_make, make, 64);
strncpy (th->t_model, model, 64);
- strcpy (th->soft, "dcraw v"DCRAW_VERSION);
+ strcpy (th->soft, "dcraw v" DCRAW_VERSION);
t = localtime (&timestamp);
sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d",
t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);

View File

@ -1,3 +1,3 @@
include/FreeImage.h
lib/libfreeimage.a
@static-lib lib/libfreeimage.a
@lib lib/libfreeimage.so.${LIBfreeimage_VERSION}