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:
Alexander von Gluck IV
2014-01-26 10:42:37 -06:00
parent 6f173f11f3
commit 800d5376f9
3 changed files with 14 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
switch $(HAIKU_BUILD_PROFILE) {
case "bootstrap-*" :
HAIKU_BOOTSTRAP_BUILD = 1 ;
HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
}
+4
View File
@@ -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
}