[Kmymoney-devel] Problems transitioning MacPorts' port kmymoney4-devel to git...

Marko Käning mk-lists at email.de
Wed Nov 16 19:10:08 UTC 2011


As a temporary solution to the problem I simply use this patch:
---
--- kmymoney/CMakeLists.txt 2011-11-16 19:34:20.000000000 +0100
+++ kmymoney/CMakeLists.txt.new 2011-11-16 19:36:03.000000000 +0100
@@ -40,21 +40,7 @@
   SET(ENV{LANG} ${LANG})
 ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn)

-# Determine the GIT reference (if we're based on GIT)
-IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
-  # make sure we don't use translated messages here
-  SET(LANG $ENV{LANG})
-  SET(ENV{LANG} "C")
-  EXECUTE_PROCESS(COMMAND git log -1 COMMAND head -n 1 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE BRANCH)
-  # extract branch name
-  STRING(REGEX MATCH "commit ([^$]+)" BRANCH "${BRANCH}")
-  SET(BRANCH ${CMAKE_MATCH_1})
-  # and use the first 10 chars of the commit id
-  STRING(SUBSTRING ${BRANCH} 0 10 BRANCH)
-  SET(VERSION_SUFFIX "-${BRANCH}")
-  # switch back to the original language setting
-  SET(ENV{LANG} ${LANG})
-ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
+SET(VERSION_SUFFIX "-GIT")

 ######################### General Requirements ##########################
---
which eliminates the whole code involving interaction with git.

Since the information concerning the actually installed version of kmymoney4-devel can be seen with "port installed kmymoney4-devel" I don't need more precise info in that VERSION_SUFFIX.


More information about the KMyMoney-devel mailing list