Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --disable-rpath when configuring xz #71

Merged
merged 3 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions build-support/bin/xz/linux/x86_64/5.2.4-1/build-xz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash

source "$(git rev-parse --show-toplevel)/utils.v1.bash"

set_strict_mode

function package_xz {
local -r installed_dir_abs="$1"

with_pushd "$installed_dir_abs" \
create_gz_package 'xz'
}

function fetch_extract_xz_source_release {
local -r archive_dirname="xz-${XZ_VERSION}"
local -r archive_filename="${archive_dirname}.tar.gz"
local -r release_url="https://tukaani.org/xz/${archive_filename}"

local -r downloaded_archive="$(curl_file_with_fail "$release_url" "$archive_filename")"
extract_for "$downloaded_archive" "$archive_dirname"
}

function build_xz {
local -r install_dir_abs="$1"

# --disable-rpath is necessary to make the xz package work "out of the box" -- otherwise at
# runtime it searches for a path in the filesystem of the VM that created it!
./configure \
--disable-rpath \
--prefix="$install_dir_abs"

make "-j${MAKE_JOBS}"

make install
}

function fetch_build_xz {
local -r install_dir_abs="$(mkdirp_absolute_path 'xz-install')"

local -r xz_src_extracted_abs="$(fetch_extract_xz_source_release)"

with_pushd >&2 "$xz_src_extracted_abs" \
build_xz "$install_dir_abs"

package_xz "$install_dir_abs"
}

readonly TARGET_PLATFORM="$1" XZ_VERSION="$2"

readonly MAKE_JOBS="${MAKE_JOBS:-2}"

case "$TARGET_PLATFORM" in
osx)
with_pushd "$(mkdirp_absolute_path "xz-${XZ_VERSION}-osx")" \
fetch_build_xz
;;
linux)
with_pushd "$(mkdirp_absolute_path "xz-${XZ_VERSION}-linux")" \
fetch_build_xz
;;
*)
die "xz does not support building for '${TARGET_PLATFORM}'"
;;
esac
5 changes: 5 additions & 0 deletions build-support/bin/xz/linux/x86_64/5.2.4-1/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

readonly result="$(./build-xz.sh linux 5.2.4)"

cp "$result" ./xz.tar.gz
64 changes: 64 additions & 0 deletions build-support/bin/xz/mac/10.13/5.2.4-1/build-xz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash

source "$(git rev-parse --show-toplevel)/utils.v1.bash"

set_strict_mode

function package_xz {
local -r installed_dir_abs="$1"

with_pushd "$installed_dir_abs" \
create_gz_package 'xz'
}

function fetch_extract_xz_source_release {
local -r archive_dirname="xz-${XZ_VERSION}"
local -r archive_filename="${archive_dirname}.tar.gz"
local -r release_url="https://tukaani.org/xz/${archive_filename}"

local -r downloaded_archive="$(curl_file_with_fail "$release_url" "$archive_filename")"
extract_for "$downloaded_archive" "$archive_dirname"
}

function build_xz {
local -r install_dir_abs="$1"

# --disable-rpath is necessary to make the xz package work "out of the box" -- otherwise at
# runtime it searches for a path in the filesystem of the VM that created it!
./configure \
--disable-rpath \
--prefix="$install_dir_abs"

make "-j${MAKE_JOBS}"

make install
}

function fetch_build_xz {
local -r install_dir_abs="$(mkdirp_absolute_path 'xz-install')"

local -r xz_src_extracted_abs="$(fetch_extract_xz_source_release)"

with_pushd >&2 "$xz_src_extracted_abs" \
build_xz "$install_dir_abs"

package_xz "$install_dir_abs"
}

readonly TARGET_PLATFORM="$1" XZ_VERSION="$2"

readonly MAKE_JOBS="${MAKE_JOBS:-2}"

case "$TARGET_PLATFORM" in
osx)
with_pushd "$(mkdirp_absolute_path "xz-${XZ_VERSION}-osx")" \
fetch_build_xz
;;
linux)
with_pushd "$(mkdirp_absolute_path "xz-${XZ_VERSION}-linux")" \
fetch_build_xz
;;
*)
die "xz does not support building for '${TARGET_PLATFORM}'"
;;
esac
5 changes: 5 additions & 0 deletions build-support/bin/xz/mac/10.13/5.2.4-1/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

readonly result="$(./build-xz.sh osx 5.2.4)"

cp "$result" ./xz.tar.gz