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) {
|
switch $(HAIKU_BUILD_PROFILE) {
|
||||||
case "bootstrap-*" :
|
case "bootstrap-*" :
|
||||||
HAIKU_BOOTSTRAP_BUILD = 1 ;
|
HAIKU_BOOTSTRAP_BUILD = 1 ;
|
||||||
|
HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
|
||||||
|
TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
#include <package/FetchFileJob.h>
|
#include <package/FetchFileJob.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
#endif
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
@@ -67,6 +69,7 @@ FetchFileJob::Execute()
|
|||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||||
CURL* handle = curl_easy_init();
|
CURL* handle = curl_easy_init();
|
||||||
|
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
@@ -108,6 +111,7 @@ FetchFileJob::Execute()
|
|||||||
// precise error reporting
|
// precise error reporting
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
#endif /* !HAIKU_BOOTSTRAP_BUILD */
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,17 +6,25 @@
|
|||||||
* Rene Gollent <[email protected]>
|
* Rene Gollent <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
initialize_after()
|
initialize_after()
|
||||||
{
|
{
|
||||||
|
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||||
curl_global_init(CURL_GLOBAL_SSL);
|
curl_global_init(CURL_GLOBAL_SSL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
terminate_after()
|
terminate_after()
|
||||||
{
|
{
|
||||||
|
#ifndef HAIKU_BOOTSTRAP_BUILD
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user