[83560] trunk/dports/graphics/esdl/Portfile

bfulgham at macports.org bfulgham at macports.org
Mon Sep 5 16:44:56 PDT 2011


Revision: 83560
          http://trac.macports.org/changeset/83560
Author:   bfulgham at macports.org
Date:     2011-09-05 16:44:56 -0700 (Mon, 05 Sep 2011)
Log Message:
-----------
ESDL 1.2 update.  Note hack for forcing a 32-bit build under 64-bit OS's.
This is necessary because wxWidgets does not build (or run) under 64-bit.

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

Modified: trunk/dports/graphics/esdl/Portfile
===================================================================
--- trunk/dports/graphics/esdl/Portfile	2011-09-05 23:42:23 UTC (rev 83559)
+++ trunk/dports/graphics/esdl/Portfile	2011-09-05 23:44:56 UTC (rev 83560)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name			esdl
-version			1.0.1
+version			1.2
 categories		graphics devel erlang
 platforms		darwin
 maintainers		bfulgham
@@ -16,33 +16,68 @@
 homepage		http://esdl.sourceforge.net/
 master_sites		sourceforge
 distfiles		${distname}.src.tar.gz
-checksums               md5     50230ea81418cb029281a70627a5dd8e \
-                        sha1    9452f54e0d8c8db2f54a7a8b4850c352f9267abb \
-                        rmd160  e60ec93bdfdea593f4fd507b65a792ffeccfd0d6
+checksums               md5     3e96c1d47bd7c1e23285360d88ce1bea \
+                        sha1    9a4b0c993b2ebe24565c31b5beaf912635153c8f \
+                        rmd160  fc1f37647ae8e9652413c0ba683743d43c149573
 
-depends_lib			port:libsdl \
-			port:libsdl_gfx \
-			port:libsdl_image \
+depends_lib		port:libsdl-framework \
 			port:erlang
 
-patchfiles 		patch-c_src-Makefile.macOSX \
-			patch-Makefile
-
 use_configure		no
 
-pre-build		{
-			# Use Macintosh Makefile
-			system "cd ${build.dir}/c_src && ln -sf Makefile.macOSX Makefile"
+pre-build {
+	# Use Macintosh Makefile
+	reinplace "s|-arch \[a-z0-9_\]*|${configure.cc_archflags}|g" ${build.dir}/c_src/Makefile.macOSX
+	reinplace "s|LDFLAGS = -F/Library/Frameworks|LDFLAGS = -F${prefix}/Library/Frameworks -F/Library/Frameworks|g" ${build.dir}/c_src/Makefile.macOSX
+	reinplace "s|-I/Library/Frameworks/SDL.framework/Headers|-I${prefix}/Library/Frameworks/SDL.framework/Headers|g" ${build.dir}/c_src/Makefile.macOSX
+	reinplace "s|LDFLAGS = -F/Library/Frameworks|LDFLAGS = -F${prefix}/Library/Frameworks -F/Library/Frameworks|g" ${build.dir}/c_src/Makefile.macOSX
 }
 
+platform darwin {
+    # Note: this horrible hack is needed to get ESDL to build on
+    # 64-bit OS's (like Snow Leopard and Lion).  Once wxWidgets 3.0
+    # is released, this can go away.
+    if {${configure.build_arch} == "x86_64"} {
+        configure.build_arch i386
+        depends_skip_archcheck libsdl-framework
+        depends_skip_archcheck xorg-randrproto
+        depends_skip_archcheck erlang
+    } elseif {${configure.build_arch} == "ppc"} {
+        configure.build_arch ppc
+        depends_skip_archcheck libsdl-framework
+        depends_skip_archcheck xorg-randrproto
+        depends_skip_archcheck erlang
+    }
+}
+
 build.target		
 destroot.destdir		DPORTSDIR=${destroot}
 
-post-destroot		{
-	xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
-	xinstall -m 0644 -W ${worksrcpath} Readme Readme.MacOSX-Cocoa license.terms \
-		${destroot}${prefix}/share/doc/${name}
-	file copy ${worksrcpath}/test ${destroot}${prefix}/share/doc/${name}/test
+set libdir ${prefix}/lib/erlang/lib/${distname}
+
+destroot {
+	xinstall -d -m 0755 ${destroot}${libdir}/ebin
+	xinstall -d -m 0755 ${destroot}${libdir}/src
+	xinstall -d -m 0755 ${destroot}${libdir}/priv
+
+	eval xinstall -m 0755 [glob ${worksrcpath}/ebin/*] \
+		${destroot}${libdir}/ebin
+	eval xinstall -m 0755 [glob ${worksrcpath}/src/*] \
+		${destroot}${libdir}/src
+	eval xinstall -m 0755 [glob ${worksrcpath}/priv/*] \
+		${destroot}${libdir}/priv
+
+	set docdir ${prefix}/share/doc/${name}
+	xinstall -d -m 0755 ${destroot}${docdir}
+	xinstall -d -m 0755 ${destroot}${docdir}/html
+	xinstall -d -m 0755 ${destroot}${docdir}/test
+	xinstall -m 0755 -W ${worksrcpath} Readme Readme.MacOSX-Cocoa license.terms \
+		${destroot}${docdir}
+
+	eval xinstall -m 0755 [glob ${worksrcpath}/doc/*] \
+		${destroot}${docdir}/html
+	eval xinstall -m 0755 [glob ${worksrcpath}/test/*] \
+		${destroot}${docdir}/test
 }
 
 livecheck.regex		<title>${name} ${name}-(.*) released.*</title> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110905/5ec05898/attachment.html>


More information about the macports-changes mailing list