Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Unified Diff: third_party/libmicrohttpd/build.py

Issue 1628363002: Build and link microhttpd from gyp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: spaces Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/skiaserve.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libmicrohttpd/build.py
diff --git a/third_party/libmicrohttpd/build.py b/third_party/libmicrohttpd/build.py
new file mode 100644
index 0000000000000000000000000000000000000000..cafcbeac88a692d1b81ea08f95c505b7fbd91e8f
--- /dev/null
+++ b/third_party/libmicrohttpd/build.py
@@ -0,0 +1,34 @@
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# this script will configure and build microhttpd in a temp directory and then
+# copy the static library generated to a destination folder
+import argparse
+import os
+from subprocess import call
+import shutil
+import tempfile
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--src", help="microhttpd src directory")
+parser.add_argument("--dst", help="output for build files")
+args = parser.parse_args()
+
+temp_dir = tempfile.mkdtemp()
+cwd = os.getcwd()
+os.chdir(temp_dir)
+call([cwd + "/" + args.src + "/configure",
+ "--disable-doc",
+ "--disable-examples",
+ "--enable-https=no",
+ "--disable-curl",
+ "--enable-spdy=no",
+ "--enable-shared=no"])
+call(["make", "--silent"])
+call(["cp",
+ temp_dir + "/src/microhttpd/.libs/libmicrohttpd.a",
+ cwd + "/" + args.dst])
+shutil.rmtree(temp_dir)
+
« no previous file with comments | « gyp/skiaserve.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698