opensmalltalk cog-spur: update to VMMaker.oscog-eem.3504
[oi-userland.git] / components / library / FreeImage / patches / 03-Makefile.gnu.patch
blobff81cbd5f915bfc004e93c5845f43db060422fae
1 --- FreeImage/Makefile.gnu Tue Mar 10 09:04:00 2015
2 +++ FreeImage/Makefile_.gnu Tue May 24 02:22:10 2022
3 @@ -6,7 +6,8 @@
4 # General configuration variables:
5 DESTDIR ?= /
6 INCDIR ?= $(DESTDIR)/usr/include
7 -INSTALLDIR ?= $(DESTDIR)/usr/lib
8 +INSTALLDIR ?= $(DESTDIR)/usr/lib/MACH64
9 +PKGCFGDIR ?= $(DESTDIR)/usr/lib/MACH64/pkgconfig
11 # Converts cr/lf to just lf
12 DOS2UNIX = dos2unix
13 @@ -16,21 +17,13 @@
14 MODULES = $(SRCS:.c=.o)
15 MODULES := $(MODULES:.cpp=.o)
16 CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
17 -# OpenJPEG
18 -CFLAGS += -DOPJ_STATIC
19 -# LibRaw
20 -CFLAGS += -DNO_LCMS
21 -# LibJXR
22 -CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
23 -CFLAGS += $(INCLUDE)
24 -CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
25 -# LibJXR
26 -CXXFLAGS += -D__ANSI__
27 -CXXFLAGS += $(INCLUDE)
28 +override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libjpeg libjxr libraw libpng libtiff-4 libwebp libwebpmux zlib)
29 +override CXXFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libjpeg libjxr libraw libpng libtiff-4 libwebp libwebpmux zlib)
30 +override LDFLAGS += $(shell pkg-config --libs OpenEXR libopenjp2 libjpeg libjxr libraw libpng libtiff-4 libwebp libwebpmux zlib)
32 ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
33 - CFLAGS += -fPIC
34 - CXXFLAGS += -fPIC
35 + override CFLAGS += -fPIC
36 + override CXXFLAGS += -fPIC
37 endif
39 TARGET = freeimage
40 @@ -67,13 +60,13 @@
41 $(AR) r $@ $(MODULES)
43 $(SHAREDLIB): $(MODULES)
44 - $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
45 + $(CC) -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES) $(LDFLAGS)
47 install:
48 - install -d $(INCDIR) $(INSTALLDIR)
49 - install -m 644 -o root -g root $(HEADER) $(INCDIR)
50 - install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
51 - install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
52 + ginstall -c -d $(INCDIR) $(PKGCFGDIR)
53 + ginstall -c -m 644 $(HEADER) $(INCDIR)
54 + ginstall -c -m 755 $(SHAREDLIB) $(INSTALLDIR)
55 + ginstall -c -m 644 libfreeimage.pc $(PKGCFGDIR)
56 ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
57 ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
58 # ldconfig