summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-09-21 09:18:03 +0000
committerJoonas Niilola <juippis@gentoo.org>2023-10-04 09:05:52 +0300
commit5fe49c1fe532dd7312db3393cf2a19e95e298214 (patch)
tree95f0c636ee1ae41143c569ad2573ea47e46f20a3
parent*/*: reassign cybertailor's packages (diff)
downloadgentoo-5fe49c1fe532dd7312db3393cf2a19e95e298214.tar.gz
gentoo-5fe49c1fe532dd7312db3393cf2a19e95e298214.tar.bz2
gentoo-5fe49c1fe532dd7312db3393cf2a19e95e298214.zip
media-gfx/panini: Fix C++17 does not allow register storage class
and update EAPI 7 -> 8 Closes: https://bugs.gentoo.org/896226 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32962 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--media-gfx/panini/files/panini-0.73.0-drop-register.patch75
-rw-r--r--media-gfx/panini/panini-0.73.0-r1.ebuild56
2 files changed, 131 insertions, 0 deletions
diff --git a/media-gfx/panini/files/panini-0.73.0-drop-register.patch b/media-gfx/panini/files/panini-0.73.0-drop-register.patch
new file mode 100644
index 000000000000..c521c4e6dd5b
--- /dev/null
+++ b/media-gfx/panini/files/panini-0.73.0-drop-register.patch
@@ -0,0 +1,75 @@
+https://github.com/lazarus-pkgs/panini/pull/16
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Thu, 21 Sep 2023 09:12:45 +0000
+Subject: [PATCH] Fix C++17 does not allow register storage class specifier
+
+C++14 depricated register storage class and it was copletely removed
+from C++17. Hence we get this build error with newer compilers like
+Clang 16 and GCC 14. This patch should fix it.
+
+Bug: https://bugs.gentoo.org/896226
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/src/GLwindow.cpp
++++ b/src/GLwindow.cpp
+@@ -901,7 +901,7 @@ void GLwindow::setImgAlpha( QImage * pim, double alpha ){
+ qint32 m = (int( 255 * alpha ) & 255 ) << 24;
+
+ for( int i = pim->width() * pim->height(); i > 0; i-- ){
+- register qint32 t = *pw & 0x00ffffff;
++ qint32 t = *pw & 0x00ffffff;
+ *pw++ = t + m;
+ }
+ }
+@@ -916,8 +916,8 @@ void GLwindow::diceImgAlpha( QImage * pim, double alpha, int dw ){
+ int r = 0, c = 0, w = pim->width();
+
+ for( int i = w * pim->height(); i > 0; i-- ){
+- register qint32 t = *pw & 0x00ffffff;
+- register int d = 1;
++ qint32 t = *pw & 0x00ffffff;
++ int d = 1;
+ if( dw ){ // dice...
+ d = ((r + c) / dw) ^ ((r + w - c) / dw);
+ }
+--- a/src/panocylinder.cpp
++++ b/src/panocylinder.cpp
+@@ -113,10 +113,10 @@ panocylinder::panocylinder( int divs ){
+ double vs = 0.5 * DEG2RAD( 150 ) / double(r2);
+
+ for( int r = 0; r < r2; r++){
+- register double t = tan( r * vs );
+- register float * pv = pv0;
+- register float * pu = pv0 + 3 *( cols + r * cols );
+- register float * pl = pv0 - 3 *( cols + r * cols );
++ double t = tan( r * vs );
++ float * pv = pv0;
++ float * pu = pv0 + 3 *( cols + r * cols );
++ float * pl = pv0 - 3 *( cols + r * cols );
+ for( col = 0; col < cols; col++){
+ *pu++ = *pv;
+ *pl++ = *pv++;
+--- a/src/panosphere.cpp
++++ b/src/panosphere.cpp
+@@ -190,7 +190,7 @@ panosphere::panosphere( int divs ){
+ float * ps = verts; // -> front face
+
+ for( int i = 0; i < ppf; i++ ){
+- register float * p = ps;
++ float * p = ps;
+
+ p += jf; // ->top
+ p[0] = ps[0]; // x = x
+--- a/src/pvQtView.cpp
++++ b/src/pvQtView.cpp
+@@ -465,7 +465,7 @@ void pvQtView::clipEyePosition(){
+ x = c * sin(azi),
+ y = sin(alt),
+ z = c * cos(azi);
+- register double s = eyeDistance;
++ double s = eyeDistance;
+ // the cube texture is only 1 radius wide
+ if( picType == pvQtPic::cub ) s *= 0.5;
+ eyex = x * s;
+--
+2.42.0
+
diff --git a/media-gfx/panini/panini-0.73.0-r1.ebuild b/media-gfx/panini/panini-0.73.0-r1.ebuild
new file mode 100644
index 000000000000..2edaa0d3c56e
--- /dev/null
+++ b/media-gfx/panini/panini-0.73.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop qmake-utils xdg-utils
+
+MY_P="${P/p/P}-src"
+DESCRIPTION="OpenGL-based panoramic image viewer"
+HOMEPAGE="https://github.com/lazarus-pkgs/panini"
+SRC_URI="https://github.com/lazarus-pkgs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtwidgets:5
+ sys-libs/zlib
+ virtual/glu
+"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+"
+
+DOCS=( NEWS {BUILD,README,USAGE}.md )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.73.0-drop-register.patch
+)
+
+src_prepare() {
+ default
+ eqmake5 ${PN}.pro
+}
+
+src_install() {
+ einstalldocs
+ dobin panini
+ domenu "${FILESDIR}"/${PN}.desktop
+ newicon ui/panini-icon-blue.jpg ${PN}.jpg
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}