-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ocaml #248
base: master
Are you sure you want to change the base?
Ocaml #248
Changes from all commits
2493d38
62473f0
06710a1
2ca83e0
3854f15
f25928f
dabe226
b24064d
9f2673e
f2cdb92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
buildTools: [ocaml, ocamlfind] | ||
buildSetup: | | ||
export OCAMLLIB=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
export OCAMLFIND_CONF=${BOB_TOOL_PATHS['ocamlfind']}/../local/etc/findlib.conf | ||
|
||
OCAMLPATH=${OCAMLPATH:-""} | ||
for i in "${@:2}" ; do | ||
for j in $i/usr/lib/* ; do | ||
if [[ -d "$j" ]] ; then | ||
if [ -e "$j/META" ] ; then | ||
OCAMLPATH+="" | ||
OCAMLPATH+="${OCAMLPATH:+:}$i/usr/lib" | ||
fi | ||
fi | ||
done | ||
done | ||
|
||
[ -z "${OCAMLPATH:+true}" ] || export OCAMLPATH | ||
|
||
packageSetup: | | ||
ocamlFixupInstall() { | ||
find . -type f -exec \ | ||
sed -i "s@#!${BOB_TOOL_PATHS[ocaml]}/ocamlrun@#!/usr/bin/env ocamlrun@g" \ | ||
{} \; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
inherit: [cpackage, make] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "3.17.2" | ||
|
||
depends: | ||
- libs::zstd-dev | ||
- use: [] | ||
depends: | ||
- libs::zstd-tgt | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/ocaml/dune/archive/refs/tags/${PKG_VERSION}.tar.gz | ||
digestSHA256: 1b45e34d1eacf40be569e4d7ad055508a3242637b098327c91f7ce67772a1889 | ||
stripComponents: 1 | ||
|
||
multiPackage: | ||
configurator: | ||
depends: | ||
- libs::csexp-dev | ||
|
||
buildTools: [ocaml, dune, ocamlfind] | ||
buildSetup: | | ||
export OCAMLLIB=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
dune build dune-configurator.install | ||
dune install dune-configurator \ | ||
--prefix "/usr" \ | ||
--dest $(pwd)/install | ||
multiPackage: | ||
dev: | ||
provideDeps: ['*-dev'] | ||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
tgt: | ||
provideDeps: ['*-tgt'] | ||
packageScript: | ||
installPackageTgt $1/install | ||
stdune: | ||
buildTools: [ocaml, dune, ocamlfind] | ||
buildSetup: | | ||
export OCAMLLIB=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
dune build stdune.install | ||
dune install stdune \ | ||
--prefix "/usr" \ | ||
--dest $(pwd)/install | ||
multiPackage: | ||
dev: | ||
provideDeps: ['*-dev'] | ||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
tgt: | ||
provideDeps: ['*-tgt'] | ||
packageScript: | ||
installPackageTgt $1/install | ||
|
||
"": | ||
inherit: [strip] | ||
buildTools: [ocaml] | ||
buildSetup: | | ||
export OCAMLLIB=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
|
||
./configure \ | ||
--toolchains enable | ||
makeParallel release V=1 | ||
make install DESTDIR=$(pwd)/install PREFIX="/usr" | ||
|
||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
stripAll . | ||
provideTools: | ||
dune: "usr/bin" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
inherit: [autotools, autoconf] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "5.3.0" | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/ocaml/ocaml/archive/refs/tags/${PKG_VERSION}.tar.gz | ||
digestSHA256: eb9eab2f21758d3cfb1e78c7f83f0b4dd6302824316aba4abee047a5a4f85029 | ||
stripComponents: 1 | ||
|
||
buildTools: [m4, autotools] | ||
buildVars: [STRIP] | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
mkdir -p .bob | ||
pushd .bob | ||
ln -s $(which ${STRIP}) strip | ||
popd | ||
export PATH=${PATH}:$(pwd)/.bob | ||
|
||
./configure \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a particular reason why you do not use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes - because
The reason is, that To use the code from the
Do you see another option? Which one do you prefer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh my gosh! It's really that borken. 🤦 In this case I would rather not touch the |
||
${AUTOCONF_BUILD:+--build=${AUTOCONF_BUILD}} \ | ||
${AUTOCONF_HOST:+--host=${AUTOCONF_HOST}} \ | ||
${AUTOCONF_TARGET:+--target=${AUTOCONF_TARGET}} \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
--prefix="/usr" \ | ||
--sysconfdir="/etc" \ | ||
--localstatedir="/var" \ | ||
--libdir=/usr/lib \ | ||
--enable-shared --enable-static \ | ||
--enable-unix-lib \ | ||
--without-zstd | ||
|
||
makeParallel V=1 | ||
make install DESTDIR=$(pwd)/install | ||
|
||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
pushd usr/bin | ||
find . -type f -exec sed -i 's@#!/usr/bin/ocamlrun@#!/usr/bin/env ocamlrun@g' {} \; | ||
popd | ||
|
||
provideTools: | ||
ocaml: "usr/bin" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
inherit: [autotools] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "1.9.8" | ||
|
||
depends: | ||
- libs::zstd-dev | ||
- use: [] | ||
depends: | ||
- libs::zstd-tgt | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/ocaml/ocamlfind/archive/refs/tags/findlib-${PKG_VERSION}.tar.gz | ||
digestSHA256: d6899935ccabf67f067a9af3f3f88d94e310075d13c648fa03ff498769ce039d | ||
stripComponents: 1 | ||
|
||
buildTools: [ocaml] | ||
buildScript: | | ||
export OCAMLLIB=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
export CAML_LD_LIBRARY_PATH=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
rsync -a --delete $1/ __src__ | ||
|
||
mkdir -p .bob/ocaml_wrappers | ||
cat > .bob/ocaml_wrappers/ocamlc << EOF | ||
#!/bin/bash | ||
if [[ "\$@" =~ '-custom' ]]; then | ||
exec ${BOB_TOOL_PATHS[ocaml]}/ocamlc \$@ | ||
else | ||
exec ${BOB_TOOL_PATHS[ocaml]}/ocamlc -use-runtime $(which ocamlrun) \$@ | ||
fi | ||
EOF | ||
chmod +x .bob/ocaml_wrappers/* | ||
|
||
export PATH=$(pwd)/.bob/ocaml_wrappers:${PATH} | ||
|
||
pushd __src__ | ||
./configure \ | ||
-bindir "/usr/bin/" \ | ||
-sitelib "/usr/lib/" \ | ||
-mandir "/usr/man/" \ | ||
-with-relative-paths-at "/" \ | ||
-no-topfind | ||
makeParallel | ||
make install DESTDIR=$(pwd)/../install | ||
popd | ||
|
||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
|
||
provideTools: | ||
ocamlfind: "usr/bin" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
inherit: [autotools] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "2.3.0" | ||
|
||
checkoutSCM: | ||
scm: git | ||
url: [email protected]:hubert/opam.git | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
tag: ${PKG_VERSION} | ||
commit: e13109411952d4f723a165c2a24b8c03c4945041 | ||
|
||
buildTools: [ocaml] | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
./configure \ | ||
${AUTOCONF_BUILD:+--build=${AUTOCONF_BUILD}} \ | ||
${AUTOCONF_HOST:+--host=${AUTOCONF_HOST}} \ | ||
${AUTOCONF_TARGET:+--target=${AUTOCONF_TARGET}} \ | ||
--prefix="/usr" \ | ||
--sysconfdir="/etc" \ | ||
--localstatedir="/var" \ | ||
--libdir=/usr/lib \ | ||
--without-mccs \ | ||
--without-dune \ | ||
--disable-checks \ | ||
makeParallel | ||
make install DESTDIR=$(pwd)/install | ||
|
||
packageScript: | ||
autotoolsPackageBin | ||
|
||
provideTools: | ||
opam: "usr/bin" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
inherit: [ocaml, install] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "1.1.0" | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/mirage/bigarray-compat/archive/refs/tags/v${PKG_VERSION}.tar.gz | ||
digestSHA256: cf09354986d1ab7d506949f58e73dd72be8aedb241c1593381c18e92a70c0bb1 | ||
stripComponents: 1 | ||
|
||
buildTools: [dune, ocaml, target-toolchain] | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
dune build | ||
dune install --prefix "/usr" \ | ||
--dest $(pwd)/install | ||
|
||
multiPackage: | ||
dev: | ||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
tgt: | ||
packageScript: | | ||
installPackageTgt $1/install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
inherit: [install] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "1.5.2" | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/ocaml-dune/csexp/archive/refs/tags/${PKG_VERSION}.tar.gz | ||
digestSHA256: de3fda861ec8210a404fcb76afa162b08ed1cd11228645c78b53e1f82b24e236 | ||
stripComponents: 1 | ||
|
||
buildTools: [dune, ocaml, target-toolchain] | ||
buildSetup: | | ||
export OCAMLLIB=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
buildScript: | | ||
mkdir -p build && pushd build | ||
rsync -aH $1/ . | ||
dune build -p csexp | ||
dune install --prefix "/usr" --dest $(pwd)/../install --relocatable | ||
|
||
multiPackage: | ||
dev: | ||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
tgt: | ||
packageScript: | | ||
installPackageTgt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
inherit: [make, cpackage, ocaml] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "0.23.0" | ||
|
||
depends: | ||
- name: devel::dune | ||
tools: | ||
target-toolchain: host-compat-toolchain | ||
use: [tools] | ||
forward: True | ||
- devel::dune-configurator-dev | ||
- devel::dune-stdune-dev | ||
- libs::bigarray-compat-dev | ||
- libs::ocaml-integers-dev | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/yallop/ocaml-ctypes/archive/refs/tags/${PKG_VERSION}.tar.gz | ||
digestSHA256: cae47d815b27dd4c824a007f1145856044542fe2588d23a443ef4eefec360bf1 | ||
stripComponents: 1 | ||
|
||
buildTools: [dune, ocaml, target-toolchain] | ||
buildSetup: | | ||
export OCAMLLIB=${BOB_TOOL_PATHS['ocaml']}/../lib | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
dune build ctypes.install | ||
dune install ctypes \ | ||
--prefix "/usr" \ | ||
--dest $(pwd)/install | ||
|
||
multiPackage: | ||
dev: | ||
provideDeps: ['*-dev'] | ||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
tgt: | ||
provideDeps: ['*-tgt'] | ||
packageScript: | | ||
installPackageTgt $1/install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
inherit: [ocaml, install] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "0.7.0" | ||
|
||
depends: | ||
- libs::stdlib-shims-dev | ||
- use: [] | ||
depends: | ||
- libs::stdlib-shims-tgt | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/yallop/ocaml-integers/archive/refs/tags/${PKG_VERSION}.tar.gz | ||
digestSHA256: 8bb517fa9a1818246eb8c4ce34ee1489fbebb4b92defa3a25d13cab8d23ec685 | ||
stripComponents: 1 | ||
|
||
buildTools: [dune, ocaml, target-toolchain] | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
dune build | ||
dune install --prefix "/usr" \ | ||
--dest $(pwd)/install | ||
|
||
multiPackage: | ||
dev: | ||
provideDeps: ['*-dev'] | ||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
tgt: | ||
provideDeps: ['*-tgt'] | ||
packageScript: | | ||
installPackageTgt $1/install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
inherit: [ocaml, install] | ||
|
||
metaEnvironment: | ||
PKG_VERSION: "0.3.0" | ||
|
||
checkoutSCM: | ||
scm: url | ||
url: https://github.com/ocaml/stdlib-shims/archive/refs/tags/${PKG_VERSION}.tar.gz | ||
digestSHA256: 6d0386313a021146300011549180fcd4e94f7ac3c3bf021ff165f6558608f0c2 | ||
stripComponents: 1 | ||
|
||
buildTools: [dune, ocaml, target-toolchain] | ||
buildScript: | | ||
rsync -a --delete $1/ . | ||
dune build | ||
dune install --prefix "/usr" \ | ||
--dest $(pwd)/install | ||
|
||
multiPackage: | ||
dev: | ||
packageScript: | | ||
rsync -a --delete $1/install/ . | ||
tgt: | ||
packageScript: | | ||
installPackageTgt $1/install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add an empty string?