[3f9ab6]: mac / ExternalPrograms / scripts / static / libexiv2.sh  Maximize  Restore  History

Download this file

112 lines (85 with data), 2.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
# ------------------
# libexiv2
# ------------------
# $Id: $
# Copyright (c) 2008, Ippei Ukai
# prepare
# export REPOSITORYDIR="/PATH2HUGIN/mac/ExternalPrograms/repository" \
# ARCHS="ppc i386" \
# ppcTARGET="powerpc-apple-darwin8" \
# ppcOSVERSION="10.4" \
# ppcMACSDKDIR="/Developer/SDKs/MacOSX10.4u.sdk" \
# ppcOPTIMIZE="-mcpu=G3 -mtune=G4" \
# i386TARGET="i386-apple-darwin8" \
# i386OSVERSION="10.4" \
# i386MACSDKDIR="/Developer/SDKs/MacOSX10.4u.sdk" \
# i386OPTIMIZE="-march=prescott -mtune=pentium-m -ftree-vectorize" \
# OTHERARGs="";
# init
let NUMARCH="0"
for i in $ARCHS
do
NUMARCH=$(($NUMARCH + 1))
done
mkdir -p "$REPOSITORYDIR/bin";
mkdir -p "$REPOSITORYDIR/lib";
mkdir -p "$REPOSITORYDIR/include";
# compile
for ARCH in $ARCHS
do
mkdir -p "$REPOSITORYDIR/arch/$ARCH/bin";
mkdir -p "$REPOSITORYDIR/arch/$ARCH/lib";
mkdir -p "$REPOSITORYDIR/arch/$ARCH/include";
ARCHARGs=""
MACSDKDIR=""
if [ $ARCH = "i386" -o $ARCH = "i686" ]
then
TARGET=$i386TARGET
MACSDKDIR=$i386MACSDKDIR
ARCHARGs="$i386OPTIMIZE -mmacosx-version-min=$i386OSVERSION"
elif [ $ARCH = "ppc" -o $ARCH = "ppc750" -o $ARCH = "ppc7400" ]
then
TARGET=$ppcTARGET
MACSDKDIR=$ppcMACSDKDIR
ARCHARGs="$ppcOPTIMIZE -mmacosx-version-min=$ppcOSVERSION"
elif [ $ARCH = "ppc64" -o $ARCH = "ppc970" ]
then
TARGET=$ppc64TARGET
MACSDKDIR=$ppc64MACSDKDIR
ARCHARGs="$ppc64OPTIMIZE -mmacosx-version-min=$ppc64OSVERSION"
elif [ $ARCH = "x86_64" ]
then
TARGET=$x64TARGET
MACSDKDIR=$x64MACSDKDIR
ARCHARGs="$x64OPTIMIZE -mmacosx-version-min=$x64OSVERSION"
fi
env CFLAGS="-isysroot $MACSDKDIR -arch $ARCH $ARCHARGs $OTHERARGs -O2 -dead_strip" \
CXXFLAGS="-isysroot $MACSDKDIR -arch $ARCH $ARCHARGs $OTHERARGs -O2 -dead_strip" \
CPPFLAGS="-I$REPOSITORYDIR/include" \
LDFLAGS="-L$REPOSITORYDIR/lib -dead_strip -prebind" \
NEXT_ROOT="$MACSDKDIR" \
./configure --prefix="$REPOSITORYDIR" --disable-dependency-tracking \
--host="$TARGET" --exec-prefix=$REPOSITORYDIR/arch/$ARCH \
--enable-static --disable-shared\
--disable-rpath;
make clean;
make $OTHERMAKEARGs;
cd src; make install-lib; cd ../;
done
# merge libexiv2
for liba in lib/libexiv2.a
do
if [ $NUMARCH -eq 1 ]
then
mv "$REPOSITORYDIR/arch/$ARCHS/$liba" "$REPOSITORYDIR/$liba";
ranlib "$REPOSITORYDIR/$liba";
continue
fi
LIPOARGs=""
for ARCH in $ARCHS
do
LIPOARGs="$LIPOARGs $REPOSITORYDIR/arch/$ARCH/$liba"
done
lipo $LIPOARGs -create -output "$REPOSITORYDIR/$liba";
ranlib "$REPOSITORYDIR/$liba";
done

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks