[59002] trunk/dports/math

vince at macports.org vince at macports.org
Thu Oct 8 06:16:25 PDT 2009


Revision: 59002
          http://trac.macports.org/changeset/59002
Author:   vince at macports.org
Date:     2009-10-08 06:16:24 -0700 (Thu, 08 Oct 2009)
Log Message:
-----------
Initial import

Added Paths:
-----------
    trunk/dports/math/gaul-devel/
    trunk/dports/math/gaul-devel/Portfile
    trunk/dports/math/gaul-devel/files/
    trunk/dports/math/gaul-devel/files/patch-config_h

Added: trunk/dports/math/gaul-devel/Portfile
===================================================================
--- trunk/dports/math/gaul-devel/Portfile	                        (rev 0)
+++ trunk/dports/math/gaul-devel/Portfile	2009-10-08 13:16:24 UTC (rev 59002)
@@ -0,0 +1,55 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
+
+PortSystem							1.0
+
+name										gaul-devel
+version									0.1850
+license									GPL
+categories							math
+maintainers							vince
+description							Genetic algorithms library
+long_description				\
+												A flexible programming library for evolutionary \
+												computation. Steady-state, generational and island \
+												model genetic algorithms are supported, using \
+												Darwinian, Lamarckian or Baldwinian evolution. \
+												Includes support for multiprocessor and distributed \
+												systems.
+
+platforms								darwin
+homepage								http://gaul.sourceforge.net/
+master_sites						sourceforge:gaul
+distname								${name}-${version}-${revision}
+
+checksums								md5			3a832c882b0df0f5c46f733d360fd7bb \
+												sha1		2ec57a5bce2ff7fc9f9c3453b2ea2d3aec248350 \
+												rmd160	efd4f1dad25bbe487e1e8bd56cb499a07c92a1e7
+
+# Finds out the number of CPU on the machine
+set	nb_th								[expr [exec sysctl -n hw.logicalcpu] * 2]
+
+# Configuration
+configure.args-append		--enable-g=yes
+configure.args-append		--enable-ccoptim=yes
+configure.args-append		--enable-padding=yes
+configure.args-append		--enable-pthread
+configure.args-append		--enable-num-threads=${nb_th}
+configure.args-append		--enable-num-procs=${nb_th}
+
+variant mpi {
+	configure.args-append	--enable-mpi=yes
+}
+
+variant slang {
+	depends.lib-append		port:slang
+	configure.args-append	--enable-slang=yes
+}
+
+# Patches
+post-configure {
+	system "chmod +x ${filespath}/patch-config_h"
+	system "${filespath}/patch-config_h ${worksrcpath}/config.h"
+	reinplace -E \
+		"s|^CC=\"(.*)\"|CC=\"\\1 ${configure.universal_cflags}\"|" \
+		${worksrcpath}/libtool
+}

Added: trunk/dports/math/gaul-devel/files/patch-config_h
===================================================================
--- trunk/dports/math/gaul-devel/files/patch-config_h	                        (rev 0)
+++ trunk/dports/math/gaul-devel/files/patch-config_h	2009-10-08 13:16:24 UTC (rev 59002)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+echo Patching $1
+
+cat $1 | \
+sed 's/#define *SIZEOF_VOID_P .*/\
+#ifdef __LP64__\
+  #define SIZEOF_VOID_P	8\
+#else\
+  #define SIZEOF_VOID_P 4\
+#endif/' |\
+sed 's/#define *SIZEOF_LONG .*/\
+#ifdef __LP64__\
+  #define SIZEOF_LONG	8\
+#else\
+  #define SIZEOF_LONG 4\
+#endif/' |\
+sed 's/#define *SIZEOF_SIZE_T .*/\
+#ifdef __LP64__\
+  #define SIZEOF_SIZE_T	8\
+#else\
+  #define SIZEOF_SIZE_T 4\
+#endif/' > /private/tmp/$$.tmp
+rm $1
+mv /private/tmp/$$.tmp $1


Property changes on: trunk/dports/math/gaul-devel/files/patch-config_h
___________________________________________________________________
Added: svn:executable
   + 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091008/f3bb3c38/attachment.html>


More information about the macports-changes mailing list