Skip to content

Commit

Permalink
dev-games/irrlicht: Fix C++17 does not allow register storage class
Browse files Browse the repository at this point in the history
* also update EAPI 7 -> 8

Closes: gentoo#33236
Closes: https://bugs.gentoo.org/894764
Signed-off-by: Brahmajit Das <[email protected]>
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
listout authored and SoapGentoo committed Oct 7, 2023
1 parent 631c51d commit c0b729c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 16 deletions.
33 changes: 33 additions & 0 deletions dev-games/irrlicht/files/irrlicht-1.8.4-drop-register.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Bug: https://bugs.gentoo.org/894764

--- a/source/Irrlicht/CColorConverter.cpp
+++ b/source/Irrlicht/CColorConverter.cpp
@@ -165,7 +165,7 @@
out += lineWidth * height;

u32 x;
- register u32 c;
+ u32 c;
for (u32 y=0; y < (u32) height; ++y)
{
if (flip)
--- a/source/Irrlicht/CMY3DHelper.h
+++ b/source/Irrlicht/CMY3DHelper.h
@@ -269,7 +269,7 @@
unsigned char *out_buf, int out_buf_size)
{
// we start out with 3 repeating bytes
- register int len = 3;
+ int len = 3;

unsigned char ch;

@@ -328,7 +328,7 @@
//-----------------------------------------------------------
void flush_outbuf(unsigned char *out_buf, int out_buf_size)
{
- register int pos=0;
+ int pos=0;

if(!outbuf_cnt)
return; // nothing to do */
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EAPI=8

inherit toolchain-funcs

DESCRIPTION="open source high performance realtime 3D engine written in C++"
HOMEPAGE="https://irrlicht.sourceforge.io/"
SRC_URI="mirror://sourceforge/irrlicht/${P}.zip
SRC_URI="
mirror://sourceforge/irrlicht/${P}.zip
https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2"
S="${WORKDIR}/${P}/source/${PN^}"

LICENSE="ZLIB"
SLOT="0"
KEYWORDS="amd64 ~riscv x86"
IUSE="debug doc static-libs"
IUSE="debug doc"

RDEPEND="app-arch/bzip2
RDEPEND="
app-arch/bzip2
~dev-games/irrlicht-headers-${PV}
media-libs/libpng:0=
sys-libs/zlib
virtual/jpeg:0
media-libs/libpng:=
sys-libs/zlib:=
media-libs/libjpeg-turbo:=
virtual/opengl
x11-libs/libX11
x11-libs/libXxf86vm"
DEPEND="${RDEPEND}
x11-base/xorg-proto"
BDEPEND="app-arch/unzip"

S=${WORKDIR}/${P}/source/${PN^}

PATCHES=(
"${WORKDIR}"/${P}-patchset/${P}-gentoo.patch
"${WORKDIR}"/${P}-patchset/${P}-demoMake.patch
"${WORKDIR}"/${P}-patchset/${P}-mesa-10.x.patch
"${WORKDIR}"/${P}-patchset/${P}-jpeg-9a.patch
"${FILESDIR}/${P}-remove-sys-sysctl.h.patch"
"${FILESDIR}"/${P}-remove-sys-sysctl.h.patch
"${FILESDIR}"/${P}-drop-register.patch
)

DOCS=( changes.txt readme.txt )
Expand Down Expand Up @@ -62,13 +65,12 @@ src_prepare() {

src_compile() {
tc-export CXX CC AR
emake NDEBUG=$(usex debug "" "1") sharedlib $(usex static-libs "staticlib" "")
emake NDEBUG=$(usev !debug 1) sharedlib
}

src_install() {
cd "${WORKDIR}"/${P} || die

use static-libs && dolib.a lib/Linux/libIrrlicht.a
dolib.so lib/Linux/libIrrlicht.so*

# create library symlinks
Expand All @@ -78,7 +80,5 @@ src_install() {
einstalldocs

# don't do these with einstalldocs because they shouldn't be compressed
if use doc ; then
dodoc -r examples media
fi
use doc && dodoc -r examples media
}

0 comments on commit c0b729c

Please sign in to comment.