depot/third_party/nixpkgs/pkgs/by-name/sa/salmon/fetch-pufferfish.patch
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

60 lines
1.9 KiB
Diff

diff --git a/scripts/fetchPufferfish.sh b/scripts/fetchPufferfish.sh
index bf2574e0..42582806 100755
--- a/scripts/fetchPufferfish.sh
+++ b/scripts/fetchPufferfish.sh
@@ -11,10 +11,6 @@ CURR_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
EXTERNAL_DIR=${CURR_DIR}/../external
INSTALL_DIR=${CURR_DIR}/../external/install
-if [ -d ${EXTERNAL_DIR}/pufferfish ] ; then
- rm -fr ${EXTERNAL_DIR}/pufferfish
-fi
-
if [ -d ${INSTALL_DIR}/include/pufferfish ] ; then
rm -fr ${INSTALL_DIR}/include/pufferfish
fi
@@ -23,42 +19,10 @@ if [ -d ${INSTALL_DIR}/src/pufferfish ] ; then
rm -fr ${INSTALL_DIR}/src/pufferfish
fi
-SVER=salmon-v1.10.2
-#SVER=develop
-#SVER=sketch-mode
-
-EXPECTED_SHA256=f225b74833f71dcf767a565345224357fb091f90ce79717abc836814d9ccd101
-
-mkdir -p ${EXTERNAL_DIR}
-curl -k -L https://github.com/COMBINE-lab/pufferfish/archive/${SVER}.zip -o ${EXTERNAL_DIR}/pufferfish.zip
-
-hashcheck=""
-if exists sha256sum; then
- hashcheck="sha256sum"
-elif exists shasum; then
- hashcheck="shasum -a256"
-else
- unset hashcheck
-fi
-
-
-if [ -z "${hashcheck-}" ]; then
- echo "Couldn't find shasum command; can't verify contents of downloaded pufferfish";
-else
-
- if [[ $SVER != develop && $SVER != onetbb ]]; then
- echo "${EXPECTED_SHA256} ${EXTERNAL_DIR}/pufferfish.zip" | ${hashcheck} -c - || { echo "pufferfish.zip did not match expected SHA1! Exiting."; exit 1; }
- else
- echo "not testing sha since pulling from develop"
- fi
-fi
-
-
-rm -fr ${EXTERNAL_DIR}/pufferfish
-unzip ${EXTERNAL_DIR}/pufferfish.zip -d ${EXTERNAL_DIR}
-mv ${EXTERNAL_DIR}/pufferfish-${SVER} ${EXTERNAL_DIR}/pufferfish
mkdir -p ${INSTALL_DIR}/include/pufferfish
+# This is needed later when pufferfish is compiled for Salmon
+cp -r ${pufferFishSrc} ${EXTERNAL_DIR}/pufferfish
cp ${EXTERNAL_DIR}/pufferfish/include/ProgOpts.hpp ${INSTALL_DIR}/include/pufferfish
cp ${EXTERNAL_DIR}/pufferfish/include/BooPHF.hpp ${INSTALL_DIR}/include/pufferfish