commit cc68e73361f031b7819d2a6feb04af42f06e0a3f
parent efd245145048d0470351067e54fc4509f1494809
Author: Jaromil <jaromil@dyne.org>
Date: Tue, 11 Sep 2012 03:53:38 +0200
install fixes for mac osx
Diffstat:
2 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/build/build-osx.sh b/build/build-osx.sh
@@ -20,7 +20,12 @@ cc="${builddir}/cc-static.zsh"
#cflags="-arch x86_64 -arch i386 -O2"
-cflags="-I/opt/local/include -I/usr/include"
+cflags=(-I/opt/local/include -I/usr/include)
+cflags+=(-arch x86_64)
+cflags+=(-arch i386)
+cflags+=(-O2)
+
+
ldflags="-L/opt/local/lib -L/usr/lib"
@@ -62,26 +67,25 @@ copydeps() {
done # 2nd
done # 1st
- { test -r build/osx/`basename $1`.bin } || {
- cp $1 build/osx/`basename $1`.bin }
+ cp $1 build/osx/`basename $1`.bin
for d in `cat $tmp | sort | uniq`; do
- if ! [ -r build/osx/dylib/`basename $d` ]; then
- cp $d build/osx/dylib/
- print "`basename $d`"
- fi
+ if ! [ -r build/osx/dylib/`basename $d` ]; then
+ cp $d build/osx/dylib/
+ print "`basename $d`"
+ fi
done
- { test -r build/osx/`basename $1` } || {
+
# create a wrapper
- cat <<EOF > build/osx/`basename $1`
+ cat <<EOF > build/osx/`basename $1`
#!/usr/bin/env zsh
test -r \$HOME/Mail/jaro/bin/jaro && PDIR=\$HOME/Mail/jaro
test -r jaro/bin/jaro && PDIR="\`pwd\`/jaro"
test \$JAROMAIL && PDIR=\$JAROMAIL
-DYLD_LIBRARY_PATH=\$PDIR/bin/dylib:\$DYLD_LIBRARY_PATH
+DYLD_LIBRARY_PATH=\$PDIR/bin/dylib:\$DYLD_LIBRARY_PATH \\
\$PDIR/bin/`basename $1`.bin \${=@}
EOF
- chmod +x build/osx/`basename $1`
- }
+ chmod +x build/osx/`basename $1`
+
}
print "Building Jaro Mail binary stash for Apple/OSX"
@@ -180,19 +184,23 @@ fi
# CFLAGS="${=cflags}" \
+{ test "$target" = "install" } || {
+ test "$target" = "all" } && {
+
+ mkdir -p build/osx/dylib
# copy all binaries built
-cp src/fetchdate build/osx/
-cp src/fetchaddr build/osx/
-cp src/mairix/mairix build/osx/
+ cp -v src/fetchdate build/osx/
+ cp -v src/fetchaddr build/osx/
+ cp -v src/mairix/mairix build/osx/
# cp src/msmtp/src/msmtp build/osx/
-cp src/dotlock build/osx/
-copydeps ${root}/src/mutt-1.5.21/mutt-jaro
-copydeps /opt/local/bin/msmtp
-copydeps /opt/local/bin/pinentry
-copydeps /opt/local/bin/lynx
-
+ cp -v src/dotlock build/osx/
+ copydeps ${root}/src/mutt-1.5.21/mutt-jaro
+ copydeps /opt/local/bin/msmtp
+ copydeps /opt/local/bin/pinentry
+ copydeps /opt/local/bin/lynx
+}
popd
diff --git a/install.sh b/install.sh
@@ -252,17 +252,7 @@ cp -a src/stats/* $WORKDIR/.stats
case $OS in
MAC)
- test $(which msmtp) || cp build/osx/msmtp* $WORKDIR/bin
- test $(which lynx) || cp build/osx/lynx* $WORKDIR/bin
- test $(which mutt) || cp build/osx/mutt* $WORKDIR/bin
- test $(which pinentry) || cp build/osx/pinentry* $WORKDIR/bin
-
- cp build/osx/dotlock $WORKDIR/bin
- cp build/osx/fetchdate $WORKDIR/bin
- cp build/osx/fetchaddr $WORKDIR/bin
- cp build/osx/mairix $WORKDIR/bin
- cp build/osx/ABQuery $WORKDIR/bin
- cp -r build/osx/dylib $WORKDIR/bin
+ cp -r build/osx/* $WORKDIR/bin
;;
GNU) cp -a build/gnu/* $WORKDIR/bin