The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit c02c03ce8111d1d920ed65f61b7f538aee2fcd20
Author: Julien Rioux <[email protected]>
Date:   Tue May 14 11:09:55 2013 +0200

    Finally also fix #6986 for autotools out-of-source builds.

diff --git a/lib/configure.py b/lib/configure.py
index d6537e2..f219713 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -648,18 +648,20 @@ def checkConverterEntries():
     checkLuatex()
 
     # Look for tex2lyx in this order (see bugs #3308 and #6986):
-    #   1)  If we're running LyX in-place then tex2lyx will be found
-    #       in ../src/tex2lyx with respect to the srcdir.
-    #   2)  If LyX was configured with a version suffix then tex2lyx
+    #   1)  If we're building LyX with autotools then tex2lyx is found
+    #       in the subdirectory tex2lyx with respect to the binary dir.
+    #   2)  If we're building LyX with cmake then tex2lyx is found
+    #       in the binary dir.
+    #   3)  If LyX was configured with a version suffix then tex2lyx
     #       will also have this version suffix.
-    #   3)  Otherwise always use tex2lyx.
-    in_place = os.path.join(srcdir, '..', 'src', 'tex2lyx', 'tex2lyx')
-    in_place = os.path.abspath(in_place)
+    #   4)  Otherwise always use tex2lyx.
+    in_binary_subdir = os.path.join(lyx_binary_dir, 'tex2lyx', 'tex2lyx')
+    in_binary_subdir = os.path.abspath(in_binary_subdir)
 
     in_binary_dir = os.path.join(lyx_binary_dir, 'tex2lyx')
     in_binary_dir = os.path.abspath(in_binary_dir)
 
-    path, t2l = checkProg('a LaTeX/Noweb -> LyX converter', [in_place, 
in_place + version_suffix, in_binary_dir, in_binary_dir + version_suffix, 
'tex2lyx' + version_suffix, 'tex2lyx'],
+    path, t2l = checkProg('a LaTeX/Noweb -> LyX converter', [in_binary_subdir, 
in_binary_subdir + version_suffix, in_binary_dir, in_binary_dir + 
version_suffix, 'tex2lyx' + version_suffix, 'tex2lyx'],
         rc_entry = [r'''\converter latex      lyx        "%% -f $$i $$o"       
""
 \converter literate   lyx        "%% -n -m noweb -f $$i $$o"   ""'''], 
not_found = 'tex2lyx')
     if path == '':

commit ef04549d8d0337573d5d856929a108c3132f93b7
Author: Julien Rioux <[email protected]>
Date:   Mon Feb 4 15:45:14 2013 +0100

    configure.py: Check path accessibility before call to os.path.isfile.
    
    If you have an unmounted dir, ac_dir, in your PATH, the call to
    
    os.path.isfile( os.path.join(ac_dir, ac_word + ext) )
    
    hangs. This is probably a python bug, but the result of configure.py
    hanging and LyX freezing is really bad, hence this workaround.
    
    According to the python docs, MacOS doesn't provide os.access();
    the hasattr protection is used for this reason.

diff --git a/lib/configure.py b/lib/configure.py
index 78983e3..d6537e2 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -198,6 +198,8 @@ def checkProg(description, progs, rc_entry = [], path = [], 
not_found = ''):
         if "PATHEXT" in os.environ:
             extlist = extlist + os.environ["PATHEXT"].split(os.pathsep)
         for ac_dir in path:
+            if hasattr(os, "access") and not os.access(ac_dir, os.F_OK):
+                continue
             for ext in extlist:
                 if os.path.isfile( os.path.join(ac_dir, ac_word + ext) ):
                     logger.info(msg + ' yes')
@@ -252,6 +254,8 @@ def checkProgAlternatives(description, progs, rc_entry = 
[], alt_rc_entry = [],
             extlist = extlist + os.environ["PATHEXT"].split(os.pathsep)
         found_alt = False
         for ac_dir in path:
+            if hasattr(os, "access") and not os.access(ac_dir, os.F_OK):
+                continue
             for ext in extlist:
                 if os.path.isfile( os.path.join(ac_dir, ac_word + ext) ):
                     logger.info(msg + ' yes')

commit ebddec15de6c4c807c18f6dac2b4f0cc94c3b642
Author: Kornel Benko <[email protected]>
Date:   Tue May 14 11:17:50 2013 +0200

    Add test for Layout::write() on cmake too
    (For now runns only on unix platforms using gcc)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ac0ca1a..07541ba 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -185,3 +185,4 @@ if(LYX_BUNDLE)
                        fixup_bundle(\"${installed_lyx}\" \"\" \"\") " 
COMPONENT RUNTIME)
 endif()
 
+add_subdirectory(tests)
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
new file mode 100644
index 0000000..5ba9f3d
--- /dev/null
+++ b/src/tests/CMakeLists.txt
@@ -0,0 +1,28 @@
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# Copyright (c) 2013 Kornel Benko [email protected]
+#
+
+set(check_Layout_SOURCES)
+foreach(_f insets/InsetLayout.cpp Color.cpp Counters.cpp Floating.cpp
+       FloatList.cpp FontInfo.cpp Layout.cpp LayoutFile.cpp Lexer.cpp
+       ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_Layout.cpp
+       support/tests/boost.cpp support/tests/dummy_functions.cpp)
+  list(APPEND check_Layout_SOURCES "${TOP_SRC_DIR}/src/${_f}")
+endforeach()
+
+add_definitions(-DNO_LAYOUT_CSS)
+add_executable(check_Layout ${check_Layout_SOURCES})
+set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} 
-Wl,--allow-multiple-definition")
+target_link_libraries(check_Layout support ${QT_QTMAIN_LIBRARY})
+add_dependencies(lyx_run_tests check_Layout)
+
+file(GLOB layout_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" 
"${TOP_SRC_DIR}/lib/layouts/*.layout")
+list(SORT layout_files)
+foreach(bns ${layout_files}) 
+  string(REPLACE ".layout" "" bn ${bns})
+
+  add_test(NAME "check_Layout/${bns}"
+    COMMAND check_Layout "${TOP_SRC_DIR}/lib/layouts/${bn}")
+endforeach()

-----------------------------------------------------------------------

Summary of changes:
 lib/configure.py         |   20 +++++++++++++-------
 src/CMakeLists.txt       |    1 +
 src/tests/CMakeLists.txt |   28 ++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 7 deletions(-)
 create mode 100644 src/tests/CMakeLists.txt


hooks/post-receive
-- 
Repository for new features

Reply via email to