package kit: Disable curl requirement on bootstrap build
* As per the mailing list. * Introduce HAIKU_BOOTSTRAP_BUILD define to sources to let them know they are taking part in a bootstrap
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
switch $(HAIKU_BUILD_PROFILE) {
|
||||
case "bootstrap-*" :
|
||||
HAIKU_BOOTSTRAP_BUILD = 1 ;
|
||||
HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
|
||||
TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#include <package/FetchFileJob.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||
#include <curl/curl.h>
|
||||
#endif
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <Path.h>
|
||||
@@ -67,6 +69,7 @@ FetchFileJob::Execute()
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
|
||||
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||
CURL* handle = curl_easy_init();
|
||||
|
||||
if (handle == NULL)
|
||||
@@ -108,6 +111,7 @@ FetchFileJob::Execute()
|
||||
// precise error reporting
|
||||
return B_ERROR;
|
||||
}
|
||||
#endif /* !HAIKU_BOOTSTRAP_BUILD */
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -6,17 +6,25 @@
|
||||
* Rene Gollent <[email protected]>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||
#include <curl/curl.h>
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" void
|
||||
initialize_after()
|
||||
{
|
||||
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||
curl_global_init(CURL_GLOBAL_SSL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
terminate_after()
|
||||
{
|
||||
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||
curl_global_cleanup();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user