From 4bbcd26e7cb1908fb98bb318bfaa13ea9e32d860 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 10 Apr 2023 05:36:05 +0100 Subject: gentoo auto-resync : 10:04:2023 - 05:36:05 --- app-text/Manifest.gz | Bin 48601 -> 48600 bytes app-text/krop/Manifest | 5 +- app-text/krop/files/krop-0.6.0-links.patch | 64 +++++++++ app-text/krop/files/krop-0.6.0-pikepdf.patch | 150 +++++++++++++++++++++ app-text/krop/krop-0.6.0-r2.ebuild | 47 +++++++ app-text/krop/metadata.xml | 3 + app-text/xournalpp/Manifest | 5 +- .../xournalpp/files/xournalpp-1.1.3-gcc13.patch | 12 ++ .../xournalpp/files/xournalpp-1.1.3-lua-5-4.patch | 14 ++ app-text/xournalpp/xournalpp-1.1.3-r1.ebuild | 58 ++++++++ app-text/xournalpp/xournalpp-9999.ebuild | 15 ++- 11 files changed, 368 insertions(+), 5 deletions(-) create mode 100644 app-text/krop/files/krop-0.6.0-links.patch create mode 100644 app-text/krop/files/krop-0.6.0-pikepdf.patch create mode 100644 app-text/krop/krop-0.6.0-r2.ebuild create mode 100644 app-text/xournalpp/files/xournalpp-1.1.3-gcc13.patch create mode 100644 app-text/xournalpp/files/xournalpp-1.1.3-lua-5-4.patch create mode 100644 app-text/xournalpp/xournalpp-1.1.3-r1.ebuild (limited to 'app-text') diff --git a/app-text/Manifest.gz b/app-text/Manifest.gz index ef1619c4e2c7..a4d67aacb434 100644 Binary files a/app-text/Manifest.gz and b/app-text/Manifest.gz differ diff --git a/app-text/krop/Manifest b/app-text/krop/Manifest index 9061a6fe2d58..6fe077b1c04e 100644 --- a/app-text/krop/Manifest +++ b/app-text/krop/Manifest @@ -1,4 +1,7 @@ +AUX krop-0.6.0-links.patch 2327 BLAKE2B 5bae0df80ac0e68845b5b231306bf1ca92452b6f43ada5dc539561480ea887542a39ba7927bec5b2b0b208a852d18d43da5c8a9d866aea686ac3ac01ff908386 SHA512 5e091d2381965d104b661273876b58ba2217be4d99d2d39b8ffad79b1909f2d84ff4b2fa829703d305d708282849a438f07dc55aa4ef7557b79fc5b7efac2ed5 +AUX krop-0.6.0-pikepdf.patch 5691 BLAKE2B 4cae2438ec89197616ab5a680d6cc1a391207c44396d0699fac264a39f0e642541e2c1047b86f1def842ef19d15158408ef6496a8dc956ec699db52a7b89c452 SHA512 c6a47582e8821d987e11fce3ae8de5e59383d1bca37328f8ab24aee590bf5f9b21dcc3d64cf20150026fd4a38beb653161804fc828da07b5bb265a2703ca86ae DIST krop-0.6.0.tar.gz 48331 BLAKE2B ca6a00a410ed4e18a401fab3a21bc49c86f73165f68b192ab83c8fad74111ba9a9941f464a2646faa5a3317bbb45cdc89bed19c901999c0b11db353ac2997a65 SHA512 51a988e4fcb65d11cc26cf5b0c808e79097a66ef8ec4751a6c051289cd77b3328ebc8ecd9829adc466f87330beb8bc715d290cc20be415a7b8f179378b7bcb4f EBUILD krop-0.6.0-r1.ebuild 945 BLAKE2B a3c4e6820cc0595dfbd61a2e76761b6f614c170bd2e990b51d3c55e9f1025ba7a4b9abab2ef3c66f200bbe032b4cc7908b79663082f1c5e7a7ab883e12c803ca SHA512 57beb5d0364398d4a3e407ee62aac125f1264c084983b6f7a851dff048577fd6644ffce0c0194a220484b1ef267ca69a1706d263e0ac31233f4d146420ba9e40 +EBUILD krop-0.6.0-r2.ebuild 1026 BLAKE2B 7d6426e80ef9cb2b1ae5d0ae55f51a75a5a608a31f6a95078052fa96b78a6c17aa09af6fb80c8eb664ffab98ffe4090c9b06815604055befb9168dfd5f68d652 SHA512 b92fb1892a0ae4d0060b2b8c57067dab8bf93983257ff5b70317ab6312dca6ed17deb4614b913bfa64d8923de19d66777a164da1bad6790d4a02534ef385e3df EBUILD krop-9999.ebuild 946 BLAKE2B 5f71943de56f191ebf29d82e6249b5953ba390e564e1bbc820698cc4e04b83381fa8b44aa3912f05ad5088fb1c68a9ef2af9b2338d053d6e869bd52483805248 SHA512 6bd37e5c7b387563783d2423ac0de3640e668126134010f55cf0f7ff7da0998395bfe2a409a4b378f320c10d0cd4bfad5806ec5f73b06ebc70b52e26c12afcfe -MISC metadata.xml 334 BLAKE2B b848b73cedb8a26432461c3a43e097ba4e6e29447014644add41afff8e545ee57983b9c181813b483dc5a79a5071f1de067292c7becbca16e41859d08e870bda SHA512 96f05cf00639a69f2a9aca1bae11a37c5cf39458265b79d8020778e8838452f1a45f95b7329e5cc49de3a946d72205fb5f1c47f4b47a71977f0d21958acba4ea +MISC metadata.xml 412 BLAKE2B cf7adf888afec0389c32bf0ebbb83a0723168970203742a5564872471eb05700cc387ace750b0606deb337e9e0e3d109ff56e650c8c617e516d1196d6ef1f52b SHA512 bc6dd57f76f5ac0468e15f31062d302cc4a7815eb6bd323a610657f02ce46524520652b2125512bb40d50e18b37369b8e1911debd3116a644f3c6ed2c099d62d diff --git a/app-text/krop/files/krop-0.6.0-links.patch b/app-text/krop/files/krop-0.6.0-links.patch new file mode 100644 index 000000000000..c311b10cf88e --- /dev/null +++ b/app-text/krop/files/krop-0.6.0-links.patch @@ -0,0 +1,64 @@ +From a39f8328cf59492e68643f499c0d0fbda910444c Mon Sep 17 00:00:00 2001 +From: Armin Straub <31167361+arminstraub@users.noreply.github.com> +Date: Sun, 17 Jan 2021 15:50:49 -0600 +Subject: [PATCH] Preserve links within a PDF (thanks to chrthi) + +--- + ChangeLog | 4 ++++ + krop/mainwindow.py | 1 + + krop/pdfcropper.py | 11 +++++++++++ + 3 files changed, 16 insertions(+) + +diff --git a/ChangeLog b/ChangeLog +index eb7dbb1..4ffbedb 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++krop (0.6.1) 2021-00-00 -- Armin Straub ++ ++ * Preserve links within a PDF (thanks to chrthi for doing this). ++ + krop (0.6.0) 2020-06-09 -- Armin Straub + + + Fixed aspect ratios, like letter size, can be chosen for selections. +diff --git a/krop/mainwindow.py b/krop/mainwindow.py +index fd1ae32..e8adadf 100644 +--- a/krop/mainwindow.py ++++ b/krop/mainwindow.py +@@ -413,6 +413,7 @@ def slotKrop(self): + pdf = PdfFile() + pdf.loadFromFile(inputFileName) + cropper = PdfCropper() ++ cropper.copyDocumentRoot(pdf) + for nr in pages: + c = self.viewer.cropValues(nr) + cropper.addPageCropped(pdf, nr, c, alwaysinclude, rotation) +diff --git a/krop/pdfcropper.py b/krop/pdfcropper.py +index 679c6fc..db30646 100644 +--- a/krop/pdfcropper.py ++++ b/krop/pdfcropper.py +@@ -55,6 +55,8 @@ def writeToFile(self, filename): + stream.close() + def addPageCropped(self, pdffile, pagenumber, croplist, rotate=0): + pass ++ def copyDocumentRoot(self, pdffile): ++ pass + + + class PyPdfFile(AbstractPdfFile): +@@ -110,6 +112,15 @@ def cropPage(self, page, crop, rotate): + if rotate != 0: + page.rotateClockwise(rotate) + ++ def copyDocumentRoot(self, pdffile): ++ # Sounds promising in PyPDF2 (see PdfFileWriter.cloneDocumentFromReader), ++ # but doesn't seem to produce a readable PDF: ++ # self.output.cloneReaderDocumentRoot(pdffile.reader) ++ # Instead, this copies at least the named destinations for links: ++ for dest in pdffile.reader.namedDestinations.values(): ++ self.output.addNamedDestinationObject(dest) ++ ++ + def optimizePdfGhostscript(oldfilename, newfilename): + import subprocess + subprocess.check_call(('gs', '-sDEVICE=pdfwrite', '-sOutputFile=' + newfilename, diff --git a/app-text/krop/files/krop-0.6.0-pikepdf.patch b/app-text/krop/files/krop-0.6.0-pikepdf.patch new file mode 100644 index 000000000000..17f59f2f72b3 --- /dev/null +++ b/app-text/krop/files/krop-0.6.0-pikepdf.patch @@ -0,0 +1,150 @@ +From b1d17b605088e118a8799fd027a892310e00d29e Mon Sep 17 00:00:00 2001 +From: Hongzhuo Liang +Date: Fri, 27 Jan 2023 17:57:04 +0100 +Subject: [PATCH] support pikepdf instead of pypdf2 + +--- + krop/mainwindow.py | 1 - + krop/pdfcropper.py | 79 ++++++++++++++-------------------------------- + 2 files changed, 24 insertions(+), 56 deletions(-) + +diff --git a/krop/mainwindow.py b/krop/mainwindow.py +index e8adadf..fd1ae32 100644 +--- a/krop/mainwindow.py ++++ b/krop/mainwindow.py +@@ -413,7 +413,6 @@ def slotKrop(self): + pdf = PdfFile() + pdf.loadFromFile(inputFileName) + cropper = PdfCropper() +- cropper.copyDocumentRoot(pdf) + for nr in pages: + c = self.viewer.cropValues(nr) + cropper.addPageCropped(pdf, nr, c, alwaysinclude, rotation) +diff --git a/krop/pdfcropper.py b/krop/pdfcropper.py +index db30646..42500de 100644 +--- a/krop/pdfcropper.py ++++ b/krop/pdfcropper.py +@@ -15,23 +15,8 @@ + + import copy + import sys ++from pikepdf import Pdf + +-# Unless specified otherwise, use PyPDF2 instead of pyPdf if available. +-usepypdf2 = '--no-PyPDF2' not in sys.argv +-if usepypdf2: +- try: +- from PyPDF2 import PdfFileReader, PdfFileWriter +- except ImportError: +- usepypdf2 = False +-if not usepypdf2: +- try: +- from pyPdf import PdfFileReader, PdfFileWriter +- except ImportError: +- _msg = "Please install PyPDF2 (or its predecessor pyPdf) first."\ +- "\n\tOn recent versions of Ubuntu, the following should do the trick:"\ +- "\n\tsudo apt-get install python-pypdf2"\ +- "\n\t(or, if using python3) sudo apt-get install python3-pypdf2" +- raise RuntimeError(_msg) + + class PdfEncryptedError(Exception): + pass +@@ -55,8 +40,6 @@ def writeToFile(self, filename): + stream.close() + def addPageCropped(self, pdffile, pagenumber, croplist, rotate=0): + pass +- def copyDocumentRoot(self, pdffile): +- pass + + + class PyPdfFile(AbstractPdfFile): +@@ -64,23 +47,16 @@ class PyPdfFile(AbstractPdfFile): + def __init__(self): + self.reader = None + def loadFromStream(self, stream): +- if usepypdf2: +- self.reader = PdfFileReader(stream, strict=False) +- else: +- self.reader = PdfFileReader(stream) +- if self.reader.isEncrypted: +- try: +- if not self.reader.decrypt(''): +- raise PdfEncryptedError +- except: +- raise PdfEncryptedError +- def getPage(self, nr): +- page = self.reader.getPage(nr-1) ++ self.reader = Pdf.open(stream) ++ if self.reader.is_encrypted: ++ raise PdfEncryptedError ++ + + class PyPdfCropper(AbstractPdfCropper): + """Implementation of PdfCropper using pyPdf""" + def __init__(self): +- self.output = PdfFileWriter() ++ self.pdf = Pdf.new() ++ + def writeToStream(self, stream): + # For certain large pdf files, PdfFileWriter.write() causes the error: + # maximum recursion depth exceeded while calling a Python object +@@ -88,37 +64,31 @@ def writeToStream(self, stream): + # We therefore temporarily increase the recursion limit. + old_reclimit = sys.getrecursionlimit() + sys.setrecursionlimit(10000) +- self.output.write(stream) ++ self.pdf.save(stream) + sys.setrecursionlimit(old_reclimit) ++ + def addPageCropped(self, pdffile, pagenumber, croplist, alwaysinclude, rotate=0): +- page = pdffile.reader.getPage(pagenumber) ++ page = pdffile.reader.pages[pagenumber] + if not croplist and alwaysinclude: +- self.output.addPage(page) ++ self.pdf.pages.append(page) + for c in croplist: +- newpage = copy.copy(page) +- self.cropPage(newpage, c, rotate) +- self.output.addPage(newpage) +- def cropPage(self, page, crop, rotate): ++ new_box = self.getCropPageParm(page, c) ++ # Update the various PDF boxes ++ new_page = copy.copy(page) ++ new_page.mediabox = new_box ++ new_page.cropbox = new_box ++ new_page.trimbox = new_box ++ if rotate != 0: ++ new_page.rotate(rotate, True) ++ self.pdf.pages.append(new_page) ++ ++ def getCropPageParm(self, page, crop): + # Note that the coordinate system is up-side down compared with Qt. +- x0, y0 = page.cropBox.lowerLeft +- x1, y1 = page.cropBox.upperRight ++ x0, y0, x1, y1 = page.cropbox + x0, y0, x1, y1 = float(x0), float(y0), float(x1), float(y1) + x0, x1 = x0+crop[0]*(x1-x0), x1-crop[2]*(x1-x0) + y0, y1 = y0+crop[3]*(y1-y0), y1-crop[1]*(y1-y0) +- # Update the various PDF boxes +- for box in (page.artBox, page.bleedBox, page.cropBox, page.mediaBox, page.trimBox): +- box.lowerLeft = (x0, y0) +- box.upperRight = (x1, y1) +- if rotate != 0: +- page.rotateClockwise(rotate) +- +- def copyDocumentRoot(self, pdffile): +- # Sounds promising in PyPDF2 (see PdfFileWriter.cloneDocumentFromReader), +- # but doesn't seem to produce a readable PDF: +- # self.output.cloneReaderDocumentRoot(pdffile.reader) +- # Instead, this copies at least the named destinations for links: +- for dest in pdffile.reader.namedDestinations.values(): +- self.output.addNamedDestinationObject(dest) ++ return [x0, y0, x1, y1] + + + def optimizePdfGhostscript(oldfilename, newfilename): +@@ -128,4 +98,3 @@ def optimizePdfGhostscript(oldfilename, newfilename): + + PdfFile = PyPdfFile + PdfCropper = PyPdfCropper +- diff --git a/app-text/krop/krop-0.6.0-r2.ebuild b/app-text/krop/krop-0.6.0-r2.ebuild new file mode 100644 index 000000000000..830a5e54f24d --- /dev/null +++ b/app-text/krop/krop-0.6.0-r2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{9,10} ) +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit desktop distutils-r1 xdg-utils + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/arminstraub/krop.git" +else + SRC_URI="https://github.com/arminstraub/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="A tool to crop PDF files" +HOMEPAGE="http://arminstraub.com/software/krop" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +PATCHES=( + "${FILESDIR}/${P}-links.patch" + "${FILESDIR}/${P}-pikepdf.patch" +) + +RDEPEND="dev-python/python-poppler-qt5[${PYTHON_USEDEP}] + dev-python/pikepdf[${PYTHON_USEDEP}] + dev-python/PyQt5[${PYTHON_USEDEP},gui,widgets]" + +src_install() { + distutils-r1_src_install + domenu "${WORKDIR}/${P}/${PN}.desktop" +} + +pkg_postinst() { + xdg_mimeinfo_database_update + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_mimeinfo_database_update + xdg_desktop_database_update +} diff --git a/app-text/krop/metadata.xml b/app-text/krop/metadata.xml index cb675f253c1d..0581997322f1 100644 --- a/app-text/krop/metadata.xml +++ b/app-text/krop/metadata.xml @@ -8,4 +8,7 @@ printing@gentoo.org Gentoo Printing Project + + arminstraub/krop + diff --git a/app-text/xournalpp/Manifest b/app-text/xournalpp/Manifest index e51243257798..26fd5109111d 100644 --- a/app-text/xournalpp/Manifest +++ b/app-text/xournalpp/Manifest @@ -1,9 +1,12 @@ AUX xournalpp-1.1.1-nocompress.patch 2302 BLAKE2B 1f381d9cc89725aa2ab04c71ceb65c8bf3fad11979c4c689570c9153a9eff456644a38ddee89468f1de976c6e1d837ef46fbb88a771f7eabb1edfa784c51b7ff SHA512 f5222e7764fbbbf8fa20ee8b32609e3d001537c0ac6ef80ab44a8346f6b5545d1339577f4c4001b3516504d9dce45cf441317881a8ede8e331ede7060c197e48 AUX xournalpp-1.1.1-nostrip.patch 1037 BLAKE2B 5016e48f6abd9368ae703f693efe3ae84d395c939f08e9244443c6aaee794729abbc52195816c7e21f08c751b8c953fef3ffda1c0f0ea73a0203f243f614e81d SHA512 5651db0248ad71967412d33cc2f39b8638c38c185635936e988ef7561dd7a51ebb0c7be803a69b7b4eb4cc548dfd237f2920b2b8c8dd779a38b90b4b28e322e1 +AUX xournalpp-1.1.3-gcc13.patch 245 BLAKE2B 32593e41947d39cc13b4012ef7f8b42d422d312f3df724bf29dfd90dacc8a3447dbdc214ec0339f94d98ae74971c45de19d4bd863123ab88256ed6e2952cd2c1 SHA512 8fe22b0d18e1be5add93642bcacac4d246e079bc4e52b6080ba2678d2017616170e1cdd3423a53ad4521a24a5b4631a28ef649b5293648d9ab3fc1048366f9b3 +AUX xournalpp-1.1.3-lua-5-4.patch 402 BLAKE2B fe257a01a3a42306cbded7311b9974db5f19d91a5e616aa9fc063747f3dca2f76e6c79ed7a1e9027fb2826b4064c4d6b28b7859cdc5e27f677faf411819bfff0 SHA512 94889468a810910bc955cdce7e0b4f6b52ae31bab36d7b9fdb03ef7221028e5fa0f3ceebf932c4fcbedb967240f70579a8a0bd6ee81936bdd183619d21cef1d4 DIST xournalpp-1.1.1.tgz 15093900 BLAKE2B 87988bc78a0d904f1e3533e393bcdfc7b76517f6cc13343cb63ceaa83de25eca885274238ce45840334ea653964c9cd1834fc22d5b2c89a731ae5616f01f22c8 SHA512 efba97d26f624e3a1b8164ef6333a0f1d2992d0245414bdb51692d845965f6c37071f687520b43a94f713465796a16cbafd8929fd3bf8e6c3face847df92251d DIST xournalpp-1.1.3.tgz 15096883 BLAKE2B 814aea3510f26f9478280d158cfa32bafd168df6a21e6776cc831f4d41a69b4dd596df3bac990d28851bba933b6c448f1e38109042bd02cd7454985aaac8d13b SHA512 7b3f1507a8f7b2b5ebef093e319008d4bc14b961ab528af490d133bc64176b85b14a4002753f5444f8fd96c326e7c6cf5d1bad443ad7ce2ea56e9f465aacae3d EBUILD xournalpp-1.1.1-r1.ebuild 1019 BLAKE2B cfb457309d08b611980b8e0d8d995f4274b48126c64fee196296b7a89983149f5b76500aba2fd0c10e61b7db57257d8684b5d93b3476791ad70ec47af907280e SHA512 5c31277a74affc8d22e7bbf51e9ea78b53d51b01126bc95ea5210bfdeffa60a2cd7882911a6a00a0e8b225a26d79c9ad53e52055736981eae4c45f0dfe9326c1 EBUILD xournalpp-1.1.1-r2.ebuild 1109 BLAKE2B a7b31fd94be15af38987b78efaacdfa6d19dbc3b7e4a73c07984cbf2b197d11d13439b29a940949695ed825cdb828313e7f06ca01eda780e55626f3e4299bca4 SHA512 3d8df719fc29e5acd86b82d8c79956ec147cfca1ff7051b9a0eb8f9543be00f800c834dac02f8e881e1be39f9b9c3e9451a05a657421ce177f0a804f90fc3a71 +EBUILD xournalpp-1.1.3-r1.ebuild 1233 BLAKE2B ffdc361f6cb2f7c4563a3367deb423525844564e6a7ba2c01c941186f70abf87cf6b3c3ee3f031b1437a252e62b5b3d87f213e52ab6ae5cedd8f5ed095340135 SHA512 a6313dcafeefbbae0c5cf67380694da39eb75447435428bc327862571d99aeb6f1cd2509d2881e8bdfd8d1f65064fa1cad307726edc8416f4e1e804caf43d3db EBUILD xournalpp-1.1.3.ebuild 1109 BLAKE2B c87136070924c6a64ed71705ef7353f3ecc4a4cd5ab201bab3805b113dc407dde7ffa40301c485e52f887a801d52e2555489169b1d5574dec7674d135127e60a SHA512 4f09a601ac97fc76d606a37d7d99400a10eda5662dc3b5307394928e14e815def45dfd46607f8e9dc59658a188b697f687cebaf7eb16a6f8df261d78c29063f2 -EBUILD xournalpp-9999.ebuild 1109 BLAKE2B a7b31fd94be15af38987b78efaacdfa6d19dbc3b7e4a73c07984cbf2b197d11d13439b29a940949695ed825cdb828313e7f06ca01eda780e55626f3e4299bca4 SHA512 3d8df719fc29e5acd86b82d8c79956ec147cfca1ff7051b9a0eb8f9543be00f800c834dac02f8e881e1be39f9b9c3e9451a05a657421ce177f0a804f90fc3a71 +EBUILD xournalpp-9999.ebuild 1233 BLAKE2B ffdc361f6cb2f7c4563a3367deb423525844564e6a7ba2c01c941186f70abf87cf6b3c3ee3f031b1437a252e62b5b3d87f213e52ab6ae5cedd8f5ed095340135 SHA512 a6313dcafeefbbae0c5cf67380694da39eb75447435428bc327862571d99aeb6f1cd2509d2881e8bdfd8d1f65064fa1cad307726edc8416f4e1e804caf43d3db MISC metadata.xml 221 BLAKE2B 4b8e1435358aa300f6debd1760de3509ae9e0ae2678b4d55057c3940efa9b15d62881ac988725e58cce5d2cf63d1de6791cb0b98aa797eecbcdd29c85d8a682f SHA512 40bf10d939c1f6ba4a0594cff7f4a44c16660489226a9a23a6e9327a43dbf757b42a8be0bc8d82daa8818b90c1b4f8c3d093a6b9f36ca15dc36301cda2a308dc diff --git a/app-text/xournalpp/files/xournalpp-1.1.3-gcc13.patch b/app-text/xournalpp/files/xournalpp-1.1.3-gcc13.patch new file mode 100644 index 000000000000..97f7fbc0d7f2 --- /dev/null +++ b/app-text/xournalpp/files/xournalpp-1.1.3-gcc13.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/894720 +https://bugs.gentoo.org/895536 +--- a/src/view/background/BackgroundConfig.h ++++ b/src/view/background/BackgroundConfig.h +@@ -11,6 +11,7 @@ + + #pragma once + ++#include + #include + #include + diff --git a/app-text/xournalpp/files/xournalpp-1.1.3-lua-5-4.patch b/app-text/xournalpp/files/xournalpp-1.1.3-lua-5-4.patch new file mode 100644 index 000000000000..c53b63588c43 --- /dev/null +++ b/app-text/xournalpp/files/xournalpp-1.1.3-lua-5-4.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -148,9 +148,9 @@ if (ENABLE_CPPUNIT) + endif (ENABLE_CPPUNIT) + + # Plugins / scripting +-find_package (Lua 5.3 EXACT) ++find_package (Lua ${LUA_VERSION} EXACT) + if (NOT Lua_FOUND) +- find_package (Lua 5.3) # Lua 5.4 is only supported with cmake >=3.18 ++ find_package (Lua ${LUA_VERSION}) # Lua 5.4 is only supported with cmake >=3.18 + endif() + + if (Lua_FOUND) diff --git a/app-text/xournalpp/xournalpp-1.1.3-r1.ebuild b/app-text/xournalpp/xournalpp-1.1.3-r1.ebuild new file mode 100644 index 000000000000..3e95f5804d98 --- /dev/null +++ b/app-text/xournalpp/xournalpp-1.1.3-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-3 lua5-4 ) +inherit cmake lua-single xdg + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/xournalpp/xournalpp.git" +else + SRC_URI="https://github.com/xournalpp/xournalpp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tgz" + KEYWORDS="~amd64 ~ppc64" +fi + +DESCRIPTION="Handwriting notetaking software with PDF annotation support" +HOMEPAGE="https://github.com/xournalpp/xournalpp" + +LICENSE="GPL-2" +SLOT="0" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +COMMON_DEPEND=" + ${LUA_DEPS} + app-text/poppler[cairo] + dev-libs/glib + dev-libs/libxml2 + dev-libs/libzip:= + gnome-base/librsvg + media-libs/portaudio[cxx] + media-libs/libsndfile + sys-libs/zlib:= + x11-libs/gtk+:3 +" +RDEPEND="${COMMON_DEPEND}" +DEPEND="${COMMON_DEPEND}" +BDEPEND=" + virtual/pkgconfig + sys-apps/lsb-release + elibc_musl? ( sys-libs/libbacktrace ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.1-nostrip.patch" + "${FILESDIR}/${PN}-1.1.1-nocompress.patch" + "${FILESDIR}/${PN}-1.1.3-lua-5-4.patch" + "${FILESDIR}/${PN}-1.1.3-gcc13.patch" +) + +src_configure() { + local mycmakeargs=( + -DLUA_VERSION="$(lua_get_version)" + ) + + cmake_src_configure +} diff --git a/app-text/xournalpp/xournalpp-9999.ebuild b/app-text/xournalpp/xournalpp-9999.ebuild index a1105db47c04..3e95f5804d98 100644 --- a/app-text/xournalpp/xournalpp-9999.ebuild +++ b/app-text/xournalpp/xournalpp-9999.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -# Upstream only support 5.3 (see CMakeLists.txt), also bug #854615 -LUA_COMPAT=( lua5-3 ) +LUA_COMPAT=( lua5-3 lua5-4 ) inherit cmake lua-single xdg if [[ ${PV} == *9999 ]]; then @@ -46,4 +45,14 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${PN}-1.1.1-nostrip.patch" "${FILESDIR}/${PN}-1.1.1-nocompress.patch" + "${FILESDIR}/${PN}-1.1.3-lua-5-4.patch" + "${FILESDIR}/${PN}-1.1.3-gcc13.patch" ) + +src_configure() { + local mycmakeargs=( + -DLUA_VERSION="$(lua_get_version)" + ) + + cmake_src_configure +} -- cgit v1.2.3