~eliasnaur/gio-patches

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] cmd/gogio: [Android] check $ANDROID_NDK_ROOT

Greg Pomerantz
Details
Message ID
<20200622155005.63895-1-gmp.gio@wow.st>
DKIM signature
missing
Download raw message
Patch: +9 -1
If the Android NDK is not found in a standard location (e.g. you are
on an F-Droid build server), check the $ANDROID_NDK_ROOT environment
variable.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
---
 cmd/gogio/androidbuild.go | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/cmd/gogio/androidbuild.go b/cmd/gogio/androidbuild.go
index 7f14a0a..d3ddbf7 100644
--- a/cmd/gogio/androidbuild.go
+++ b/cmd/gogio/androidbuild.go
@@ -591,7 +591,15 @@ func findNDK(androidHome string) (string, error) {
	if _, err := os.Stat(ndkBundle); err == nil {
		return ndkBundle, nil
	}
	return "", fmt.Errorf("no NDK found in $ANDROID_HOME (%s). Use `sdkmanager ndk-bundle` to install it", androidHome)
	// Certain non-standard NDK isntallations set the $ANDROID_NDK_ROOT
	// environment variable
	if ndkBundle, ok := os.LookupEnv("ANDROID_NDK_ROOT"); ok {
		if _, err := os.Stat(ndkBundle); err == nil {
			return ndkBundle, nil
		}
	}

	return "", fmt.Errorf("no NDK found in $ANDROID_HOME (%s). Set $ANDROID_NDK_ROOT or use `sdkmanager ndk-bundle` to install the NDK", androidHome)
}

func findKeytool() (string, error) {
-- 
2.16.2
Details
Message ID
<C3NRSJ1RGTVN.R24UYJ6Q7PXL@themachine>
In-Reply-To
<20200622155005.63895-1-gmp.gio@wow.st> (view parent)
DKIM signature
pass
Download raw message
Merged. Thanks!

-- elias
Review patch Export thread (mbox)