comparison OrthancFramework/Resources/CMake/BoostConfiguration.sh @ 4044:d25f4c0fa160 framework

splitting code into OrthancFramework and OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jun 2020 20:30:34 +0200
parents Resources/CMake/BoostConfiguration.sh@3e0ad879eba2
children 6156a970a2e1
comparison
equal deleted inserted replaced
4043:6c6239aec462 4044:d25f4c0fa160
1 #!/bin/bash
2
3 set -e
4 set -u
5
6 ## Starting with version 0.6.2, Orthanc is shipped with a subset of the
7 ## Boost libraries that is generated with the BCP tool:
8 ##
9 ## http://www.boost.org/doc/libs/1_54_0/tools/bcp/doc/html/index.html
10 ##
11 ## This script generates this subset.
12 ##
13 ## History:
14 ## - Orthanc between 0.6.2 and 0.7.3: Boost 1.54.0
15 ## - Orthanc between 0.7.4 and 0.9.1: Boost 1.55.0
16 ## - Orthanc between 0.9.2 and 0.9.4: Boost 1.58.0
17 ## - Orthanc between 0.9.5 and 1.0.0: Boost 1.59.0
18 ## - Orthanc between 1.1.0 and 1.2.0: Boost 1.60.0
19 ## - Orthanc 1.3.0: Boost 1.64.0
20 ## - Orthanc 1.3.1: Boost 1.65.1
21 ## - Orthanc 1.3.2: Boost 1.66.0
22 ## - Orthanc between 1.4.0 and 1.4.2: Boost 1.67.0
23 ## - Orthanc between 1.5.0 and 1.5.4: Boost 1.68.0
24 ## - Orthanc >= 1.5.5: Boost 1.69.0
25
26 BOOST_VERSION=1_69_0
27 ORTHANC_VERSION=1.5.6
28
29 rm -rf /tmp/boost_${BOOST_VERSION}
30 rm -rf /tmp/bcp/boost_${BOOST_VERSION}
31
32 cd /tmp
33 echo "Uncompressing the sources of Boost ${BOOST_VERSION}..."
34 tar xfz ./boost_${BOOST_VERSION}.tar.gz
35
36 echo "Generating the subset..."
37 mkdir -p /tmp/bcp/boost_${BOOST_VERSION}
38 bcp --boost=/tmp/boost_${BOOST_VERSION} thread system locale date_time filesystem math/special_functions algorithm uuid atomic iostreams program_options numeric/ublas geometry polygon signals2 chrono /tmp/bcp/boost_${BOOST_VERSION}
39
40 echo "Removing documentation..."
41 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/locale/doc/html
42 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/algorithm/doc/html
43 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/geometry/doc/html
44 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/geometry/doc/doxy/doxygen_output/html
45 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/filesystem/example/
46
47 # https://stackoverflow.com/questions/1655372/longest-line-in-a-file
48 LONGEST_FILENAME=`find /tmp/bcp/ | awk '{print length, $0}' | sort -nr | head -1`
49 LONGEST=`echo "$LONGEST_FILENAME" | cut -d ' ' -f 1`
50
51 echo
52 echo "Longest filename (${LONGEST} characters):"
53 echo "${LONGEST_FILENAME}"
54 echo
55
56 if [ ${LONGEST} -ge 128 ]; then
57 echo "ERROR: Too long filename for Windows!"
58 echo
59 exit -1
60 fi
61
62 echo "Compressing the subset..."
63 cd /tmp/bcp
64 tar cfz boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz boost_${BOOST_VERSION}
65 ls -l boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz
66 md5sum boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz
67 readlink -f boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz