head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.4 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.2 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q1:1.1.0.2 pkgsrc-2012Q1-base:1.1; locks; strict; comment @# @; 1.2 date 2012.04.15.05.54.53; author markd; state dead; branches; next 1.1; 1.1 date 2012.03.22.22.08.30; author markd; state Exp; branches; next ; desc @@ 1.2 log @Update KDE SC to 4.8.2 bugfixes. @ text @$NetBSD: patch-cmake_modules_FindXine.cmake,v 1.1 2012/03/22 22:08:30 markd Exp $ Starting with the recently released version 1.2.0, xine has its version number macros in xine/version.h instead of xine.h itself. Account for this case by checking if xine/version.h exists and falling back to xine.h if it doesn't when reading the version numbers. --- cmake/modules/FindXine.cmake.orig 2012-01-18 18:06:22.000000000 +0000 +++ cmake/modules/FindXine.cmake @@@@ -47,7 +47,13 @@@@ FIND_PROGRAM(XINECONFIG_EXECUTABLE NAMES # Get the version number from xine.h and store it in the cache: IF(XINE_INCLUDE_DIR AND NOT XINE_VERSION) - FILE(READ ${XINE_INCLUDE_DIR}/xine.h XINE_VERSION_CONTENT) + IF(EXISTS ${XINE_INCLUDE_DIR}/xine/version.h) # xine 1.2.0+ + SET(XINE_VERSION_FILE ${XINE_INCLUDE_DIR}/xine/version.h) + ELSE(EXISTS ${XINE_INCLUDE_DIR}/xine/version.h) + SET(XINE_VERSION_FILE ${XINE_INCLUDE_DIR}/xine.h) + ENDIF(EXISTS ${XINE_INCLUDE_DIR}/xine/version.h) + + FILE(READ ${XINE_VERSION_FILE} XINE_VERSION_CONTENT) STRING(REGEX MATCH "#define *XINE_MAJOR_VERSION *([0-9]+)" _dummy "${XINE_VERSION_CONTENT}") SET(XINE_VERSION_MAJOR "${CMAKE_MATCH_1}") @ 1.1 log @Detect the version of recent xine's that have moved the version number macros to xine/version.h @ text @d1 1 a1 1 $NetBSD$ @