-#!/bin/bash
+#!/usr/local/bin/bash
#use: patch -p2 < bsd.patch
export CONFIG_SHELL=/bin/bash
export MAKE=gmake
export C_INCLUDE_PATH=/usr/local/include
-export CPLUS_INCLUDE_PATH=/usr/local/include
+export CPLUS_INCLUDE_PATH=/usr/local/include:/usr/local/include/OpenEXR:/usr/local/include/Imath
export LIBRARY_PATH=/usr/local/lib
alias make=gmake
( ./autogen.sh
- BSD=1 CC=clang CXX=clang++ CFLAGS="-g -O2 -DFFMPEG3" \
+ BSD=1 CC=clang CXX=clang++ CFLAGS="-g -O2 " \
./configure --with-single-user \
--disable-static-build --without-lv2 --disable-lame --disable-twolame \
--with-oss --without-alsa --without-firewire --without-dv --without-dvb \
--without-video4linux2 --without-xxf86vm --without-ladspa-build \
--without-libzmpeg --without-commercial --without-thirdparty \
--without-vaapi --without-vdpau --without-shuttle --without-shuttle-usb \
- --without-x10tv --without-wintv
+ --without-x10tv --with-jobs=4 --without-wintv
gmake
gmake install ) 2>&1 | tee log
ifeq ($(WANT_CIN_3RDPARTY),no)
LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavutil
LIBS += -lswresample -lswscale
+PLATFORM = $(shell uname -s)
+ifneq (, $(filter $(PLATFORM), FreeBSD NetBSD))
LIBS += -lintl -liconv
LIBS += -lexecinfo
-
+endif
LIBS += $(shared_libs)
LIBS += $(system_libs)
else
#opencv4 breaks SIFT/SURF findobj
CFLAGS += -I$(opencv_prefix)/include/opencv4
CFLAGS += -I$(opencv_prefix)/include
+CFLAGS += -std=c++11
ifeq ($(src),git)
$(opencv).src:
-DINSTALL_C_EXAMPLES=OFF \
-DINSTALL_PYTHON_EXAMPLES=OFF \
-DBUILD_EXAMPLES=OFF .. \
+ -DBUILD_PERF_TESTS=OFF \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_opencv_apps=OFF \
-DBUILD_opencv_python3=no \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DOPENCV_EXTRA_MODULES_PATH="$(opencv)_contrib/modules/"
-DINSTALL_PYTHON_EXAMPLES=ON \
-DBUILD_EXAMPLES=ON .. \
-DBUILD_opencv_python3=no \
+ -DBUILD_PERF_TESTS=OFF \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_opencv_apps=OFF \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DOPENCV_EXTRA_MODULES_PATH="$(opencv)_contrib/modules/"
-SYSLIB := $(lastword $(wildcard /usr/lib /usrlib32 /usr/lib64))
+SYSLIB := $(lastword $(wildcard /usr/lib /usr/lib32 /usr/lib64))
CVLIBS := $(dir $(shell find $(opencv_prefix) -name libopencv_core.so))
LFLAGS += -L$(CVLIBS) $(patsubst $(CVLIBS)/lib%.so,-l%,$(wildcard $(CVLIBS)/libopencv_*.so))
LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/lib{Half,Imath,Ilm,Iex}*.so))
else ifeq ($(bld),sys)
$(opencv)/build:
-SYSLIB := $(lastword $(wildcard /usr/lib /usrlib32 /usr/lib64))
+SYSLIB := $(lastword $(wildcard /usr/lib /usr/lib32 /usr/lib64))
LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/libopencv_*.so))
LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/lib{Half,Imath,Ilm,Iex}*.so))
static_libs :=