Skip to content

Commit

Permalink
media-libs/devil: add 1.8.0
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/645518
Signed-off-by: Haelwenn (lanodan) Monnier <[email protected]>
  • Loading branch information
lanodan committed Oct 15, 2023
1 parent d8198ed commit 191d708
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions media-libs/devil/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST DevIL-1.7.8.tar.gz 2051993 BLAKE2B 7c06549f7d90965fe6dcd7c6b460119a8491ca50f3103c745195fa5483885878717e9ae417eda51f25cbb60c0a96be180b12727115212709199ded13156ecb3e SHA512 a67e1488d6cb366431d9fcb460b8fe5b8a1dd79426ac77f8abd0db4a5aad7512697f72ef0c49ddb0e806469cc37ba1319e10ccd2ebd73942332df2c3c507458e
DIST DevIL-1.8.0.tar.gz 3084833 BLAKE2B 74257355ef5d1374eedfdbe7a7d4eb23538119e5194041c2c368db0537d927aa120fdbf8d38f12ea23666cfdd9cd2ff83a73f7e1770b92dc9b5d015c05b08afb SHA512 103fa51f4094af0fe988bf9520e1b9178900f980b72226e64ede60b6b0938a646c670a37372214edb557e492947cd5af5012a3ac906734a5ea83e072f81db583
55 changes: 55 additions & 0 deletions media-libs/devil/devil-1.8.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake flag-o-matic

MY_P=DevIL-${PV}

DESCRIPTION="DevIL image library"
HOMEPAGE="https://openil.sourceforge.net/"
SRC_URI="mirror://sourceforge/openil/${MY_P}.tar.gz"
S="${WORKDIR}/DevIL/DevIL"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
IUSE="jasper jpeg lcms mng png tiff"

# jasper isn't required but is automagic
RDEPEND="
jasper? media-libs/jasper:= )
jpeg? ( media-libs/libjpeg-turbo:= )
lcms? ( media-libs/lcms )
mng? ( media-libs/libmng:= )
png? (
media-libs/libpng:=
sys-libs/zlib:=
)
tiff? ( media-libs/tiff:= )
"
DEPEND="${RDEPEND}"

PATCHES=(
"${FILESDIR}/devil-1.8.0-jasper-function-signatures.patch"
)

src_configure() {
local mycmakeargs=(
-DIL_NO_JP2=$(usex !jasper)
-DIL_NO_JPG=$(usex !jpeg)
-DIL_NO_LCMS=$(usex !lcms)
-DIL_NO_MNG=$(usex !mng)
-DIL_NO_PNG=$(usex !png)
-DIL_NO_TIF=$(usex !tiff)
)

# Taken from Alpine which also has the following comment:
# "register" storage class specifier is no longer allowed in modern C++
# standards. Until upstream removes the qualifier, we can just ignore the
# warning.
append-cxxflags -Wno-register

cmake_src_configure
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This fixes mismatching function signatures when using function pointers to
iJp2_file_read and iJp2_file_write in jas_stream_opts_t.

--- a/src-IL/src/il_jp2.cpp
+++ b/src-IL/src/il_jp2.cpp
@@ -314,13 +314,13 @@



-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt)
+static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt)
{
obj;
return iread(buf, 1, cnt);
}

-static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt)
+static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt)
{
obj;
return iwrite(buf, 1, cnt);
1 change: 1 addition & 0 deletions media-libs/devil/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="allegro">Add support for Allegro</flag>
<flag name="jasper">Add support for <pkg>media-libs/jasper</pkg></flag>
</use>
<upstream>
<remote-id type="github">DentonW/DevIL</remote-id>
Expand Down

0 comments on commit 191d708

Please sign in to comment.