diff --git a/CMakeLists.txt b/CMakeLists.txt index d8baeec063a7c456f77d4bdfa8c88718c283bed8..1492d63bc1749c66e66839c1d6a8034da247cede 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ set(CMAKE_MODULE_PATH set(VERSION_MAJOR 3) set(VERSION_MINOR 9) -set(VERSION_PATCH 1) +set(VERSION_PATCH 2) set(VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) # Generate include header with the version string @@ -95,6 +95,18 @@ endif () find_package(Threads) find_package(OpenSSL) + +# Include directories for our newer version of curl +set(CURL_DIR /tmp/curl/bogusinstall) +set(CURL_LIBRARIES ${CURL_DIR}/lib${LIB_SUFFIX}/ws2_32 ${CURL_DIR}/lib${LIB_SUFFIX}/iphlpapi ${CURL_DIR}/lib${LIB_SUFFIX}/libcurl) +set(CURL_INCLUDE_DIR ${CURL_DIR}/include/) +set(CURL_LIBRARY ${CURL_DIR}/lib${LIB_SUFFIX}/libcurl.a CACHE filepath "path to libcurl.a") +find_file(Curl_local libcurl.a PATHS ${CURL_DIR}/lib${LIB_SUFFIX}/ ) +if (NOT Curl_local) + message("-- LibCurl not found in '${CURL_LIBRARY}'") +endif() + + # Find Boost set(Boost_ADDITIONAL_VERSIONS "1.41" "1.41.0" "1.42" "1.42.0" "1.43" "1.43.0" "1.44" "1.44.0" "1.45" "1.45.0" diff --git a/packaging/rpm/fts.spec b/packaging/rpm/fts.spec index 2420f02742256e01235afad11f095cf3be4f090a..0876ccff61a42e29007147f6adbc41cf9b320751 100644 --- a/packaging/rpm/fts.spec +++ b/packaging/rpm/fts.spec @@ -9,8 +9,8 @@ %endif Name: fts -Version: 3.9.1 -Release: 2%{?dist} +Version: 3.9.2 +Release: 1%{?dist} Summary: File Transfer Service V3 Group: System Environment/Daemons License: ASL 2.0 @@ -37,8 +37,9 @@ BuildRequires: boost148-devel BuildRequires: CGSI-gSOAP-devel BuildRequires: cajun-jsonapi-devel - +BuildRequires: wget BuildRequires: cmake +BuildRequires: cmake3 BuildRequires: libdirq-devel BuildRequires: doxygen %if 0%{?el5} @@ -50,7 +51,6 @@ BuildRequires: gfal2-devel >= 2.14.2 BuildRequires: glib2-devel BuildRequires: globus-gsi-credential-devel BuildRequires: gridsite-devel -BuildRequires: libcurl-devel BuildRequires: openldap-devel BuildRequires: protobuf-devel BuildRequires: pugixml-devel @@ -198,6 +198,8 @@ The File Transfer Service V3 mysql plug-in %setup -q %build +#build curl +./src/cli/buildcurl.sh # Make sure the version in the spec file and the version used # for building matches fts_cmake_ver=`sed -n 's/^set(VERSION_\(MAJOR\|MINOR\|PATCH\) \([0-9]\+\).*/\2/p' CMakeLists.txt | paste -sd '.'` diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt index 852af3b14e981a8122c1f5bfcbaa74b2139ea891..1e8b7d212e031cc5ff60a427ff7ee8c686ae2dd6 100644 --- a/src/cli/CMakeLists.txt +++ b/src/cli/CMakeLists.txt @@ -33,6 +33,10 @@ find_package(Boost COMPONENTS program_options unit_test_framework REQUIRED) # Require soap headers include_directories ("${CMAKE_BINARY_DIR}/src/ws-ifce/gsoap") +add_definitions(-DCURL_STATICLIB) + +include_directories(${CURL_INCLUDE_DIR}) + # add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) @@ -53,8 +57,8 @@ set (fts_cli_internal_libs set(fts_cli_libs ${fts_cli_internal_libs} gridsite - curl - globus_gsi_sysconfig + ${CURL_LIBRARY} + globus_gsi_sysconfig ${Boost_PROGRAM_OPTIONS_LIBRARY} ) diff --git a/src/cli/buildcurl.sh b/src/cli/buildcurl.sh new file mode 100755 index 0000000000000000000000000000000000000000..fe50cb75cbae5fa542012d62acd8306c5ff31f55 --- /dev/null +++ b/src/cli/buildcurl.sh @@ -0,0 +1,12 @@ +# This script assumes that: +# - pwd is the top source directory + + +mkdir -p ./src/cli/external +cd ./src/cli/external +wget https://curl.haxx.se/download/curl-7.65.2.tar.gz +tar zxvf curl-7.65.2.tar.gz +mv curl-7.65.2 curl +cd curl +cmake3 . -DCMAKE_INSTALL_PREFIX=/tmp/curl/bogusinstall -DBUILD_CURL_EXE=false -DBUILD_TESTING=false -DBUILD_SHARED_LIBS=false -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC -DCURL_DISABLE_LDAP=ON +make -j2 install diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 73f115c63969ad0986cf9f0f815382ecc4a9cbf1..b95c027dc9f54f2c96faa974f9f3803d67483ca7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,6 +23,6 @@ include_directories (${Boost_INCLUDE_DIRS}) include_directories (${GLIB2_INCLUDE_DIRS}) include_directories (${CMAKE_SOURCE_DIR}/src) include_directories (${CMAKE_BINARY_DIR}/src) - +include_directories (${CURL_INCLUDE_DIR}) # Tests add_subdirectory (unit)