Ticket #37641: couchdb-devel.20130218.patch

File couchdb-devel.20130218.patch, 7.9 KB (added by jeff@…, 12 years ago)
  • Portfile

     
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    22# $Id$
    33
    4 PortSystem 1.0
    5 PortGroup active_variants 1.1
     4PortSystem           1.0
     5PortGroup            active_variants 1.1
    66
    7 name                couchdb-devel
    8 conflicts           couchdb
    9 svn.revision        1177555
    10 version             1.3.0a${svn.revision}
    11 revision            1
     7name                 couchdb-devel
     8conflicts            couchdb
     9version              1.4.0a-20130217
    1210
    13 categories          databases
    14 platforms           darwin
     11categories           databases
     12platforms            darwin
    1513
    16 description         CouchDB is a document database server
    17 maintainers         jsnider.net:jeff \
    18                     openmaintainer
    19 long_description  ${description} with a restful HTTP API, capable of \
    20         storing arbitrary JSON documents, building powerful data views, \
    21         defined in JavaScript, and processed in parallel using Map/Reduce. \
    22         It leaves out SQL and transactions for simplicity's sake, to \
    23         improve scalability and to relax users' lives.
     14description          CouchDB is a document database server
     15maintainers          jsnider.net:jeff \
     16                     openmaintainer
     17long_description     ${description} with a restful HTTP API, capable of \
     18                     storing arbitrary JSON documents, building powerful data views, \
     19                     defined in JavaScript, and processed in parallel using Map/Reduce. \
     20                     It leaves out SQL and transactions for simplicity's sake, to \
     21                     improve scalability and to relax users' lives.
    2422
    25 homepage            http://couchdb.apache.org/
    26 master_sites        ${homepage}
     23homepage             http://couchdb.apache.org/
    2724
    28 distname            couchdb-${version}
    29 fetch.type          svn
    30 svn.url             http://svn.apache.org/repos/asf/couchdb/trunk
    31 worksrcdir          trunk
     25fetch.type           git
     26git.url              https://git-wip-us.apache.org/repos/asf/couchdb.git
     27git.branch           fdbd48a44624bff120daa51992924feeca23ba00
    3228
    33 depends_lib     port:automake \
    34     port:autoconf \
    35     port:libtool \
    36     port:help2man \
    37     port:icu \
    38     port:spidermonkey \
    39     port:erlang
     29depends_build        port:automake \
     30                     port:autoconf \
     31                     port:libtool \
     32                     port:help2man \
     33                     port:pkgconfig \
     34                     port:autoconf-archive
    4035
     36depends_lib          port:icu \
     37                     port:spidermonkey \
     38                     port:erlang
     39
    4140# erlang is not universal
    42 universal_variant   no
     41universal_variant    no
    4342
    44 patchfiles          patch-automake-1.13.diff \
    45                     patch-configure.ac.diff \
    46                     patch-src-couchdb-priv-Makefile.am.diff
     43patchfiles           patch-automake-1.13.diff \
     44                     patch-src-couchdb-priv-Makefile.am.diff
    4745
    4846require_active_variants erlang ssl
    4947
     
    5149    system "cd ${worksrcpath}; ./bootstrap"
    5250}
    5351
    54 set dbgroup couchdb
    55 set dbuser couchdb
    56 set logdir ${prefix}/var/log/couchdb
    57 set dbdir ${prefix}/var/lib/couchdb
    58 set plistdir /Library/LaunchDaemons
     52configure.args       --with-js-include=${prefix}/include/js \
     53                     --with-erlang=${prefix}/lib/erlang/usr/include \
     54                     --enable-js-trunk
     55
     56set dbgroup          couchdb
     57set dbuser           couchdb
     58set logdir           ${prefix}/var/log/couchdb
     59set dbdir            ${prefix}/var/lib/couchdb
     60set confdir          ${prefix}/etc/couchdb
     61set rundir           ${prefix}/var/run/couchdb
     62set plistdir         /Library/LaunchDaemons
    5963startupitem.uniquename org.apache.couchdb
    60 set plist ${startupitem.uniquename}.plist
     64set plist            ${startupitem.uniquename}.plist
    6165
     66add_users            ${dbuser} group=${dbgroup}
     67
    6268post-destroot {
    63     addgroup ${dbgroup}
    64     adduser ${dbuser} gid=[existsgroup ${dbgroup}]
     69    move ${destroot}${confdir}/local.ini ${destroot}${confdir}/local.ini.sample
    6570    xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \
    66         ${destroot}${dbdir} \
    67         ${destroot}${logdir} \
    68         ${destroot}${plistdir}
     71        ${destroot}${dbdir} \
     72        ${destroot}${logdir} \
     73        ${destroot}${plistdir} \
     74        ${destroot}${rundir}
    6975    destroot.keepdirs-append \
    7076        ${destroot}${dbdir} \
    71         ${destroot}${logdir}
     77        ${destroot}${logdir} \
     78        ${destroot}${rundir}
    7279    system "cd ${destroot}${plistdir} && ln -sf ${prefix}${plistdir}/${plist}"
    7380}
    7481
     82post-activate {
     83    if {![file exists ${confdir}/local.ini]} {
     84        xinstall -m 640 -o ${dbuser} -g ${dbgroup} ${confdir}/local.ini.sample ${confdir}/local.ini
     85    }
     86}
     87
     88
    7589notes "
    76 Changes in CouchDB r753448 make older database files incompatible.\
    77 See http://wiki.apache.org/couchdb/BreakingChanges for details.
    78 
    7990Run the following command to load the CouchDB launchd plist\
    8091in order to start the service now and at system startup:
    8192
    82 sudo launchctl load -w ${plistdir}/${plist}
     93sudo port load couchdb
    8394"
    8495
    85 livecheck.type  regex
    86 livecheck.url   http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/
    87 livecheck.version       ${svn.revision}
    88 livecheck.regex  (\[0-9\]+)
     96livecheck.type       regex
     97livecheck.url        "https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=commit;h=refs/heads/master"
     98livecheck.version    ${git.branch}
     99livecheck.regex      <tr><td>commit</td><td class="sha1">(\[a-f0-9\]{40})</td></tr>
     100
     101
  • files/patch-automake-1.13.diff

     
    1 --- configure.ac.orig   2011-09-15 10:44:37.000000000 -0500
    2 +++ configure.ac        2013-01-14 01:35:34.000000000 -0600
    3 @@ -18,8 +18,7 @@
    4  AC_CONFIG_AUX_DIR([build-aux])
    5  AC_CONFIG_MACRO_DIR([m4])
     1--- bootstrap.orig      2013-01-15 08:43:05.000000000 -0600
     2+++ bootstrap   2013-01-15 08:42:39.000000000 -0600
     3@@ -84,9 +84,9 @@
     4 }
    65 
    7 -AM_CONFIG_HEADER([config.h])
    8 -AC_CONFIG_HEADERS([src/snappy/google-snappy/config.h])
    9 +AC_CONFIG_HEADERS([config.h src/snappy/google-snappy/config.h])
     6 LIBTOOLIZE=`find_program glibtoolize libtoolize`
     7-ACLOCAL=`find_program aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal`
     8+ACLOCAL=`find_program aclocal`
     9 AUTOHEADER=`find_program autoheader`
     10-AUTOMAKE=`find_program automake-1.11 automake-1.10 automake-1.9 automake`
     11+AUTOMAKE=`find_program automake`
     12 AUTOCONF=`find_program autoconf`
    1013 
    11  AM_INIT_AUTOMAKE([1.6.3 foreign])
    12  
     14 get_aclocal_dir_list () {
  • files/patch-configure.ac.diff

     
    1 --- configure.ac.orig   2011-09-15 10:44:37.000000000 -0500
    2 +++ configure.ac        2013-01-14 02:18:15.000000000 -0600
    3 @@ -349,7 +348,7 @@
    4  AM_CONDITIONAL([USE_OTP_NIFS], [test x$otp_release \> xR13B03])
    5  AM_CONDITIONAL([USE_EJSON_COMPARE_NIF], [test x$otp_release \> xR14B03])
    6  
    7 -has_crypto=`${ERL} -eval "case application:load(crypto) of ok -> ok; _ -> exit(no_crypto) end." -noshell -s init stop`
    8 +has_crypto=""
    9  
    10  if test -n "$has_crypto"; then
    11      AC_MSG_ERROR([Could not find the Erlang crypto library. Has Erlang been compiled with OpenSSL support?])
  • files/patch-src-couchdb-priv-Makefile.am.diff

     
    11--- src/couchdb/priv/Makefile.am.orig   2011-09-01 23:03:05.000000000 -0500
    22+++ src/couchdb/priv/Makefile.am        2013-01-14 05:13:47.000000000 -0600
    3 @@ -55,7 +55,7 @@
     3@@ -70,7 +70,7 @@
    44 
    55 locallibbin_PROGRAMS = couchjs
    66 couchjs_SOURCES = $(COUCHJS_SRCS)