diff --git a/README.md b/README.md index 599b338..44ba1b1 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ Pluggable servomotor driver library ## Install -[Boost.Filesystem](https://boostorg.github.io/filesystem) is required - ```shell pip install servoarray ``` diff --git a/ci/image/Dockerfile.in b/ci/image/Dockerfile.in index 75e5a28..1b58391 100644 --- a/ci/image/Dockerfile.in +++ b/ci/image/Dockerfile.in @@ -3,7 +3,12 @@ FROM @BASE_IMAGE@ SHELL @SHELL@ RUN apt-get update -y \ - && apt-get install -y --no-install-recommends libboost-dev libboost-filesystem-dev cmake git build-essential + && apt-get install -y --no-install-recommends cmake build-essential curl ca-certificates git + +RUN mkdir -p tmp/boost && cd $_ \ + && curl -fsSL https://dl.bintray.com/boostorg/release/@BOOST_VERSION@/source/boost_@BOOST_VERSION_U@.tar.gz | tar -xz --strip-components=1 \ + && ./bootstrap.sh \ + && ./b2 cxxflags=-fPIC cflags=-fPIC -a link=static --with-filesystem --with-system install COPY scripts /scripts diff --git a/ci/scripts/install.sh b/ci/scripts/install.sh index d61f92f..4c42615 100755 --- a/ci/scripts/install.sh +++ b/ci/scripts/install.sh @@ -50,11 +50,14 @@ function cross_sh() { readonly BASE_IMAGE=$(base_image) readonly CROSS_SH=$(cross_sh) +readonly BOOST_VERSION=1.69.0 echo "BASE_IMAGE=${BASE_IMAGE}" cat ci/image/Dockerfile.in \ | sed "s/@BASE_IMAGE@/${BASE_IMAGE//\//\\/}/g" \ | sed "s/@SHELL@/${CROSS_SH//\//\\/}/g" \ + | sed "s/@BOOST_VERSION@/${BOOST_VERSION}/g" \ + | sed "s/@BOOST_VERSION_U@/${BOOST_VERSION//\./_}/g" \ > ci/image/Dockerfile docker build ci/image -t builder diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 43e7a34..a499786 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,6 +40,7 @@ set(SERVOARRAY_DEFAULT_CONFIG_FILES ~/.servoarrayrc ./.servoarrayrc) option(BUILD_PYTHON "Build servoarray python module" ON) +set(Boost_USE_STATIC_LIBS ON) find_package(Boost 1.36.0 REQUIRED COMPONENTS filesystem system) include_directories(${Boost_INCLUDE_DIRS}) diff --git a/src/cmake/cpack.cmake b/src/cmake/cpack.cmake index 600391f..371910e 100644 --- a/src/cmake/cpack.cmake +++ b/src/cmake/cpack.cmake @@ -16,7 +16,6 @@ set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") set(CPACK_GENERATOR "TGZ;ZIP") set(CPACK_PACKAGE_CONTACT "coord.e ") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-filesystem1.62.0") set(CPACK_PACKAGE_VERSION_MAJOR ${servoarray_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${servoarray_VERSION_MINOR})