[148921] trunk/dports/graphics/openexr

mcalhoun at macports.org mcalhoun at macports.org
Sun May 22 14:52:44 PDT 2016


Revision: 148921
          https://trac.macports.org/changeset/148921
Author:   mcalhoun at macports.org
Date:     2016-05-22 14:52:43 -0700 (Sun, 22 May 2016)
Log Message:
-----------
openexr: fix upgrade errors found in #51470

Modified Paths:
--------------
    trunk/dports/graphics/openexr/Portfile

Added Paths:
-----------
    trunk/dports/graphics/openexr/files/patch-64bit_types.diff
    trunk/dports/graphics/openexr/files/patch-search_order.diff

Modified: trunk/dports/graphics/openexr/Portfile
===================================================================
--- trunk/dports/graphics/openexr/Portfile	2016-05-22 21:50:50 UTC (rev 148920)
+++ trunk/dports/graphics/openexr/Portfile	2016-05-22 21:52:43 UTC (rev 148921)
@@ -18,11 +18,19 @@
 checksums       rmd160  a825ed42e731da3bc39f25ce2a310712a5b0f956 \
                 sha256  36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231
 
+# avoid dependency on port:cctools
+configure.env-append NM=${prefix}/bin/nm
+
+# avoid dependency on port:grep
+configure.env-append GREP=/usr/bin/grep
+
 if {${subport} ne "ilmbase"} {
     depends_build-append port:pkgconfig
 }
 
 if {${subport} eq ${name}} {
+    revision 1
+    
     depends_lib-append port:ilmbase
 
     # ImfCompressor.h is included in other header files
@@ -30,6 +38,18 @@
     # see also https://lists.nongnu.org/archive/html/openexr-devel/2013-06/msg00001.html
     patchfiles \
         patch-IlmImf-Makefile.diff
+
+    # which upgrading, do not find old header files and libraries (see #51470)
+    patchfiles-append \
+        patch-search_order.diff
+    #
+    configure.ldflags-delete -L${prefix}/lib
+
+    # see
+    #    https://github.com/openexr/openexr/commit/353cbc2e89c582e07796f01bce8f203e84c8ae46
+    #    and
+    #    https://github.com/openexr/openexr/commit/57ecf581d053f5cacf2e8fc3c024490e0bbe536f
+    patchfiles-append patch-64bit_types.diff
 }
 
 subport ilmbase {

Added: trunk/dports/graphics/openexr/files/patch-64bit_types.diff
===================================================================
--- trunk/dports/graphics/openexr/files/patch-64bit_types.diff	                        (rev 0)
+++ trunk/dports/graphics/openexr/files/patch-64bit_types.diff	2016-05-22 21:52:43 UTC (rev 148921)
@@ -0,0 +1,120 @@
+From 57ecf581d053f5cacf2e8fc3c024490e0bbe536f Mon Sep 17 00:00:00 2001
+From: Brendan Bolles <brendan at fnordware.com>
+Date: Wed, 13 Aug 2014 19:54:10 -0700
+Subject: [PATCH] Use LL for 64-bit literals
+
+On a 32-bit architecture, these literals are too big for just a long,
+they need to be long long, otherwise I get an error in GCC.
+---
+ IlmImf/ImfFastHuf.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/IlmImf/ImfFastHuf.cpp b/IlmImf/ImfFastHuf.cpp
+index 86c84dc..01edad4 100644
+--- IlmImf/ImfFastHuf.cpp.orig
++++ IlmImf/ImfFastHuf.cpp
+@@ -107,7 +107,7 @@ FastHufDecoder::FastHufDecoder
+     for (int i = 0; i <= MAX_CODE_LEN; ++i)
+     {
+         codeCount[i] = 0;
+-        base[i]      = 0xffffffffffffffffL;
++        base[i]      = 0xffffffffffffffffLL;
+         offset[i]    = 0;
+     }
+ 
+@@ -352,7 +352,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+ 
+     for (int i = 0; i <= MAX_CODE_LEN; ++i)
+     {
+-        if (base[i] != 0xffffffffffffffffL)
++        if (base[i] != 0xffffffffffffffffLL)
+         {
+             _ljBase[i] = base[i] << (64 - i);
+         }
+@@ -362,7 +362,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+             // Unused code length - insert dummy values
+             //
+ 
+-            _ljBase[i] = 0xffffffffffffffffL;
++            _ljBase[i] = 0xffffffffffffffffLL;
+         }
+     }
+ 
+@@ -417,7 +417,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+ 
+     int minIdx = TABLE_LOOKUP_BITS;
+ 
+-    while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffL)
++    while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffLL)
+         minIdx--;
+ 
+     if (minIdx < 0)
+@@ -427,7 +427,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+         // Set the min value such that the table is never tested.
+         //
+ 
+-        _tableMin = 0xffffffffffffffffL;
++        _tableMin = 0xffffffffffffffffLL;
+     }
+     else
+     {
+
+From 353cbc2e89c582e07796f01bce8f203e84c8ae46 Mon Sep 17 00:00:00 2001
+From: Brendan Bolles <brendan at fnordware.com>
+Date: Thu, 14 Aug 2014 18:49:56 -0700
+Subject: [PATCH] Change suffixes to ULL because Int64 is unsigned
+
+As discusses in pull request #126
+---
+ IlmImf/ImfFastHuf.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/IlmImf/ImfFastHuf.cpp b/IlmImf/ImfFastHuf.cpp
+index 01edad4..10bc318 100644
+--- IlmImf/ImfFastHuf.cpp.orig
++++ IlmImf/ImfFastHuf.cpp
+@@ -107,7 +107,7 @@ FastHufDecoder::FastHufDecoder
+     for (int i = 0; i <= MAX_CODE_LEN; ++i)
+     {
+         codeCount[i] = 0;
+-        base[i]      = 0xffffffffffffffffLL;
++        base[i]      = 0xffffffffffffffffULL;
+         offset[i]    = 0;
+     }
+ 
+@@ -352,7 +352,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+ 
+     for (int i = 0; i <= MAX_CODE_LEN; ++i)
+     {
+-        if (base[i] != 0xffffffffffffffffLL)
++        if (base[i] != 0xffffffffffffffffULL)
+         {
+             _ljBase[i] = base[i] << (64 - i);
+         }
+@@ -362,7 +362,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+             // Unused code length - insert dummy values
+             //
+ 
+-            _ljBase[i] = 0xffffffffffffffffLL;
++            _ljBase[i] = 0xffffffffffffffffULL;
+         }
+     }
+ 
+@@ -417,7 +417,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+ 
+     int minIdx = TABLE_LOOKUP_BITS;
+ 
+-    while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffLL)
++    while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffULL)
+         minIdx--;
+ 
+     if (minIdx < 0)
+@@ -427,7 +427,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset)
+         // Set the min value such that the table is never tested.
+         //
+ 
+-        _tableMin = 0xffffffffffffffffLL;
++        _tableMin = 0xffffffffffffffffULL;
+     }
+     else
+     {

Added: trunk/dports/graphics/openexr/files/patch-search_order.diff
===================================================================
--- trunk/dports/graphics/openexr/files/patch-search_order.diff	                        (rev 0)
+++ trunk/dports/graphics/openexr/files/patch-search_order.diff	2016-05-22 21:52:43 UTC (rev 148921)
@@ -0,0 +1,37 @@
+--- IlmImf/Makefile.in.orig	2016-05-22 12:57:47.000000000 -0700
++++ IlmImf/Makefile.in	2016-05-22 13:18:35.000000000 -0700
+@@ -458,9 +458,10 @@
+ 		 ImfOptimizedPixelReading.h
+ 
+ EXTRA_DIST = $(noinst_HEADERS) b44ExpLogTable.cpp b44ExpLogTable.h dwaLookups.cpp dwaLookups.h CMakeLists.txt
+-INCLUDES = @ILMBASE_CXXFLAGS@ \
++INCLUDES = \
+ 	   -I$(top_builddir)  \
+-	   -I$(top_srcdir)/config
++	   -I$(top_srcdir)/config \
++	   @ILMBASE_CXXFLAGS@
+ 
+ CLEANFILES = b44ExpLogTable b44ExpLogTable.h dwaLookups dwaLookups.h
+ b44ExpLogTable_SOURCES = b44ExpLogTable.cpp
+--- IlmImfUtil/Makefile.in.orig	2014-08-09 21:48:23.000000000 -0700
++++ IlmImfUtil/Makefile.in	2016-05-22 14:30:46.000000000 -0700
+@@ -260,15 +260,16 @@
+ 	ImfImageDataWindow.h ImfImageDataWindow.cpp \
+ 	ImfImageChannelRenaming.h
+ 
+-libIlmImfUtil_la_LDFLAGS = @ILMBASE_LDFLAGS@ -version-info \
++libIlmImfUtil_la_LDFLAGS = -version-info \
+ 	@LIBTOOL_VERSION@ -no-undefined $(am__append_1)
+ libIlmImfUtil_la_LIBADD = -L$(top_builddir)/IlmImf @ILMBASE_LIBS@ -lIlmImf
+ libIlmImfUtilincludedir = $(includedir)/OpenEXR
+ EXTRA_DIST = CMakeLists.txt
+-INCLUDES = @ILMBASE_CXXFLAGS@ \
++INCLUDES = \
+ 	   -I$(top_builddir)  \
+ 	   -I$(top_srcdir)/IlmImf  \
+-	   -I$(top_srcdir)/config
++	   -I$(top_srcdir)/config \
++	   @ILMBASE_CXXFLAGS@
+ 
+ all: all-am
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160522/e3891535/attachment-0001.html>


More information about the macports-changes mailing list