diff -ruN enblend-old/Portfile enblend/Portfile --- enblend-old/Portfile 2006-11-01 13:25:57.000000000 -0800 +++ enblend/Portfile 2008-01-23 17:57:58.000000000 -0800 @@ -2,18 +2,39 @@ PortSystem 1.0 name enblend -version 2.5 +version 3.0 categories graphics -maintainers froe0071@umn.edu +maintainers brad.froehle@gmail.com openmaintainer description a tool to composite images long_description Enblend is a tool to composite overlapping images \ with invisible (or very difficult to see) seams. homepage http://enblend.sourceforge.net/ master_sites sourceforge:${name} -checksums md5 d760e27fa1fa0395c07cc9d1bb1ea3cc +checksums md5 f80a12ff91a6122c5ea0d102443929da \ + sha1 98f001a4eddb3fd1f9ab7def00d8655d4fb726ea \ + rmd160 fceaece3b39b1b8f93f34efa5273a18fc2da356d -depends_lib port:tiff port:boost +depends_lib port:tiff \ + port:boost \ + port:lcms \ + port:glew \ + port:libxmi \ + port:glut -configure.args CFLAGS="-I${prefix}/include" \ - LDFLAGS="-L${prefix}/lib" \ - CPPFLAGS="-I${prefix}/include" +configure.cppflags-append -I${x11prefix}/include +configure.ldflags-append -L${x11prefix}/lib +configure.args --mandir=${prefix}/share/man + +platform darwin 9 { + configure.ldflags-append "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" +} + +patchfiles patch-src_gpu.cc \ + patch-src_anneal.h + +post-destroot { + xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} + xinstall -m 644 -W ${worksrcpath} AUTHORS ChangeLog COPYING \ + INSTALL NEWS README TODO VIGRA_LICENSE \ + ${destroot}${prefix}/share/doc/${name} +} diff -ruN enblend-old/files/patch-src_anneal.h enblend/files/patch-src_anneal.h --- enblend-old/files/patch-src_anneal.h 1969-12-31 16:00:00.000000000 -0800 +++ enblend/files/patch-src_anneal.h 2007-12-16 15:23:09.000000000 -0800 @@ -0,0 +1,21 @@ +--- src/anneal.h.orig 2007-12-16 15:11:13.000000000 -0800 ++++ src/anneal.h 2007-12-16 15:22:58.000000000 -0800 +@@ -39,7 +39,8 @@ + #ifdef _WIN32 + #include + #else +-#include ++#include ++using std::isnan; + #endif + + #include "gpu.h" +@@ -678,7 +679,7 @@ + + localK = stateSpace->size(); + if (localK < 2) convergedPoints[index] = true; +- kMax = std::max(kMax, stateProbabilities->size()); ++ kMax = std::max((size_t)kMax, stateProbabilities->size()); + + } + diff -ruN enblend-old/files/patch-src_gpu.cc enblend/files/patch-src_gpu.cc --- enblend-old/files/patch-src_gpu.cc 1969-12-31 16:00:00.000000000 -0800 +++ enblend/files/patch-src_gpu.cc 2007-12-16 16:27:52.000000000 -0800 @@ -0,0 +1,45 @@ +--- src/gpu.cc.orig 2007-12-16 15:05:56.000000000 -0800 ++++ src/gpu.cc 2007-12-16 16:23:18.000000000 -0800 +@@ -22,12 +22,15 @@ + + #include "gpu.h" + ++//OSX Hack ++#include ++ + using std::cerr; + using std::cout; + using std::endl; + + static GLuint GlutWindowHandle; +-static int MaxTextureSize; ++static GLint MaxTextureSize; + static GLuint PiTexture; + static GLuint ETexture; + static GLuint OutTexture; +@@ -71,8 +74,8 @@ + } + + void printInfoLog(GLhandleARB obj) { +- int infologLength = 0; +- int charsWritten = 0; ++ GLint infologLength = 0; ++ GLsizei charsWritten = 0; + char *infoLog; + glGetObjectParameterivARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &infologLength); + if (infologLength > 1) { +@@ -116,6 +119,14 @@ + } + + bool initGPU() { ++ // OSX hack ++ // http://www.ogre3d.org/wiki/index.php/MacLibrary ++ void* cocoa_lib; ++ cocoa_lib = dlopen( "/System/Library/Frameworks/Cocoa.framework/Cocoa", RTLD_LAZY ); ++ void (*nsappload)(void); ++ nsappload = (void(*)()) dlsym( cocoa_lib, "NSApplicationLoad"); ++ nsappload(); ++ + glutInitDisplayMode(GLUT_RGBA | GLUT_ALPHA); + GlutWindowHandle = glutCreateWindow("Enblend"); +