blob: 0c72cc763d10eb9a4111df41e64eea3221d758f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# This file is part of MXE.
# See index.html for further information.
PKG := opencv
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.4.4
$(PKG)_CHECKSUM := 6e518c0274a8392c0c98d18ef0ef754b9c596aca
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := OpenCV-$($(PKG)_VERSION)a.tar.bz2
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)library/$(PKG)-unix/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc eigen ffmpeg jasper jpeg lcms1 libpng openexr tiff xz zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/' | \
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
# build
mkdir '$(1).build'
cd '$(1).build' && cmake \
-DWITH_QT=OFF \
-DWITH_OPENGL=ON \
-DWITH_GSTREAMER=OFF \
-DWITH_GTK=OFF \
-DWITH_VIDEOINPUT=ON \
-DWITH_XINE=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_opencv_apps=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_PACKAGE=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_WITH_DEBUG_INFO=OFF \
-DBUILD_FAT_JAVA_LIB=OFF \
-DBUILD_ZLIB=OFF \
-DBUILD_TIFF=OFF \
-DBUILD_JASPER=OFF \
-DBUILD_JPEG=OFF \
-DBUILD_PNG=OFF \
-DBUILD_OPENEXR=OFF \
-DCMAKE_VERBOSE=ON \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
'$(1)'
# install
$(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1
# fixup and install pkg-config file
# can't figure out where these unprefixed libs are coming from
$(SED) -i 's,\(opengl32\|glu32\|stdc++\),-l\1,g' '$(1).build/unix-install/opencv.pc'
$(INSTALL) -m755 '$(1).build/unix-install/opencv.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig'
'$(TARGET)-g++' \
-W -Wall -Werror -ansi -pedantic \
'$(1)/samples/c/fback_c.c' -o '$(PREFIX)/$(TARGET)/bin/test-opencv.exe' \
`'$(TARGET)-pkg-config' opencv --cflags --libs`
endef
# float.h issues https://bugzilla.redhat.com/show_bug.cgi?id=843436
$(PKG)_BUILD_x86_64-w64-mingw32 =
$(PKG)_BUILD_i686-w64-mingw32 =
|