summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-10 04:37:19 +0100
committerSam James <sam@gentoo.org>2023-04-10 04:37:19 +0100
commit92eb2acc80acbdc7874a07fea529201047ea9dee (patch)
treec38cba87a97ac7954103086e83dc7eff10e8b923 /app-text/xournalpp
parentapp-text/krop: add github upstream metadata (diff)
downloadgentoo-92eb2acc80acbdc7874a07fea529201047ea9dee.tar.gz
gentoo-92eb2acc80acbdc7874a07fea529201047ea9dee.tar.bz2
gentoo-92eb2acc80acbdc7874a07fea529201047ea9dee.zip
app-text/xournalpp: support Lua 5.4, fix build w/ gcc 13
Bug: https://bugs.gentoo.org/854615 Closes: https://bugs.gentoo.org/894720 Closes: https://bugs.gentoo.org/895536 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/xournalpp')
-rw-r--r--app-text/xournalpp/files/xournalpp-1.1.3-gcc13.patch12
-rw-r--r--app-text/xournalpp/files/xournalpp-1.1.3-lua-5-4.patch14
-rw-r--r--app-text/xournalpp/xournalpp-1.1.3-r1.ebuild58
-rw-r--r--app-text/xournalpp/xournalpp-9999.ebuild15
4 files changed, 96 insertions, 3 deletions
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 <cstdint>
+ #include <map>
+ #include <string>
+
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
+}