void-packages/srcpkgs/gmic/patches/01-includedir.patch

45 lines
2.3 KiB
Diff

Index: gmic-2.9.9/src/Makefile
===================================================================
--- gmic-2.9.9.orig/src/Makefile
+++ gmic-2.9.9/src/Makefile
@@ -163,13 +163,13 @@ NO_PRERELEASE = $(shell date +%y%m%d)
NO_PRERELEASE_CFLAGS = -Dgmic_prerelease="\\\"$(PRERELEASE)\\\""
# Minimal set of flags mandatory to compile G'MIC.
-MANDATORY_CFLAGS = -Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. $(shell pkg-config --cflags zlib || echo -I$(USR)/$(INCLUDE)) $(PRERELEASE_CFLAGS) $(EXTRA_CFLAGS)
+MANDATORY_CFLAGS = -Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. $(shell pkg-config --cflags zlib) $(PRERELEASE_CFLAGS) $(EXTRA_CFLAGS)
MANDATORY_LIBS = $(shell pkg-config --libs zlib || echo -lz) $(EXTRA_LIBS)
ifndef NO_SRIPDLIB
MANDATORY_CFLAGS += -std=c++11 -pedantic
endif
-MANDATORY_LIBS += -L$(USR)/$(LIB)
+MANDATORY_LIBS +=
ifdef IS_GCC
MANDATORY_CFLAGS += -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label
MANDATORY_LIBS += -lm
@@ -250,7 +250,7 @@ endif
# Enable faster X11 display, using XShm extension.
# (ftp://www.x.org/pub/X11R7.7/doc/man/man3/XShm.3.xhtml)
XSHM_CFLAGS = -Dcimg_use_xshm $(shell pkg-config --cflags xcb-shm)
-XSHM_LIBS = $(shell pkg-config --libs xcb-shm || echo -L$(USR)/X11R6/lib) -lXext
+XSHM_LIBS = $(shell pkg-config --libs xcb-shm) -lXext
# Enable image display, using GDI32 (Windows).
GDI32_CFLAGS = -Dcimg_display=2
@@ -303,12 +303,12 @@ OPENCV_LIBS = $(shell pkg-config opencv
# Enable support of most classical image file formats, using the GraphicsMagick++ library.
# (http://www.graphicsmagick.org/Magick++/)
-MAGICK_CFLAGS = -Dcimg_use_magick $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(USR)/$(INCLUDE)/GraphicsMagick)
+MAGICK_CFLAGS = -Dcimg_use_magick $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(XBPS_CROSS_BASE)$(USR)/$(INCLUDE)/GraphicsMagick)
MAGICK_LIBS = $(shell pkg-config --libs GraphicsMagick++ || echo -lGraphicsMagick++)
# Enable native support of EXR image files, using the OpenEXR library.
# (http://www.openexr.com/)
-OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(USR)/$(INCLUDE)/OpenEXR
+OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(XBPS_CROSS_BASE)$(USR)/$(INCLUDE)/OpenEXR
OPENEXR_LIBS = -lIlmImf -lHalf
# Enable Fast Fourier Transforms, using the FFTW3 library.