Ticket #40436: Portfile

File Portfile, 4.5 KB (added by ynaito@…, 11 years ago)

Portfile

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5PortGroup           python  1.0
6PortGroup           github  1.0
7github.setup        ecell ecell3 c63b469914ebd7990a643632181d1a9be1fe99f2
8
9name                py-ecell3
10revision            0
11
12
13categories          science
14maintainers         sfc.keio.ac.jp:ynaito
15license             GPLv2
16homepage            http://www.e-cell.org/
17
18description         E-Cell Simulation Environment (E-Cell SE)
19long_description    E-Cell System is an object-oriented software suite \
20for modeling, simulation, and analysis of large scale complex systems \
21such as biological cells. Core part of the system, E-Cell Simulation \
22Environment version 3, allows many components driven by multiple \
23algorithms with different timescales to coexist.
24
25default_variants +python${python.version} -atlas -gcc43 -gcc44 -gcc45 -no_single -no_static
26
27checksums           md5     0652e3fda892e9e98db177340df5b210 \
28                    sha1    5e1cbaebbbceab1700276aaa39de38dba4e3e972 \
29                    rmd160  deceb28559a2dc988d9ec8a5329e3f8d9bc19945
30
31python.versions     26 27
32python.default_version 27
33
34if {${subport} != ${name}} {
35
36  categories           science
37  dist_subdir          ${name}
38  python.add_archflags no
39  use_configure        yes
40  build.cmd            make
41  build.target         all
42  destroot.cmd         ${build.cmd}
43  destroot.target      install
44  destroot.destdir     DESTDIR=${destroot}
45  pre-destroot         {}
46  extract.asroot       yes
47
48  patchfiles           patch-pyecell_setup.py.in.diff\
49                       patch-DigitalWindow.py.diff\
50                       patch-Drosophila-python.em.diff\
51                       patch-Makefile.am.diff\
52                       patch-_ecs.cpp.diff
53 
54  depends_lib          port:py${python.version}-pygtk \
55                       port:py${python.version}-numpy \
56                       path:lib/libboost_python-mt.a:boost \
57                       port:gsl \
58                       port:py${python.version}-ply
59 
60  depends_build       port:libtool  \
61                      port:autoconf \
62                      port:automake
63 
64  set env_ARCHFLAGS   "ARCHFLAGS=\"-arch ${build_arch}\""
65  set env_PYTHONPATH  "PYTHONPATH=\"${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages:${prefix}/lib/python${python.branch}/site-packages\""
66  configure.env-append ${env_PYTHONPATH}
67  build.env-append     "${env_ARCHFLAGS} ${env_PYTHONPATH}"
68 
69  if {${configure.compiler} == "clang"} {
70          configure.compiler llvm-gcc-4.2
71  }
72 
73  notes \
74  "**************************************************************************
75  To use ecell3-session-monitor, please set environment
76  variable PYTHONPATH as following:
77 
78  For sh, bash:
79  export PYTHONPATH=\"${prefix}/Library/Frameworks/Python.framework/\\
80  Versions/${python.branch}/lib/python${python.branch}/site-packages:${prefix}/lib/python${python.branch}/site-packages\"
81 
82  For csh, tcsh:
83  setenv PYTHONPATH \"${prefix}/Library/Frameworks/Python.framework/\\
84  Versions/${python.branch}/lib/python${python.branch}/site-packages:${prefix}/lib/python${python.branch}/site-packages\"
85  **************************************************************************"
86 
87 
88  pre-fetch {
89 
90      if {![file exists ${prefix}/lib/libboost_python-mt.a]} {
91          if {[file exists ${prefix}/lib/libboost_filesystem-mt.a]} {
92              ui_error "Please uninstall or deactivate the boost port and reinstall it by running `port install boost +python${python.version}`."
93          } else {
94              ui_error "Please install boost with the python${python.version} variant by running `port install boost +python${python.version}`."
95          }
96              error "boost must be installed with the python${python.version} variant enabled."
97      }
98 
99  }
100 
101 
102  pre-extract {
103      if {![file exists ${prefix}/lib/libboost_python.a] && [file exists ${prefix}/lib/libboost_python-mt.a]} {
104          ln -s ${prefix}/lib/libboost_python-mt.a ${prefix}/lib/libboost_python.a
105      }
106      if {![file exists ${prefix}/lib/libboost_python.dylib] && [file exists ${prefix}/lib/libboost_python-mt.dylib]} {
107          ln -s ${prefix}/lib/libboost_python-mt.dylib ${prefix}/lib/libboost_python.dylib
108      }
109 
110  }
111 
112 
113  pre-configure {
114      system "cd ${worksrcpath} && ./autogen.sh"
115  }
116 
117  pre-build {
118  }
119 
120  post-destroot {
121  }
122 
123}