summaryrefslogtreecommitdiff
path: root/platform/ios/scripts
diff options
context:
space:
mode:
authorFredrik Karlsson <bjorn.fredrik.karlsson@gmail.com>2016-07-14 11:30:20 +0200
committerGitHub <noreply@github.com>2016-07-14 11:30:20 +0200
commitc531686ecceed3ca13484367dee121574b11acb7 (patch)
tree3ff1b3b271408769eea9641fe25e98772c04fa75 /platform/ios/scripts
parent0d065af4100751927ed27ab1d3d4bee63448665f (diff)
downloadqtlocation-mapboxgl-c531686ecceed3ca13484367dee121574b11acb7.tar.gz
[ios] fixes #4536 include podspec for static framework (#5653)
* [ios] fixes #4536 include podspec for static framework * [ios] removed excessive frameworks, libraries and flags from the static podspec * [ios] cleaned up the podspec
Diffstat (limited to 'platform/ios/scripts')
-rwxr-xr-xplatform/ios/scripts/package.sh26
1 files changed, 17 insertions, 9 deletions
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index 29ea2c47bd..c753c63dfd 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -178,24 +178,32 @@ if [[ "${GCC_GENERATE_DEBUGGING_SYMBOLS}" == false ]]; then
fi
fi
-function create_local_podspec {
- step "Creating local podspec"
+function create_podspec {
+ step "Creating local podspec (${1})"
+ [[ $SYMBOLS = YES ]] && POD_SUFFIX="-symbols" || POD_SUFFIX=""
POD_SOURCE_PATH=' :path => ".",'
POD_FRAMEWORKS=" m.vendored_frameworks = '"${NAME}".framework'"
- [[ $SYMBOLS = YES ]] && POD_SUFFIX="-symbols" || POD_SUFFIX=""
- POD_LOCALSPEC=${OUTPUT}/$1/${NAME}-iOS-SDK${POD_SUFFIX}.podspec
- sed "s/.*:http.*/${POD_SOURCE_PATH}/" platform/ios/${NAME}-iOS-SDK${POD_SUFFIX}.podspec > ${POD_LOCALSPEC}
- sed -i.bak "s/.*vendored_frameworks.*/${POD_FRAMEWORKS}/" ${POD_LOCALSPEC}
- rm -rf ${POD_LOCALSPEC}.bak
- cp -pv LICENSE.md ${OUTPUT}/$1/
+ INPUT_PODSPEC=platform/ios/${NAME}-iOS-SDK${POD_SUFFIX}.podspec
+ OUTPUT_PODSPEC=${OUTPUT}/${1}/${NAME}-iOS-SDK${POD_SUFFIX}.podspec
+ if [[ ${1} == "dynamic" ]]; then
+ sed "s/.*:http.*/${POD_SOURCE_PATH}/" ${INPUT_PODSPEC} > ${OUTPUT_PODSPEC}
+ sed -i '' "s/.*vendored_frameworks.*/${POD_FRAMEWORKS}/" ${OUTPUT_PODSPEC}
+ fi
+ if [[ ${1} == "static" ]]; then
+ awk '/Pod::Spec.new/,/m.platform/' ${INPUT_PODSPEC} > ${OUTPUT_PODSPEC}
+ cat platform/ios/${NAME}-iOS-SDK-static-part.podspec >> ${OUTPUT_PODSPEC}
+ sed -i '' "s/.*:http.*/${POD_SOURCE_PATH}/" ${OUTPUT_PODSPEC}
+ fi
+ cp -pv LICENSE.md ${OUTPUT}/${1}/
}
if [[ ${BUILD_STATIC} == true ]]; then
stat "${OUTPUT}/static/${NAME}.framework"
+ create_podspec "static"
fi
if [[ ${BUILD_DYNAMIC} == true ]]; then
stat "${OUTPUT}/dynamic/${NAME}.framework"
- create_local_podspec "dynamic"
+ create_podspec "dynamic"
fi
if [[ ${BUILD_STATIC} == true ]]; then