diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-01-01 21:06:00 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-01-01 21:06:00 +0000 |
commit | 129160ec854dca4c3fedb5bcfbcb56930371da0f (patch) | |
tree | 53bf797418ac5e9b99c41ca0382c87b82421e5de /media-libs/freeimage/files | |
parent | 441d1370330332b7d78f238d2f5e13f7aed5e4e0 (diff) |
gentoo new year resync : 01.01.2021
Diffstat (limited to 'media-libs/freeimage/files')
-rw-r--r-- | media-libs/freeimage/files/freeimage-3.18.0-libraw-0.20.0.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/media-libs/freeimage/files/freeimage-3.18.0-libraw-0.20.0.patch b/media-libs/freeimage/files/freeimage-3.18.0-libraw-0.20.0.patch new file mode 100644 index 000000000000..dc108b567c4e --- /dev/null +++ b/media-libs/freeimage/files/freeimage-3.18.0-libraw-0.20.0.patch @@ -0,0 +1,71 @@ +https://bugs.gentoo.org/734724 +"FreeImage now uses LibRaw 0.20-Beta2 (GIT patch 2020-05-29) +git-svn-id: https://svn.code.sf.net/p/freeimage/svn@1842 f6e0daa0-2725-47c6-9c0b-5e6e9cdd0720" +--- a/Source/FreeImage/PluginRAW.cpp ++++ b/Source/FreeImage/PluginRAW.cpp +@@ -59,21 +59,18 @@ public: + } + + int valid() { +- return (_io && _handle); ++ return (_io && _handle) ? 1 : 0; + } + + int read(void *buffer, size_t size, size_t count) { +- if(substream) return substream->read(buffer, size, count); + return _io->read_proc(buffer, (unsigned)size, (unsigned)count, _handle); + } + + int seek(INT64 offset, int origin) { +- if(substream) return substream->seek(offset, origin); + return _io->seek_proc(_handle, (long)offset, origin); + } + + INT64 tell() { +- if(substream) return substream->tell(); + return _io->tell_proc(_handle); + } + +@@ -83,19 +80,21 @@ public: + + int get_char() { + int c = 0; +- if(substream) return substream->get_char(); +- if(!_io->read_proc(&c, 1, 1, _handle)) return -1; ++ if (!_io->read_proc(&c, 1, 1, _handle)) { ++ return -1; ++ } + return c; + } + + char* gets(char *buffer, int length) { +- if (substream) return substream->gets(buffer, length); + memset(buffer, 0, length); + for(int i = 0; i < length; i++) { +- if(!_io->read_proc(&buffer[i], 1, 1, _handle)) ++ if (!_io->read_proc(&buffer[i], 1, 1, _handle)) { + return NULL; +- if(buffer[i] == 0x0A) ++ } ++ if (buffer[i] == 0x0A) { + break; ++ } + } + return buffer; + } +@@ -104,7 +103,6 @@ public: + std::string buffer; + char element = 0; + bool bDone = false; +- if(substream) return substream->scanf_one(fmt,val); + do { + if(_io->read_proc(&element, 1, 1, _handle) == 1) { + switch(element) { +@@ -127,7 +125,6 @@ public: + } + + int eof() { +- if(substream) return substream->eof(); + return (_io->tell_proc(_handle) >= _eof); + } + |