Skip to content

Commit

Permalink
add cflag SUFFIX and PREFIX defines to pkgconfig file
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Jan 24, 2024
1 parent 1192235 commit 33dc2f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OpenBLAS
7 changes: 4 additions & 3 deletions tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ function do_build_lib {
else
local version=$(cd OpenBLAS && git describe --tags --abbrev=8)
fi
mv $BUILD_PREFIX/lib/pkgconfig/openblas*.pc $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc
local plat_tag=$(get_plat_tag $plat)
local suff=""
[ -n "$suffix" ] && suff="-$suffix"
Expand All @@ -186,11 +187,11 @@ function do_build_lib {
# do it ourselves
static_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a'`)
renamed_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.renamed'`)
# set -x # echo commands
cp -f "OpenBLAS/${renamed_libname}" "$BUILD_PREFIX/lib/${static_libname}"
# set +x
sed -e "s/^Cflags.*/\1 -DBLAS_SYMBOL_PREFIX=scipy_ -DBLAS_SYMBOL_SUFFIX=64_/" -i.bak $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc
else
sed -e "s/^Cflags.*/\1 -DBLAS_SYMBOL_PREFIX=scipy_/" -i.bak $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc
fi
mv $BUILD_PREFIX/lib/pkgconfig/openblas*.pc $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc

local out_name="openblas${symbolsuffix}-${version}-${plat_tag}${suff}.tar.gz"
tar zcvf libs/$out_name \
Expand Down

0 comments on commit 33dc2f8

Please sign in to comment.