summaryrefslogtreecommitdiff
path: root/app-office/lyx/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-office/lyx/files')
-rw-r--r--app-office/lyx/files/lyx-2.4.0-fix-hunspell.patch21
-rw-r--r--app-office/lyx/files/lyx-2.4.0-prefer-xdg-open.patch54
2 files changed, 75 insertions, 0 deletions
diff --git a/app-office/lyx/files/lyx-2.4.0-fix-hunspell.patch b/app-office/lyx/files/lyx-2.4.0-fix-hunspell.patch
new file mode 100644
index 000000000000..265049b46631
--- /dev/null
+++ b/app-office/lyx/files/lyx-2.4.0-fix-hunspell.patch
@@ -0,0 +1,21 @@
+From: Arthur Zamarin <arthurzam@gentoo.org>
+Date: Fri, 5 Apr 2024 15:40:57 +0300
+Subject: fix find hunspell using pkg-config
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -884,6 +884,14 @@ if(NOT LYX_EXTERNAL_HUNSPELL)
+ message(STATUS " * Hunspell:")
+ message(STATUS " - include: ${HUNSPELL_INCLUDE_DIR}")
+ message(STATUS " - library: ${HUNSPELL_LIBRARY}")
++elseif(LYX_HUNSPELL)
++ find_package(PkgConfig)
++ pkg_check_modules(HUNSPELL hunspell)
++ set(HUNSPELL_INCLUDE_DIR ${HUNSPELL_INCLUDE_DIRS})
++ set(HUNSPELL_LIBRARY ${HUNSPELL_LIBRARIES})
++ message(STATUS " * Hunspell:")
++ message(STATUS " - include: ${HUNSPELL_INCLUDE_DIR}")
++ message(STATUS " - library: ${HUNSPELL_LIBRARY}")
+ endif()
+
+ foreach(_spell "ASPELL" "ENCHANT" "HUNSPELL")
diff --git a/app-office/lyx/files/lyx-2.4.0-prefer-xdg-open.patch b/app-office/lyx/files/lyx-2.4.0-prefer-xdg-open.patch
new file mode 100644
index 000000000000..b5a8ef5ced6b
--- /dev/null
+++ b/app-office/lyx/files/lyx-2.4.0-prefer-xdg-open.patch
@@ -0,0 +1,54 @@
+From: Arthur Zamarin <arthurzam@gentoo.org>
+Date: Fri, 5 Apr 2024 16:05:46 +0300
+Add xdg-open as the first choice whenever this seems to be useful
+
+--- a/lib/configure.py
++++ b/lib/configure.py
+@@ -716,7 +716,7 @@ def checkModule(module):
+ return False
+
+
+-texteditors = ['xemacs', 'gvim', 'kedit', 'kwrite', 'kate',
++texteditors = ['xdg-open', 'xemacs', 'gvim', 'kedit', 'kwrite', 'kate',
+ 'nedit', 'gedit', 'geany', 'leafpad', 'mousepad',
+ 'xed', 'notepad', 'WinEdt', 'WinShell', 'PSPad']
+
+@@ -731,7 +731,7 @@ def checkFormatEntries(dtl_tools):
+ checkViewerEditor('a Dia viewer and editor', ['dia'],
+ rc_entry = [r'\Format dia dia DIA "" "%%" "%%" "vector,zipped=native", "application/x-dia-diagram"'])
+ #
+- checkViewerEditor('an OpenDocument drawing viewer and editor', ['libreoffice', 'lodraw', 'ooffice', 'oodraw', 'soffice'],
++ checkViewerEditor('an OpenDocument drawing viewer and editor', ['xdg-open', 'libreoffice', 'lodraw', 'ooffice', 'oodraw', 'soffice'],
+ rc_entry = [r'\Format odg "odg, sxd" "OpenDocument drawing" "" "%%" "%%" "vector,zipped=native" "application/vnd.oasis.opendocument.graphics"'])
+ #
+ checkViewerEditor('a Grace viewer and editor', ['xmgrace'],
+@@ -756,9 +756,9 @@ def checkFormatEntries(dtl_tools):
+ \Format xbm xbm XBM "" "%s" "%s" "" "image/x-xbitmap"
+ \Format xpm xpm XPM "" "%s" "%s" "" "image/x-xpixmap"'''
+ path, iv = checkViewerNoRC('a raster image viewer',
+- ['xv', 'gwenview', 'kview',
++ ['xdg-open', 'xv', 'gwenview', 'kview',
+ 'eog', 'xviewer', 'ristretto', 'gpicview', 'lximage-qt',
+- 'xdg-open', 'gimp-remote', 'gimp'],
++ 'gimp-remote', 'gimp'],
+ rc_entry = [imageformats])
+ path, ie = checkEditorNoRC('a raster image editor',
+ ['gimp-remote', 'gimp'], rc_entry = [imageformats])
+@@ -815,7 +815,7 @@ def checkFormatEntries(dtl_tools):
+ #checkProg('a Postscript interpreter', ['gs'],
+ # rc_entry = [ r'\ps_command "%%"' ])
+ checkViewer('a Postscript previewer',
+- ['kghostview', 'okular', 'qpdfview --unique',
++ ['xdg-open', 'kghostview', 'okular', 'qpdfview --unique',
+ 'evince', 'xreader',
+ 'gv', 'ghostview -swap', 'gsview64', 'gsview32'],
+ rc_entry = [r'''\Format eps eps EPS "" "%%" "" "vector" "image/x-eps"
+@@ -826,7 +826,7 @@ def checkFormatEntries(dtl_tools):
+ # maybe use "bestApplication()" from https://github.com/jleclanche/python-mime
+ # the MIME type is set for pdf6, because that one needs to be autodetectable by libmime
+ checkViewer('a PDF previewer',
+- ['pdfview', 'kpdf', 'okular', 'qpdfview --unique',
++ ['xdg-open', 'pdfview', 'kpdf', 'okular', 'qpdfview --unique',
+ 'evince', 'xreader', 'kghostview', 'xpdf', 'SumatraPDF',
+ 'acrobat', 'acroread', 'mupdf', 'Skim.app',
+ 'gv', 'ghostview', 'AcroRd32', 'gsview64', 'gsview32'],