Look for private key of default geolocation service.

* Let the jamfile set HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY if the
  header that is supposed to contain it is found in src/kits/shared
  (which isn't the case for normal builds).
* In case HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY is set, include the
  corresponding header and activate Mozilla's geolocation service with
  the key defined in that header.
  
This procedure should enable buildbot to create nightly images without
exposing the private service key.
This commit is contained in:
Oliver Tappe 2014-10-02 00:12:46 +02:00
parent 3006031ac2
commit d0fe638dbd
2 changed files with 17 additions and 3 deletions

View File

@ -141,9 +141,19 @@ BGeolocation::LocateSelf(float& latitude, float& longitude)
}
// FIXME switch to an openly available service that will actually work with the
// "standard" geolocation API. Openbmap has a few variations.
const char* BGeolocation::kDefaultService = "http://openbmap.org/api/json.php5";
#ifdef HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY
#include "DefaultGeolocationServiceKey.h"
const char* BGeolocation::kDefaultService
= "https://location.services.mozilla.com/v1/geolocate?key="
DEFAULT_GEOLOCATION_SERVICE_KEY;
#else
const char* BGeolocation::kDefaultService = "";
#endif
} // namespace BPrivate

View File

@ -6,6 +6,10 @@ AddSubDirSupportedPlatforms libbe_test ;
UseLibraryHeaders agg ;
UsePrivateHeaders shared locale ;
if [ Glob $(SUBDIR) : DefaultGeolocationServiceKey.h ] {
SubDirC++Flags [ FDefines HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY ] ;
}
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {