testing/freeimage: new aport

This commit is contained in:
Taner Tas 2018-02-28 17:55:26 +00:00 committed by Leonardo Arena
parent 6e03802a5a
commit 792ba63de2
5 changed files with 1327 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff -ruN a/Makefile.gnu b/Makefile.gnu
--- a/Makefile.gnu 2015-04-09 16:34:02.315316841 +0200
+++ b/Makefile.gnu 2015-04-09 16:34:28.875483201 +0200
@@ -71,9 +71,9 @@
install:
install -d $(INCDIR) $(INSTALLDIR)
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+ install -m 644 $(HEADER) $(INCDIR)
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
# ldconfig

View File

@ -0,0 +1,67 @@
Fix build issue caused by invalid register usage on x86
Patch taken from https://github.com/openexr/openexr/issues/128.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp
===================================================================
--- a/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp
+++ b/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp
@@ -40,21 +40,19 @@
namespace {
#if defined(IMF_HAVE_SSE2) && defined(__GNUC__)
-
+#include <cpuid.h>
// Helper functions for gcc + SSE enabled
- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
+ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx,
+ unsigned int &ecx, unsigned int &edx)
{
- __asm__ __volatile__ (
- "cpuid"
- : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
- : /* Input */ "a"(n)
- : /* Clobber */);
+ __get_cpuid(n, &eax, &ebx, &ecx, &edx);
}
#else // IMF_HAVE_SSE2 && __GNUC__
// Helper functions for generic compiler - all disabled
- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
+ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx,
+ unsigned int &ecx, unsigned int &edx)
{
eax = ebx = ecx = edx = 0;
}
@@ -64,7 +62,7 @@
#ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
- void xgetbv(int n, int &eax, int &edx)
+ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx)
{
__asm__ __volatile__ (
"xgetbv"
@@ -75,7 +73,7 @@
#else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
- void xgetbv(int n, int &eax, int &edx)
+ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx)
{
eax = edx = 0;
}
@@ -94,8 +92,8 @@
f16c(false)
{
bool osxsave = false;
- int max = 0;
- int eax, ebx, ecx, edx;
+ unsigned int max = 0;
+ unsigned int eax, ebx, ecx, edx;
cpuid(0, max, ebx, ecx, edx);
if (max > 0)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
libraw/dc_raw: fix gcc-6 failures
With gcc-6, it is no longer allowed to narrow the type of constants in
a constant array declaration.
Fixes:
http://autobuild.buildroot.org/results/081/0811531872f69f9febbdc482dfbdd7fb5c35d1c8/build-end.log
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -durN a/Source/LibRawLite/internal/dcraw_common.cpp b/Source/LibRawLite/internal/dcraw_common.cpp
--- a/Source/LibRawLite/internal/dcraw_common.cpp
+++ b/Source/LibRawLite/internal/dcraw_common.cpp
@@ -2479,7 +2479,7 @@
void CLASS kodak_radc_load_raw()
{
- static const char src[] = {
+ static const signed char src[] = {
1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8,
1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8,
2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8,
@@ -4519,7 +4519,7 @@
*/
void CLASS vng_interpolate()
{
- static const signed char *cp, terms[] = {
+ static const int *cp, terms[] = {
-2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01,
-2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01,
-2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,

View File

@ -0,0 +1,41 @@
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=freeimage
pkgver=3.17.0
pkgrel=0
pkgdesc="Open Source library project for developers who would like to support popular graphics image formats."
url="http://freeimage.sourceforge.net/"
arch="all"
license="GPL-2.0-only FreeImage"
_distname="FreeImage"
makedepends="dos2unix"
subpackages="$pkgname-dev"
source="http://downloads.sourceforge.net/${pkgname}/${_distname}${pkgver//.}.zip
0001-no-root-install.patch
0002-fix-cpuid-x86.patch
0003-LibWebP-fix-compilation-issue-with-GCC-5.x-C-11.patch
0004-fix-gcc-6.patch"
options="!check"
prepare() {
mv ${srcdir}/${_distname} ${srcdir}/${pkgname}-${pkgver}
find "$builddir" -type f -exec dos2unix -q -s {} \;
default_prepare
}
build() {
cd "$builddir"
make
}
package() {
cd "$builddir"
#sed -i -e 's/-o root -g root//' Makefile.*
make DESTDIR="${pkgdir}" install
}
sha512sums="703c2626c0bcfe73eb40d720f45745208ca9650a7730759680a2b38ad3f6c719a43008477032bc70b76a95761f7d4b6f901b961359d36b54ace906dd78fb391b FreeImage3170.zip
2dc51d700671962339cc1f27c0ad7e679e7ed6233d1534b81d68fcffb6e86960fa182b6916d19da7451bf34b69efe4a1b62b7f335b9802d7799706b766257d59 0001-no-root-install.patch
ef88862593bd8d271d11f86ec389c8a92c131ffb03fb7028e87dfddc7ae74e22bef50327175a7dcee9c414df80e84579c59f3b8e1f825d54f0fdc76a0530c06f 0002-fix-cpuid-x86.patch
4208d4f3ee49424d65c5e78c18c424543208a554855a6ea1cafd32e57b7354aa36131ea62a95a6856e19c5c0ef47e7d63616e690246c1b19716dca323c3476cc 0003-LibWebP-fix-compilation-issue-with-GCC-5.x-C-11.patch
75050c6a6b2f30c42e9b5d1326499f4d088e3c79b23c92bea72b60fe6759d1e529b136f599d7de059c433cfc661b189d8dd6e32e9fcb0244fb27153c792d3c0e 0004-fix-gcc-6.patch"