Skip to content

Commit

Permalink
New Recipe: GSL v1.16 (#246)
Browse files Browse the repository at this point in the history
* New Recipe: GSL@1

Rename original GSL -> GSL@2

* rename `EXCLUDED_PROJECTS` to `EXCLUDED_NAMES`

* Filter out `@` from `$(NAME)`
  • Loading branch information
dpo authored and staticfloat committed Nov 30, 2019
1 parent 71c89d0 commit 6ffe4a2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
47 changes: 47 additions & 0 deletions G/GSL@1/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder

name = "GSL"
version = v"1.16"

# Collection of sources required to build GSL
sources = [
"http://ftp.gnu.org/gnu/gsl/gsl-$(version.major).$(version.minor).tar.gz" =>
"73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53",
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/gsl-*/
update_configure_scripts
# We need to massage configure script to convince it to build the shared library
# for PowerPC.
if [[ "${target}" == powerpc64le-* ]]; then
autoreconf -vi
fi
./configure --prefix=$prefix --host=${target}
make -j${nproc}
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()

# The products that we will ensure are always built.
# Note that the products we are declaring here should be kept in-sync with those of `GSL@2`,
# so that users that don't care about versions can simply use (e.g. `libgsl`) without having
# to worry about whether `libgsl` is called something else in `GSL@2` versus `GSL@1`.
products = [
LibraryProduct("libgsl", :libgsl)
]

# Dependencies that must be installed before this package can be built
dependencies = [
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)
2 changes: 1 addition & 1 deletion G/GSL/build_tarballs.jl → G/GSL@2/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ sources = [
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/gsl-*/
update_configure_scripts
# We need to massage configure script to convince it to build the shared library
# for PowerPC.
if [[ "${target}" == powerpc64le-* ]]; then
autoreconf -vi
fi
update_configure_scripts
./configure --prefix=$prefix --host=${target}
make -j${nproc}
make install
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
PROJECTS=$(git diff-tree --no-commit-id --name-only -r HEAD "${COMPARE_AGAINST}" | grep -E ".+/.+" | cut -d/ -f1,2 | sort -u)
# LLVM is special, we won't build it automatically since it takes special attention
EXCLUDE_PROJECTS=" LLVM "
EXCLUDED_NAMES=" LLVM "
# This is the dynamic mapping we're going to build up, if it's empty we don't do anything
PROJECTS_ACCEPTED=""
Expand All @@ -53,7 +53,7 @@ jobs:
fi
# Ignore stuff in our excluded projects
if [[ "${EXCLUDE_PROJECTS}" == *" ${NAME} "* ]]; then
if [[ "${EXCLUDED_NAMES}" == *" ${NAME} "* ]]; then
echo " --> Skipping as it's excluded"
continue
fi
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
DOCKER_OPTS="$(BASE_DOCKER_OPTS) -w /workspace/${PROJECT} bb_worker:$(Build.SourceVersion)"
# First, we get build metadata in the form of a JSON object:
CONTAINER_NAME=meta_json-${NAME}-$(Build.SourceVersion)
CONTAINER_NAME=$(echo meta_json-${NAME}-$(Build.SourceVersion) | tr '[@]' '_')
docker run --name=${CONTAINER_NAME} ${DOCKER_OPTS} bash -c " \
echo \"Generating meta.json...\"; \
julia --color=yes ./build_tarballs.jl --meta-json=./meta.json; \
Expand Down

0 comments on commit 6ffe4a2

Please sign in to comment.