aboutsummaryrefslogtreecommitdiff
path: root/ports/boost
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-18 20:50:08 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-18 20:54:03 -0700
commitccca198c1b1730b0241911cb56dc8e3504958b2a (patch)
treea2dd9b8b087a09afdcecc5cbb3377bed15127eb2 /ports/boost
downloadvcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.tar.gz
vcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.zip
Initial commit
Diffstat (limited to 'ports/boost')
-rw-r--r--ports/boost/CONTROL3
-rw-r--r--ports/boost/portfile.cmake93
-rw-r--r--ports/boost/user-config.jam10
3 files changed, 106 insertions, 0 deletions
diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL
new file mode 100644
index 000000000..8307022f0
--- /dev/null
+++ b/ports/boost/CONTROL
@@ -0,0 +1,3 @@
+Source: boost
+Version: 1.60
+Description: Peer-reviewed portable C++ source libraries
diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake
new file mode 100644
index 000000000..acdfb9379
--- /dev/null
+++ b/ports/boost/portfile.cmake
@@ -0,0 +1,93 @@
+include(vcpkg_common_functions)
+vcpkg_download_distfile(ARCHIVE_FILE
+ URL "http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.bz2"
+ FILENAME "boost_1_60_0.tar.bz2"
+ MD5 65a840e1a0b13a558ff19eeb2c4f0cbe
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+
+if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/b2.exe)
+ message(STATUS "Bootstrapping")
+ vcpkg_execute_required_process(
+ COMMAND "${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/bootstrap.bat"
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0
+ LOGNAME bootstrap
+ )
+endif()
+message(STATUS "Bootstrapping done")
+
+set(B2_OPTIONS
+ --toolset=msvc
+ -j$ENV{NUMBER_OF_PROCESSORS}
+ -q
+ --without-python
+ threading=multi
+ link=shared
+ runtime-link=shared
+ --debug-configuration
+)
+if(TRIPLET_SYSTEM_ARCH MATCHES "x64")
+ list(APPEND B2_OPTIONS address-model=64)
+endif()
+if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
+ list(APPEND B2_OPTIONS windows-api=store)
+ set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR})
+endif()
+
+message(STATUS "Building ${TARGET_TRIPLET}-rel")
+vcpkg_execute_required_process(
+ COMMAND "${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/b2.exe"
+ --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage
+ --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
+ ${B2_OPTIONS}
+ variant=release
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0
+ LOGNAME build-${TARGET_TRIPLET}-rel
+)
+message(STATUS "Building ${TARGET_TRIPLET}-rel done")
+message(STATUS "Building ${TARGET_TRIPLET}-dbg")
+vcpkg_execute_required_process(
+ COMMAND "${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/b2.exe"
+ --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage
+ --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
+ ${B2_OPTIONS}
+ variant=debug
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0
+ LOGNAME build-${TARGET_TRIPLET}-dbg
+)
+message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
+
+message(STATUS "Packaging headers")
+file(
+ COPY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/boost
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+ PATTERN "config/user.hpp" EXCLUDE
+)
+file(COPY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/boost/config/user.hpp
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include/boost/config/
+)
+file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp
+ "\n#define BOOST_ALL_DYN_LINK\n"
+)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost RENAME copyright)
+message(STATUS "Packaging headers done")
+
+message(STATUS "Packaging ${TARGET_TRIPLET}-rel")
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+ FILES_MATCHING PATTERN "*.lib")
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+ FILES_MATCHING PATTERN "*.dll")
+message(STATUS "Packaging ${TARGET_TRIPLET}-rel done")
+
+message(STATUS "Packaging ${TARGET_TRIPLET}-dbg")
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+ FILES_MATCHING PATTERN "*.lib")
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+ FILES_MATCHING PATTERN "*.dll")
+message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done")
+
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/boost/user-config.jam b/ports/boost/user-config.jam
new file mode 100644
index 000000000..58184920a
--- /dev/null
+++ b/ports/boost/user-config.jam
@@ -0,0 +1,10 @@
+using msvc : 14.0 : :
+<compileflags>"\"/AIC:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\store\\references\""
+<linkflags>/appcontainer
+<linkflags>/nodefaultlibs
+<linkflags>WindowsApp.lib
+<variant>release:<linkflags>vcruntime.lib
+<variant>debug:<linkflags>vcruntimed.lib
+<variant>release:<linkflags>ucrt.lib
+<variant>debug:<linkflags>ucrtd.lib
+;