| 383 | # Public Recipe API to be subclassed if needed |
| 384 | |
| 385 | def download_if_necessary(self): |
| 386 | if self.ctx.ndk_api < self.min_ndk_api_support: |
| 387 | error(f"In order to build '{self.name}', you must set minimum ndk api (minapi) to `{self.min_ndk_api_support}`.\n") |
| 388 | exit(1) |
| 389 | info_main('Downloading {}'.format(self.name)) |
| 390 | user_dir = environ.get('P4A_{}_DIR'.format(self.name.lower())) |
| 391 | if user_dir is not None: |
| 392 | info('P4A_{}_DIR is set, skipping download for {}'.format( |
| 393 | self.name, self.name)) |
| 394 | return |
| 395 | self.download() |
| 396 | |
| 397 | def download(self): |
| 398 | if self.url is None: |