diff --git a/packages.sh b/packages.sh index 3dea813..7b0039a 100755 --- a/packages.sh +++ b/packages.sh @@ -161,16 +161,27 @@ prepare_clean_dir() { fi } +get_src_filename() { + local src_filename=$(basename "${PACKAGE_SRC}") + # if last part is "download", return previous folder. + # used for Sourceforge + if [[ "${src_filename}" = 'download' ]]; then + echo "${PACKAGE_SRC}" | awk -F/ '{print $(NF-1)}' + else + echo ${src_filename} + fi +} + download_package_src() { if [[ ! -z "${PACKAGE_SRC}" ]]; then - local src_filename=$(basename "${PACKAGE_SRC}") + local src_filename=`get_src_filename` if [[ ! -z "${src_filename}" ]]; then if [[ -e "${PACKAGE_SRC_DOWNLOAD_DIR}/${src_filename}" ]] && [[ "`stat -c %s ${PACKAGE_SRC_DOWNLOAD_DIR}/${src_filename}`" -gt 1024 ]]; then echo "Using cached download" else echo "Downloading package source..." wget --no-check-certificate --tries=5 --retry-connrefused --waitretry=5 \ - --progress=bar:force:noscroll \ + --trust-server-names --progress=bar:force:noscroll \ -O ${src_filename} -P ${PACKAGE_SRC_DOWNLOAD_DIR} "${PACKAGE_SRC}" fi else @@ -182,7 +193,7 @@ download_package_src() { unpack_package_src() { if [[ ! -z "${PACKAGE_SRC}" ]]; then - local src_filename=$(basename "${PACKAGE_SRC}") + local src_filename=`get_src_filename` local src_file="${PACKAGE_SRC_DOWNLOAD_DIR}/${src_filename}" if [[ -e "${src_file}" ]]; then echo "Unpacking ${src_file}..." diff --git a/packages/boost/package.mk b/packages/boost/package.mk index 032c8ac..ba2f41a 100644 --- a/packages/boost/package.mk +++ b/packages/boost/package.mk @@ -1,6 +1,7 @@ PACKAGE_NAME="Boost C++ libraries" PACKAGE_VERSION="1.84.0" -PACKAGE_SRC="https://boostorg.jfrog.io/artifactory/main/release/${PACKAGE_VERSION}/source/boost_${PACKAGE_VERSION//./_}.tar.gz" +#PACKAGE_SRC="https://boostorg.jfrog.io/artifactory/main/release/${PACKAGE_VERSION}/source/boost_${PACKAGE_VERSION//./_}.tar.gz" +PACKAGE_SRC="https://sourceforge.net/projects/boost/files/boost/${PACKAGE_VERSION}/boost_${PACKAGE_VERSION//./_}.tar.gz/download" configure_package() { ./bootstrap.sh