[texworks] 52/73: Imported Debian patch 0.5~svn1363-5
This is an automated email from the git hooks/post-receive script.
preining pushed a commit to branch master
in repository texworks.
commit 0d72f712e07a6e375964658c2dc9aa2ab13db97b
Author: Atsuhito KOHDA <kohda@debian.org>
Date: Tue Jul 8 15:07:38 2014 +0900
Imported Debian patch 0.5~svn1363-5
---
CMake/Modules/FindSynctex.cmake | 51 ++++++++++++++++++
CMakeLists.txt | 10 ++++
debian/changelog | 7 +++
debian/control | 2 +-
debian/patch-synctex | 115 ++++++++++++++++++++++++++++++++++++++++
src/CMakeLists.txt | 8 +++
src/PDFDocument.h | 2 +-
7 files changed, 193 insertions(+), 2 deletions(-)
diff --git a/CMake/Modules/FindSynctex.cmake b/CMake/Modules/FindSynctex.cmake
new file mode 100644
index 0000000..a807d43
--- /dev/null
+++ b/CMake/Modules/FindSynctex.cmake
@@ -0,0 +1,51 @@
+# - Try to find Synctex
+# Once done this will define
+#
+# SYNCTEX_FOUND - system has Synctex
+# SYNCTEX_INCLUDE_DIR - the Fontconfig include directory
+# SYNCTEX_LIBRARIES - Link these to use Sycntex
+#
+# Redistribution and use of this file is allowed according to the terms of the
+# MIT license. For details see the file COPYING-CMAKE-MODULES.
+
+
+if ( SYNCTEX_INCLUDE_DIR AND SYNCTEX_LIBRARIES )
+ # in cache already
+ SET(Synctex_FIND_QUIETLY TRUE)
+endif ( SYNCTEX_INCLUDE_DIR AND SYNCTEX_LIBRARIES )
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+if( NOT WIN32 )
+ find_package(PkgConfig)
+
+ pkg_check_modules(SYNCTEX_PKG QUIET synctex)
+endif( NOT WIN32 )
+
+FIND_PATH(SYNCTEX_INCLUDE_DIR NAMES synctex_parser.h
+ PATHS
+ /usr/local/include/synctex_parser
+ /usr/X11/include/synctex_parser
+ /usr/include/synctex_parser
+ HINTS
+ ${SYNCTEX_PKG_INCLUDE_DIRS} # Generated by pkg-config
+)
+
+FIND_LIBRARY(SYNCTEX_LIBRARIES NAMES synctex ${SYNCTEX_PKG_LIBRARIES}
+ PATHS
+ /usr/local
+ /usr/X11
+ /usr
+ HINTS
+ ${SYNCTEX_PKG_LIBRARY_DIRS} # Generated by pkg-config
+ PATH_SUFFIXES
+ lib64
+ lib
+)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Synctex DEFAULT_MSG SYNCTEX_LIBRARIES SYNCTEX_INCLUDE_DIR)
+
+# show the SYNCTEX_INCLUDE_DIR and SYNCTEX_LIBRARIES variables only in the advanced view
+MARK_AS_ADVANCED(SYNCTEX_INCLUDE_DIR SYNCTEX_LIBRARIES )
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8417ae0..4ac3a21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -221,6 +221,7 @@ INCLUDE( TranslationMacros )
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(Hunspell REQUIRED)
FIND_PACKAGE(Poppler REQUIRED)
+FIND_PACKAGE(Synctex)
# The only thing Poppler should need is the location of the include directories
# in order to access header files. The library loader should be able to find
@@ -241,6 +242,10 @@ IF ( POPPLER_NEEDS_FONTCONFIG )
LIST(APPEND TeXworks_INCLUDE_DIRS ${FONTCONFIG_INCLUDE_DIR})
ENDIF ()
+IF ( SYNCTEX_FOUND )
+ LIST(APPEND TeXworks_INCLUDE_DIRS ${SYNCTEX_INCLUDE_DIR})
+ENDIF ()
+
SET(TeXworks_LIB_DIRS ${QT_LIBRARY_DIR})
set(TEXWORKS_ADDITIONAL_LIBS "" CACHE STRING "Additional libraries not found by CMake")
@@ -255,6 +260,11 @@ SET(TeXworks_LIBS
${TEXWORKS_ADDITIONAL_LIBS}
)
+IF ( SYNCTEX_FOUND )
+ LIST(APPEND TeXworks_LIBS ${SYNCTEX_LIBRARIES})
+ENDIF ()
+
+
# Configure Optional Dependencies
# -------------------------------
diff --git a/debian/changelog b/debian/changelog
index 6843e84..a1c1b4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+texworks (0.5~svn1363-5) unstable; urgency=medium
+
+ * Modify to use the shared library for synctex. Thanks to Sebastian Ramacher
+ <sramacher AT debian.org> (Closes: #753818)
+
+ -- Atsuhito KOHDA <kohda@debian.org> Tue, 08 Jul 2014 15:07:38 +0900
+
texworks (0.5~svn1363-4) unstable; urgency=medium
* Enabled parallel building. Thanks to Pino Toscano <pino AT debian.org>.
diff --git a/debian/control b/debian/control
index b23fe79..648180d 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: texworks
Section: editors
Priority: extra
Maintainer: Atsuhito KOHDA <kohda@debian.org>
-Build-Depends: debhelper (>= 7), pkg-config, cmake (>= 2.8.6), libhunspell-dev, libqt4-dev, libpoppler-qt4-dev, liblua5.2-dev, python-dev, zlib1g-dev
+Build-Depends: debhelper (>= 7), pkg-config, cmake (>= 2.8.6), libhunspell-dev, libqt4-dev, libpoppler-qt4-dev, liblua5.2-dev, python-dev, zlib1g-dev, libsynctex-dev
Standards-Version: 3.9.5
Homepage: http://www.tug.org/texworks/
diff --git a/debian/patch-synctex b/debian/patch-synctex
new file mode 100644
index 0000000..8b7ff11
--- /dev/null
+++ b/debian/patch-synctex
@@ -0,0 +1,115 @@
+--- texworks-0.5~svn1363.orig/CMake/Modules/FindSynctex.cmake
++++ texworks-0.5~svn1363/CMake/Modules/FindSynctex.cmake
+@@ -0,0 +1,51 @@
++# - Try to find Synctex
++# Once done this will define
++#
++# SYNCTEX_FOUND - system has Synctex
++# SYNCTEX_INCLUDE_DIR - the Fontconfig include directory
++# SYNCTEX_LIBRARIES - Link these to use Sycntex
++#
++# Redistribution and use of this file is allowed according to the terms of the
++# MIT license. For details see the file COPYING-CMAKE-MODULES.
++
++
++if ( SYNCTEX_INCLUDE_DIR AND SYNCTEX_LIBRARIES )
++ # in cache already
++ SET(Synctex_FIND_QUIETLY TRUE)
++endif ( SYNCTEX_INCLUDE_DIR AND SYNCTEX_LIBRARIES )
++
++# use pkg-config to get the directories and then use these values
++# in the FIND_PATH() and FIND_LIBRARY() calls
++if( NOT WIN32 )
++ find_package(PkgConfig)
++
++ pkg_check_modules(SYNCTEX_PKG QUIET synctex)
++endif( NOT WIN32 )
++
++FIND_PATH(SYNCTEX_INCLUDE_DIR NAMES synctex_parser.h
++ PATHS
++ /usr/local/include/synctex_parser
++ /usr/X11/include/synctex_parser
++ /usr/include/synctex_parser
++ HINTS
++ ${SYNCTEX_PKG_INCLUDE_DIRS} # Generated by pkg-config
++)
++
++FIND_LIBRARY(SYNCTEX_LIBRARIES NAMES synctex ${SYNCTEX_PKG_LIBRARIES}
++ PATHS
++ /usr/local
++ /usr/X11
++ /usr
++ HINTS
++ ${SYNCTEX_PKG_LIBRARY_DIRS} # Generated by pkg-config
++ PATH_SUFFIXES
++ lib64
++ lib
++)
++
++include(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(Synctex DEFAULT_MSG SYNCTEX_LIBRARIES SYNCTEX_INCLUDE_DIR)
++
++# show the SYNCTEX_INCLUDE_DIR and SYNCTEX_LIBRARIES variables only in the advanced view
++MARK_AS_ADVANCED(SYNCTEX_INCLUDE_DIR SYNCTEX_LIBRARIES )
++
+--- texworks-0.5~svn1363.orig/CMakeLists.txt
++++ texworks-0.5~svn1363/CMakeLists.txt
+@@ -221,6 +221,7 @@
+ FIND_PACKAGE(ZLIB REQUIRED)
+ FIND_PACKAGE(Hunspell REQUIRED)
+ FIND_PACKAGE(Poppler REQUIRED)
++FIND_PACKAGE(Synctex)
+
+ # The only thing Poppler should need is the location of the include directories
+ # in order to access header files. The library loader should be able to find
+@@ -241,6 +242,10 @@
+ LIST(APPEND TeXworks_INCLUDE_DIRS ${FONTCONFIG_INCLUDE_DIR})
+ ENDIF ()
+
++IF ( SYNCTEX_FOUND )
++ LIST(APPEND TeXworks_INCLUDE_DIRS ${SYNCTEX_INCLUDE_DIR})
++ENDIF ()
++
+ SET(TeXworks_LIB_DIRS ${QT_LIBRARY_DIR})
+
+ set(TEXWORKS_ADDITIONAL_LIBS "" CACHE STRING "Additional libraries not found by CMake")
+@@ -255,6 +260,11 @@
+ ${TEXWORKS_ADDITIONAL_LIBS}
+ )
+
++IF ( SYNCTEX_FOUND )
++ LIST(APPEND TeXworks_LIBS ${SYNCTEX_LIBRARIES})
++ENDIF ()
++
++
+ # Configure Optional Dependencies
+ # -------------------------------
+
+--- texworks-0.5~svn1363.orig/src/CMakeLists.txt
++++ texworks-0.5~svn1363/src/CMakeLists.txt
+@@ -21,6 +21,14 @@
+ LIST(APPEND TEXWORKS_SRCS ${TEXWORKS_WIN_RCS})
+ ENDIF ( WIN32 )
+
++IF ( SYNCTEX_FOUND )
++ FILE(GLOB SYNCTEX_SRCS "synctex_*.c")
++ FILE(GLOB SYNCTEX_HDRS "synctex_*.h")
++
++ LIST(REMOVE_ITEM TEXWORKS_SRCS ${SYNCTEX_SRCS})
++ LIST(REMOVE_ITEM TEXWORKS_HDRS ${SYNCTEX_HDRS})
++ENDIF ( SYNCTEX_FOUND )
++
+ # These source files along with the `.moc` files generated from some headers
+ # form the TeXworks scripting API. We export them to variables in the
+ # `PARENT_SCOPE` (top level CMake file) so that they will be available to the
+--- texworks-0.5~svn1363.orig/src/PDFDocument.h
++++ texworks-0.5~svn1363/src/PDFDocument.h
+@@ -40,7 +40,7 @@
+ #else
+ #include "poppler-qt5.h"
+ #endif
+-#include "synctex_parser.h"
++#include <synctex_parser.h>
+
+ #include "ui_PDFDocument.h"
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9cfc6ee..81da447 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -21,6 +21,14 @@ IF ( WIN32 )
LIST(APPEND TEXWORKS_SRCS ${TEXWORKS_WIN_RCS})
ENDIF ( WIN32 )
+IF ( SYNCTEX_FOUND )
+ FILE(GLOB SYNCTEX_SRCS "synctex_*.c")
+ FILE(GLOB SYNCTEX_HDRS "synctex_*.h")
+
+ LIST(REMOVE_ITEM TEXWORKS_SRCS ${SYNCTEX_SRCS})
+ LIST(REMOVE_ITEM TEXWORKS_HDRS ${SYNCTEX_HDRS})
+ENDIF ( SYNCTEX_FOUND )
+
# These source files along with the `.moc` files generated from some headers
# form the TeXworks scripting API. We export them to variables in the
# `PARENT_SCOPE` (top level CMake file) so that they will be available to the
diff --git a/src/PDFDocument.h b/src/PDFDocument.h
index f0c04e9..24b42dc 100644
--- a/src/PDFDocument.h
+++ b/src/PDFDocument.h
@@ -40,7 +40,7 @@
#else
#include "poppler-qt5.h"
#endif
-#include "synctex_parser.h"
+#include <synctex_parser.h>
#include "ui_PDFDocument.h"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texworks.git
Reply to: