1 | diff -ruN enblend-old/Portfile enblend/Portfile |
---|
2 | --- enblend-old/Portfile 2006-11-01 13:25:57.000000000 -0800 |
---|
3 | +++ enblend/Portfile 2008-01-23 17:57:58.000000000 -0800 |
---|
4 | @@ -2,18 +2,39 @@ |
---|
5 | |
---|
6 | PortSystem 1.0 |
---|
7 | name enblend |
---|
8 | -version 2.5 |
---|
9 | +version 3.0 |
---|
10 | categories graphics |
---|
11 | -maintainers froe0071@umn.edu |
---|
12 | +maintainers brad.froehle@gmail.com openmaintainer |
---|
13 | description a tool to composite images |
---|
14 | long_description Enblend is a tool to composite overlapping images \ |
---|
15 | with invisible (or very difficult to see) seams. |
---|
16 | homepage http://enblend.sourceforge.net/ |
---|
17 | master_sites sourceforge:${name} |
---|
18 | -checksums md5 d760e27fa1fa0395c07cc9d1bb1ea3cc |
---|
19 | +checksums md5 f80a12ff91a6122c5ea0d102443929da \ |
---|
20 | + sha1 98f001a4eddb3fd1f9ab7def00d8655d4fb726ea \ |
---|
21 | + rmd160 fceaece3b39b1b8f93f34efa5273a18fc2da356d |
---|
22 | |
---|
23 | -depends_lib port:tiff port:boost |
---|
24 | +depends_lib port:tiff \ |
---|
25 | + port:boost \ |
---|
26 | + port:lcms \ |
---|
27 | + port:glew \ |
---|
28 | + port:libxmi \ |
---|
29 | + port:glut |
---|
30 | |
---|
31 | -configure.args CFLAGS="-I${prefix}/include" \ |
---|
32 | - LDFLAGS="-L${prefix}/lib" \ |
---|
33 | - CPPFLAGS="-I${prefix}/include" |
---|
34 | +configure.cppflags-append -I${x11prefix}/include |
---|
35 | +configure.ldflags-append -L${x11prefix}/lib |
---|
36 | +configure.args --mandir=${prefix}/share/man |
---|
37 | + |
---|
38 | +platform darwin 9 { |
---|
39 | + 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" |
---|
40 | +} |
---|
41 | + |
---|
42 | +patchfiles patch-src_gpu.cc \ |
---|
43 | + patch-src_anneal.h |
---|
44 | + |
---|
45 | +post-destroot { |
---|
46 | + xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} |
---|
47 | + xinstall -m 644 -W ${worksrcpath} AUTHORS ChangeLog COPYING \ |
---|
48 | + INSTALL NEWS README TODO VIGRA_LICENSE \ |
---|
49 | + ${destroot}${prefix}/share/doc/${name} |
---|
50 | +} |
---|
51 | diff -ruN enblend-old/files/patch-src_anneal.h enblend/files/patch-src_anneal.h |
---|
52 | --- enblend-old/files/patch-src_anneal.h 1969-12-31 16:00:00.000000000 -0800 |
---|
53 | +++ enblend/files/patch-src_anneal.h 2007-12-16 15:23:09.000000000 -0800 |
---|
54 | @@ -0,0 +1,21 @@ |
---|
55 | +--- src/anneal.h.orig 2007-12-16 15:11:13.000000000 -0800 |
---|
56 | ++++ src/anneal.h 2007-12-16 15:22:58.000000000 -0800 |
---|
57 | +@@ -39,7 +39,8 @@ |
---|
58 | + #ifdef _WIN32 |
---|
59 | + #include <cmath> |
---|
60 | + #else |
---|
61 | +-#include <math.h> |
---|
62 | ++#include <cmath> |
---|
63 | ++using std::isnan; |
---|
64 | + #endif |
---|
65 | + |
---|
66 | + #include "gpu.h" |
---|
67 | +@@ -678,7 +679,7 @@ |
---|
68 | + |
---|
69 | + localK = stateSpace->size(); |
---|
70 | + if (localK < 2) convergedPoints[index] = true; |
---|
71 | +- kMax = std::max(kMax, stateProbabilities->size()); |
---|
72 | ++ kMax = std::max((size_t)kMax, stateProbabilities->size()); |
---|
73 | + |
---|
74 | + } |
---|
75 | + |
---|
76 | diff -ruN enblend-old/files/patch-src_gpu.cc enblend/files/patch-src_gpu.cc |
---|
77 | --- enblend-old/files/patch-src_gpu.cc 1969-12-31 16:00:00.000000000 -0800 |
---|
78 | +++ enblend/files/patch-src_gpu.cc 2007-12-16 16:27:52.000000000 -0800 |
---|
79 | @@ -0,0 +1,45 @@ |
---|
80 | +--- src/gpu.cc.orig 2007-12-16 15:05:56.000000000 -0800 |
---|
81 | ++++ src/gpu.cc 2007-12-16 16:23:18.000000000 -0800 |
---|
82 | +@@ -22,12 +22,15 @@ |
---|
83 | + |
---|
84 | + #include "gpu.h" |
---|
85 | + |
---|
86 | ++//OSX Hack |
---|
87 | ++#include <dlfcn.h> |
---|
88 | ++ |
---|
89 | + using std::cerr; |
---|
90 | + using std::cout; |
---|
91 | + using std::endl; |
---|
92 | + |
---|
93 | + static GLuint GlutWindowHandle; |
---|
94 | +-static int MaxTextureSize; |
---|
95 | ++static GLint MaxTextureSize; |
---|
96 | + static GLuint PiTexture; |
---|
97 | + static GLuint ETexture; |
---|
98 | + static GLuint OutTexture; |
---|
99 | +@@ -71,8 +74,8 @@ |
---|
100 | + } |
---|
101 | + |
---|
102 | + void printInfoLog(GLhandleARB obj) { |
---|
103 | +- int infologLength = 0; |
---|
104 | +- int charsWritten = 0; |
---|
105 | ++ GLint infologLength = 0; |
---|
106 | ++ GLsizei charsWritten = 0; |
---|
107 | + char *infoLog; |
---|
108 | + glGetObjectParameterivARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &infologLength); |
---|
109 | + if (infologLength > 1) { |
---|
110 | +@@ -116,6 +119,14 @@ |
---|
111 | + } |
---|
112 | + |
---|
113 | + bool initGPU() { |
---|
114 | ++ // OSX hack |
---|
115 | ++ // http://www.ogre3d.org/wiki/index.php/MacLibrary |
---|
116 | ++ void* cocoa_lib; |
---|
117 | ++ cocoa_lib = dlopen( "/System/Library/Frameworks/Cocoa.framework/Cocoa", RTLD_LAZY ); |
---|
118 | ++ void (*nsappload)(void); |
---|
119 | ++ nsappload = (void(*)()) dlsym( cocoa_lib, "NSApplicationLoad"); |
---|
120 | ++ nsappload(); |
---|
121 | ++ |
---|
122 | + glutInitDisplayMode(GLUT_RGBA | GLUT_ALPHA); |
---|
123 | + GlutWindowHandle = glutCreateWindow("Enblend"); |
---|
124 | + |
---|