From f51eb6768bacc50ccf7496292f3f6b9c58c1579ef5e1d42909a00ba47493259a Mon Sep 17 00:00:00 2001 From: Ana Guerrero Date: Tue, 28 Jan 2025 15:10:05 +0000 Subject: [PATCH] Drop python2 requirement - it is dropped from Factory OBS-URL: https://build.opensuse.org/package/show/Publishing/texworks?expand=0&rev=28 --- .gitattributes | 23 ++ .gitignore | 1 + texworks-0.6.9.tar.gz | 3 + texworks-cmake-find-python.patch | 124 ++++++ texworks-python-plugin-buildfix.patch | 111 ++++++ texworks.changes | 548 ++++++++++++++++++++++++++ texworks.spec | 149 +++++++ 7 files changed, 959 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 texworks-0.6.9.tar.gz create mode 100644 texworks-cmake-find-python.patch create mode 100644 texworks-python-plugin-buildfix.patch create mode 100644 texworks.changes create mode 100644 texworks.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/texworks-0.6.9.tar.gz b/texworks-0.6.9.tar.gz new file mode 100644 index 0000000..c10ecc9 --- /dev/null +++ b/texworks-0.6.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0c8e4b9f2fbb38f681b9d91f331366e5cdcb35dba7a94cb2988ccfca113ac2b +size 12505487 diff --git a/texworks-cmake-find-python.patch b/texworks-cmake-find-python.patch new file mode 100644 index 0000000..30092ac --- /dev/null +++ b/texworks-cmake-find-python.patch @@ -0,0 +1,124 @@ +From dae1586af7a218e9bbe9ce3031a97e8efcac980a Mon Sep 17 00:00:00 2001 +From: Atri Bhattacharya +Date: Thu, 15 Feb 2024 20:03:50 +0100 +Subject: [PATCH] Fix finding Python with CMake >= 3.27 (fixes #1039) + +--- + CMakeLists.txt | 38 ++++++++++++++--------- + plugins-src/TWPythonPlugin/CMakeLists.txt | 4 +-- + src/CMakeLists.txt | 4 +-- + 3 files changed, 28 insertions(+), 18 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f245e5192..9682c3933 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -326,17 +326,27 @@ ENDIF() + + IF ( WITH_PYTHON ) + IF ( USE_SYSTEM_PYTHON ) +- SET(PYTHON_LIBRARIES "-F/System/Library/Frameworks -framework Python" CACHE PATH "Python library.") +- SET(PYTHON_INCLUDE_DIR "/System/Library/Framework/Python.framework/Headers" CACHE PATH "Python framework.") +- MARK_AS_ADVANCED(PYTHON_LIBRARIES) +- MARK_AS_ADVANCED(PYTHON_INCLUDE_DIR) +- SET(PYTHONLIBS_FOUND TRUE) ++ SET(Python_LIBRARIES "-F/System/Library/Frameworks -framework Python" CACHE PATH "Python library.") ++ SET(Python_INCLUDE_DIR "/System/Library/Framework/Python.framework/Headers" CACHE PATH "Python framework.") ++ MARK_AS_ADVANCED(Python_LIBRARIES) ++ MARK_AS_ADVANCED(Python_INCLUDE_DIR) ++ SET(Python_Interpreter_FOUND TRUE) ++ SET(Python_Development_FOUND TRUE) + ELSE () +- # **NOTE** +- # In order to find the correct version of 'PythonLibs', it seems that we need to run 'FIND_PACKAGE(PythonInterp)' firstly. +- # In order to find the correct version of 'PythonInterp', we need to set 'PYTHONHOME' environment variable +- FIND_PACKAGE(PythonInterp) +- FIND_PACKAGE(PythonLibs) ++ IF (CMAKE_VERSION VERSION_LESS "3.12") ++ # **NOTE** ++ # In order to find the correct version of 'PythonLibs', it seems that we need to run 'FIND_PACKAGE(PythonInterp)' firstly. ++ # In order to find the correct version of 'PythonInterp', we need to set 'PYTHONHOME' environment variable ++ FIND_PACKAGE(PythonInterp) ++ FIND_PACKAGE(PythonLibs) ++ SET(Python_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS}) ++ SET(Python_LIBRARIES ${PYTHON_LIBRARIES}) ++ SET(Python_VERSION ${PYTHON_VERSION_STRING}) ++ SET(Python_Interpreter_FOUND ${PYTHONINTERP_FOUND}) ++ SET(Python_Development_FOUND ${PYTHONLIBS_FOUND}) ++ ELSE () ++ FIND_PACKAGE(Python COMPONENTS Interpreter Development) ++ ENDIF () + ENDIF () + ENDIF() + +@@ -344,7 +354,7 @@ IF ( LUA_FOUND AND WITH_LUA AND NOT ${BUILD_SHARED_PLUGINS}) + ADD_DEFINITIONS(-DQT_STATICPLUGIN -DSTATIC_LUA_SCRIPTING_PLUGIN) + ENDIF () + +-IF ( PYTHONLIBS_FOUND AND WITH_PYTHON AND NOT ${BUILD_SHARED_PLUGINS}) ++IF ( Python_Interpreter_FOUND AND Python_Development_FOUND AND WITH_PYTHON AND NOT ${BUILD_SHARED_PLUGINS}) + ADD_DEFINITIONS(-DQT_STATICPLUGIN -DSTATIC_PYTHON_SCRIPTING_PLUGIN) + ENDIF () + +@@ -406,7 +416,7 @@ IF ( LUA_FOUND AND WITH_LUA ) + ADD_SUBDIRECTORY(${TeXworks_SOURCE_DIR}/plugins-src/TWLuaPlugin) + ENDIF () + +-IF ( PYTHONLIBS_FOUND AND WITH_PYTHON ) ++IF ( Python_Interpreter_FOUND AND Python_Development_FOUND AND WITH_PYTHON ) + ADD_SUBDIRECTORY(${TeXworks_SOURCE_DIR}/plugins-src/TWPythonPlugin) + ENDIF () + +@@ -509,7 +519,7 @@ IF ( WITH_LUA ) + CONFIG_VERSION("Lua" "${LUA_VERSION_STRING}") + ENDIF() + if (WITH_PYTHON) +- CONFIG_VERSION("Python" "${PYTHON_VERSION_STRING}") ++ CONFIG_VERSION("Python" "${Python_VERSION}") + endif() + CONFIG_VERSION("Qt" ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}) + CONFIG_VERSION("SyncTeX" "${SYNCTEX_VERSION_STRING}") +@@ -520,7 +530,7 @@ message(" Scripting") + CONFIG_YESNO(" ECMA scripting" ON) + CONFIG_YESNO(" QtScript scripting" WITH_QTSCRIPT) + CONFIG_YESNO(" Lua scripting plugin" LUA_FOUND) +-CONFIG_YESNO(" Python scripting plugin" PYTHONLIBS_FOUND) ++CONFIG_YESNO(" Python scripting plugin" Python_Development_FOUND) + message("") + + CONFIG_INFO("Build ID" ${TW_BUILD_ID}) +diff --git a/plugins-src/TWPythonPlugin/CMakeLists.txt b/plugins-src/TWPythonPlugin/CMakeLists.txt +index 255937f17..6d99c5a68 100644 +--- a/plugins-src/TWPythonPlugin/CMakeLists.txt ++++ b/plugins-src/TWPythonPlugin/CMakeLists.txt +@@ -37,13 +37,13 @@ if (NOT MSVC) + target_compile_options(TWPythonPlugin PRIVATE -Wno-old-style-cast) + endif () + +-target_include_directories(TWPythonPlugin SYSTEM PRIVATE ${PYTHON_INCLUDE_DIRS}) ++target_include_directories(TWPythonPlugin SYSTEM PRIVATE ${Python_INCLUDE_DIRS}) + target_include_directories(TWPythonPlugin PRIVATE ${TeXworks_SOURCE_DIR}/src) + + # Specify link libraries even if the plugin is built statically so all the + # interface properties of the Qt targets (include directories, lib directories, + # etc.) are available +-TARGET_LINK_LIBRARIES(TWPythonPlugin ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${TEXWORKS_ADDITIONAL_LIBS}) ++TARGET_LINK_LIBRARIES(TWPythonPlugin ${QT_LIBRARIES} ${Python_LIBRARIES} ${TEXWORKS_ADDITIONAL_LIBS}) + IF (${BUILD_SHARED_PLUGINS}) + INSTALL(TARGETS TWPythonPlugin + LIBRARY DESTINATION ${TeXworks_PLUGIN_DIR} +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ba2f40351..3f91ab887 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -207,8 +207,8 @@ IF (NOT ${BUILD_SHARED_PLUGINS}) + IF (WITH_LUA AND LUA_FOUND) + LIST(INSERT TeXworks_LIBS 0 TWLuaPlugin ${LUA_LIBRARIES}) + ENDIF() +- IF (WITH_PYTHON AND PYTHONLIBS_FOUND) +- LIST(INSERT TeXworks_LIBS 0 TWPythonPlugin ${PYTHON_LIBRARIES}) ++ IF (WITH_PYTHON AND Python_Development_FOUND) ++ LIST(INSERT TeXworks_LIBS 0 TWPythonPlugin ${Python_LIBRARIES}) + ENDIF() + ENDIF() + diff --git a/texworks-python-plugin-buildfix.patch b/texworks-python-plugin-buildfix.patch new file mode 100644 index 0000000..cb4efeb --- /dev/null +++ b/texworks-python-plugin-buildfix.patch @@ -0,0 +1,111 @@ +From f8962bca2db2cae3183cad201a4726e7726caccb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20L=C3=B6ffler?= +Date: Thu, 15 Feb 2024 20:05:39 +0100 +Subject: [PATCH] Fix building the python scripting plugin (fixes #1038) + +--- + plugins-src/TWPythonPlugin/PythonScript.cpp | 31 +++++++++++++-------- + plugins-src/TWPythonPlugin/PythonScript.h | 4 ++- + 2 files changed, 22 insertions(+), 13 deletions(-) + +diff --git a/plugins-src/TWPythonPlugin/PythonScript.cpp b/plugins-src/TWPythonPlugin/PythonScript.cpp +index 752783b60..5c218e66e 100644 +--- a/plugins-src/TWPythonPlugin/PythonScript.cpp ++++ b/plugins-src/TWPythonPlugin/PythonScript.cpp +@@ -21,6 +21,9 @@ + + #include "PythonScript.h" + ++// https://docs.python.org/3/c-api/arg.html#strings-and-buffers ++#define PY_SSIZE_T_CLEAN ++ + // Python uses the name "slots", which Qt hijacks. So we temporarily undefine + // it, then include the python headers, then redefine it + #undef slots +@@ -376,22 +379,26 @@ PyObject * PythonScript::VariantToPython(const QVariant & v) + { + if (v.isNull()) Py_RETURN_NONE; + ++#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + switch (static_cast(v.type())) { +- case QVariant::Double: ++#else ++ switch (v.metaType().id()) { ++#endif ++ case QMetaType::Double: + return Py_BuildValue("d", v.toDouble()); +- case QVariant::Bool: ++ case QMetaType::Bool: + if (v.toBool()) Py_RETURN_TRUE; + else Py_RETURN_FALSE; +- case QVariant::Int: ++ case QMetaType::Int: + return Py_BuildValue("i", v.toInt()); +- case QVariant::LongLong: ++ case QMetaType::LongLong: + return Py_BuildValue("L", v.toLongLong()); +- case QVariant::UInt: ++ case QMetaType::UInt: + return Py_BuildValue("I", v.toUInt()); +- case QVariant::ULongLong: ++ case QMetaType::ULongLong: + return Py_BuildValue("K", v.toULongLong()); +- case QVariant::Char: +- case QVariant::String: ++ case QMetaType::Char: ++ case QMetaType::QString: + #ifdef Py_UNICODE_WIDE + { + QVector tmp = v.toString().toUcs4(); +@@ -400,8 +407,8 @@ PyObject * PythonScript::VariantToPython(const QVariant & v) + #else + return Py_BuildValue("u", v.toString().constData()); + #endif +- case QVariant::List: +- case QVariant::StringList: ++ case QMetaType::QVariantList: ++ case QMetaType::QStringList: + { + QVariantList list = v.toList(); + +@@ -412,7 +419,7 @@ PyObject * PythonScript::VariantToPython(const QVariant & v) + } + return pyList; + } +- case QVariant::Hash: ++ case QMetaType::QVariantHash: + { + QVariantHash hash = v.toHash(); + +@@ -422,7 +429,7 @@ PyObject * PythonScript::VariantToPython(const QVariant & v) + } + return pyDict; + } +- case QVariant::Map: ++ case QMetaType::QVariantMap: + { + QVariantMap map = v.toMap(); + +diff --git a/plugins-src/TWPythonPlugin/PythonScript.h b/plugins-src/TWPythonPlugin/PythonScript.h +index 35d420aa9..658d4330a 100644 +--- a/plugins-src/TWPythonPlugin/PythonScript.h ++++ b/plugins-src/TWPythonPlugin/PythonScript.h +@@ -26,6 +26,8 @@ + #include "scripting/Script.h" + #include "scripting/ScriptAPIInterface.h" + ++#include ++ + // Forward declaration taken from the Python headers to avoid having to include + // Python in this header file + struct _object; +@@ -37,8 +39,8 @@ namespace Scripting { + /** \brief Class for handling python scripts */ + class PythonScript : public Script + { +- Q_OBJECT + Q_INTERFACES(Tw::Scripting::Script) ++ Q_DECLARE_TR_FUNCTIONS(Tw::Scripting::ECMAScript) + + public: + /** \brief Constructor diff --git a/texworks.changes b/texworks.changes new file mode 100644 index 0000000..29f5405 --- /dev/null +++ b/texworks.changes @@ -0,0 +1,548 @@ +------------------------------------------------------------------- +Tue Jan 28 07:51:12 UTC 2025 - Bernhard Wiedemann + +- Drop python2 requirement + +------------------------------------------------------------------- +Thu Feb 15 19:27:12 UTC 2024 - Atri Bhattacharya + +- Add texworks-python-plugin-buildfix.patch to fix building python + scripting plugin (gh#TeXworks/texworks#1038); patch taken from + upstream commit. +- Refresh texworks-cmake-find-python.patch with version committed + upstream. +- Enable python scripting plugin; Requires at least Python 3.8, + disable plugin for openSUSE < 1650. +- Require gcc9 for openSUSE < 1650 as GCC >= 8 is required by Lua + scripting plugin for filesystem support. + +------------------------------------------------------------------- +Mon Feb 12 10:35:26 UTC 2024 - Atri Bhattacharya + +- Update to version 0.6.9: + * Add support for PDF layers + * Add support for "--insert-text" and "--insert-cite" command + line options + * Enable customization of which columns are shown in the "Insert + Citations..." dialog + * Enable customization of the default citation command used by + the "Insert Citations..." dialog + * Add dtx tag patterns + * Improve command line parsing +- Switch over to Qt6 builds. +- Disable python bindings over compilation errors + (gh#TeXworks/texworks#1038). +- Add texworks-cmake-find-python.patch: cmake has dropped support + for PythonInterp and PythonLibs, use FindPython instead + (gh#TeXworks/texworks#1039). + +------------------------------------------------------------------- +Tue Mar 14 09:40:00 UTC 2023 - Atri Bhattacharya + +- Update to version 0.6.8: + * Make the maximum RAM usage of the PDF previewer configurable + (and reduce the default to 256 MiB). + * Enable typesetting from preview if no source is open. + * Make the PDF paper color configurable. + * Add AppImage support. + * Speed up populating the recently opened files menu + (particularly when containing files on slow network drives). + * Disable the typesetting button in the preview if no source is + available. + * Update translations. + * Refactor and modernize parts of the code. + * Bug fixes: + - Fix crash when closing a source opened after the preview. + - Fix crash when killing a typesetting process by closing the + source window. + - Fix several memory leaks. + - Fix the PDF preview of files that are in the process of + being changed (e.g., during typesetting). + - Fix focusing of the console when typesetting from the + preview. + - Fix (potential) non-sequential ordering of PDF search + results. + - Fix repeated PDF searches with the same search string but + different search flags. + - Fix blocking UI while performing long PDF searches. + - Fix PDF search result highlighting disappearing too quickly. + - Fix the display of PDF search results in single page view. + - Fix typesetting with symlinked root files. + - Fix quotation of paths in the TEXEDIT & MIKTEX_EDITOR + environment variables. + - Pre-select the ruler unit in the "Edit guideline" dialog. + +------------------------------------------------------------------- +Sat Mar 5 17:10:27 UTC 2022 - Atri Bhattacharya + +- Update to version 0.6.7: + * Add a ruler with draggable guidelines to the PDF previewer. + * Improve preservation of Unicode characters during + loading/saving. + * Prevent concurrent typesetting in multi-file sources. + * Disable "Remove Aux Files" during typesetting. + * Add full paths as tool tips in the "Open Recent" menu. + * Use native separators (/ or \) in the recent files menu. + * Add "Fit to Content Width" to the PDF preview zoom context + menu and to the scaling preferences. + * Improve support for dark themes (changing the syntax + highlighting color palette; fixing the color of the current + line when changing OS color schemes; fixing the background + color of the screen calibration widget for dark themes). + * Improve interoperability with docstrip by adding support for + "%^^A ! TeX..." magic comments. + * Fix crash when using the PDF preview zoom context menu. + * Fix search results for unsaved .tex documents. + * Fix linespacing when (re-)loading a document. + * Fix hang when recent files are on (inaccessible) network + drives. + * Fix bugs when populating the recent files menu. + * Fix focus when switching windows from the "Windows" menu. + * Fix filtering in the citation select dialog. + * Fix parsing BiBTeX @STRING entries. + * Fix toggling of items in the "Remove Aux Files" dialog. + * Fix quotes smartening after \. + * Modernize and restructure the code to improve quality, + stability, maintainability, and the possibilities for future + enhancements. + * Improve automatic building, testing, and packaging. + * Improve texworks.appdata.xml. + * Add "Keywords" to texworks.desktop. + * Update translations. + +------------------------------------------------------------------- +Sat Mar 13 14:12:33 UTC 2021 - Atri Bhattacharya + +- Update to version 0.6.6: + * Add support for macOS 11 Big Sur + * Add support for HiDPI screens (e.g., Retina screens) + * Make the text cursor width customizable + * Add support for environment variables in paths to typesetting + tools + * Add support for custom shortcuts for quickly changing + typesetting tools + * Pre-select *.pdf when the open dialog is called from the + preview + * Only reload a file if its content changed (this improves + support for network shares, cloud services, etc.) + * Add support for Qt's new Javascript engine + * Fix some crashes + * Fix some potential memory leaks + * Fix refreshing of the PDF preview on Windows + * Fix opening links to PDFs specified with relative paths + * Fix the context menu in the PDF preview + * Fix File > Close in the PDF preview + * Fix switching the PDF to fullscreen mode on first press + * Fix resizing of the columns in the template dialog + * Fix the disappearance of several text encodings + * Move resources to (OS dependent) standard locations + * Update translations + * Update libraries for pre-built binaries + * Modernize and restructure the code to improve quality, + stability, maintainability, and the possibilities for future + enhancements + * Improve automatic building, testing, and packaging + * Initial support for Qt6 +- New BuildRequires: pkgconfig(Qt5Qml). +- Drop upstreamed patches: + * 0001-QtPDF-Fix-compilation-with-Qt-5.15.patch. + * Drop texworks-drop-FindLua-cmake-module.patch. + +------------------------------------------------------------------- +Sun Feb 14 00:02:53 UTC 2021 - Atri Bhattacharya + +- Add texworks-drop-FindLua-cmake-module.patch: Drop custom + FindLua.cmake included in sources in favour of cmake's default + module [gh#TeXworks/texworks#924]. + +------------------------------------------------------------------- +Fri Jun 5 18:48:42 UTC 2020 - Christophe Giboudeaux + +- Add upstream patch: + * 0001-QtPDF-Fix-compilation-with-Qt-5.15.patch + +------------------------------------------------------------------- +Fri Mar 27 08:48:46 UTC 2020 - Atri Bhattacharya + +- Update to version 0.6.5: + * Fix text selection handling when moving the mouse. + * Fix auto-reloading of TeX documents that were changed outside + TeXworks. + * Updated translations. +- Changes from version 0.6.4: + * Add shortcut (Ctrl+Shift+J) to invoke SyncTeX at the cursor + position. + * Make shortcuts for autocompletion configurable. + * Make "Auto-Follow Focus" configurable in the preferences. + * Make editor line spacing customizable. + * Make console output accessible by keyboard; among other thigs, + this makes the console work with screen readers. + * Migrate to a more powerful regular expressions engine (e.g. + for finding and replacing). + * Fix opening empty files. + * Fix the highlighting of TeX commands that include non-ASCII + characters. + * Fix the auto-closing of PDFs with the associated TeXs. + * Fix the PDF display on high-dpi screens like Retina displays. + * Properly handle "&" for recent files menu. + * Fix syntax highlighting in the "New from template" dialog. + * Sort interface locales alphabetically in the preferences. + * Don't show invalid PDF page sizes in the meta data dock. + * Properly show the PDF file size in the meta data dock even for + locked or invalid files. + * Fix the conversion of Lua tables in Lua scripts. + * Fix the installation of icons on *nix platforms. + * Update libraries for pre-built binaries. + * Modernize and restructure the code to improve quality, + stability, maintainability, and the possibilities for future + enhancements. + * Improve unit tests and add automated testing on Windows; this + ensures better code quality across all supported operating + systems. + * Discontinue Qt4 support. + * Updated translations. +- Rename source tarball to %{name}-%{version}.tar.gz. +- Adapt to changed location of icons: + * Add BuildRequires: hicolor-icon-theme. + * Update file list with new icon directory. +- Minor cleanups with spec-cleaner. + +------------------------------------------------------------------- +Tue Mar 19 15:12:11 UTC 2019 - Atri B + +- Update to version 0.6.3: + * New features and improvements: + - Implement "Insert Citations..." dialog + - Implement indenting/unindenting by Tab/Shift+Tab + - Make synchronization granularity configurable (highlight + corresponding character, word, or line) + - Add ability to distinguish identically named files by + displaying the respective folders they are in in the window + title, window menu, and under "Open Recent" + - Implement "Fit to content width" PDF zoom (which ignores + empty space around the text) + - Disable unavailable typesetting engines + - Allow to change the editor font size by Ctrl+Mousewheel + - Improve the detection of spellchecking languages (add + ability to search multiple directories and list all results) + - Hide the menu bar in PDF full screen mode + - Rework/expand code completion strings + - Add/update syntax highlighting for LaTeX, ConTeXt, Lua, DTX, + and BibTeX + - Add cleanup-patterns for beamer files .nav & .snm + - Add new/unified icons for typeset and zooming + - Display paper size and file size in the PDF metadata + * Bug fixes: + - Fix infinite loop in syntax highlighter (which caused + significant slow-down especially for large files) + - Fix underline when spellchecking with syntax highlighting + - Fix "Place on Left/Right", especially on multi-screen setups + - Avoid 'file "" not found' errors when synchronizing + - Fix synchronization while searching in a PDF + - Fix fine-grained synchronization near paragraph boundaries + - Fix the PDF copy menu command + - Fix PDF text selection + - Fix font color reset when searching and using stylesheets + - Fix crashes when working with locked PDFs + - Fix unexpected cursor movement when using a combination of + backspace and up/down arrow keys (thanks to @mgkuhn) + - Fix the font in the log parser output + - Fix persistent magnifying glass + - Remove unimplemented PDF menu items cut, paste, clear +- Use cmake rpm macros. +- Drop conditionals for outdated openSUSE versions. +- New BuildRequires: + * texlive-tex-bin: needed to detect and configure the location + of tex binary. + * Qt5Test to determine QT version. + * python3-devel: Switch to python3 based scripting plugin. +- Use %%license to install COPYING file. +- Minor spec file cleanups using spec-cleaner. + +------------------------------------------------------------------- +Sun Apr 30 21:52:52 UTC 2017 - badshah400@gmail.com + +- Update to version 0.6.2: + + Implement handling of links to external files in the PDF + preview. + + Implement a simple screen calibration widget to allow adapting + the PDF preview to the screen's resolution. + + Improve responsiveness when opening large documents. + + Use old content instead of rendering placeholers after a PDF + was reloaded to facilitate seeing changes. + + Improve the usability of the "Remove Aux Files..." dialog by + letting the user toogle the selection by clicking anywhere on + the row. + + Add support for the bibliography program "biber" by default. + + Allow custom zoom levels in the PDF status bar context menu. + + Bugs fixed: + - Fix PDF zoom speed for high-resolution mouse-wheels. + - Fix a deadlock causing TeXworks to hang when loading PDF + annotations such as links. + - Fix crash when changing files outside TeXworks. + - Fix crash when syncing from an if-block in the TeX file. + - Fix crash when reloading a PDF while text was selected. + - Fix enabling of the first/previous/next/last page toolbar + buttons in the PDF preview. + - Fix the wrong appearance of the PDF magnifier in some cases. + - Fix truncation issues and misreported Windows versions in + "Email to mailing list". + +------------------------------------------------------------------- +Sun Jul 17 08:06:33 UTC 2016 - jengelh@inai.de + +- Trim irrelevant parts from description + +------------------------------------------------------------------- +Sun May 1 23:24:55 UTC 2016 - badshah400@gmail.com + +- Update to version 0.6.1: + + Fix "Jump to Source" from PDF context menu + + Fix fine-sync'ing close to PDF line boundaries + + Fix loading of Qt-global translations + + Fix pixel-alignment after zoomFitWindow in continuous mode + + Fix handling of changing scroll bar visibilities in + zoomFitWidth and zoomFitWindow + + Allow horizontal scrolling by Shift+MouseWheel + + Updated translations + +------------------------------------------------------------------- +Mon Apr 11 04:34:38 UTC 2016 - badshah400@gmail.com + +- Update to version 0.6.0: + + Complete redesign of the PDF previewer using QtPDF by Charlie + Sharpsteen + + Fast and responsive preview even at very high magnifications + + New page modes: continuous scrolling and two-column layout + + Text selection/copying from the PDF + + Go back to previous view after clicking on a link using + Alt+left arrow + + Fix disappearing spellcheck underline with some fonts/font + sizes in Qt 5 + + Update the width of the line number display when changing the + editor font + + Show a note in the "About Scripts" dialog for disabled script + languages + + Explicitly add a "Quit TeXworks" menu item to the global + menubar on Mac OS X + + Make Qt5 the default framework for building TeXworks + + Add support for Lua 5.3. +- When building with QT5, add BuildRequires on + pkgconfig(Qt5Concurrent) as this a necessary dependency this + version onwards. +- Set the cmake variable TeXworks_DIC_DIR to the proper + installation location of myspell dicts in openSUSE to make + texworks find them. + +------------------------------------------------------------------- +Mon Apr 27 23:04:45 UTC 2015 - badshah400@gmail.com + +- Update to version 0.4.6: + + Implement character-level synchronization by using text + searching to assist SyncTeX. + + Lift hardwrap line length limitation and implement (hard) + unwrap. + + Always show console output tab while typesetting to show + progress. + + Improve the handling of UTF-8 byte order marks. + + Improve the log parsing script. + + Improve the handling of script errors. + + Work around a race condition that causes lines to become + invisible, subsequently leading to a crash. + + Fix incorrectly accumulating indent. + + Fix SyncTeX initialization with non-ASCII filenames. + + Fix selection of whole lines and when selecting right-to-left. + + Fix hangs and crashes when using "Fit to ..." in the PDF view. + + Fix a crash when running an invalid system command from + scripts. + + Fix encoding issues when reading environment variables. + + Fix scrolling when searching for multi-line strings. + + Fix auto-completion when working with RTL languages. + + Improve the handling of Retina displays in Mac OS X. + + Fix a crash when opening PDF files from the Windows + Explorer. + + Provide texworks.appdata.xml for *nix platforms. + + Fix compilation with Qt 5. + + Improve the CMake build system. + + Add support for Lua 5.2. + + Move development from Google Code to GitHub. +- Drop conditionals referring to out-of-support openSUSE + releases. +- Update source URL. +- Use CMake based build system. +- Build with Qt5 for openSUSE >= 13.2. +- Drop manual from filelist, no longer bundled by upstream, see + http://www.tug.org/texworks/#Documentation instead. + +------------------------------------------------------------------- +Sun Apr 14 21:07:21 UTC 2013 - badshah400@gmail.com + +- Update to version 0.4.5: + + Fix "Restore defaults" in preferences dialog + + Fix removal and selection of text moved via drag'n'drop + + Fix default saving location + + Keep UTF-8 BOMs in files that have them + + Make "Goto Source" lead to the last active source window + + Implement close button for the console output panel + + Implement "Open PDF with TeX" option + + Improve compatibility with OS color schemes + + New encoding support for "Mac Central European Roman" + + Code cleanup + + Updated log parser (improve handling of long messages and file + paths) + + New script properties/functions: cursorPosition, + getEngineList() + +------------------------------------------------------------------- +Sun Apr 29 08:45:11 UTC 2012 - badshah400@gmail.com + +- Update to version 0.4.4: + + Fix crash caused by Qt when adding lines at the beginning of a + document + + Fix search/replace for multi-line strings + + Work around layout issues which cause lines to disappear + + Fix building with BSD make + + Fix block selection of last paragraph + + Fix overwrite of "Find all occurrences" option + + Improve "Unable to execute..." error dialog + + Rename "Show/Hide Output Panel" to "Show/Hide Console Output" + in the menu and the preferences dialog + + Remove subject and add instructions to body of the "email to + mailinglist" + + Bring the window running TeX to the top at the beginning of + typesetting to ensure that the console output is visible + + Allow symlinks and display only folders in "path for programs" + in the preferences dialog + + Add "Clear Recent Files" to "Open Recent" menu + + Add an autocompletion entry to the preferences dialog + + Add Lua(La)TeX to the default tools (and drop LaTeXmk by + default) + + Add an option to open log files + + Add CMake support (experimental) + + Update SyncTeX to version 1.17 + + Update URLs to http://www.tug.org/texworks/ + + Some enhancements to functions available to scripting + + Avoid showing an empty message box for script results + + Resolve symlinks when looking for scripts + + Expose the scripts' titles, authors, filenames, etc. to + scripting + + Update/improve scripts: open pdf in default viewer, derive + spellchecking language from babel package, log parser. + +------------------------------------------------------------------- +Mon Feb 13 10:56:50 UTC 2012 - coolo@suse.com + +- patch license to follow spdx.org standard + +------------------------------------------------------------------- +Sat Jul 16 18:08:58 UTC 2011 - badshah400@gmail.com + +- Update to version 0.4.3 + + Fix bug in autocompletion that could cause data loss + +------------------------------------------------------------------- +Wed Jun 29 09:15:21 UTC 2011 - badshah400@gmail.com + +- Update to version 0.4.2 + + Work around layout issues with Qt 4.7.2 that caused TeXworks to + crash sometimes + + Fix autocompletion at the beginning of a line + + Respect per-file setting "None" for syntax highlighting, smart + quotes, and auto indent + + Update SyncTeX to version 1.16 + + Allow to disable autocompletion by editing the configuration file + + Fix runtime warning about empty file watchers + + Enhance Mac patches for poppler + + Improve installation and packaging routines + +------------------------------------------------------------------- +Fri May 27 08:47:21 UTC 2011 - badshah400@gmail.com + +- Update to version 0.4.1 + + Option to always close the output panel after typesetting + + Invoke "Goto page" and "Goto line" from the status bar widgets + + Implement pdf zoom menu from the status bar widget + + Allow to reload a file with selectable encoding + + Implement "Help > Settings and Resources..." for easy access, + in particular to customizable resources + + Speed up program start-up + + Add \begin{document} to the auto-completion + + Work around the almost invisible highlighting when searching + with the "Find all occurences" option + + Improve highlighting of auto-completed text + + Let typeset combobox adjust size dynamically + + Remove the "+" from the zoom tool icon in the PDF preview + + Reduce size of packages + + Fix handling of non-existent files in automatic resource + updates + + Fix handling of TEXEDIT environment variable; add support for + the MIKTEX_EDITOR environment variable + + Fix several compile time and runtime warnings + + Fix invisible icons in application switcher with compiz + + Rename default ConTeXt tools + + Add more extensions for associating files with TeXworks + + Add support for Python 3.2 + + Clean up unused code & files + +------------------------------------------------------------------- +Tue Apr 19 19:26:10 UTC 2011 - badshah400@gmail.com + +- Correct pkgconfig dependency for lua plugin package + +------------------------------------------------------------------- +Sat Apr 16 09:14:15 UTC 2011 - badshah400@gmail.com + +- Split out python scripting and lua scripting plugins in + respective subpackages +- Correctly point to myspell dictionaries, this enables the + dictionaries in texworks' spell-checker (thanks to Mike) +- Install the user-manual (thanks to Mike) + +------------------------------------------------------------------- +Mon Mar 21 19:11:33 UTC 2011 - badshah400@gmail.com + +- Correct version number to 0.4.0 in keeping with upstream + +------------------------------------------------------------------- +Mon Mar 21 06:17:07 UTC 2011 - badshah400@gmail.com + +- Update to version 0.4: + + Support scripting (QtScript, Lua, Python) + + "Save all" menu item + + Auto-completion for the beamer class + + Support background color/font flags in syntax highlighting + + Implement a command line parser + + Automatically update resources when installing new releases + + Implement "Smarten quotes" for a selection + + Only display each language once in the sellchecker + language selection + + Preserve documemt view when reloading after external changes + + Handle different file encodings and line ending conventions + and allow the user to change them + + Make pdflatex the default on fresh installations + + Indicate a document's modification state in the windows menu + + Improve the "Email to mailing list" template + + Make "Highlight current line" color palette-aware + + Update SyncTeX to 1.9 + + Allow Esc and Return in the tags and search result windows + + Improve "Remove Auxiliary Files" dialog + + Fix handling of external file links in PDF's + + Numerous bug fixes + + Set TeXworks as the default editor when hitting 'e' after + a TeX error +- Remove texworks-default_to_pdflatex.patch in favor of upstream + implementation +- Remove auxiliary .desktop file and icons, implemented properly + upstream + +------------------------------------------------------------------- +Sat Sep 25 21:51:21 UTC 2010 - badshah400@gmail.com + +- Remove incorrect entries from .desktop file +- Cleanup of spec file + +------------------------------------------------------------------- +Sun Aug 1 23:57:44 UTC 2010 - badshah400@gmail.com + +- Initial package following openSUSE packaging guidelines + diff --git a/texworks.spec b/texworks.spec new file mode 100644 index 0000000..109df20 --- /dev/null +++ b/texworks.spec @@ -0,0 +1,149 @@ +# +# spec file for package texworks +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2007-09 by Jonathan Kew. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define __builder ninja +%if 0%{?suse_version} < 1650 +# Lua plugin requires GCC >= 8 for filesystem support +%define gcc_ver 9 +# Python plugin requires Python >= 3.8 +%bcond_with python +%else +%bcond_without python +%endif +Name: texworks +Version: 0.6.9 +Release: 0 +Summary: TeXshop-like TeX Editor +License: GPL-2.0-or-later +Group: Productivity/Publishing/TeX/Frontends +URL: https://www.tug.org/texworks/ +Source0: https://github.com/TeXworks/texworks/archive/release-%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM texworks-cmake-find-python.patch gh#TeXworks/texworks#1039 badshah400@gmail.com -- cmake has dropped support for PythonInterp and PythonLibs, use FindPython instead +Patch0: https://github.com/TeXworks/texworks/commit/dae1586af7a218e9bbe9ce3031a97e8efcac980a.patch#/texworks-cmake-find-python.patch +# PATCH-FIX-UPSTREAM texworks-python-plugin-buildfix.patch gh#/TeXworks/texworks#1038 badshah400@gmail.com -- Fix building the python scripting plugin +Patch1: https://github.com/TeXworks/texworks/commit/f8962bca2db2cae3183cad201a4726e7726caccb.patch#/texworks-python-plugin-buildfix.patch +BuildRequires: cmake +BuildRequires: dbus-1-devel +BuildRequires: desktop-file-utils +BuildRequires: gcc%{?gcc_ver}-c++ +BuildRequires: hicolor-icon-theme +BuildRequires: hunspell-devel +BuildRequires: libpoppler-devel >= 0.24 +BuildRequires: libpoppler-qt6-devel >= 0.24 +BuildRequires: lua-devel +BuildRequires: ninja +BuildRequires: pkgconfig +%if %{with python} +BuildRequires: python-rpm-macros +BuildRequires: python3-devel +%endif +BuildRequires: texlive-tex-bin +BuildRequires: update-desktop-files +BuildRequires: pkgconfig(Qt6Concurrent) +BuildRequires: pkgconfig(Qt6Core) +BuildRequires: pkgconfig(Qt6Core5Compat) +BuildRequires: pkgconfig(Qt6DBus) +BuildRequires: pkgconfig(Qt6Gui) +BuildRequires: pkgconfig(Qt6Linguist) +BuildRequires: pkgconfig(Qt6Qml) +BuildRequires: pkgconfig(Qt6Test) +BuildRequires: pkgconfig(Qt6UiTools) +BuildRequires: pkgconfig(Qt6Widgets) +BuildRequires: pkgconfig(Qt6Xml) +Requires: dbus-1 +Requires: hunspell +Requires: poppler-tools +Requires: texlive-latex + +%description +The TeXworks project is a simple TeX front-end program (working +environment) that is modeled on Dick Koch's TeXShop for Mac OS X. + +%package plugin-python +Summary: Plugins to add python scripting to texworks +Group: Development/Libraries/Python +Requires: %{name} = %{version} +Requires: python3 + +%description plugin-python +The TeXworks project is a simple TeX front-end program (working +environment) that is modeled on Dick Koch's TeXShop for Mac OS X. + +This package adds python scripting abitilies to TeXworks. + +%package plugin-lua +Summary: Plugins to add python scripting to texworks +Group: Development/Libraries/Other +Requires: %{name} = %{version} +Requires: lua + +%description plugin-lua +The TeXworks project is a simple TeX front-end program (working +environment) that is modeled on Dick Koch's TeXShop for Mac OS X. + +This package adds lua scripting abitilies to TeXworks. + +%prep +%autosetup -p1 -n texworks-release-%{version} + +%build +%cmake -DCMAKE_CXX_COMPILER=g++%{?gcc_ver:-%{gcc_ver}} \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DTW_BUILD_ID="openSUSE" \ + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=%{_lib} \ + -DQT_DEFAULT_MAJOR_VERSION=6 \ + -DWITH_LUA=ON \ + -DWITH_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \ + -DBUILD_SHARED_PLUGINS:BOOL=ON \ + -DTeXworks_DIC_DIR=%{_datadir}/myspell \ + -DTeXworks_PLUGIN_DIR=%{_libdir}/%{name} + +%cmake_build + +%install +%cmake_install +%suse_update_desktop_file texworks Publishing WordProcessor + +# Package doc files using %%doc, remove them here +for i in COPYING README.md NEWS +do + rm %{buildroot}%{_datadir}/doc/%{name}/${i} +done + +%files +%doc README.md NEWS +%license COPYING +%dir %{_datadir}/metainfo +%{_datadir}/metainfo/texworks.appdata.xml +%{_bindir}/texworks +%{_datadir}/applications/texworks.desktop +%{_datadir}/icons/hicolor/*/apps/*.png +%{_mandir}/man1/texworks.1%{?ext_man} + +%if %{with python} +%files plugin-python +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/*PythonPlugin.so +%endif + +%files plugin-lua +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/*LuaPlugin.so + +%changelog