From 9190519e981286d8331e11e041ab745c1cfdf277 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Sat, 21 May 2011 13:48:45 +0000 Subject: [PATCH] 1.) Run in place feature: If everything fails, try with source path 2.) Read the PATCH_VERSION from configure.ac too 3.) Ident-text in script git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38804 a592a061-630c-0410-9148-cb99ea01b6c8 --- CMakeLists.txt | 4 ++-- development/cmake/doc/CMakeLists.txt | 3 --- development/cmake/doc/ReplaceValues.py | 10 ++++++++++ src/support/Package.cpp | 13 +++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4571bcab1e..2614e8a992 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,10 +210,10 @@ foreach(_c_l ${_config_lines} ) setstripped(PACKAGE_BASE ${CMAKE_MATCH_1}) setstripped(PACKAGE_VERSION ${CMAKE_MATCH_2}) setstripped(PACKAGE_BUGREPORT ${CMAKE_MATCH_3}) - if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\).*$") + if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\)?.*$") set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1}) set(LYX_MINOR_VERSION ${CMAKE_MATCH_2}) - set(LYX_PATCH_VERSION 0) # TODO 2.1.0svn, LYX_PATCH_VERSION == 0 + set(LYX_PATCH_VERSION ${CMAKE_MATCH_4}) # TODO 2.1.0svn, LYX_PATCH_VERSION == 0 set(LYX_DIR_VER "LYX_DIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x") set(LYX_USERDIR_VER "LYX_USERDIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x") set(LYX_INSTALL_SUFFIX "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}") diff --git a/development/cmake/doc/CMakeLists.txt b/development/cmake/doc/CMakeLists.txt index 82db821d3f..6f40f383cf 100644 --- a/development/cmake/doc/CMakeLists.txt +++ b/development/cmake/doc/CMakeLists.txt @@ -7,9 +7,6 @@ project(doc) -#TODO: replace perl script with python, see scons: -# http://www.lyx.org/trac/browser/lyx-devel/trunk/development/scons/scons_utils.py - SET(_docs) file(GLOB_RECURSE _rel_lyx_docs RELATIVE "${TOP_SRC_DIR}/lib/doc" "${TOP_SRC_DIR}/lib/doc/*.lyx" "${TOP_SRC_DIR}/lib/doc/*.txt") diff --git a/development/cmake/doc/ReplaceValues.py b/development/cmake/doc/ReplaceValues.py index 1dcb8f2a4c..a25972c59d 100755 --- a/development/cmake/doc/ReplaceValues.py +++ b/development/cmake/doc/ReplaceValues.py @@ -1,4 +1,14 @@ #! /usr/bin/env python + +# file ReplaceValues.py +# +# This file is part of LyX, the document processor. +# Licence details can be found in the file COPYING. +# +# author: Kornel Benko, kornel@lyx.org +# +# Syntax: ReplaceValues.py [= [= ...]] [ ...] + import sys import re diff --git a/src/support/Package.cpp b/src/support/Package.cpp index ec08a55b7b..f21c976dd2 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -573,6 +573,19 @@ get_system_support_dir(FileName const & abs_binary, if (!fileSearch(path.absFileName(), chkconfig_ltx).empty()) return path; +#if defined(LYX_ABS_TOP_SRCDIR) + { + string const dir = fix_dir_name(LYX_ABS_TOP_SRCDIR); + path = makeAbsPath(dir); + FileName path2(addPath(path.absFileName(), "lib")); + searched_dirs.push_back(path2); + FileName const abs_path = fileSearch(path2.absFileName(), chkconfig_ltx); + if (! abs_path.empty()) { + return path2; + } + } + +#endif // Everything has failed :-( // So inform the user and exit. string searched_dirs_str; -- 2.39.2