[arch-commits] Commit in freeimage/trunk (PKGBUILD freeimage-libraw-0.20.patch)

Antonio Rojas arojas at archlinux.org
Thu Jul 23 17:32:27 UTC 2020


    Date: Thursday, July 23, 2020 @ 17:32:27
  Author: arojas
Revision: 665015

libraw 0.20 rebuild

Added:
  freeimage/trunk/freeimage-libraw-0.20.patch
Modified:
  freeimage/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   10 +++++---
 freeimage-libraw-0.20.patch |   50 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-23 16:48:10 UTC (rev 665014)
+++ PKGBUILD	2020-07-23 17:32:27 UTC (rev 665015)
@@ -6,7 +6,7 @@
 
 pkgname=freeimage
 pkgver=3.18.0
-pkgrel=5
+pkgrel=6
 pkgdesc="Library project for developers who would like to support popular graphics image formats"
 arch=('x86_64')
 license=('GPL' 'custom:FIPL')
@@ -14,9 +14,11 @@
 depends=('libjpeg-turbo' 'openexr' 'openjpeg2' 'libwebp' 'libraw' 'jxrlib')
 makedepends=('mesa' 'glu')
 source=("https://downloads.sourceforge.net/project/freeimage/Source%20Distribution/${pkgver}/FreeImage${pkgver//./}.zip"
-        freeimage-unbundle.patch)
+        freeimage-unbundle.patch
+        freeimage-libraw-0.20.patch)
 sha512sums=('9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818'
-            '605fd28aaaf3b0ad225d04dd7de5e34d825bb7aa4b1f3a3b4219657c51b2f1507512916e95ba1a731ca5fc8b704f03b83371ab9ad066d74fd49feee735cf13b5')
+            '605fd28aaaf3b0ad225d04dd7de5e34d825bb7aa4b1f3a3b4219657c51b2f1507512916e95ba1a731ca5fc8b704f03b83371ab9ad066d74fd49feee735cf13b5'
+            '5709e4c5baac3505bf2f2498082fbf6b8614e631fec69fc629036c8d033fbe21434a198e9ae24d577dd65928fd31a0d95c584ea4349d74134f7859d4e57b8397')
 
 prepare() {
   cd FreeImage
@@ -27,6 +29,8 @@
   # can't be built due to private headers
   > Source/FreeImage/PluginG3.cpp
   > Source/FreeImageToolkit/JPEGTransform.cpp
+
+  patch -p1 -i ../freeimage-libraw-0.20.patch # Fix build with libraw 0.20
 }
 
 build() {

Added: freeimage-libraw-0.20.patch
===================================================================
--- freeimage-libraw-0.20.patch	                        (rev 0)
+++ freeimage-libraw-0.20.patch	2020-07-23 17:32:27 UTC (rev 665015)
@@ -0,0 +1,50 @@
+--- FreeImage/Source/FreeImage/PluginRAW.cpp.orig	2020-07-23 17:27:57.937848902 +0000
++++ FreeImage/Source/FreeImage/PluginRAW.cpp	2020-07-23 17:28:59.482079468 +0000
+@@ -63,17 +63,14 @@
+ 	}
+ 
+     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,13 +80,11 @@
+ 
+     int get_char() { 
+ 		int c = 0;
+-		if(substream) return substream->get_char();
+ 		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))
+@@ -104,7 +99,6 @@
+ 		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 +121,6 @@
+ 	}
+ 
+ 	int eof() { 
+-		if(substream) return substream->eof();
+         return (_io->tell_proc(_handle) >= _eof);
+     }
+ 



More information about the arch-commits mailing list