diff --git a/saltstack/pillar/common/mac.sls b/saltstack/pillar/common/mac.sls index 679930d..a2c0614 100644 --- a/saltstack/pillar/common/mac.sls +++ b/saltstack/pillar/common/mac.sls @@ -11,17 +11,18 @@ machine: hdf5: https://mac.r-project.org/bin/darwin20/arm64/hdf5-1.12.1-darwin.20-arm64.tar.xz java: https://download.java.net/java/GA/jdk18.0.1.1/65ae32619e2f40f3a9af3af1851d6e19/2/GPL/openjdk-18.0.1.1_macos-aarch64_bin.tar.gz netcdf: https://mac.r-project.org/bin/darwin20/arm64/netcdf-4.8.1-darwin.20-arm64.tar.xz + viennarna: https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_6_x/ViennaRNA-2.6.3.tar.gz intel: dotnet: https://download.visualstudio.microsoft.com/download/pr/2ef12357-499b-4a5b-a488-da45a5f310e6/fbe35c354bfb50934a976fc91c6d8d81/dotnet-runtime-6.0.13-osx-x64.pkg gsl: https://mac.r-project.org/bin/darwin17/x86_64/gsl-2.7-darwin.17-x86_64.tar.xz hdf5: https://mac.r-project.org/bin/darwin17/x86_64/hdf5-1.12.1-darwin.17-x86_64.tar.xz java: https://download.java.net/java/GA/jdk18.0.1.1/65ae32619e2f40f3a9af3af1851d6e19/2/GPL/openjdk-18.0.1.1_macos-x64_bin.tar.gz netcdf: https://mac.r-project.org/bin/darwin17/x86_64/netcdf-4.8.1-darwin.17-x86_64.tar.xz + viennarna: https://www.tbi.univie.ac.at/RNA/download/osx/macosx/ViennaRNA-2.5.0-MacOSX.dmg clustal_omega: http://www.clustal.org/omega/clustal-omega-1.2.3-macosx cmake: https://github.com/Kitware/CMake/releases/download/v3.23.0/cmake-3.23.0-macos-universal.dmg jags: https://cfhcable.dl.sourceforge.net/project/mcmc-jags/JAGS/4.x/Mac%20OS%20X/JAGS-4.3.1.pkg macfuse: https://github.com/osxfuse/osxfuse/releases/download/macfuse-4.2.4/macfuse-4.2.4.dmg - viennarna: https://www.tbi.univie.ac.at/RNA/download/osx/macosx/ViennaRNA-2.5.0-MacOSX.dmg glpk: https://mac.r-project.org/bin/darwin20/x86_64/glpk-5.0-darwin.20-x86_64.tar.xz downloads: {# For BBS #} intel: @@ -31,6 +32,11 @@ machine: openssl: https://mac.r-project.org/bin/darwin20/arm64/openssl-1.1.1t-darwin.20-arm64.tar.xz pkgconfig: https://mac.r-project.org/bin/darwin20/x86_64/pkgconfig-0.29.2-darwin.20-x86_64.tar.xz xquartz: https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.5/XQuartz-2.8.5.pkg + deployment_target: 11.0 + sdk: + path: /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk + target: MacOSX11.3.sdk + r: cran: - rgl diff --git a/saltstack/salt/dependencies/viennarna/init.sls b/saltstack/salt/dependencies/viennarna/init.sls index 0223f97..47f8fc3 100644 --- a/saltstack/salt/dependencies/viennarna/init.sls +++ b/saltstack/salt/dependencies/viennarna/init.sls @@ -1,32 +1,47 @@ # Needed by BioC GeneGA +# Mac Only {% set machine = salt["pillar.get"]("machine") %} -{% set download = machine.dependencies.viennarna.split("/")[-1] %} -{% set viennarna_version = download[10:-11] %} {%- if machine.r_path is defined %} {% set r_path = machine.r_path %} {% else %} -{% set r_path = '' %} +{% set r_path = "" %} {%- endif %} -{%- if grains['os'] == 'Ubuntu' %} -install_libgsl: - pkg.installed: - - pkgs: - - libgsl23 - - libgslcblas0 - -install_viennarna: - cmd.run: - - name: wget {{ machine.dependencies.viennarna }} && dpkg -i {{ download }} +{%- if grains["osarch"] == "arm64" %} +{% set download_url = machine.dependencies.arm64.viennarna %} +{% else %} +{% set download_url = machine.dependencies.intel.viennarna %} +{%- endif %} +{% set download = download_url.split("/")[-1] %} -{%- elif grains['os'] == 'MacOS' %} download_viennarna: cmd.run: - - name: curl -LO {{ machine.dependencies.viennarna }} + - name: curl -LO {{ download_url }} - cwd: {{ machine.user.home }}/biocbuild/Downloads - runas: biocbuild +{%- if grains["osarch"] == "arm64" %} +untar_viennarna: + cmd.run: + - name: tar xvfJ {{ machine.user.home }}/biocbuild/Downloads/{{ download }} + - cwd: {{ machine.user.home }}/biocbuild/Downloads + - require: + - cmd: download_viennarna + +configure_compile_install_viennarna: + cmd.run: + - name: | + version=$(perl -v | grep version | awk -F'[ ,]' '{print $4 "." $7}') + export CPATH={{ machine.sdk.path }}/System/Library/Perl/$version/darwin-thread-multi-2level/CORE/EXTERN.h && ./configure + export CPATH={{ machine.sdk.path }}/System/Library/Perl/$version/darwin-thread-multi-2level/CORE/EXTERN.h make + export CPATH={{ machine.sdk.path }}/System/Library/Perl/$version/darwin-thread-multi-2level/CORE/EXTERN.h make install + - cwd: {{ machine.user.home }}/biocbuild/Downloads/{{ download[:-7] }} + - require: + - cmd: untar_viennarna +{%- else %} +{% set viennarna_version = download[10:-11] %} + install_viennarna: cmd.run: - name: | diff --git a/saltstack/salt/rlang/mac.sls b/saltstack/salt/rlang/mac.sls index 5ff1dea..4fe3493 100644 --- a/saltstack/salt/rlang/mac.sls +++ b/saltstack/salt/rlang/mac.sls @@ -133,16 +133,16 @@ download_minimum_supported_macossdk: untar_macossdk: cmd.run: - name: tar -xf {{ machine.user.home }}/biocbuild/Downloads/MacOSX11.3.sdk.tar.xz - - cwd: /Library/Developer/CommandLineTools/SDKs + - cwd: /Library/Developer/CommandLineTools/SDKs - group: wheel - require: - cmd: download_minimum_supported_macossdk symlink_minor_to_major_version: file.symlink: - - name: /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk - - target: MacOSX11.3.sdk - - cwd: /Library/Developer/CommandLineTools/SDKs + - name: {{ machine.sdk.path }} + - target: {{ machine.sdk.target }} + - cwd: /Library/Developer/CommandLineTools/SDKs - group: wheel - require: - cmd: untar_macossdk @@ -150,7 +150,7 @@ symlink_minor_to_major_version: fix_gfortran_sdk_symlink: file.symlink: - name: /opt/gfortrant/SDK - - target: /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk + - target: {{ machine.sdk.path }} - cwd: /opt/gfortran - group: admin - require: @@ -160,7 +160,7 @@ export_minimum_build_in_profile: file.append: - name: /etc/profile - text: | - export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk - export MACOSX_DEPLOYMENT_TARGET=11.0 + export SDKROOT={{ machine.sdk.path }} + export MACOSX_DEPLOYMENT_TARGET={{ machine.deployment_target }} - require: - file: fix_gfortran_sdk_symlink