From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ACB5E13835A for ; Tue, 29 Dec 2020 01:54:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 982E1E0A96; Tue, 29 Dec 2020 01:54:50 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6AE41E0A46 for ; Tue, 29 Dec 2020 01:54:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D9F28341344 for ; Tue, 29 Dec 2020 01:54:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 48F70CC for ; Tue, 29 Dec 2020 01:54:47 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1609206881.f8cc16d8d29ac37adc78c77d28956ce1bd20cd80.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/libgeodecomp/, sci-libs/libgeodecomp/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/libgeodecomp/files/libgeodecomp-0.5.0_pre20201009-opencv.patch sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild X-VCS-Directories: sci-libs/libgeodecomp/ sci-libs/libgeodecomp/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f8cc16d8d29ac37adc78c77d28956ce1bd20cd80 X-VCS-Branch: master Date: Tue, 29 Dec 2020 01:54:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 74ffd8f8-c209-4037-ab21-cf41c3a7cd75 X-Archives-Hash: edc34c8d8ee2164346f8bd3d302a4c8b commit: f8cc16d8d29ac37adc78c77d28956ce1bd20cd80 Author: Kurt Kanzenbach kmk-computers de> AuthorDate: Mon Dec 28 14:08:16 2020 +0000 Commit: Sam James gentoo org> CommitDate: Tue Dec 29 01:54:41 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8cc16d8 sci-libs/libgeodecomp: Fix build with OpenCV enabled Closes: https://bugs.gentoo.org/762196 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Kurt Kanzenbach kmk-computers.de> Closes: https://github.com/gentoo/gentoo/pull/18850 Signed-off-by: Sam James gentoo.org> .../libgeodecomp-0.5.0_pre20201009-opencv.patch | 186 +++++++++++++++++++++ .../libgeodecomp-0.5.0_pre20201009.ebuild | 5 +- 2 files changed, 190 insertions(+), 1 deletion(-) diff --git a/sci-libs/libgeodecomp/files/libgeodecomp-0.5.0_pre20201009-opencv.patch b/sci-libs/libgeodecomp/files/libgeodecomp-0.5.0_pre20201009-opencv.patch new file mode 100644 index 00000000000..0a063281249 --- /dev/null +++ b/sci-libs/libgeodecomp/files/libgeodecomp-0.5.0_pre20201009-opencv.patch @@ -0,0 +1,186 @@ +From 3a20ca303ccc8d9d7cfd9787b392f1436d266243 Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach +Date: Mon, 28 Dec 2020 15:03:16 +0100 +Subject: [PATCH] cmake: Fix build with OpenCV + +The FindOpenCV module assumes that OpenCV in installed into a separate +directory which makes sense for cluster machines etc. + +However, on Gentoo OpenCV is installed by portage and the corresponding Cmake +module can be used directly. + +Signed-off-by: Kurt Kanzenbach +--- + CMakeModules/FindOpenCV.cmake | 160 ---------------------------------- + 1 file changed, 160 deletions(-) + delete mode 100644 CMakeModules/FindOpenCV.cmake + +diff --git a/CMakeModules/FindOpenCV.cmake b/CMakeModules/FindOpenCV.cmake +deleted file mode 100644 +index 68d629da5a4d..000000000000 +--- a/CMakeModules/FindOpenCV.cmake ++++ /dev/null +@@ -1,160 +0,0 @@ +-########################################################### +-# Find OpenCV Library +-# See http://sourceforge.net/projects/opencvlibrary/ +-#---------------------------------------------------------- +-# +-## 1: Setup: +-# The following variables are optionally searched for defaults +-# OpenCV_DIR: Base directory of OpenCv tree to use. +-# +-## 2: Variable +-# The following are set after configuration is done: +-# +-# OpenCV_FOUND +-# OpenCV_LIBS +-# OpenCV_INCLUDE_DIR +-# OpenCV_VERSION (OpenCV_VERSION_MAJOR, OpenCV_VERSION_MINOR, OpenCV_VERSION_PATCH) +-# +-# +-# Deprecated variable are used to maintain backward compatibility with +-# the script of Jan Woetzel (2006/09): www.mip.informatik.uni-kiel.de/~jw +-# OpenCV_INCLUDE_DIRS +-# OpenCV_LIBRARIES +-# OpenCV_LINK_DIRECTORIES +-# +-## 3: Version +-# +-# 2010/04/07 Benoit Rat, Correct a bug when OpenCVConfig.cmake is not found. +-# 2010/03/24 Benoit Rat, Add compatibility for when OpenCVConfig.cmake is not found. +-# 2010/03/22 Benoit Rat, Creation of the script. +-# +-# +-# tested with: +-# - OpenCV 2.1: MinGW, MSVC2008 +-# - OpenCV 2.0: MinGW, MSVC2008, GCC4 +-# +-# +-## 4: Licence: +-# +-# LGPL 2.1 : GNU Lesser General Public License Usage +-# Alternatively, this file may be used under the terms of the GNU Lesser +- +-# General Public License version 2.1 as published by the Free Software +-# Foundation and appearing in the file LICENSE.LGPL included in the +-# packaging of this file. Please review the following information to +-# ensure the GNU Lesser General Public License version 2.1 requirements +-# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +-# +-#---------------------------------------------------------- +- +- +-find_path(OpenCV_DIR "OpenCVConfig.cmake" /usr/share/OpenCV DOC "Root directory of OpenCV") +- +-##==================================================== +-## Find OpenCV libraries +-##---------------------------------------------------- +-if(EXISTS "${OpenCV_DIR}") +- +- #When its possible to use the Config script use it. +- if(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") +- +- ## Include the standard CMake script +- include("${OpenCV_DIR}/OpenCVConfig.cmake") +- +- ## Search for a specific version +- set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") +- +- #Otherwise it try to guess it. +- else(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") +- +- set(OPENCV_LIB_COMPONENTS cxcore cv ml highgui cvaux) +- find_path(OpenCV_INCLUDE_DIR "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "") +- if(EXISTS ${OpenCV_INCLUDE_DIR}) +- include_directories(${OpenCV_INCLUDE_DIR}) +- endif(EXISTS ${OpenCV_INCLUDE_DIR}) +- +- #Find OpenCV version by looking at cvver.h +- file(STRINGS ${OpenCV_INCLUDE_DIR}/cvver.h OpenCV_VERSIONS_TMP REGEX "^#define CV_[A-Z]+_VERSION[ \t]+[0-9]+$") +- string(REGEX REPLACE ".*#define CV_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MAJOR ${OpenCV_VERSIONS_TMP}) +- string(REGEX REPLACE ".*#define CV_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MINOR ${OpenCV_VERSIONS_TMP}) +- string(REGEX REPLACE ".*#define CV_SUBMINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_PATCH ${OpenCV_VERSIONS_TMP}) +- set(OpenCV_VERSION ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH} CACHE STRING "" FORCE) +- set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") +- +- endif(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") +- +- +- +- +- ## Initiate the variable before the loop +- set(GLOBAL OpenCV_LIBS "") +- set(OpenCV_FOUND_TMP true) +- +- ## Loop over each components +- foreach(__CVLIB ${OPENCV_LIB_COMPONENTS}) +- +- find_library(OpenCV_${__CVLIB}_LIBRARY_DEBUG NAMES "${__CVLIB}${CVLIB_SUFFIX}d" "lib${__CVLIB}${CVLIB_SUFFIX}d" PATHS "${OpenCV_DIR}/lib" NO_DEFAULT_PATH) +- find_library(OpenCV_${__CVLIB}_LIBRARY_RELEASE NAMES "${__CVLIB}${CVLIB_SUFFIX}" "lib${__CVLIB}${CVLIB_SUFFIX}" PATHS "${OpenCV_DIR}/lib" NO_DEFAULT_PATH) +- +- #Remove the cache value +- set(OpenCV_${__CVLIB}_LIBRARY "" CACHE STRING "" FORCE) +- +- #both debug/release +- if(OpenCV_${__CVLIB}_LIBRARY_DEBUG AND OpenCV_${__CVLIB}_LIBRARY_RELEASE) +- set(OpenCV_${__CVLIB}_LIBRARY debug ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} optimized ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) +- #only debug +- elseif(OpenCV_${__CVLIB}_LIBRARY_DEBUG) +- set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} CACHE STRING "" FORCE) +- #only release +- elseif(OpenCV_${__CVLIB}_LIBRARY_RELEASE) +- set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) +- #no library found +- else() +- set(OpenCV_FOUND_TMP false) +- endif() +- +- #Add to the general list +- if(OpenCV_${__CVLIB}_LIBRARY) +- set(OpenCV_LIBS ${OpenCV_LIBS} ${OpenCV_${__CVLIB}_LIBRARY}) +- endif(OpenCV_${__CVLIB}_LIBRARY) +- +- endforeach(__CVLIB) +- +- +- set(OpenCV_FOUND ${OpenCV_FOUND_TMP} CACHE BOOL "" FORCE) +- +- +-else(EXISTS "${OpenCV_DIR}") +- set(ERR_MSG "Please specify OpenCV directory using OpenCV_DIR env. variable") +-endif(EXISTS "${OpenCV_DIR}") +-##==================================================== +- +- +-##==================================================== +-## Print message +-##---------------------------------------------------- +-if(NOT OpenCV_FOUND) +- # make FIND_PACKAGE friendly +- if(NOT OpenCV_FIND_QUIETLY) +- if(OpenCV_FIND_REQUIRED) +- message(FATAL_ERROR "OpenCV required but some headers or libs not found. ${ERR_MSG}") +- else(OpenCV_FIND_REQUIRED) +- message(STATUS "WARNING: OpenCV was not found. ${ERR_MSG}") +- endif(OpenCV_FIND_REQUIRED) +- endif(NOT OpenCV_FIND_QUIETLY) +-endif(NOT OpenCV_FOUND) +-##==================================================== +- +- +-##==================================================== +-## Backward compatibility +-##---------------------------------------------------- +-if(OpenCV_FOUND) +- option(OpenCV_BACKWARD_COMPA "Add some variable to make this script compatible with the other version of FindOpenCV.cmake" false) +- if(OpenCV_BACKWARD_COMPA) +- find_path(OpenCV_INCLUDE_DIRS "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") +- find_path(OpenCV_INCLUDE_DIR "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") +- set(OpenCV_LIBRARIES "${OpenCV_LIBS}" CACHE STRING "" FORCE) +- endif(OpenCV_BACKWARD_COMPA) +-endif(OpenCV_FOUND) +-##==================================================== +-- +2.26.2 + diff --git a/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild b/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild index 70aa2285270..3b63da93513 100644 --- a/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild +++ b/sci-libs/libgeodecomp/libgeodecomp-0.5.0_pre20201009.ebuild @@ -42,7 +42,10 @@ DEPEND="${RDEPEND} S="${WORKDIR}/libgeodecomp-${MY_COMMIT}" -PATCHES=( "${FILESDIR}/${P}-mpi.patch" ) +PATCHES=( + "${FILESDIR}/${P}-mpi.patch" + "${FILESDIR}/${P}-opencv.patch" +) DOCS=( README )