From: "Amy Winston" <amynka@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/files/, media-libs/opencv/
Date: Thu, 9 Jun 2016 13:54:18 +0000 (UTC) [thread overview]
Message-ID: <1465480349.cf149b0c51363346080559b66a540c956cfd05aa.amynka@gentoo> (raw)
commit: cf149b0c51363346080559b66a540c956cfd05aa
Author: dracwyrm <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Thu Jun 9 12:52:00 2016 +0000
Commit: Amy Winston <amynka <AT> gentoo <DOT> org>
CommitDate: Thu Jun 9 13:52:29 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf149b0c
media-libs/opencv: change to EAPI 6 and fix python installation
-Add patch to install the correct bindings based on single_python_target
-Fix Cuda in ebuild
-Remove unused CMake options
-Modified patch to be -p1 format
-Tiny fixes and rewrites for EAPI 6 specs
.../files/opencv-3.1.0-gentooify-python.patch | 101 ++++++++
.../opencv/files/opencv-3.1.0-git-autodetect.patch | 4 +-
.../opencv/files/opencv-3.1.0-java-magic.patch | 47 ++++
media-libs/opencv/opencv-3.1.0-r4.ebuild | 269 +++++++++++++++++++++
4 files changed, 419 insertions(+), 2 deletions(-)
diff --git a/media-libs/opencv/files/opencv-3.1.0-gentooify-python.patch b/media-libs/opencv/files/opencv-3.1.0-gentooify-python.patch
new file mode 100644
index 0000000..7bb01b4
--- /dev/null
+++ b/media-libs/opencv/files/opencv-3.1.0-gentooify-python.patch
@@ -0,0 +1,101 @@
+diff -purN a/cmake/OpenCVDetectGentooPython.cmake b/cmake/OpenCVDetectGentooPython.cmake
+--- a/cmake/OpenCVDetectGentooPython.cmake 1970-01-01 01:00:00.000000000 +0100
++++ b/cmake/OpenCVDetectGentooPython.cmake 2016-06-09 10:21:09.236148446 +0100
+@@ -0,0 +1,77 @@
++# Find specified Python version
++# Arguments:
++# found (variable): Set if interpreter found
++# executable (variable): Output of executable found
++# version_string (variable): Output of found version
++# version_major (variable): Output of found major version
++# version_minor (variable): Output of found minor version
++# libs_found (variable): Set if libs found
++# libs_version_string (variable): Output of found libs version
++# libraries (variable): Output of found Python libraries
++# library (variable): Output of found Python library
++# debug_libraries (variable): Output of found Python debug libraries
++# debug_library (variable): Output of found Python debug library
++# include_path (variable): Output of found Python include path
++# include_dir (variable): Output of found Python include dir
++# include_dir2 (variable): Output of found Python include dir2
++# packages_path (variable): Output of found Python packages path
++# numpy_include_dirs (variable): Output of found Python Numpy include dirs
++function(find_python found executable version_string version_major version_minor
++ libs_found libs_version_string libraries library debug_libraries
++ debug_library include_path include_dir include_dir2 packages_path
++ numpy_include_dirs)
++
++ set(${found} "TRUE" PARENT_SCOPE)
++ set(${executable} "${GENTOO_PYTHON_EXECUTABLE}" CACHE FILEPATH "Path to Python interpretor")
++ set(${version_string} "${GENTOO_PYTHON_MAJOR}.${GENTOO_PYTHON_MINOR}" PARENT_SCOPE)
++ set(${version_major} "${GENTOO_PYTHON_MAJOR}" PARENT_SCOPE)
++ set(${version_minor} "${GENTOO_PYTHON_MINOR}" PARENT_SCOPE)
++ set(${libs_found} "TRUE" PARENT_SCOPE)
++ set(${libs_version_string} "${version_string}" PARENT_SCOPE)
++ set(${libraries} "${GENTOO_PYTHON_LIBRARIES}" PARENT_SCOPE)
++ set(${library} "${GENTOO_PYTHON_LIBRARIES}" CACHE FILEPATH "Path to Python library")
++ set(${debug_libraries} "${GENTOO_PYTHON_DEBUG_LIBRARIES}" PARENT_SCOPE)
++ set(${debug_library} "${GENTOO_PYTHON_DEBUG_LIBRARIES}" CACHE FILEPATH "Path to Python debug")
++ set(${include_path} "${GENTOO_PYTHON_INCLUDE_PATH}" PARENT_SCOPE)
++ set(${include_dir} "${GENTOO_PYTHON_INCLUDE_PATH}" CACHE PATH "Python include dir")
++ set(${include_dir2} "${GENTOO_PYTHON_INCLUDE_PATH}" CACHE PATH "Python include dir 2")
++ set(${packages_path} "${GENTOO_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")
++ set(${numpy_include_dirs} "${GENTOO_PYTHON_PACKAGES_PATH}/numpy/core/include/" CACHE PATH "Path to numpy headers")
++endfunction(find_python)
++
++# In order to use existing CMake files, this needs to be here to switch between
++# Python 2 and 3. It's messy and could be in the ebuild to declare this,
++# but then the ebuild would be a mile long and unreadable. This makes then
++# messy stuff hidden out of the way.
++set(PYTHON2INTERP_FOUND "FALSE")
++set(PYTHON3INTERP_FOUND "FALSE")
++
++if(WITH_PYTHON)
++ if(GENTOO_PYTHON_MAJOR EQUAL 2)
++ find_python(PYTHON2INTERP_FOUND PYTHON2_EXECUTABLE PYTHON2_VERSION_STRING
++ PYTHON2_VERSION_MAJOR PYTHON2_VERSION_MINOR PYTHON2LIBS_FOUND
++ PYTHON2LIBS_VERSION_STRING PYTHON2_LIBRARIES PYTHON2_LIBRARY
++ PYTHON2_DEBUG_LIBRARIES PYTHON2_LIBRARY_DEBUG PYTHON2_INCLUDE_PATH
++ PYTHON2_INCLUDE_DIR PYTHON2_INCLUDE_DIR2 PYTHON2_PACKAGES_PATH
++ PYTHON2_NUMPY_INCLUDE_DIRS)
++ endif()
++
++ if(GENTOO_PYTHON_MAJOR EQUAL 3)
++ find_python(PYTHON3INTERP_FOUND PYTHON3_EXECUTABLE PYTHON3_VERSION_STRING
++ PYTHON3_VERSION_MAJOR PYTHON3_VERSION_MINOR PYTHON3LIBS_FOUND
++ PYTHON3LIBS_VERSION_STRING PYTHON3_LIBRARIES PYTHON3_LIBRARY
++ PYTHON3_DEBUG_LIBRARIES PYTHON3_LIBRARY_DEBUG PYTHON3_INCLUDE_PATH
++ PYTHON3_INCLUDE_DIR PYTHON3_INCLUDE_DIR2 PYTHON3_PACKAGES_PATH
++ PYTHON3_NUMPY_INCLUDE_DIRS)
++ endif()
++endif()
++
++if(PYTHON2INTERP_FOUND) # Use Python 2 as default Python interpreter
++ set(PYTHON_DEFAULT_AVAILABLE "TRUE")
++ set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON2_EXECUTABLE}")
++elseif(PYTHON3INTERP_FOUND) # Use Python 2 as fallback Python interpreter (if there is no Python 2)
++ set(PYTHON_DEFAULT_AVAILABLE "TRUE")
++ set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON3_EXECUTABLE}")
++else()
++ set(PYTHON_DEFAULT_AVAILABLE "FALSE")
++endif()
+diff -purN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2015-12-18 15:02:16.000000000 +0000
++++ b/CMakeLists.txt 2016-06-08 18:57:53.489793304 +0100
+@@ -215,6 +215,7 @@ OCV_OPTION(WITH_VA "Include
+ OCV_OPTION(WITH_VA_INTEL "Include Intel VA-API/OpenCL support" OFF IF (UNIX AND NOT ANDROID) )
+ OCV_OPTION(WITH_GDAL "Include GDAL Support" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
+ OCV_OPTION(WITH_GPHOTO2 "Include gPhoto2 library support" ON IF (UNIX AND NOT ANDROID) )
++OCV_OPTION(WITH_PYTHON "Include python bindings" OFF)
+
+ # OpenCV build components
+ # ===================================================
+@@ -559,7 +560,7 @@ if(BUILD_DOCS)
+ endif(BUILD_DOCS)
+
+ # --- Python Support ---
+-include(cmake/OpenCVDetectPython.cmake)
++include(cmake/OpenCVDetectGentooPython.cmake)
+
+ # --- Java Support ---
+ include(cmake/OpenCVDetectApacheAnt.cmake)
diff --git a/media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch b/media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch
index e4fa287..f4bf0da 100644
--- a/media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch
+++ b/media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch
@@ -1,5 +1,5 @@
---- opencv-3.1.0-r1/work/opencv-3.1.0/CMakeLists.txt.old 2016-04-07 14:34:35.090937125 +0200
-+++ opencv-3.1.0-r1/work/opencv-3.1.0/CMakeLists.txt 2016-04-07 14:35:18.492935300 +0200
+--- a/CMakeLists.txt 2016-04-07 14:34:35.090937125 +0200
++++ b/CMakeLists.txt 2016-04-07 14:35:18.492935300 +0200
@@ -444,23 +444,23 @@
# ----------------------------------------------------------------------------
# Autodetect if we are in a GIT repository
diff --git a/media-libs/opencv/files/opencv-3.1.0-java-magic.patch b/media-libs/opencv/files/opencv-3.1.0-java-magic.patch
new file mode 100644
index 0000000..96a0e7e
--- /dev/null
+++ b/media-libs/opencv/files/opencv-3.1.0-java-magic.patch
@@ -0,0 +1,47 @@
+diff -purN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2015-12-18 15:02:16.000000000 +0000
++++ b/CMakeLists.txt 2016-06-06 17:15:48.006020666 +0100
+@@ -209,6 +209,7 @@ OCV_OPTION(WITH_OPENCLAMDFFT "Include
+ OCV_OPTION(WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
+ OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON IF (WIN32 AND NOT WINRT) )
+ OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF (WIN32 AND NOT WINRT) )
++OCV_OPTION(WITH_JAVA "Include Java support" ON)
+ OCV_OPTION(WITH_IPP_A "Include Intel IPP_A support" OFF IF (MSVC OR X86 OR X86_64) )
+ OCV_OPTION(WITH_MATLAB "Include Matlab support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT))
+ OCV_OPTION(WITH_VA "Include VA support" OFF IF (UNIX AND NOT ANDROID) )
+@@ -562,20 +563,25 @@ endif(BUILD_DOCS)
+ include(cmake/OpenCVDetectPython.cmake)
+
+ # --- Java Support ---
+-include(cmake/OpenCVDetectApacheAnt.cmake)
+-if(ANDROID)
+- include(cmake/OpenCVDetectAndroidSDK.cmake)
++If(WITH_JAVA)
++ include(cmake/OpenCVDetectApacheAnt.cmake)
++ if(ANDROID)
++ include(cmake/OpenCVDetectAndroidSDK.cmake)
+
+- if(NOT ANDROID_TOOLS_Pkg_Revision GREATER 13)
+- message(WARNING "OpenCV requires Android SDK tools revision 14 or newer. Otherwise tests and samples will no be compiled.")
++ if(NOT ANDROID_TOOLS_Pkg_Revision GREATER 13)
++ message(WARNING "OpenCV requires Android SDK tools revision 14 or newer. Otherwise tests and samples will no be compiled.")
++ endif()
++ else()
++ find_package(JNI)
+ endif()
+-else()
+- find_package(JNI)
+-endif()
+
+-if(ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7) AND (ANDROID_TOOLS_Pkg_Revision GREATER 13))
+- SET(CAN_BUILD_ANDROID_PROJECTS TRUE)
++ if(ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7) AND (ANDROID_TOOLS_Pkg_Revision GREATER 13))
++ SET(CAN_BUILD_ANDROID_PROJECTS TRUE)
++ else()
++ SET(CAN_BUILD_ANDROID_PROJECTS FALSE)
++ endif()
+ else()
++ SET(ANT_EXECUTABLE "")
+ SET(CAN_BUILD_ANDROID_PROJECTS FALSE)
+ endif()
+
diff --git a/media-libs/opencv/opencv-3.1.0-r4.ebuild b/media-libs/opencv/opencv-3.1.0-r4.ebuild
new file mode 100644
index 0000000..d83ba38
--- /dev/null
+++ b/media-libs/opencv/opencv-3.1.0-r4.ebuild
@@ -0,0 +1,269 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit toolchain-funcs cmake-utils python-single-r1 java-pkg-opt-2 java-ant-2
+
+DESCRIPTION="A collection of algorithms and sample code for
+ various computer vision problems"
+HOMEPAGE="http://opencv.org"
+
+SRC_URI="
+ mirror://sourceforge/opencvlibrary/opencv-unix/${PV}/${P}.zip
+ https://github.com/Itseez/${PN}/archive/${PV}.zip -> ${P}.zip
+ contrib? (
+ https://github.com/Itseez/${PN}_contrib/archive/cd5993c6576267875adac300b9ddd1f881bb1766.zip
+ -> ${P}_contrib.zip )" #commit from Sun, 27 Mar 2016 17:31:51
+
+LICENSE="BSD"
+SLOT="0/3.1" # subslot = libopencv* soname version
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux"
+IUSE="contrib cuda +eigen examples ffmpeg gdal gphoto2 gstreamer gtk \
+ ieee1394 ipp jpeg jpeg2k libav opencl openexr opengl openmp pch png \
+ +python qt4 qt5 testprograms threads tiff vaapi v4l vtk webp xine"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ ?? ( qt4 qt5 )"
+
+# The following logic is intrinsic in the build system, but we do not enforce
+# it on the useflags since this just blocks emerging pointlessly:
+# gtk? ( !qt4 )
+# opengl? ( || ( gtk qt4 ) )
+# openmp? ( !threads )
+
+RDEPEND="
+ app-arch/bzip2
+ sys-libs/zlib
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ gdal? ( sci-libs/gdal )
+ gphoto2? ( media-libs/libgphoto2 )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ opengl? ( x11-libs/gtkglext )
+ )
+ java? ( >=virtual/jre-1.6:* )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ ieee1394? (
+ media-libs/libdc1394
+ sys-libs/libraw1394
+ )
+ ipp? ( sci-libs/ipp )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr )
+ opengl? ( virtual/opengl virtual/glu )
+ png? ( media-libs/libpng:0= )
+ python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qttest:4
+ opengl? ( dev-qt/qtopengl:4 )
+ )
+ qt5? (
+ dev-qt/qtgui:5
+ dev-qt/qttest:5
+ dev-qt/qtconcurrent:5
+ opengl? ( dev-qt/qtopengl:5 )
+ )
+ threads? ( dev-cpp/tbb )
+ tiff? ( media-libs/tiff:0 )
+ v4l? ( >=media-libs/libv4l-0.8.3 )
+ vtk? ( sci-libs/vtk[rendering] )
+ webp? ( media-libs/libwebp )
+ xine? ( media-libs/xine-lib )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )
+ java? ( >=virtual/jdk-1.6 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.0-gles.patch
+ "${FILESDIR}"/${PN}-3.1.0-cmake-no-opengl.patch
+ "${FILESDIR}"/${P}-git-autodetect.patch
+ "${FILESDIR}"/${P}-java-magic.patch
+ "${FILESDIR}"/${P}-gentooify-python.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled stuff
+ rm -rf 3rdparty || die "Removing 3rd party components failed"
+ sed -i \
+ -e '/add_subdirectory(.*3rdparty.*)/ d' \
+ CMakeLists.txt cmake/*cmake || die
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ if use openmp; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ JAVA_ANT_ENCODING="iso-8859-1"
+ # set encoding so even this cmake build will pick it up.
+ export ANT_OPTS+=" -Dfile.encoding=iso-8859-1"
+ java-ant-2_src_configure
+
+ # please dont sort here, order is the same as in CMakeLists.txt
+ local mycmakeargs=(
+ # Optional 3rd party components
+ # ===================================================
+ -DWITH_1394=$(usex ieee1394 ON OFF)
+ -DWITH_AVFOUNDATION=OFF # IOS
+ -DWITH_VTK=$(usex vtk ON OFF)
+ -DWITH_EIGEN=$(usex eigen ON OFF)
+ -DWITH_VFW=OFF # Video windows support
+ -DWITH_FFMPEG=$(usex ffmpeg ON OFF)
+ -DWITH_GSTREAMER=$(usex gstreamer ON OFF)
+ -DWITH_GSTREAMER_0_10=OFF # Don't want this
+ -DWITH_GTK=$(usex gtk ON OFF)
+ -DWITH_GTK_2_X=OFF
+ -DWITH_IPP=$(usex ipp ON OFF)
+ -DWITH_JASPER=$(usex jpeg2k ON OFF)
+ -DWITH_JPEG=$(usex jpeg ON OFF)
+ -DWITH_WEBP=$(usex webp ON OFF)
+ -DWITH_OPENEXR=$(usex openexr ON OFF)
+ -DWITH_OPENGL=$(usex opengl ON OFF)
+ -DWITH_OPENNI=OFF # Not packaged
+ -DWITH_OPENNI2=OFF # Not packaged
+ -DWITH_PNG=$(usex png ON OFF)
+ -DWITH_PVAPI=OFF # Not packaged
+ -DWITH_GIGEAPI=OFF
+ # Qt in CMakeList.txt here: See below
+ -DWITH_WIN32UI=OFF # Windows only
+ -DWITH_QUICKTIME=OFF
+ -DWITH_TBB=$(usex threads ON OFF)
+ -DWITH_OPENMP=$(usex openmp ON OFF)
+ -DWITH_CSTRIPES=OFF
+ -DWITH_PTHREADS_PF=ON
+ -DWITH_TIFF=$(usex tiff ON OFF)
+ -DWITH_UNICAP=OFF # Not packaged
+ -DWITH_V4L=$(usex v4l ON OFF)
+ -DWITH_LIBV4L=$(usex v4l ON OFF)
+ -DWITH_DSHOW=ON # direct show supp
+ -DWITH_MSMF=OFF
+ -DWITH_XIMEA=OFF # Windows only
+ -DWITH_XINE=$(usex xine ON OFF)
+ -DWITH_CLP=OFF
+ -DWITH_OPENCL=$(usex opencl ON OFF)
+ -DWITH_OPENCL_SVM=OFF
+ -DWITH_OPENCLAMDFFT=$(usex opencl ON OFF)
+ -DWITH_OPENCLAMDBLAS=$(usex opencl ON OFF)
+ -DWITH_DIRECTX=OFF
+ -DWITH_INTELPERC=OFF
+ -DWITH_JAVA=$(usex java ON OFF) # Ant needed, no compile flag
+ -DWITH_IPP_A=OFF
+ -DWITH_MATLAB=ON
+ -DWITH_VA=$(usex vaapi ON OFF)
+ -DWITH_VA_INTEL=$(usex vaapi ON OFF)
+ -DWITH_GDAL=$(usex gdal ON OFF)
+ -DWITH_GPHOTO2=$(usex gphoto2 ON OFF)
+ # ===================================================
+ # OpenCV build components
+ # ===================================================
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_ANDROID_EXAMPLES=OFF
+ -DBUILD_DOCS=OFF # Doesn't install anyways.
+ -DBUILD_EXAMPLES=$(usex examples ON OFF)
+ -DBUILD_PERF_TESTS=OFF
+ -DBUILD_TESTS=$(usex testprograms ON OFF)
+ # ===================================================
+ # OpenCV installation options
+ # ===================================================
+ -DINSTALL_C_EXAMPLES=$(usex examples ON OFF)
+ -DINSTALL_TESTS=$(usex testprograms ON OFF)
+ # ===================================================
+ # OpenCV build options
+ # ===================================================
+ -DENABLE_PRECOMPILED_HEADERS=$(usex pch ON OFF)
+ -DHAVE_opencv_java=$(usex java YES NO)
+ )
+
+ if use qt4; then
+ mycmakeargs+=( -DWITH_QT=4 )
+ elif use qt5; then
+ mycmakeargs+=( -DWITH_QT=5 )
+ else
+ mycmakeargs+=( -DWITH_QT=OFF )
+ fi
+
+ if use cuda; then
+ if [[ "$(gcc-version)" > "4.8" ]]; then
+ # bug 577410
+ # #error -- unsupported GNU version! gcc 4.9 and up are not supported!
+ ewarn "CUDA and >=sys-devel/gcc-4.9 do not play well together. Disabling CUDA support."
+ mycmakeargs+=( -DWITH_CUDA=OFF )
+ mycmakeargs+=( -DWITH_CUBLAS=OFF )
+ mycmakeargs+=( -DWITH_CUFFT=OFF )
+
+ else
+ mycmakeargs+=( -DWITH_CUDA=ON )
+ mycmakeargs+=( -DWITH_CUBLAS=ON )
+ mycmakeargs+=( -DWITH_CUFFT=ON )
+ mycmakeargs+=( -DCUDA_NPP_LIBRARY_ROOT_DIR="/opt/cuda" )
+ fi
+ else
+ mycmakeargs+=( -DWITH_CUDA=OFF )
+ mycmakeargs+=( -DWITH_CUBLAS=OFF )
+ mycmakeargs+=( -DWITH_CUFFT=OFF )
+ fi
+
+ use contrib && mycmakeargs+=(
+ -DOPENCV_EXTRA_MODULES_PATH="${WORKDIR}/opencv_contrib-${PV}/modules"
+ )
+
+ if use python; then
+ # Set all python variables to load the correct Gentoo paths
+ mycmakeargs+=(
+ -DWITH_PYTHON=ON
+ -DGENTOO_PYTHON_EXECUTABLE=${EPYTHON}
+ -DGENTOO_PYTHON_INCLUDE_PATH="$(python_get_includedir)"
+ -DGENTOO_PYTHON_LIBRARIES="$(python_get_library_path)"
+ -DGENTOO_PYTHON_PACKAGES_PATH="$(python_get_sitedir)"
+ -DGENTOO_PYTHON_MAJOR=${EPYTHON:6:1}
+ -DGENTOO_PYTHON_MINOR=${EPYTHON:8:1}
+ -DGENTOO_PYTHON_DEBUG_LIBRARIES="" # Absolutely no clue what this is
+ )
+ use examples && mycmakeargs+=( -DINSTALL_PYTHON_EXAMPLES=ON )
+ else
+ mycmakeargs+=( -DINSTALL_PYTHON_EXAMPLES=OFF )
+ fi
+
+ # things we want to be hard off or not yet figured out
+ mycmakeargs+=(
+ -DBUILD_PACKAGE=OFF
+ -DENABLE_PROFILING=OFF
+ )
+
+ # things we want to be hard enabled not worth useflag
+ mycmakeargs+=(
+ -DCMAKE_SKIP_RPATH=ON
+ -DOPENCV_DOC_INSTALL_PATH=
+ )
+
+ # workaround for bug 413429
+ tc-export CC CXX
+
+ cmake-utils_src_configure
+}
next reply other threads:[~2016-06-09 13:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 13:54 Amy Winston [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-04-26 19:49 [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/files/, media-libs/opencv/ Andrew Ammerlaan
2024-01-10 12:41 Sam James
2024-01-03 21:28 Andreas Sturmlechner
2023-08-24 22:37 Sam James
2022-10-15 0:44 Sam James
2021-12-03 0:54 Sam James
2020-06-25 17:08 Andreas Sturmlechner
2019-12-07 19:39 Amy Liffey
2019-08-10 20:15 Alexey Shvetsov
2019-01-16 19:46 Amy Liffey
2019-01-14 22:23 Amy Liffey
2018-05-31 17:24 Amy Liffey
2018-05-25 19:26 Amy Liffey
2018-01-21 8:36 Amy Liffey
2017-07-27 18:54 Amy Liffey
2017-07-27 18:42 Amy Liffey
2016-09-27 14:22 Amy Winston
2016-04-07 17:39 Amy Winston
2016-02-25 13:35 Amy Winston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465480349.cf149b0c51363346080559b66a540c956cfd05aa.amynka@gentoo \
--to=amynka@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox