summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2012-09-20 22:39:14 +1000
committerMichael Palimaka <kensington@gentoo.org>2012-09-20 22:39:14 +1000
commit88e400f0f192a13fcf44547cf65143ad617ba314 (patch)
treed6171b4ce0c748c3ff64668ad197b1ca97c6b9ad
parent7aa005a70124b876254b9edf618435020935a9cd (diff)
downloadkde-88e400f0f192a13fcf44547cf65143ad617ba314.tar.gz
kde-88e400f0f192a13fcf44547cf65143ad617ba314.tar.bz2
kde-88e400f0f192a13fcf44547cf65143ad617ba314.zip
[sys-auth/pam-face-authentication] Add hacks to build with newer versions of OpenCV wrt bug #435302.
(Portage version: 2.1.11.16/git/Linux x86_64, unsigned Manifest commit)
-rw-r--r--sys-auth/pam-face-authentication/files/pam-face-authentication-0.3-opencv.patch23
-rw-r--r--sys-auth/pam-face-authentication/pam-face-authentication-0.3.ebuild15
2 files changed, 33 insertions, 5 deletions
diff --git a/sys-auth/pam-face-authentication/files/pam-face-authentication-0.3-opencv.patch b/sys-auth/pam-face-authentication/files/pam-face-authentication-0.3-opencv.patch
new file mode 100644
index 00000000000..5597b1c3f80
--- /dev/null
+++ b/sys-auth/pam-face-authentication/files/pam-face-authentication-0.3-opencv.patch
@@ -0,0 +1,23 @@
+Fixes build with newer versions of OpenCV.
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -88,7 +88,7 @@
+
+ INCLUDE_DIRECTORIES( "${CMAKE_SOURCE_DIR}/include" )
+ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
+-INCLUDE_DIRECTORIES(${OPENCV_INCLUDE_DIR})
++INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
+ INCLUDE_DIRECTORIES(${PAM_INCLUDE_DIR})
+ ADD_LIBRARY(pam_face_authentication SHARED ${PAM_FACE_AUTHENTICATE_SRCS})
+ SET_TARGET_PROPERTIES( pam_face_authentication PROPERTIES PREFIX "")
+@@ -96,8 +96,8 @@
+ TARGET_LINK_LIBRARIES( xwindowFaceAuth ${X11_LIBRARIES})
+
+ ADD_EXECUTABLE( qt-facetrainer ${QT_FACETRAINER_SRCS} ${QT_FACETRAINER_MOC_SRCS} ${QT_FACETRAINER_RC_SRCS} ${QT_FACETRAINER_UI_HDRS} )
+-TARGET_LINK_LIBRARIES( pam_face_authentication ${PAM_LIBRARIES} ${OPENCV_LIBRARIES})
+-TARGET_LINK_LIBRARIES( qt-facetrainer ${QT_LIBRARIES} ${OPENCV_LIBRARIES})
++TARGET_LINK_LIBRARIES( pam_face_authentication ${PAM_LIBRARIES} ${OpenCV_LIBS})
++TARGET_LINK_LIBRARIES( qt-facetrainer ${QT_LIBRARIES} ${OpenCV_LIBS})
+
+ if( UNIX AND NOT APPLE )
+ if( NOT DESKTOP_ENTRY )
diff --git a/sys-auth/pam-face-authentication/pam-face-authentication-0.3.ebuild b/sys-auth/pam-face-authentication/pam-face-authentication-0.3.ebuild
index c8b212f4886..b50a627477b 100644
--- a/sys-auth/pam-face-authentication/pam-face-authentication-0.3.ebuild
+++ b/sys-auth/pam-face-authentication/pam-face-authentication-0.3.ebuild
@@ -4,7 +4,7 @@
EAPI=4
-inherit cmake-utils
+inherit cmake-utils eutils
DESCRIPTION="This is Pluggable Authentication Module for Face based Authentication"
HOMEPAGE="http://code.google.com/p/pam-face-authentication/"
@@ -22,8 +22,13 @@ DEPEND="
"
RDEPEND="${DEPEND}"
-PATCHES=(
- "${FILESDIR}/${PN}-0.3-cmake.patch"
-)
+DOCS=( AUTHORS ChangeLog README )
-DOCS=(AUTHORS ChangeLog README)
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.3-cmake.patch
+ epatch "${FILESDIR}"/${PN}-0.3-opencv.patch
+
+ cp /usr/share/OpenCV/OpenCVConfig.cmake cmake/modules/FindOpenCV.cmake || die
+ sed -i cmake/modules/FindOpenCV.cmake \
+ -e 's:${OpenCV_INSTALL_PATH}:/usr:' || die
+}