]> granicus.if.org Git - neomutt/commitdiff
travis: add macports config distro/macports
authorRichard Russon <rich@flatcap.org>
Fri, 25 Oct 2019 16:47:00 +0000 (17:47 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 25 Oct 2019 16:47:00 +0000 (17:47 +0100)
.travis.yml
macports/bootstrap.sh [new file with mode: 0755]
macports/mail/neomutt-mp/Portfile [new file with mode: 0644]

index 0002b59fd6e60f48fe64c8b056505dedcd2f0d85..e2ff1f1fd26afbf12509ffaa356a4a9ef4f6f2af 100644 (file)
@@ -1,56 +1,24 @@
 notifications:
   email: false
 
-dist: bionic
+os: osx
 
 language: c
-compiler: gcc
-cache: ccache
-
-addons:
-  apt:
-    packages:
-      - autopoint
-      - docbook-simple
-      - docbook-xsl
-      - gettext
-      - libdb-dev
-      - libgdbm-dev
-      - libgnutls28-dev
-      - libgpgme11-dev
-      - libgss-dev
-      - libidn2-0-dev
-      - libkyotocabinet-dev
-      - liblmdb-dev
-      - liblua5.2-dev
-      - libnotmuch-dev
-      - libqdbm-dev
-      - libsasl2-dev
-      - libslang2-dev
-      - libssl-dev
-      - libtokyocabinet-dev
-      - libxml2-utils
-      - lua5.2
-      - lynx
-      - xsltproc
 
 git:
   depth: 3
 
-install:
-  - git clone --depth 1 https://github.com/neomutt/travis-build.git ~/config
-
-before_script:
-  - ccache --zero-stats
-  - export ANSI_CLEAR
-  - export -f travis_fold
-  - export -f travis_nanoseconds
-  - export -f travis_time_finish
-  - export -f travis_time_start
-
+env:
+  - COLUMNS=78
+before_install:
+  - ./macports/bootstrap.sh
+  - unset CC && source /opt/local/share/macports/setupenv.bash
 script:
-  - ~/config/build
-
-after_script:
-  - ccache --show-stats
-
+  - sed -i '' "s|@@REPO_PATH@@|${PWD}|g" macports/mail/neomutt-mp/Portfile
+  - echo "file://${PWD}/macports" | sudo tee -a /opt/local/etc/macports/sources.conf
+  - portindex -e macports
+  - sudo port install neomutt-mp
+  - port contents neomutt-mp
+  - neomutt -v
+after_failure:
+  - port log neomutt-mp | tail -n 256 && sleep 8
diff --git a/macports/bootstrap.sh b/macports/bootstrap.sh
new file mode 100755 (executable)
index 0000000..ab112e0
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -e
+
+# Uninstall Homebrew
+brew --version
+/usr/bin/sudo /usr/bin/find /usr/local -mindepth 2 -delete && hash -r
+
+# Download and install MacPorts built by https://github.com/macports/macports-base/blob/travis-ci/.travis.yml
+OS_MAJOR=$(uname -r | cut -f 1 -d .)
+curl -fsSLO "https://dl.bintray.com/macports-ci-bot/macports-base/2.6r0/MacPorts-${OS_MAJOR}.tar.bz2"
+sudo tar -xpf "MacPorts-${OS_MAJOR}.tar.bz2" -C /
+rm -f "MacPorts-${OS_MAJOR}.tar.bz2"
+
+unset CC && source /opt/local/share/macports/setupenv.bash
+echo "ui_interactive no" | sudo tee -a /opt/local/etc/macports/macports.conf
+sudo /opt/local/postflight && sudo rm -f /opt/local/postflight
+sudo port -v sync
diff --git a/macports/mail/neomutt-mp/Portfile b/macports/mail/neomutt-mp/Portfile
new file mode 100644 (file)
index 0000000..d516d84
--- /dev/null
@@ -0,0 +1,160 @@
+# -*- 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
+
+PortSystem          1.0
+
+name                neomutt-mp
+version             git
+categories          mail
+platforms           darwin
+license             GPL-2+
+maintainers         {lbschenkel @lbschenkel} {l2dy @l2dy} openmaintainer
+
+description         The Mutt E-Mail Client (patched version with added features)
+long_description    Mutt is a small but very powerful text-based MIME \
+                    mail client. Mutt is highly configurable, and is \
+                    well suited to the mail power user with advanced \
+                    features like key bindings, keyboard macros, mail \
+                    threading, regular expression searches and \
+                    a powerful pattern matching language for selecting \
+                    groups of messages.
+homepage            https://neomutt.org
+
+fetch.type          git
+git.url             file://@@REPO_PATH@@
+
+depends_build       port:docbook-xml-4.2 port:docbook-xsl-nons port:libxslt port:w3m
+depends_lib         path:bin/perl:perl5 \
+                    path:lib/libssl.dylib:openssl \
+                    port:gettext \
+                    port:libiconv \
+                    port:ncurses \
+                    port:zlib
+depends_run         path:share/curl/curl-ca-bundle.crt:curl-ca-bundle
+
+post-patch {
+    # Use MacPorts Perl
+    reinplace -W ${worksrcpath} "s|/usr/bin/perl|${prefix}/bin/perl|g" \
+              doc/gen-map-doc \
+              doxygen/doxygen.conf
+
+    reinplace -W ${worksrcpath} "s|/usr/bin/|${prefix}/bin/|g" \
+              contrib/sample.neomuttrc-tlr \
+              contrib/smime_keys \
+              contrib/smime_keys_test.pl \
+              doc/manual.xml.head
+    reinplace -W ${worksrcpath} "s|/usr/libexec/|${prefix}/libexec/|g" \
+              contrib/gpg.rc \
+              contrib/smime.rc \
+              doc/manual.xml.head
+    reinplace -W ${worksrcpath} "s|/usr/local/|${prefix}/|g" \
+              init.h \
+              contrib/hcache-bench/README.md \
+              contrib/sample.neomuttrc \
+              doc/manual.xml.head
+    reinplace -W ${worksrcpath} "s|/usr/share|${prefix}/share|g" \
+              doc/manual.xml.head
+}
+
+configure.args      --disable-idn \
+                    --with-ncurses=${prefix} \
+                    --with-nls=${prefix} \
+                    --with-ssl=${prefix}
+
+# disable ccache, build issues with autosetup
+configure.ccache     no
+configure.env-append CCACHE=none
+
+default_variants    +idn +mutt
+if {${install.user} ne "root"} {
+    default_variants-append     +homespool
+}
+
+variant db4 conflicts db5 description {Support Berkeley DB database} {
+    configure.args-append       --with-bdb=${prefix} --with-bdb-version=4.8
+    depends_lib-append          port:db48
+}
+variant db5 conflicts db4 description {Support Berkeley DB database} {
+    configure.args-append       --with-bdb=${prefix} --with-bdb-version=5.3
+    depends_lib-append          port:db53
+}
+variant gdbm description {Support GNU dbm database} {
+    configure.args-append       --with-gdbm=${prefix}
+    depends_lib-append          port:gdbm
+}
+variant gnutls description {Use GnuTLS} {
+    configure.args-replace      --with-ssl=${prefix} --with-gnutls=${prefix}
+    depends_lib-replace         path:lib/libssl.dylib:openssl port:gnutls
+}
+variant gpgme description {Enable GPGME crypto support} {
+    configure.args-append       --with-gpgme=${prefix}
+    depends_lib-append          port:gpgme
+}
+variant gss description {Support GSS API (Kerberos)} {
+    configure.args-append       --with-gss=${prefix}
+    depends_lib-append          port:kerberos5
+}
+variant homespool description {Spool mail in home directory (allows installing without root privileges)} {
+    configure.args-append       --homespool
+}
+variant idn description {Internationalized Domain Name support} {
+    configure.args-replace      --disable-idn --with-idn=${prefix}
+    depends_lib-append          port:libidn
+}
+variant kyotocabinet description {Support Kyoto Cabinet database} {
+    configure.args-append       --with-kyotocabinet=${prefix}
+    depends_lib-append          port:kyotocabinet
+}
+variant lmdb description {Support LMDB database} {
+    configure.args-append       --with-lmdb=${prefix}
+    depends_lib-append          port:lmdb
+}
+variant lua description {Lua scripting support} {
+    configure.args-append       --with-lua=${prefix}
+    depends_lib-append          port:lua
+}
+variant mutt description {Create 'mutt' symlink} {
+    post-destroot {
+        file link -symbolic ${destroot}${prefix}/bin/mutt neomutt
+    }
+}
+variant notmuch description {Notmuch support} {
+    configure.args-append       --with-notmuch=${prefix}
+    depends_lib-append          port:notmuch
+}
+variant qdbm description {Support QDBM database} {
+    configure.args-append       --with-qdbm=${prefix}
+    depends_lib-append          port:qdbm
+}
+variant sasl description {Simple Authentication and Security Layer support} {
+    configure.args-append       --with-sasl=${prefix}
+    depends_lib-append          port:cyrus-sasl2
+}
+variant slang description {Use S-lang instead of ncurses} {
+    configure.args-append       --with-ui=slang --with-slang=${prefix}
+    depends_lib-replace         port:ncurses port:slang2
+}
+variant tokyocabinet description {Support Tokyo Cabinet database} {
+    configure.args-append       --with-tokyocabinet=${prefix}
+    depends_lib-append          port:tokyocabinet
+}
+
+post-destroot {
+    move ${destroot}${prefix}/etc/neomuttrc \
+         ${destroot}${prefix}/etc/neomuttrc.sample
+    # install mime.types in ${prefix}/etc as previous versions used to do
+    copy ${destroot}${prefix}/share/doc/neomutt/mime.types \
+         ${destroot}${prefix}/etc/mime.types.sample
+    # install examples in ${prefix}/share/examples
+    xinstall -d ${destroot}${prefix}/share/examples
+    move ${destroot}${prefix}/share/doc/neomutt/samples \
+         ${destroot}${prefix}/share/examples/neomutt
+}
+
+post-activate {
+    foreach f { mime.types neomuttrc } {
+        if {![file exists ${prefix}/etc/${f}]} {
+            copy ${prefix}/etc/${f}.sample \
+                 ${prefix}/etc/${f}
+        }
+    }
+}