From 4070c09dd2b74f700aaf6a294d97f5dd80696bed Mon Sep 17 00:00:00 2001 From: Robert Hatcher Date: Thu, 2 Apr 2026 09:42:53 -0500 Subject: [PATCH 1/2] update buld_lhapdf.sh to take into account that the URL on hepforge has changed and is more complex. Also the name for v6 versions starts with LHAPDF rather than lhapdf. --- src/scripts/build/ext/build_lhapdf.sh | 35 +++++++++++++++++++++------ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/src/scripts/build/ext/build_lhapdf.sh b/src/scripts/build/ext/build_lhapdf.sh index 6ad28380bd..95c588ca7e 100755 --- a/src/scripts/build/ext/build_lhapdf.sh +++ b/src/scripts/build/ext/build_lhapdf.sh @@ -51,24 +51,43 @@ cd ${topdir}/download whichfetchit=`which wget | grep -v "no wget in"` if [ ! -z "${whichfetchit}" ] ; then echo use \"wget\" for fetching files - fetchit='wget ' + fetchit='wget ' + oopt="--output-document" else whichfetchit=`which curl | grep -v "no curl in"` if [ ! -z "${whichfetchit}" ] ; then - # -f = fail without creating dummy, -O output local named like remoteza - echo use \"curl -f -O\" for fetching files - fetchit='curl -f -O ' + oopt="--output" + # -f = fail without creating dummy + # --location to follow redirection + # use explicit --output as new hepforge URL is funky + ####, -O output local named like remoteza + echo use \"curl -f --location ${oopt}\" for fetching files + fetchit='curl -f --location ' else echo "Neither wget nor curl available -- can't download files" exit 1 fi fi -echo "$fetchit http://www.hepforge.org/archive/lhapdf/lhapdf-${major}.${minor}.${revis}.tar.gz" -$fetchit http://www.hepforge.org/archive/lhapdf/lhapdf-${major}.${minor}.${revis}.tar.gz +### example links +# https://lhapdf.hepforge.org/downloads/?f=old/lhapdf-5.7.0.tar.gz +# https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.5.6.tar.gz -tar xzvf lhapdf-${major}.${minor}.${revis}.tar.gz -mv lhapdf-${major}.${minor}.${revis} ${topdir}/src +if [ ${major} -eq 5 ]; then + basepath=lhapdf-${major}.${minor}.${revis} + tarfile=${basepath}.tar.gz + fetchpath="?f=old/${tarfile}" +else + basepath=LHAPDF-${major}.${minor}.${revis} + tarfile=${basepath}.tar.gz + fetchpath="?f=${tarfile}" +fi + +echo "$fetchit ${oopt} ${tarfile} https://lhapdf.hepforge.org/downloads/${fetchpath}" +$fetchit ${oopt} ${tarfile} "https://lhapdf.hepforge.org/downloads/${fetchpath}" + +tar xzvf ${tarfile} +mv ${basepath} ${topdir}/src cd ${topdir}/src ./configure --prefix=${topdir}/stage/ make From 637177c3c57f691f421adc92ed30e237dd436147 Mon Sep 17 00:00:00 2001 From: Robert Hatcher Date: Tue, 5 May 2026 13:53:07 -0500 Subject: [PATCH 2/2] make default version something recent --- src/scripts/build/ext/build_lhapdf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/build/ext/build_lhapdf.sh b/src/scripts/build/ext/build_lhapdf.sh index 95c588ca7e..969a129350 100755 --- a/src/scripts/build/ext/build_lhapdf.sh +++ b/src/scripts/build/ext/build_lhapdf.sh @@ -8,7 +8,7 @@ # Costas Andreopoulos # -version=5.7.0 +version=6.5.6 doclean=0 refetch=0 while [ $# -gt 0 ] ; do