summarylogtreecommitdiffstats
path: root/0003-Use-system-wide-libjpeg.patch
diff options
context:
space:
mode:
authorDaniel Bermond2017-02-28 21:07:51 -0300
committerDaniel Bermond2017-02-28 21:07:51 -0300
commit8af7201a2bab34d88c2748176e8e9f1832fe8141 (patch)
treec5b9f8d15ff49bd7a8713e7b4297f5caab6fd154 /0003-Use-system-wide-libjpeg.patch
downloadaur-8af7201a2bab34d88c2748176e8e9f1832fe8141.tar.gz
Initial commit
Diffstat (limited to '0003-Use-system-wide-libjpeg.patch')
-rw-r--r--0003-Use-system-wide-libjpeg.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/0003-Use-system-wide-libjpeg.patch b/0003-Use-system-wide-libjpeg.patch
new file mode 100644
index 000000000000..37b3d118891f
--- /dev/null
+++ b/0003-Use-system-wide-libjpeg.patch
@@ -0,0 +1,97 @@
+From: Hauke Wintjen <hwintjen@rimpl-consulting.de>
+Date: Fri, 29 Mar 2013 22:21:36 +0100
+Subject: Use system wide libjpeg
+
+---
+ Source/Core/Makefile | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/Source/Core/Makefile
++++ b/Source/Core/Makefile
+@@ -5,14 +5,12 @@
+ INC_DIRS = \
+ ../../Include \
+ ../../ThirdParty/PSCommon/XnLib/Include \
+- ../Drivers/OniFile/Formats \
+- ../../ThirdParty/LibJPEG
++ ../Drivers/OniFile/Formats
+
+ SRC_FILES = \
+ *.cpp \
+ ../Drivers/OniFile/Formats/XnCodec.cpp \
+- ../Drivers/OniFile/Formats/XnStreamCompression.cpp \
+- ../../ThirdParty/LibJPEG/*.c \
++ ../Drivers/OniFile/Formats/XnStreamCompression.cpp
+
+ ifeq ("$(OSTYPE)","Darwin")
+ INC_DIRS += /opt/local/include
+@@ -23,7 +21,7 @@
+ LIB_NAME = OpenNI2
+
+ LIB_DIRS = ../../ThirdParty/PSCommon/XnLib/Bin/$(PLATFORM)-$(CFG)
+-USED_LIBS = XnLib dl pthread
++USED_LIBS = XnLib dl pthread jpeg
+ ifneq ("$(OSTYPE)","Darwin")
+ USED_LIBS += rt
+ endif
+@@ -32,4 +30,11 @@
+
+ CFLAGS += -Wall
+
++ifeq ($(shell ld -ljpeg -o /dev/null 1>&2 2> /dev/null; echo $$?), 0)
++ USED_LIBS += jpeg
++else
++ INC_DIRS += ../../ThirdParty/LibJPEG
++ SRC_FILES += ../../ThirdParty/LibJPEG/*.c
++endif
++
+ include ../../ThirdParty/PSCommon/BuildSystem/CommonCppMakefile
+--- a/Source/Drivers/OniFile/Makefile
++++ b/Source/Drivers/OniFile/Makefile
+@@ -6,15 +6,12 @@
+ . \
+ ../../../Include \
+ ../../../ThirdParty/PSCommon/XnLib/Include \
+- ../../../ThirdParty/LibJPEG \
+ Formats
+
+ SRC_FILES = \
+ *.cpp \
+ Formats/*.cpp \
+- XnLibExtensions/*.cpp \
+- ../../../ThirdParty/LibJPEG/*.c
+-
++ XnLibExtensions/*.cpp
+
+ ifeq ("$(OSTYPE)","Darwin")
+ INC_DIRS += /opt/local/include
+@@ -25,7 +22,7 @@
+ LIB_NAME = OniFile
+
+ LIB_DIRS = ../../../ThirdParty/PSCommon/XnLib/Bin/$(PLATFORM)-$(CFG)
+-USED_LIBS = XnLib pthread
++USED_LIBS = XnLib pthread jpeg
+ ifneq ("$(OSTYPE)","Darwin")
+ USED_LIBS += rt
+ endif
+--- a/Source/Drivers/PS1080/Makefile
++++ b/Source/Drivers/PS1080/Makefile
+@@ -16,8 +16,7 @@
+ DriverImpl/*.cpp\
+ Formats/*.cpp \
+ Include/*.cpp \
+- Sensor/*.cpp \
+- ../../../ThirdParty/LibJPEG/*.c
++ Sensor/*.cpp
+
+
+ ifeq ("$(OSTYPE)","Darwin")
+@@ -30,7 +29,7 @@
+
+ LIB_DIRS += ../../../ThirdParty/PSCommon/XnLib/Bin/$(PLATFORM)-$(CFG)
+ LIB_DIRS += $(BIN_DIR)/$(PLATFORM)-$(CFG)
+-USED_LIBS = XnLib dl pthread DepthUtils
++USED_LIBS = XnLib dl pthread DepthUtils jpeg
+ ifneq ("$(OSTYPE)","Darwin")
+ USED_LIBS += rt usb-1.0 udev
+ else