[58302] trunk/dports/graphics/povray

jmr at macports.org jmr at macports.org
Fri Sep 25 09:35:43 PDT 2009


Revision: 58302
          http://trac.macports.org/changeset/58302
Author:   jmr at macports.org
Date:     2009-09-25 09:35:39 -0700 (Fri, 25 Sep 2009)
Log Message:
-----------
povray: build fixes for snow leopard / x86_64 (#21604), avoid using outdated internal libpng, only install sample config files, fix livecheck, misc other fixes

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

Added Paths:
-----------
    trunk/dports/graphics/povray/files/
    trunk/dports/graphics/povray/files/patch-configure
    trunk/dports/graphics/povray/files/patch-source_png_pov.cpp

Modified: trunk/dports/graphics/povray/Portfile
===================================================================
--- trunk/dports/graphics/povray/Portfile	2009-09-25 16:26:31 UTC (rev 58301)
+++ trunk/dports/graphics/povray/Portfile	2009-09-25 16:35:39 UTC (rev 58302)
@@ -4,7 +4,7 @@
 
 name			povray
 version			3.6.1
-revision                1
+revision                2
 maintainers		nomaintainer
 categories		graphics
 platforms		darwin
@@ -15,9 +15,13 @@
 homepage		http://www.povray.org/
 master_sites	${homepage}ftp/pub/povray/Official/Unix/ \
 				ftp://ftp.povray.org/pub/povray/Official/Unix/
-checksums		md5 b5789bb7eeaed0809c5c82d0efda571d
+checksums		md5 b5789bb7eeaed0809c5c82d0efda571d \
+			sha1 1fab3ccbdedafbf77e3a66087709bbdf60bc643d
 use_bzip2		yes
 
+depends_build \
+    port:pkgconfig
+
 depends_lib \
 	port:xorg-libsm \
 	port:xpm \
@@ -26,9 +30,39 @@
 	port:zlib \
 	port:tiff
 
+patchfiles      patch-configure patch-source_png_pov.cpp
+
+# uses its own cflags in addition to the ones we pass anyway
+configure.optflags
 configure.args	--includedir=${prefix}/include \
 				--mandir=${prefix}/share/man \
-				COMPILED_BY="${maintainers}"
+				COMPILED_BY="MacPorts"
 
+set branch [join [lrange [split ${version} .] 0 1] .]
+post-destroot {
+    foreach f {povray.conf povray.ini} {
+        move ${destroot}${prefix}/etc/povray/${branch}/${f} \
+             ${destroot}${prefix}/etc/povray/${branch}/${f}.sample
+    }
+}
+post-activate {
+    foreach f {povray.conf povray.ini} {
+        if {![file exists ${prefix}/etc/povray/${branch}/${f}]} {
+            copy ${prefix}/etc/povray/${branch}/${f}.sample \
+                 ${prefix}/etc/povray/${branch}/${f}
+        }
+    } 
+}
+
 test.run		yes
 test.target		check
+
+platform darwin {
+    if {![variant_isset universal]} {
+        configure.args-append --build=${build_arch}-apple-darwin${os.major}
+    }
+}
+
+livecheck.type  regex
+livecheck.url   ${homepage}ftp/pub/povray/Official/Unix/
+livecheck.regex {CURRENT-VERSION-IS-([0-9.]+)}

Added: trunk/dports/graphics/povray/files/patch-configure
===================================================================
--- trunk/dports/graphics/povray/files/patch-configure	                        (rev 0)
+++ trunk/dports/graphics/povray/files/patch-configure	2009-09-25 16:35:39 UTC (rev 58302)
@@ -0,0 +1,28 @@
+--- configure.orig	2004-08-03 09:20:13.000000000 +1000
++++ configure	2009-09-26 01:11:40.000000000 +1000
+@@ -10646,6 +10646,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include "png.h"
+ int main (void)
+@@ -10653,7 +10654,7 @@
+   const char *version = png_get_libpng_ver(NULL)
+     ;
+   fprintf (stderr, "%s\n", version);
+-  return ! (strcmp (version ? version : "", "$required_libpng_version") >= 0);
++  return (system ("pkg-config --atleast-version=$required_libpng_version libpng"));
+ }
+ 
+ 
+@@ -14933,7 +14934,7 @@
+             ;;
+           k6-*)           pov_arch="k6"; pov_arch_fallback="i686";;
+           k7-*)           pov_arch="k7"; pov_arch_fallback="i686";;
+-          k8-*|x86_64-*)  pov_arch="k8"; pov_arch_fallback="i686";;
++          k8-*)           pov_arch="k8"; pov_arch_fallback="i686";;
+           *)              pov_arch="unknown";;
+         esac
+       fi

Added: trunk/dports/graphics/povray/files/patch-source_png_pov.cpp
===================================================================
--- trunk/dports/graphics/povray/files/patch-source_png_pov.cpp	                        (rev 0)
+++ trunk/dports/graphics/povray/files/patch-source_png_pov.cpp	2009-09-25 16:35:39 UTC (rev 58302)
@@ -0,0 +1,11 @@
+--- source/png_pov.cpp.orig	2004-08-03 00:11:37.000000000 +0100
++++ source/png_pov.cpp	2006-11-15 16:48:33.000000000 +0000
+@@ -782,7 +782,7 @@
+       {
+          // finished prematurely - trick into thinking done
+          png_ptr->num_rows = png_ptr->row_number;
+-         png_write_finish_row(png_ptr);
++         png_write_row(png_ptr, row_ptr);
+       }
+ 
+ #ifdef POV_COMMENTS // temporarily skip comment writing code 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090925/8d4e1efb/attachment.html>


More information about the macports-changes mailing list