Ticket #45091: Portfile

File Portfile, 4.0 KB (added by c9s (Yo-An Lin), 10 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
2# $Id$
3PortSystem          1.0
4PortGroup           cmake 1.0
5
6name                hhvm
7version             3.2
8maintainers         c9s
9categories          lang
10license             ZEND
11description         HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the flexibility that PHP developers are accustomed to. http://hhvm.com
12long_description    ${name}: ${description}
13
14platforms           darwin
15
16fetch.type          git
17git.url             git://github.com/facebook/hhvm.git
18# git.branch          HHVM-${version}
19git.branch          origin/HHVM-${version}
20
21post-fetch {
22    # Does the github portgroup support 'clone --recursive'?
23    # This will be removed once the python re-write is complete.
24    system -W ${worksrcpath} "git submodule update --init --recursive --force"
25}
26
27depends_build-append port:autoconf port:cmake port:automake port:gcc48 port:binutils port:coreutils
28
29depends_lib         port:oniguruma5 \
30                    port:libvpx \
31                    port:readline \
32                    port:icu \
33                    port:bzip2 \
34                    port:libyaml port:memcached \
35                    port:libelf port:tbb port:libevent \
36                    port:libxslt port:mysql55-connector-cpp \
37                    port:elftoolchain port:google-glog port:libzip \
38                    port:protobuf-c port:protobuf-cpp port:ncurses port:pcre
39
40use_parallel_build  yes
41
42# -DCMAKE_C_COMPILER=${configure.cc}
43# -DCMAKE_CXX_COMPILER=${configure.cxx}
44
45configure.compiler      macports-gcc-4.8
46configure.args-append \
47        -Wno-dev \
48        -DCMAKE_PREFIX_PATH=${prefix} \
49        -DCMAKE_INSTALL_PREFIX=${prefix} \
50        -DCMAKE_ASM_COMPILER=${configure.cc} \
51        -DLIBIBERTY_LIB=${prefix}/lib/gcc48/x86_64/libiberty.a \
52        -DCMAKE_INCLUDE_PATH="${prefix}/include/gcc48/c++/parallel:${prefix}/include:/usr/include" \
53        -DCMAKE_LIBRARY_PATH="${prefix}/lib:/usr/lib" \
54        -DLIBDWARF_LIBRARIES=${prefix}/lib/elftoolchain/libdwarf.3.dylib \
55        -DLIBDWARF_INCLUDE_DIRS=${prefix}/include/elftoolchain \
56        -DLIBEVENT_LIB=${prefix}/lib/libevent.dylib \
57        -DLIBEVENT_INCLUDE_DIR=${prefix}/include \
58        -DLIBVPX_INCLUDE_DIRS=${prefix}/include \
59        -DFREETYPE_INCLUDE_DIRS=${prefix}/include/freetype2 \
60        -DFREETYPE_LIBRARIES=${prefix}/lib/libfreetype.dylib \
61        -DLIBSQLITE3_INCLUDE_DIR=${prefix}/include \
62        -DLIBSQLITE3_LIBRARY=${prefix}/lib/libsqlite3.0.dylib \
63        -DJEMALLOC_INCLUDE_DIR=${prefix}/include \
64        -DJEMALLOC_LIB=${prefix}/lib/libjemalloc.dylib \
65        -DMYSQL_INCLUDE_DIR=${prefix}/include/mysql55/mysql \
66        -DMYSQL_LIB=${prefix}/lib/mysql55/mysql/libmysqlclient.dylib \
67        -DBOOST_INCLUDEDIR=${prefix}/include \
68        -DBOOST_LIBRARYDIR=${prefix}/lib \
69        -DBoost_USE_STATIC_LIBS=ON \
70        -DPCRE_INCLUDE_DIR=${prefix}/include \
71        -DPCRE_LIBRARY=${prefix}/lib/libpcre.dylib \
72        -DREADLINE_INCLUDE_DIR=${prefix}/include \
73        -DREADLINE_LIBRARY=${prefix}/lib/libreadline.dylib \
74        -DCURL_INCLUDE_DIR=${prefix}/include \
75        -DCURL_LIBRARY=${prefix}/lib/libcurl.dylib
76       
77variant typechecker description {Enable HHVM Typechecker} {
78    depends_lib-append port:ocaml port:opam
79    build.target-append hack
80    # configure.args-append -DXXXXX
81}
82
83# distfiles
84# startupitem.create      yes
85# startupitem.executable  ${prefix}/lib/${name_mysql}/bin/mysqld --user=${mysqluser}
86
87pre-destroot {
88    # Fix the library linking path
89    install_name_tool -change libjemalloc.1.dylib ${prefix}/lib/libjemalloc.1.dylib ${worksrcpath}/hphp/hhvm/hhvm
90}
91
92
93# patch.pre_args -p0
94patchfiles 0001-HHVM-3.2.0-cpu_set_t-compilation-fix-on-Mac-OS-10.9.diff
95
96# configure.args-append -DINFODIR=share/info -DDOCDIR=share/doc
97# build {}
98# destroot { }
99
100subport ${name}-devel {
101    git.branch origin/master
102}