]> git.lyx.org Git - features.git/commitdiff
1.) Run in place feature: If everything fails, try with source path
authorKornel Benko <kornel@lyx.org>
Sat, 21 May 2011 13:48:45 +0000 (13:48 +0000)
committerKornel Benko <kornel@lyx.org>
Sat, 21 May 2011 13:48:45 +0000 (13:48 +0000)
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
development/cmake/doc/CMakeLists.txt
development/cmake/doc/ReplaceValues.py
src/support/Package.cpp

index 4571bcab1e774db94ce67d196fa9b72bebbe7a5c..2614e8a9928d71423e4b1bbaf1c84c5e43ed4073 100644 (file)
@@ -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}")
index 82db821d3fe0baa6b633e37311a7487ba1a6466b..6f40f383cf6378a1dee9cb1b38c89314b415468f 100644 (file)
@@ -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")
 
index 1dcb8f2a4cb03505d9a66bb6e0c12cff85439f05..a25972c59da520551698a1b908183646444e170a 100755 (executable)
@@ -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 [<var1>=<Subst1> [<var2>=<Subst> ...]] <Inputfile> [<Inputfile> ...]
+
 import sys
 import re
 
index ec08a55b7be91ff6058a6185a83ecea416f662f5..f21c976dd2389e0a54314136695510547b505b64 100644 (file)
@@ -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;