Skip to content
Snippets Groups Projects
Commit 4d0eefc1 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Improved macports on travis-ci

Take advantage of https://github.com/GiovanniBussi/macports-ci

In this manner I will have to maintain a single script even though
I use macports on travis-ci for multiple projects
parent 4a75d38d
No related branches found
No related tags found
No related merge requests found
...@@ -109,22 +109,16 @@ install: ...@@ -109,22 +109,16 @@ install:
# I do it only when LD_LIBRARY_PATH is non blank, since otherwise clang gives problems # I do it only when LD_LIBRARY_PATH is non blank, since otherwise clang gives problems
- if test -n "$LD_LIBRARY_PATH" ; then PLUMED_LDFLAGS="-Wl,-rpath,$LD_LIBRARY_PATH" ; fi - if test -n "$LD_LIBRARY_PATH" ; then PLUMED_LDFLAGS="-Wl,-rpath,$LD_LIBRARY_PATH" ; fi
# macports related stuff # macports related stuff
- if test -n "$PLUMED_MACPORTS" ; then export COLUMNS=80 ; fi # configure macports
# install macports from source: - if test -n "$PLUMED_MACPORTS" ; then
# - if test -n "$PLUMED_MACPORTS" ; then wget https://distfiles.macports.org/MacPorts/MacPorts-2.3.4.tar.bz2 && tar xvfj MacPorts-2.3.4.tar.bz2 ; fi export COLUMNS=80 ;
# - if test -n "$PLUMED_MACPORTS" ; then cd MacPorts-2.3.4 && ./configure && sudo make install && cd - && sudo rm -fr MacPorts-2.3.4 ; fi wget https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci ;
# install macports from binary (faster): chmod +x ./macports-ci ;
- if test -n "$PLUMED_MACPORTS" ; then OSX_VERSION="$(sw_vers -productVersion | sed 's/\.[^\.]*$//')" ; fi ./macports-ci install ;
- MACPORTS_PKG=MacPorts-2.4.1-10.11-ElCapitan.pkg PATH="/opt/local/bin:$PATH" ;
- if test "$OSX_VERSION" == 10.12 ; then MACPORTS_PKG=MacPorts-2.4.1-10.12-Sierra.pkg ; fi make macports ;
- echo "$MACPORTS_PKG" ./macports-ci localports macports ;
- if test -n "$PLUMED_MACPORTS" ; then wget https://distfiles.macports.org/MacPorts/$MACPORTS_PKG ; fi fi
- if test -n "$PLUMED_MACPORTS" ; then sudo installer -pkg $MACPORTS_PKG -target / ; fi
- if test -n "$PLUMED_MACPORTS" ; then export PATH=/opt/local/bin:$PATH ; fi
- if test -n "$PLUMED_MACPORTS" ; then sudo port -N -v selfupdate ; fi
- if test -n "$PLUMED_MACPORTS" ; then make macports ; fi
- if test -n "$PLUMED_MACPORTS" ; then ./.travis/config.macports.sh ; fi
script: script:
# make sure all modules are enabled # make sure all modules are enabled
- CONFIG_FLAGS="$CONFIG_FLAGS --enable-modules=all" - CONFIG_FLAGS="$CONFIG_FLAGS --enable-modules=all"
......
#! /bin/bash
set -e
set -x
cd macports
cp /opt/local/etc/macports/sources.conf $$
awk -v repo="file://$PWD" '{if($NF=="[default]") print repo; print}' $$ > $$.new
sudo mv -f $$.new /opt/local/etc/macports/sources.conf
echo "** NEW SOURCES"
cat /opt/local/etc/macports/sources.conf
echo "** END NEW SOURCES"
rm -f $$
portindex
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment