Skip to content

Commit

Permalink
update boost package source from SourceForge
Browse files Browse the repository at this point in the history
  • Loading branch information
duhow committed Jan 8, 2024
1 parent 610bcfc commit 7df5baf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
17 changes: 14 additions & 3 deletions packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}..."
Expand Down
3 changes: 2 additions & 1 deletion packages/boost/package.mk
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7df5baf

Please sign in to comment.