Skip to content

Commit

Permalink
Initial esy build (#1)
Browse files Browse the repository at this point in the history
Initial cross-platform esy build - building on Linux, OSX, Win10.

* Initial esy build

* Add missed esy folder

* Fix EOL

* Force windows env

* Tweak build steps

* More tweaks

* Move build scripts

* Use CMake for OSX/Linux

* Install libtool

* Add EOL gitattributes

* Fix .gitattributes

* Fix prefix
  • Loading branch information
bryphe authored Feb 24, 2020
1 parent 84eeca1 commit 39e3ef0
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .ci/esy-build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ steps:
versionSpec: '8.9'
- script: git submodule update --init
displayName: 'git submodule update --init'
- script: npm install -g esy@0.5.8
displayName: 'npm install -g esy@0.5.8'
- script: npm install -g esy@0.6.2
displayName: 'npm install -g esy@0.6.2'
- script: esy install
displayName: 'esy install'
- script: esy build
Expand Down
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
test/fixtures/lorem_ipsum.txt text eol=lf

esy/build-windows.sh text eol=lf
esy/build.sh text eol=lf
*.sh text eol=lf
*.ac text eol=lf
*.am text eol=lf
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
pool:
vmImage: 'macOS 10.13'
steps:
- script: brew update
- script: brew install libtool
- template: .ci/esy-build-steps.yml

- job: MacOS14
Expand Down
3 changes: 3 additions & 0 deletions esy.lock/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions esy.lock/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 120 additions & 0 deletions esy.lock/index.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions esy/build-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/bash

set -e

sh autogen.sh
./configure --host=x86_64-w64-mingw32 CC=x86_64-w64-mingw32-gcc --prefix=$cur__install
make
# TODO: One of the tests fails on Windows. Likely, it is a mingw/cygwin pathing issue - but need to investigate to be sure.
# make check
make install
5 changes: 5 additions & 0 deletions esy/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$cur__target_dir

make
make install

27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

{
"name": "esy-libuv",
"version": "1.34.2",
"description": "Esy-enabled libuv build",
"license": "MIT",
"esy": {
"build": [
["bash", "#{os=='windows' ? './esy/build-windows.sh':'./esy/build.sh'}"]
],
"buildsInSource":true,
"exportedEnv": {
"LIBUV_INCLUDE_PATH": {
"val": "#{self.install / 'include'}",
"scope": "global"
},
"LIBUV_LIB_PATH": {
"val": "#{self.lib}",
"scope": "global"
}
}
},
"dependencies": {
"esy-cmake": "^0.3.2",
"esy-libtools": "github:bryphe/esy-libtools#62766a2"
}
}

0 comments on commit 39e3ef0

Please sign in to comment.