Skip to content

Commit

Permalink
Merge pull request #267 from nodenv/ruby-build-updates
Browse files Browse the repository at this point in the history
Ruby build updates
  • Loading branch information
jasonkarns authored Jun 6, 2017
2 parents bbaede9 + 595808a commit 4f2e67d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/node-build
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,10 @@ build_package_ldflags_dirs() {
done
}

build_package_enable_shared() {
package_option node configure --enable-shared
}

apply_node_patch() {
local patchfile
case "$1" in
Expand Down Expand Up @@ -783,7 +787,7 @@ list_definitions() {
}

sort_versions() {
sed 'h; s/[+-]/./g; s/.p\([[:digit:]]\)/.z\1/; s/$/.z/; G; s/\n/ /' | \
sed 'h; s/[+-]/./g; s/.p\([[:digit:]]\)/.z.\1/; s/$/.z/; G; s/\n/ /' | \
LC_ALL=C sort -t. -k 1,1 -k 2,2n -k 3,3n -k 4,4n -k 5,5n | awk '{print $2}'
}

Expand Down
12 changes: 12 additions & 0 deletions test/build.bats
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,18 @@ OUT
unstub uname
}

@test "make on FreeBSD 11" {
cached_tarball "node-v4.0.0"

stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE"
stub_make_install

MAKE= install_fixture definitions/vanilla-node
assert_success

unstub uname
}

@test "can use NODE_CONFIGURE to apply a patch" {
cached_tarball "node-v4.0.0"

Expand Down
4 changes: 3 additions & 1 deletion test/definitions.bats
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ NUM_DEFINITIONS="$(ls "$BATS_TEST_DIRNAME"/../share/node-build | wc -l)"
expected="0.8.9
0.10.40
4.0.0
4.2.3
4.11.1
iojs-0.12.0-dev
iojs-1.0.0
iojs-1.x-dev
iojs-3.3.1"
for ver in "$expected"; do
for ver in $expected; do
touch "${NODE_BUILD_ROOT}/share/node-build/$ver"
done
run node-build --definitions
Expand Down

0 comments on commit 4f2e67d

Please sign in to comment.