aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-28 22:51:24 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-28 22:51:24 -0700
commit366ec59181998f669c5cd7823e66a7c302199ad1 (patch)
tree767a712f8cd1f53fb7b2bdc8e9b5e556104e7a4a /scripts
parentbf59fc2c68fde5b9e6a747248057553f81ae15b8 (diff)
Simplified static builds of mailcore2
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-mailcore2-ios.sh4
-rwxr-xr-xscripts/build-mailcore2-osx.sh2
-rw-r--r--scripts/deps-versions.plistbin227 -> 233 bytes
-rwxr-xr-xscripts/include.sh/build-dep.sh40
4 files changed, 33 insertions, 13 deletions
diff --git a/scripts/build-mailcore2-ios.sh b/scripts/build-mailcore2-ios.sh
index c55e9af6..2a2eddc1 100755
--- a/scripts/build-mailcore2-ios.sh
+++ b/scripts/build-mailcore2-ios.sh
@@ -12,7 +12,7 @@ name="mailcore2-ios"
xcode_target="static mailcore2 ios"
xcode_project="mailcore2.xcodeproj"
library="libMailCore-ios.a"
-embedded_deps="ctemplate-ios libetpan-ios tidy-html5-ios uchardet-ios"
-flatten_deps=1
+embedded_deps="ctemplate-ios libetpan-ios libsasl-ios tidy-html5-ios uchardet-ios"
+build_mailcore=1
build_git_ios
diff --git a/scripts/build-mailcore2-osx.sh b/scripts/build-mailcore2-osx.sh
index 8e755993..aaf84924 100755
--- a/scripts/build-mailcore2-osx.sh
+++ b/scripts/build-mailcore2-osx.sh
@@ -13,6 +13,6 @@ xcode_target="static mailcore2 osx"
xcode_project="mailcore2.xcodeproj"
library="libMailCore.a"
embedded_deps="ctemplate-osx libetpan-osx uchardet-osx"
-flatten_deps=1
+build_mailcore=1
build_git_osx
diff --git a/scripts/deps-versions.plist b/scripts/deps-versions.plist
index d53a4628..3ec48e12 100644
--- a/scripts/deps-versions.plist
+++ b/scripts/deps-versions.plist
Binary files differ
diff --git a/scripts/include.sh/build-dep.sh b/scripts/include.sh/build-dep.sh
index 3f9b5c39..802b32c5 100755
--- a/scripts/include.sh/build-dep.sh
+++ b/scripts/include.sh/build-dep.sh
@@ -107,7 +107,12 @@ build_git_ios()
cd "$tmpdir/bin"
mkdir -p "$name-$version/$name"
mkdir -p "$name-$version/$name/lib"
- mv Release-iphoneos/include "$name-$version/$name"
+ if test x$build_mailcore=x1 ; then
+ mkdir -p "$name-$version/$name/include"
+ mv Release-iphoneos/include/MailCore "$name-$version/$name/include"
+ else
+ mv Release-iphoneos/include "$name-$version/$name"
+ fi
lipo -create "Release-iphoneos/$library" \
"Release-iphonesimulator/$library" \
-output "$name-$version/$name/lib/$library"
@@ -119,14 +124,19 @@ build_git_ios()
else
echo Dependency $dep not found
fi
- if test x$flatten_deps=x1 ; then
- cp -R "$name-$version/$dep"/* "$name-$version/$name"
+ if test x$build_mailcore=x1 ; then
+ cp -R "$name-$version/$dep/lib" "$name-$version/$name"
rm -rf "$name-$version/$dep"
fi
done
- if test x$flatten_deps=x1 ; then
- mv "$name-$version/$name"/* "$name-$version"
+ if test x$build_mailcore=x1 ; then
+ mv "$name-$version/$name/lib" "$name-$version"
+ mv "$name-$version/$name/include" "$name-$version"
rm -rf "$name-$version/$name"
+ libtool -static -o "$name-$version/$library" "$name-$version/lib"/*.a
+ rm -rf "$name-$version/lib"
+ mkdir -p "$name-$version/lib"
+ mv "$name-$version/$library" "$name-$version/lib"
fi
echo "$rev"> "$name-$version/git-rev"
if test x$build_for_external = x1 ; then
@@ -231,7 +241,12 @@ build_git_osx()
cd "$tmpdir/bin"
mkdir -p "$name-$version/$name"
mkdir -p "$name-$version/$name/lib"
- mv Release/include "$name-$version/$name"
+ if test x$build_mailcore=x1 ; then
+ mkdir -p "$name-$version/$name/include"
+ mv Release/include/MailCore "$name-$version/$name/include"
+ else
+ mv Release/include "$name-$version/$name"
+ fi
mv "Release/$library" "$name-$version/$name/lib"
for dep in $embedded_deps ; do
if test -d "$srcdir/$name/build-mac/$dep" ; then
@@ -241,14 +256,19 @@ build_git_osx()
else
echo Dependency $dep not found
fi
- if test x$flatten_deps=x1 ; then
- cp -R "$name-$version/$dep"/* "$name-$version/$name"
+ if test x$build_mailcore=x1 ; then
+ cp -R "$name-$version/$dep/lib" "$name-$version/$name"
rm -rf "$name-$version/$dep"
fi
done
- if test x$flatten_deps=x1 ; then
- mv "$name-$version/$name"/* "$name-$version"
+ if test x$build_mailcore=x1 ; then
+ mv "$name-$version/$name/lib" "$name-$version"
+ mv "$name-$version/$name/include" "$name-$version"
rm -rf "$name-$version/$name"
+ libtool -static -o "$name-$version/$library" "$name-$version/lib"/*.a
+ rm -rf "$name-$version/lib"
+ mkdir -p "$name-$version/lib"
+ mv "$name-$version/$library" "$name-$version/lib"
fi
echo "$rev"> "$name-$version/git-rev"
if test x$build_for_external = x1 ; then