Skip to content

Commit c674184

Browse files
MythicLionManadamtharani
authored andcommitted
Added support for building libetpan locally.
Normally the build-dep.sh script downloads libetpan (and other dependancies) during a mail core build. Since we have a patched libetpan library we need to use a locally built version. This patch modifies the build-dep script to check the built products directory for a .a file that matches the dependancy, and if it is there doesn't perform a version check and doesn't download a new version. There are a few problems with this approach: 1, libetpan must be built by the umbrella build before mailcore2 targets are built, otherwise a new version will still be downloaded. 2. The dependancy detection only works for .a targets, where build-dep.sh can support other target types. 3. If libetpan is built locally its version is not checked, so the version in the umbrella build must be compatible.
1 parent 2a8c414 commit c674184

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

scripts/include.sh/build-dep.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,20 @@ get_prebuilt_dep()
330330

331331
installed_version="`defaults read "$installed_versions_path" "$name" 2>/dev/null`"
332332
if test ! -d "$scriptpath/../Externals/$name" ; then
333-
installed_version=
333+
echo "$name is not in Externals. Checking built products dir"
334+
335+
if test -f "${BUILT_PRODUCTS_DIR}/${name}.a" ; then
336+
echo "Found product in built products dir, using that version. The version number of that"
337+
echo "version is unknown, it is your responsability to ensure that it is up to date and is"
338+
echo "configured properly with any required headers copied to $BUILT_PRODUCTS_DIR"
339+
340+
# Mark the version as up to date, even though the true version number is not known
341+
installed_version="`defaults read "$versions_path" "$name" 2>/dev/null`"
342+
else
343+
# There is no version in BUILT_PRODUCTS_DIR so clear installed_version in order to
344+
# download a new copy
345+
installed_version=
346+
fi
334347
fi
335348
if test "x$installed_version" = x ; then
336349
installed_version="none"

0 commit comments

Comments
 (0)