forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: https://bugs.gentoo.org/645518 Signed-off-by: Haelwenn (lanodan) Monnier <[email protected]>
- Loading branch information
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
21 changes: 21 additions & 0 deletions
21
media-libs/devil/files/devil-1.8.0-jasper-function-signatures.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters