Author: kornel
Date: Sat May 21 15:48:45 2011
New Revision: 38804
URL: http://www.lyx.org/trac/changeset/38804
Log:
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
Modified:
lyx-devel/trunk/CMakeLists.txt
lyx-devel/trunk/development/cmake/doc/CMakeLists.txt
lyx-devel/trunk/development/cmake/doc/ReplaceValues.py
lyx-devel/trunk/src/support/Package.cpp
Modified: lyx-devel/trunk/CMakeLists.txt
==============================================================================
--- lyx-devel/trunk/CMakeLists.txt Sat May 21 14:26:05 2011 (r38803)
+++ lyx-devel/trunk/CMakeLists.txt Sat May 21 15:48:45 2011 (r38804)
@@ -210,10 +210,10 @@
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}")
Modified: lyx-devel/trunk/development/cmake/doc/CMakeLists.txt
==============================================================================
--- lyx-devel/trunk/development/cmake/doc/CMakeLists.txt Sat May 21
14:26:05 2011 (r38803)
+++ lyx-devel/trunk/development/cmake/doc/CMakeLists.txt Sat May 21
15:48:45 2011 (r38804)
@@ -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")
Modified: lyx-devel/trunk/development/cmake/doc/ReplaceValues.py
==============================================================================
--- lyx-devel/trunk/development/cmake/doc/ReplaceValues.py Sat May 21
14:26:05 2011 (r38803)
+++ lyx-devel/trunk/development/cmake/doc/ReplaceValues.py Sat May 21
15:48:45 2011 (r38804)
@@ -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, [email protected]
+#
+# Syntax: ReplaceValues.py [<var1>=<Subst1> [<var2>=<Subst> ...]] <Inputfile>
[<Inputfile> ...]
+
import sys
import re
Modified: lyx-devel/trunk/src/support/Package.cpp
==============================================================================
--- lyx-devel/trunk/src/support/Package.cpp Sat May 21 14:26:05 2011
(r38803)
+++ lyx-devel/trunk/src/support/Package.cpp Sat May 21 15:48:45 2011
(r38804)
@@ -573,6 +573,19 @@
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;