├── recipe ├── post-link.sh ├── java.rc ├── .bld-r-base.bat.swp ├── test-svg.R ├── yum_requirements.txt ├── deactivate-r-base.sh ├── install-cross-activate.sh ├── activate-r-base.sh ├── 0003-Win32-Do-not-link-static-libgcc.patch ├── 0002-Fix-trio-config.h-include-depth-issue.patch ├── conda_build_config.yaml ├── activate-cross-r-base.sh ├── 0015-Win32-Fix-COMPILED_BY-for-custom-GCC-pkgversion.patch ├── 0010-Allow-rpath-in-tcltk-dylib-LC_LOAD_DYLIB-command.patch ├── 0018-Fix-path-to-TCL-TK.patch ├── 0012-Use-LAPACK_LDFLAGS-in-Rlapack_la_LIBADD.patch ├── 0008-Revert-part-of-9b818c6dc00143ff18775a4015a3f43b5196f.patch ├── 0005-Darwin-Avoid-setting-DYLD_FALLBACK_LIBRARY_PATH.patch ├── 0007-javareconf-Do-not-fail-on-compile-fail.patch ├── 0001-Darwin-Remove-unicode-elipsis-character-from-grDevic.patch ├── 0009-javareconf-macOS-Continue-to-allow-system-Java-lt-9-.patch ├── bld-r-base.bat ├── 0004-Win32-Prevent-conversion-of-R_ARCH-to-abs-Windows-pa.patch ├── 0011-Check-for-changes-then-forcibly-mv-in-javareconf.in.patch ├── 0014-Use-conda-s-tzdata-package.patch ├── notes.md ├── 0006-Linux-Do-not-modify-LD_LIBRARY_PATH.patch ├── launcher.c ├── meta.yaml └── build-r-base.sh ├── .github └── CODEOWNERS ├── .ci_support ├── migrations │ └── pcre21047.yaml ├── README ├── win_64_.yaml ├── linux_ppc64le_.yaml ├── linux_64_.yaml ├── linux_aarch64_.yaml ├── osx_64_.yaml └── osx_arm64_.yaml ├── conda-forge.yml ├── .circleci └── config.yml ├── .gitattributes ├── .gitignore ├── .scripts ├── logging_utils.sh ├── create_conda_build_artifacts.bat ├── run_docker_build.sh ├── run_osx_build.sh ├── create_conda_build_artifacts.sh ├── build_steps.sh └── run_win_build.bat ├── azure-pipelines.yml ├── LICENSE.txt ├── .azure-pipelines ├── azure-pipelines-win.yml ├── azure-pipelines-osx.yml └── azure-pipelines-linux.yml └── README.md /recipe/post-link.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | R CMD javareconf > /dev/null 2>&1 || true 3 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @conda-forge/r @isuruf @mbargull @mingwandroid @ocefpaf @sodre @xhochy -------------------------------------------------------------------------------- /recipe/java.rc: -------------------------------------------------------------------------------- 1 | export JDK_HOME=/usr/lib/jvm/java 2 | export JAVA_HOME=${JDK_HOME}/jre 3 | -------------------------------------------------------------------------------- /recipe/.bld-r-base.bat.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conda-forge/r-base-feedstock/HEAD/recipe/.bld-r-base.bat.swp -------------------------------------------------------------------------------- /recipe/test-svg.R: -------------------------------------------------------------------------------- 1 | svg(filename="test.svg") 2 | pie( 1:10, labels=paste("label number",1:10)) 3 | dev.off() 4 | if (!file.exists("test.svg")) { 5 | stop("SVG not created!") 6 | } 7 | -------------------------------------------------------------------------------- /.ci_support/migrations/pcre21047.yaml: -------------------------------------------------------------------------------- 1 | __migrator: 2 | build_number: 1 3 | commit_message: Rebuild for pcre2 10.47 4 | kind: version 5 | migration_number: 1 6 | migrator_ts: 1763668342.9392653 7 | pcre2: 8 | - '10.47' 9 | -------------------------------------------------------------------------------- /recipe/yum_requirements.txt: -------------------------------------------------------------------------------- 1 | # TODO get rid of this and use xorg package. 2 | mesa-libGL-devel 3 | mesa-libGLU-devel 4 | libX11-devel 5 | libXt-devel 6 | libXrender-devel 7 | libXext-devel 8 | libXdmcp 9 | xorg-x11-server-Xvfb 10 | -------------------------------------------------------------------------------- /recipe/deactivate-r-base.sh: -------------------------------------------------------------------------------- 1 | # shellcheck shell=sh 2 | 3 | # restore pre-existing RSTUDIO_WHICH_R 4 | if [ -n "${RSTUDIO_WHICH_R_PREV+x}" ]; then 5 | export RSTUDIO_WHICH_R="${RSTUDIO_WHICH_R_PREV}" 6 | unset RSTUDIO_WHICH_R_PREV 7 | else 8 | unset RSTUDIO_WHICH_R 9 | fi 10 | -------------------------------------------------------------------------------- /recipe/install-cross-activate.sh: -------------------------------------------------------------------------------- 1 | if [[ "${build_platform}" != linux-ppc64le ]] ; then 2 | shellcheck --shell=sh --severity=style --enable=check-unassigned-uppercase \ 3 | "${RECIPE_DIR}/activate-cross-r-base.sh" 4 | fi 5 | mkdir -p $PREFIX/etc/conda/activate.d/ 6 | cp $RECIPE_DIR/activate-cross-r-base.sh $PREFIX/etc/conda/activate.d/activate-cross-r-base.sh 7 | -------------------------------------------------------------------------------- /recipe/activate-r-base.sh: -------------------------------------------------------------------------------- 1 | # shellcheck shell=sh 2 | 3 | R CMD javareconf > /dev/null 2>&1 || true 4 | 5 | # store existing RSTUDIO_WHICH_R 6 | if [ -n "${RSTUDIO_WHICH_R+x}" ]; then 7 | export RSTUDIO_WHICH_R_PREV="${RSTUDIO_WHICH_R}" 8 | fi 9 | # shellcheck disable=SC2154 # CONDA_PREFIX is always set in this context 10 | export RSTUDIO_WHICH_R="${CONDA_PREFIX}/bin/R" 11 | -------------------------------------------------------------------------------- /.ci_support/README: -------------------------------------------------------------------------------- 1 | This file is automatically generated by conda-smithy. If any 2 | particular build configuration is expected, but it is not found, 3 | please make sure all dependencies are satisfiable. To add/modify any 4 | matrix elements, you should create/change conda-smithy's input 5 | recipe/conda_build_config.yaml and re-render the recipe, rather than 6 | editing these files directly. 7 | -------------------------------------------------------------------------------- /conda-forge.yml: -------------------------------------------------------------------------------- 1 | azure: 2 | store_build_artifacts: true 3 | bot: 4 | abi_migration_branches: 5 | - 4.3.x 6 | - 4.4.x 7 | build_platform: 8 | linux_aarch64: linux_64 9 | linux_ppc64le: linux_64 10 | osx_arm64: osx_64 11 | conda_build: 12 | pkg_format: '2' 13 | conda_forge_output_validation: true 14 | github: 15 | branch_name: main 16 | tooling_branch_name: main 17 | provider: 18 | linux_aarch64: native 19 | linux_ppc64le: native 20 | test: native_and_emulated 21 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: jinja-yaml -*- 4 | 5 | version: 2 6 | 7 | jobs: 8 | build: 9 | working_directory: ~/test 10 | machine: 11 | image: ubuntu-2004:current 12 | steps: 13 | - run: 14 | # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. 15 | command: exit 0 16 | 17 | workflows: 18 | version: 2 19 | build_and_test: 20 | jobs: 21 | - build: 22 | filters: 23 | branches: 24 | ignore: 25 | - /.*/ 26 | -------------------------------------------------------------------------------- /.ci_support/win_64_.yaml: -------------------------------------------------------------------------------- 1 | bzip2: 2 | - '1' 3 | c_compiler: 4 | - gcc 5 | c_compiler_version: 6 | - '13' 7 | c_stdlib: 8 | - m2w64-sysroot 9 | c_stdlib_version: 10 | - '12' 11 | cairo: 12 | - '1' 13 | channel_sources: 14 | - conda-forge 15 | channel_targets: 16 | - conda-forge main 17 | cxx_compiler: 18 | - gxx 19 | cxx_compiler_version: 20 | - '13' 21 | fontconfig: 22 | - '2' 23 | fortran_compiler: 24 | - gfortran 25 | fortran_compiler_version: 26 | - '13' 27 | gsl: 28 | - '2.7' 29 | icu: 30 | - '75' 31 | libblas: 32 | - 3.9.* *netlib 33 | libcurl: 34 | - '8' 35 | libdeflate: 36 | - '1.25' 37 | libiconv: 38 | - '1' 39 | libjpeg_turbo: 40 | - '3' 41 | liblapack: 42 | - 3.9.* *netlib 43 | liblzma_devel: 44 | - '5' 45 | libpng: 46 | - '1.6' 47 | libtiff: 48 | - '4.7' 49 | pcre2: 50 | - '10.47' 51 | target_platform: 52 | - win-64 53 | tk: 54 | - '8.6' 55 | zlib: 56 | - '1' 57 | -------------------------------------------------------------------------------- /recipe/0003-Win32-Do-not-link-static-libgcc.patch: -------------------------------------------------------------------------------- 1 | From 461f2f1ef08c05d06eeb95908f86799f517fa76f Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Tue, 2 Jan 2018 15:40:19 +0000 4 | Subject: [PATCH 03/13] Win32: Do not link -static-libgcc 5 | 6 | --- 7 | src/gnuwin32/fixed/etc/Makeconf | 4 ++-- 8 | 1 file changed, 2 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/src/gnuwin32/fixed/etc/Makeconf b/src/gnuwin32/fixed/etc/Makeconf 11 | index 41df5e0..3838f12 100644 12 | --- a/src/gnuwin32/fixed/etc/Makeconf 13 | +++ b/src/gnuwin32/fixed/etc/Makeconf 14 | @@ -16,8 +16,8 @@ else 15 | FDEBUGFLAG= 16 | endif 17 | 18 | -DLLFLAGS += -static-libgcc 19 | -LINKFLAGS += -static-libgcc 20 | +DLLFLAGS += 21 | +LINKFLAGS += 22 | 23 | 24 | ## Things which are substituted by fixed/Makefile (and also -O3 -> -O2) 25 | -- 26 | 2.39.3 (Apple Git-146) 27 | 28 | -------------------------------------------------------------------------------- /recipe/0002-Fix-trio-config.h-include-depth-issue.patch: -------------------------------------------------------------------------------- 1 | From 365171510f0f163f69d348be5343df222d77ecf6 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Wed, 15 Dec 2021 07:32:32 +0100 4 | Subject: [PATCH 02/13] Fix trio config.h include depth issue 5 | 6 | --- 7 | src/extra/trio/Makefile.win | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/src/extra/trio/Makefile.win b/src/extra/trio/Makefile.win 11 | index 5a8abf8..935ba50 100644 12 | --- a/src/extra/trio/Makefile.win 13 | +++ b/src/extra/trio/Makefile.win 14 | @@ -2,7 +2,7 @@ 15 | include ../../gnuwin32/MkRules 16 | 17 | # triop.h says this does not work, but useful to debug wchar conversions. 18 | -trio-CPPFLAGS=-DTRIO_FEATURE_WIDECHAR=1 19 | +trio-CPPFLAGS=-DTRIO_FEATURE_WIDECHAR=1 -I../../include -I. 20 | 21 | CPPFLAGS = -I../../include -I../../main 22 | 23 | -- 24 | 2.39.3 (Apple Git-146) 25 | 26 | -------------------------------------------------------------------------------- /recipe/conda_build_config.yaml: -------------------------------------------------------------------------------- 1 | # Keep building with gcc 10 for compatibility with packages 2 | # that build R pacakges with CUDA (eg: xgboost) 3 | c_compiler_version: # [linux] 4 | - 10 # [linux] 5 | cxx_compiler_version: # [linux] 6 | - 10 # [linux] 7 | fortran_compiler_version: # [linux] 8 | - 10 # [linux] 9 | c_compiler: # [win] 10 | - gcc # [win] 11 | c_compiler_version: # [win] 12 | - 13 # [win] 13 | cxx_compiler: # [win] 14 | - gxx # [win] 15 | cxx_compiler_version: # [win] 16 | - 13 # [win] 17 | fortran_compiler: # [win] 18 | - gfortran # [win] 19 | fortran_compiler_version: # [win] 20 | - 13 # [win] 21 | c_stdlib: # [win] 22 | - m2w64-sysroot # [win] 23 | c_stdlib_version: # [win] 24 | - 12 # [win] 25 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.patch binary 4 | *.diff binary 5 | meta.yaml text eol=lf 6 | build.sh text eol=lf 7 | bld.bat text eol=crlf 8 | 9 | # github helper pieces to make some files not show up in diffs automatically 10 | .azure-pipelines/* linguist-generated=true 11 | .circleci/* linguist-generated=true 12 | .ci_support/README linguist-generated=true 13 | .drone/* linguist-generated=true 14 | .drone.yml linguist-generated=true 15 | .github/* linguist-generated=true 16 | .travis/* linguist-generated=true 17 | .appveyor.yml linguist-generated=true 18 | .gitattributes linguist-generated=true 19 | .gitignore linguist-generated=true 20 | .travis.yml linguist-generated=true 21 | .scripts/* linguist-generated=true 22 | .woodpecker.yml linguist-generated=true 23 | /LICENSE.txt linguist-generated=true 24 | /README.md linguist-generated=true 25 | azure-pipelines.yml linguist-generated=true 26 | build-locally.py linguist-generated=true 27 | pixi.toml linguist-generated=true 28 | shippable.yml linguist-generated=true 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # User content belongs under recipe/. 2 | # Feedstock configuration goes in `conda-forge.yml` 3 | # Everything else is managed by the conda-smithy rerender process. 4 | # Please do not modify 5 | 6 | # Ignore all files and folders in root 7 | * 8 | !/conda-forge.yml 9 | 10 | # Don't ignore any files/folders if the parent folder is 'un-ignored' 11 | # This also avoids warnings when adding an already-checked file with an ignored parent. 12 | !/**/ 13 | # Don't ignore any files/folders recursively in the following folders 14 | !/recipe/** 15 | !/.ci_support/** 16 | 17 | # Since we ignore files/folders recursively, any folders inside 18 | # build_artifacts gets ignored which trips some build systems. 19 | # To avoid that we 'un-ignore' all files/folders recursively 20 | # and only ignore the root build_artifacts folder. 21 | !/build_artifacts/** 22 | /build_artifacts 23 | 24 | *.pyc 25 | 26 | # Rattler-build's artifacts are in `output` when not specifying anything. 27 | /output 28 | # Pixi's configuration 29 | .pixi 30 | -------------------------------------------------------------------------------- /recipe/activate-cross-r-base.sh: -------------------------------------------------------------------------------- 1 | # shellcheck shell=sh 2 | 3 | if [ -z "${CONDA_BUILD:+x}" ]; then 4 | echo "This package can only be used in conda-build" 5 | exit 1 6 | fi 7 | 8 | # shellcheck disable=SC2154 # assume variables are set at this point 9 | if [ "${CONDA_BUILD_STATE-}" != "TEST" ] && [ "${build_platform}" != "${target_platform}" ]; then 10 | export R="${BUILD_PREFIX}/bin/R" 11 | export R_ARGS="--library=${PREFIX}/lib/R/library --no-test-load" 12 | # Keep these around if we want to build a native version 13 | cp "${BUILD_PREFIX}/lib/R/etc/Makeconf" "${BUILD_PREFIX}/lib/R/etc/Makeconf.${build_platform}" 14 | echo "R_HOME=${PREFIX}/lib/R" > "${BUILD_PREFIX}/lib/R/etc/Makeconf" 15 | cat "${PREFIX}/lib/R/etc/Makeconf" >> "${BUILD_PREFIX}/lib/R/etc/Makeconf" 16 | cp "${BUILD_PREFIX}/lib/R/etc/Makeconf" "${BUILD_PREFIX}/lib/R/etc/Makeconf.${target_platform}" 17 | if [ -d "${BUILD_PREFIX}/lib/R/library" ]; then 18 | rsync -a -I "${BUILD_PREFIX}/lib/R/library/" "${PREFIX}/lib/R/library/" 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /.scripts/logging_utils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Provide a unified interface for the different logging 4 | # utilities CI providers offer. If unavailable, provide 5 | # a compatible fallback (e.g. bare `echo xxxxxx`). 6 | 7 | function startgroup { 8 | # Start a foldable group of log lines 9 | # Pass a single argument, quoted 10 | case ${CI:-} in 11 | azure ) 12 | echo "##[group]$1";; 13 | travis ) 14 | echo "$1" 15 | echo -en 'travis_fold:start:'"${1// /}"'\r';; 16 | github_actions ) 17 | echo "::group::$1";; 18 | * ) 19 | echo "$1";; 20 | esac 21 | } 2> /dev/null 22 | 23 | function endgroup { 24 | # End a foldable group of log lines 25 | # Pass a single argument, quoted 26 | 27 | case ${CI:-} in 28 | azure ) 29 | echo "##[endgroup]";; 30 | travis ) 31 | echo -en 'travis_fold:end:'"${1// /}"'\r';; 32 | github_actions ) 33 | echo "::endgroup::";; 34 | esac 35 | } 2> /dev/null 36 | -------------------------------------------------------------------------------- /recipe/0015-Win32-Fix-COMPILED_BY-for-custom-GCC-pkgversion.patch: -------------------------------------------------------------------------------- 1 | From 1bb4f73babfe04c01a811d8230e4733ba398da92 Mon Sep 17 00:00:00 2001 2 | From: Marcel Bargull 3 | Date: Sun, 30 Jun 2024 22:57:23 +0200 4 | Subject: [PATCH] Win32: Fix COMPILED_BY for custom GCC pkgversion 5 | 6 | Signed-off-by: Marcel Bargull 7 | --- 8 | src/gnuwin32/MkRules.rules | 3 ++- 9 | 1 file changed, 2 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/src/gnuwin32/MkRules.rules b/src/gnuwin32/MkRules.rules 12 | index 46bdb0b821..69b3318b50 100644 13 | --- a/src/gnuwin32/MkRules.rules 14 | +++ b/src/gnuwin32/MkRules.rules 15 | @@ -11,7 +11,8 @@ ATLAS_PATH ?= 16 | TOOL_PATH ?= 17 | BINPREF64 ?= 18 | CCBASE = $(if $(USE_LLVM),clang,gcc) 19 | -COMPILED_BY ?= $(CCBASE)-$(shell $(CC) --version | grep -E -o "([0-9]{1,}\.){2,}[0-9]{1,}") 20 | +# tail -n1 to skip matches in "gcc (CUSTOM) X.Y.Z" for GCC configured --with-pkgversion=CUSTOM 21 | +COMPILED_BY ?= $(CCBASE)-$(shell $(CC) --version | head -n1 | grep -E -o "([0-9]{1,}\.){2,}[0-9]{1,}" | tail -n1) 22 | M_ARCH ?= 23 | AS_ARCH ?= 24 | RC_ARCH ?= 25 | -------------------------------------------------------------------------------- /.ci_support/linux_ppc64le_.yaml: -------------------------------------------------------------------------------- 1 | bzip2: 2 | - '1' 3 | c_compiler: 4 | - gcc 5 | c_compiler_version: 6 | - '10' 7 | c_stdlib: 8 | - sysroot 9 | c_stdlib_version: 10 | - '2.17' 11 | cairo: 12 | - '1' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '10' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | fortran_compiler: 28 | - gfortran 29 | fortran_compiler_version: 30 | - '10' 31 | glib: 32 | - '2' 33 | gsl: 34 | - '2.7' 35 | icu: 36 | - '75' 37 | libblas: 38 | - 3.9.* *netlib 39 | libcurl: 40 | - '8' 41 | libdeflate: 42 | - '1.25' 43 | libiconv: 44 | - '1' 45 | libjpeg_turbo: 46 | - '3' 47 | liblapack: 48 | - 3.9.* *netlib 49 | liblzma_devel: 50 | - '5' 51 | libpng: 52 | - '1.6' 53 | libtiff: 54 | - '4.7' 55 | libuuid: 56 | - '2' 57 | pango: 58 | - '1' 59 | pcre2: 60 | - '10.47' 61 | readline: 62 | - '8' 63 | target_platform: 64 | - linux-ppc64le 65 | zip_keys: 66 | - - c_compiler_version 67 | - cxx_compiler_version 68 | - fortran_compiler_version 69 | zlib: 70 | - '1' 71 | -------------------------------------------------------------------------------- /recipe/0010-Allow-rpath-in-tcltk-dylib-LC_LOAD_DYLIB-command.patch: -------------------------------------------------------------------------------- 1 | From 359a6f705c6b4871a69d4ca7c6b2a9a6b688c884 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Sun, 29 Apr 2018 19:30:59 +0100 4 | Subject: [PATCH 10/13] Allow @rpath in tcltk dylib LC_LOAD_DYLIB command 5 | 6 | --- 7 | src/library/tcltk/R/unix/zzz.R | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/src/library/tcltk/R/unix/zzz.R b/src/library/tcltk/R/unix/zzz.R 11 | index 9715367..658cf5c 100644 12 | --- a/src/library/tcltk/R/unix/zzz.R 13 | +++ b/src/library/tcltk/R/unix/zzz.R 14 | @@ -46,7 +46,7 @@ 15 | ind <- grep("^/.*libtk[.0-9]+[.]dylib", loads) 16 | if (length(ind)) { 17 | this <- loads[ind] 18 | - if (!file.exists(this)) { 19 | + if(!file.exists(this) && !grepl("@rpath",this)) { 20 | ## one issue here is that libtk built from unpatched 21 | ## sources has wrong id, so we report what it is looking for 22 | ## (/opt/R/arm64/lib:/usr/X11R6/lib/libtk8.6.dylib is wrong) 23 | -- 24 | 2.39.3 (Apple Git-146) 25 | 26 | -------------------------------------------------------------------------------- /.ci_support/linux_64_.yaml: -------------------------------------------------------------------------------- 1 | bzip2: 2 | - '1' 3 | c_compiler: 4 | - gcc 5 | c_compiler_version: 6 | - '10' 7 | c_stdlib: 8 | - sysroot 9 | c_stdlib_version: 10 | - '2.17' 11 | cairo: 12 | - '1' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '10' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | fortran_compiler: 28 | - gfortran 29 | fortran_compiler_version: 30 | - '10' 31 | glib: 32 | - '2' 33 | gsl: 34 | - '2.7' 35 | icu: 36 | - '75' 37 | libblas: 38 | - 3.9.* *netlib 39 | libcurl: 40 | - '8' 41 | libdeflate: 42 | - '1.25' 43 | libiconv: 44 | - '1' 45 | libjpeg_turbo: 46 | - '3' 47 | liblapack: 48 | - 3.9.* *netlib 49 | liblzma_devel: 50 | - '5' 51 | libpng: 52 | - '1.6' 53 | libtiff: 54 | - '4.7' 55 | libuuid: 56 | - '2' 57 | pango: 58 | - '1' 59 | pcre2: 60 | - '10.47' 61 | readline: 62 | - '8' 63 | target_platform: 64 | - linux-64 65 | tk: 66 | - '8.6' 67 | zip_keys: 68 | - - c_compiler_version 69 | - cxx_compiler_version 70 | - fortran_compiler_version 71 | zlib: 72 | - '1' 73 | -------------------------------------------------------------------------------- /.ci_support/linux_aarch64_.yaml: -------------------------------------------------------------------------------- 1 | bzip2: 2 | - '1' 3 | c_compiler: 4 | - gcc 5 | c_compiler_version: 6 | - '10' 7 | c_stdlib: 8 | - sysroot 9 | c_stdlib_version: 10 | - '2.17' 11 | cairo: 12 | - '1' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '10' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | fortran_compiler: 28 | - gfortran 29 | fortran_compiler_version: 30 | - '10' 31 | glib: 32 | - '2' 33 | gsl: 34 | - '2.7' 35 | icu: 36 | - '75' 37 | libblas: 38 | - 3.9.* *netlib 39 | libcurl: 40 | - '8' 41 | libdeflate: 42 | - '1.25' 43 | libiconv: 44 | - '1' 45 | libjpeg_turbo: 46 | - '3' 47 | liblapack: 48 | - 3.9.* *netlib 49 | liblzma_devel: 50 | - '5' 51 | libpng: 52 | - '1.6' 53 | libtiff: 54 | - '4.7' 55 | libuuid: 56 | - '2' 57 | pango: 58 | - '1' 59 | pcre2: 60 | - '10.47' 61 | readline: 62 | - '8' 63 | target_platform: 64 | - linux-aarch64 65 | tk: 66 | - '8.6' 67 | zip_keys: 68 | - - c_compiler_version 69 | - cxx_compiler_version 70 | - fortran_compiler_version 71 | zlib: 72 | - '1' 73 | -------------------------------------------------------------------------------- /recipe/0018-Fix-path-to-TCL-TK.patch: -------------------------------------------------------------------------------- 1 | From 4473a2eb84deb2f6509e0ae576a478661a9d3b49 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Tue, 19 Sep 2023 17:28:19 -0500 4 | Subject: [PATCH] Fix path to TCL/TK 5 | 6 | --- 7 | src/library/tcltk/R/windows/zzz.R | 4 ++-- 8 | 1 file changed, 2 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/src/library/tcltk/R/windows/zzz.R b/src/library/tcltk/R/windows/zzz.R 11 | index 87cb0a2d73..4d6626273d 100644 12 | --- a/src/library/tcltk/R/windows/zzz.R 13 | +++ b/src/library/tcltk/R/windows/zzz.R 14 | @@ -21,10 +21,10 @@ 15 | .onLoad <- function(libname, pkgname) 16 | { 17 | if(!nzchar(tclbin <- Sys.getenv("MY_TCLTK"))) { 18 | - tclbin <- file.path(R.home(), "Tcl", "bin") 19 | + tclbin <- file.path(R.home(), "..", "..", "Library", "bin") 20 | if(!file.exists(tclbin)) 21 | stop("Tcl/Tk support files were not installed", call.=FALSE) 22 | - lib <- gsub("\\", "/", file.path(R.home(), "Tcl", "lib"), 23 | + lib <- gsub("\\", "/", file.path(R.home(), "..", "..", "Library", "lib"), 24 | fixed=TRUE) 25 | Sys.setenv(TCLLIBPATH = lib) 26 | } 27 | -- 28 | 2.42.0 29 | 30 | -------------------------------------------------------------------------------- /recipe/0012-Use-LAPACK_LDFLAGS-in-Rlapack_la_LIBADD.patch: -------------------------------------------------------------------------------- 1 | From a9df83a1aea2b219a598ff49198ee4ba8e20d5c3 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Sat, 27 Apr 2019 00:36:24 +0100 4 | Subject: [PATCH 12/13] Use LAPACK_LDFLAGS in Rlapack_la_LIBADD 5 | 6 | --- 7 | src/modules/lapack/Makefile.in | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/src/modules/lapack/Makefile.in b/src/modules/lapack/Makefile.in 11 | index 0a1c9cb..36007a1 100644 12 | --- a/src/modules/lapack/Makefile.in 13 | +++ b/src/modules/lapack/Makefile.in 14 | @@ -61,7 +61,7 @@ Rlapack_la = libRlapack$(R_DYLIB_EXT) 15 | ## needed being loaded into R.bin/libR.so, and that need not be the 16 | ## case for a static libfortran or if a package is compiled under a 17 | ## different compiler. 18 | -@BUILD_NEW_ACCELERATE_LAPACK_FALSE@Rlapack_la_LIBADD = $(FLIBS_IN_SO) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBR) 19 | +@BUILD_NEW_ACCELERATE_LAPACK_FALSE@Rlapack_la_LIBADD = @LAPACK_LDFLAGS@ $(FLIBS_IN_SO) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBR) 20 | @BUILD_NEW_ACCELERATE_LAPACK_TRUE@Rlapack_la_LIBADD = -framework Accelerate 21 | 22 | ALL_CFLAGS = $(ALL_CFLAGS_LO) 23 | -- 24 | 2.39.3 (Apple Git-146) 25 | 26 | -------------------------------------------------------------------------------- /.ci_support/osx_64_.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '10.13' 5 | bzip2: 6 | - '1' 7 | c_compiler: 8 | - clang 9 | c_compiler_version: 10 | - '19' 11 | c_stdlib: 12 | - macosx_deployment_target 13 | c_stdlib_version: 14 | - '10.13' 15 | cairo: 16 | - '1' 17 | channel_sources: 18 | - conda-forge 19 | channel_targets: 20 | - conda-forge main 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '19' 25 | expat: 26 | - '2' 27 | fontconfig: 28 | - '2' 29 | fortran_compiler: 30 | - gfortran 31 | fortran_compiler_version: 32 | - '14' 33 | glib: 34 | - '2' 35 | gsl: 36 | - '2.7' 37 | icu: 38 | - '75' 39 | libblas: 40 | - 3.9.* *netlib 41 | libcurl: 42 | - '8' 43 | libdeflate: 44 | - '1.25' 45 | libiconv: 46 | - '1' 47 | libjpeg_turbo: 48 | - '3' 49 | liblapack: 50 | - 3.9.* *netlib 51 | liblzma_devel: 52 | - '5' 53 | libpng: 54 | - '1.6' 55 | libtiff: 56 | - '4.7' 57 | llvm_openmp: 58 | - '19' 59 | macos_machine: 60 | - x86_64-apple-darwin13.4.0 61 | pango: 62 | - '1' 63 | pcre2: 64 | - '10.47' 65 | readline: 66 | - '8' 67 | target_platform: 68 | - osx-64 69 | tk: 70 | - '8.6' 71 | zip_keys: 72 | - - c_compiler_version 73 | - cxx_compiler_version 74 | - fortran_compiler_version 75 | zlib: 76 | - '1' 77 | -------------------------------------------------------------------------------- /.ci_support/osx_arm64_.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '11.0' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | bzip2: 6 | - '1' 7 | c_compiler: 8 | - clang 9 | c_compiler_version: 10 | - '19' 11 | c_stdlib: 12 | - macosx_deployment_target 13 | c_stdlib_version: 14 | - '11.0' 15 | cairo: 16 | - '1' 17 | channel_sources: 18 | - conda-forge 19 | channel_targets: 20 | - conda-forge main 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '19' 25 | expat: 26 | - '2' 27 | fontconfig: 28 | - '2' 29 | fortran_compiler: 30 | - gfortran 31 | fortran_compiler_version: 32 | - '14' 33 | glib: 34 | - '2' 35 | gsl: 36 | - '2.7' 37 | icu: 38 | - '75' 39 | libblas: 40 | - 3.9.* *netlib 41 | libcurl: 42 | - '8' 43 | libdeflate: 44 | - '1.25' 45 | libiconv: 46 | - '1' 47 | libjpeg_turbo: 48 | - '3' 49 | liblapack: 50 | - 3.9.* *netlib 51 | liblzma_devel: 52 | - '5' 53 | libpng: 54 | - '1.6' 55 | libtiff: 56 | - '4.7' 57 | llvm_openmp: 58 | - '19' 59 | macos_machine: 60 | - arm64-apple-darwin20.0.0 61 | pango: 62 | - '1' 63 | pcre2: 64 | - '10.47' 65 | readline: 66 | - '8' 67 | target_platform: 68 | - osx-arm64 69 | tk: 70 | - '8.6' 71 | zip_keys: 72 | - - c_compiler_version 73 | - cxx_compiler_version 74 | - fortran_compiler_version 75 | zlib: 76 | - '1' 77 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | stages: 6 | - stage: Check 7 | jobs: 8 | - job: Skip 9 | pool: 10 | vmImage: 'ubuntu-22.04' 11 | variables: 12 | DECODE_PERCENTS: 'false' 13 | RET: 'true' 14 | steps: 15 | - checkout: self 16 | fetchDepth: '2' 17 | - bash: | 18 | git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` 19 | echo "##vso[task.setvariable variable=log]$git_log" 20 | displayName: Obtain commit message 21 | - bash: echo "##vso[task.setvariable variable=RET]false" 22 | condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))) 23 | displayName: Skip build? 24 | - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" 25 | name: result 26 | displayName: Export result 27 | - stage: Build 28 | condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) 29 | dependsOn: Check 30 | jobs: 31 | - template: ./.azure-pipelines/azure-pipelines-linux.yml 32 | - template: ./.azure-pipelines/azure-pipelines-osx.yml 33 | - template: ./.azure-pipelines/azure-pipelines-win.yml -------------------------------------------------------------------------------- /recipe/0008-Revert-part-of-9b818c6dc00143ff18775a4015a3f43b5196f.patch: -------------------------------------------------------------------------------- 1 | From 009edfb5948cb2d1767bcb9bc560695a84d4e0dd Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Sun, 29 Apr 2018 19:27:02 +0100 4 | Subject: [PATCH 08/13] Revert part of 9b818c6dc00143ff18775a4015a3f43b5196fa31 5 | (support for old Java on macOS) 6 | 7 | --- 8 | src/scripts/javareconf.in | 17 +++++++++++++++++ 9 | 1 file changed, 17 insertions(+) 10 | 11 | diff --git a/src/scripts/javareconf.in b/src/scripts/javareconf.in 12 | index 5c83713..0bbcafd 100644 13 | --- a/src/scripts/javareconf.in 14 | +++ b/src/scripts/javareconf.in 15 | @@ -199,6 +199,23 @@ custom_JAVA_CPPFLAGS="${JAVA_CPPFLAGS}" 16 | custom_JAVA_LD_LIBRARY_PATH="${JAVA_LD_LIBRARY_PATH}" 17 | 18 | 19 | +# sys-dependent tweaks to JNI flags 20 | +hostos=`uname 2>/dev/null` 21 | +if test "${hostos}" = "Darwin"; then 22 | + ## This changed for Java 9. 23 | + ## pref=`echo "${JAVA_HOME}" | grep "/Home$"` 24 | + pref=`echo "${JAVA_HOME}" | grep "^/System/Library"` 25 | + if test "${pref}" = "${JAVA_HOME}"; then 26 | + echo "System Java on macOS" 27 | + JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers" 28 | + JAVA_LIBS="-framework JavaVM" 29 | + JAVA_LD_LIBRARY_PATH= 30 | + has_libjvm=unknown 31 | + else 32 | + echo "Non-system Java on macOS" 33 | + fi 34 | +fi 35 | + 36 | # sys-dependent tweaks to JNI flags -- Darwin ones removed for R 3.5 37 | 38 | ## we now look for a path to put in R_LD_LIBRARY_PATH which will 39 | -- 40 | 2.39.3 (Apple Git-146) 41 | 42 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD-3-Clause license 2 | Copyright (c) 2015-2022, conda-forge contributors 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 21 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 27 | DAMAGE. 28 | -------------------------------------------------------------------------------- /recipe/0005-Darwin-Avoid-setting-DYLD_FALLBACK_LIBRARY_PATH.patch: -------------------------------------------------------------------------------- 1 | From 8a4c15dae946f79d35f0ad02f13ac17e4c03d3be Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Tue, 2 Jan 2018 15:47:26 +0000 4 | Subject: [PATCH 05/13] Darwin: Avoid setting DYLD_FALLBACK_LIBRARY_PATH 5 | 6 | Since it does nothing these days (you should use -Wl,-rpath,${PREFIX}/lib instead). 7 | --- 8 | configure | 2 +- 9 | configure.ac | 2 +- 10 | 2 files changed, 2 insertions(+), 2 deletions(-) 11 | 12 | diff --git a/configure b/configure 13 | index 6128827..cb070fb 100755 14 | --- a/configure 15 | +++ b/configure 16 | @@ -24513,7 +24513,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu 17 | R_LD_LIBRARY_PATH_save=${R_LD_LIBRARY_PATH} 18 | R_LD_LIBRARY_PATH= 19 | case "${host_os}" in 20 | - darwin*) 21 | + some_other_platform*) 22 | ## Darwin provides a full path in the ID of each library such 23 | ## that the linker can add library's path to the binary at link time. 24 | ## This allows the dyld to find libraries even without xx_LIBRARY_PATH. 25 | diff --git a/configure.ac b/configure.ac 26 | index 4bbf6ac..e033c19 100644 27 | --- a/configure.ac 28 | +++ b/configure.ac 29 | @@ -887,7 +887,7 @@ AC_SUBST(LIBTOOL_DEPS) 30 | R_LD_LIBRARY_PATH_save=${R_LD_LIBRARY_PATH} 31 | R_LD_LIBRARY_PATH= 32 | case "${host_os}" in 33 | - darwin*) 34 | + some_other_platform*) 35 | ## Darwin provides a full path in the ID of each library such 36 | ## that the linker can add library's path to the binary at link time. 37 | ## This allows the dyld to find libraries even without xx_LIBRARY_PATH. 38 | -- 39 | 2.39.3 (Apple Git-146) 40 | 41 | -------------------------------------------------------------------------------- /recipe/0007-javareconf-Do-not-fail-on-compile-fail.patch: -------------------------------------------------------------------------------- 1 | From 5929caf0663da2ec33293ea4fc1c2ab4b37bfe93 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Tue, 2 Jan 2018 15:53:45 +0000 4 | Subject: [PATCH 07/13] javareconf: Do not fail on compile fail 5 | 6 | --- 7 | src/scripts/javareconf.in | 14 ++++++++++---- 8 | 1 file changed, 10 insertions(+), 4 deletions(-) 9 | 10 | diff --git a/src/scripts/javareconf.in b/src/scripts/javareconf.in 11 | index 6ffb704..5c83713 100644 12 | --- a/src/scripts/javareconf.in 13 | +++ b/src/scripts/javareconf.in 14 | @@ -347,10 +347,16 @@ ${R_HOME}/bin/R CMD SHLIB conftest.c 15 | ac_status=$? 16 | 17 | if test $ac_status != 0; then 18 | - echo "Unable to compile a JNI program" 19 | - JAVA_LD_LIBRARY_PATH= 20 | - JAVA_LIBS= 21 | - JAVA_CPPFLAGS= 22 | + echo "Unable to compile a JNI program, ignoring this though as you may not want to compile anything here" 23 | + echo ".. this is an Anaconda Distribution and conda-forge customization whereby env activation causes us" 24 | + echo ".. to call R CMD javareconf in order to dynamically detect a JDK that may be in that env. The fact" 25 | + echo ".. that we prohibit setting LD_LIBRARY_PATH is also somewhat responsible for us needing to do this" 26 | + echo ".. because \${R_HOME}/etc/ldpaths is the normal way that R dynamically finds shared libraries. This" 27 | + echo ".. is what would, in upstream R, set LD_LIBRARY_PATH. AD cannot set this as it causes all sorts of" 28 | + echo ".. issues with DT_RUNPATH / DT_RPATH on various distributions." 29 | + # JAVA_LD_LIBRARY_PATH= 30 | + # JAVA_LIBS= 31 | + # JAVA_CPPFLAGS= 32 | fi 33 | 34 | rm -f conftest.c conftest.o conftest.so Makevars 35 | -- 36 | 2.39.3 (Apple Git-146) 37 | 38 | -------------------------------------------------------------------------------- /recipe/0001-Darwin-Remove-unicode-elipsis-character-from-grDevic.patch: -------------------------------------------------------------------------------- 1 | From fa2577d619b9e4fce2ca9c9802b2de9094c8e039 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Tue, 2 Jan 2018 16:17:34 +0000 4 | Subject: [PATCH 01/13] Darwin: Remove unicode elipsis character from grDevice 5 | "Page Setup..." menu entry 6 | 7 | --- 8 | src/library/grDevices/src/qdCocoa.m | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/src/library/grDevices/src/qdCocoa.m b/src/library/grDevices/src/qdCocoa.m 12 | index 697882d..e21fe1f 100644 13 | --- a/src/library/grDevices/src/qdCocoa.m 14 | +++ b/src/library/grDevices/src/qdCocoa.m 15 | @@ -130,7 +130,7 @@ + (QuartzCocoaView*) quartzWindowWithRect: (NSRect) rect andInfo: (void*) info 16 | menuItem = [[NSMenuItem alloc] initWithTitle:@"Close Window" action:@selector(performClose:) keyEquivalent:@"w"]; [menu addItem:menuItem]; [menuItem release]; 17 | menuItem = [[NSMenuItem alloc] initWithTitle:@"Save" action:@selector(saveDocument:) keyEquivalent:@"s"]; [menu addItem:menuItem]; [menuItem release]; 18 | [menu addItem:[NSMenuItem separatorItem]]; 19 | - menuItem = [[NSMenuItem alloc] initWithTitle:@"Page Setup…" action:@selector(runPageLayout:) keyEquivalent:@"P"]; [menu addItem:menuItem]; [menuItem release]; 20 | + menuItem = [[NSMenuItem alloc] initWithTitle:@"Page Setup..." action:@selector(runPageLayout:) keyEquivalent:@"P"]; [menu addItem:menuItem]; [menuItem release]; 21 | menuItem = [[NSMenuItem alloc] initWithTitle:@"Print" action:@selector(printDocument:) keyEquivalent:@"p"]; [menu addItem:menuItem]; [menuItem release]; 22 | 23 | menuItem = [[NSMenuItem alloc] initWithTitle:[menu title] action:nil keyEquivalent:@""]; /* the "Quartz" item in the main menu */ 24 | -- 25 | 2.39.3 (Apple Git-146) 26 | 27 | -------------------------------------------------------------------------------- /recipe/0009-javareconf-macOS-Continue-to-allow-system-Java-lt-9-.patch: -------------------------------------------------------------------------------- 1 | From 1790810034a4d268320e24f647bfe5df93af77d2 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Sun, 7 Jan 2018 11:35:05 +0000 4 | Subject: [PATCH 09/13] javareconf (macOS): Continue to allow system Java lt 9 5 | to be detected as such 6 | 7 | Java 9 is for macOS 10.10 and above, we still support 10.9 8 | 9 | Without this change: 10 | JAVA_HOME : /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home 11 | Java library path: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries 12 | JNI cpp flags : 13 | JNI linker flags : -L/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries -ljvm 14 | 15 | With this change: 16 | JAVA_HOME : /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home 17 | Java library path: 18 | JNI cpp flags : -I/System/Library/Frameworks/JavaVM.framework/Headers 19 | JNI linker flags : -framework JavaVM 20 | 21 | The problems without this change are that libjvm.so on Apple's Java 1.6.0 JDK (2015 and 2017) 22 | is 32-bit only and jni.h does not get found without JNI cpp flags being set. 23 | --- 24 | src/scripts/javareconf.in | 2 +- 25 | 1 file changed, 1 insertion(+), 1 deletion(-) 26 | 27 | diff --git a/src/scripts/javareconf.in b/src/scripts/javareconf.in 28 | index 0bbcafd..133ba02 100644 29 | --- a/src/scripts/javareconf.in 30 | +++ b/src/scripts/javareconf.in 31 | @@ -204,7 +204,7 @@ hostos=`uname 2>/dev/null` 32 | if test "${hostos}" = "Darwin"; then 33 | ## This changed for Java 9. 34 | ## pref=`echo "${JAVA_HOME}" | grep "/Home$"` 35 | - pref=`echo "${JAVA_HOME}" | grep "^/System/Library"` 36 | + pref=`echo "${JAVA_HOME}" | grep "^/System/Library\|/Home$"` 37 | if test "${pref}" = "${JAVA_HOME}"; then 38 | echo "System Java on macOS" 39 | JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers" 40 | -- 41 | 2.39.3 (Apple Git-146) 42 | 43 | -------------------------------------------------------------------------------- /recipe/bld-r-base.bat: -------------------------------------------------------------------------------- 1 | @rem See notes.md for more information about all of this. 2 | 3 | @rem Compile the launcher 4 | 5 | @rem XXX: Should we build Rgui with -DGUI=1 -mwindows? The only difference is 6 | @rem that it doesn't block the terminal, but we also can't get the return 7 | @rem value for the conda build tests. 8 | 9 | x86_64-w64-mingw32-gcc -DGUI=0 -O -s -o launcher.exe "%RECIPE_DIR%\launcher.c" 10 | if errorlevel 1 exit 1 11 | 12 | @rem Install the launcher 13 | 14 | if not exist "%PREFIX%\Scripts" mkdir "%PREFIX%\Scripts" 15 | if errorlevel 1 exit 1 16 | 17 | copy launcher.exe "%PREFIX%\Scripts\R.exe" 18 | if errorlevel 1 exit 1 19 | 20 | copy launcher.exe "%PREFIX%\Scripts\Rcmd.exe" 21 | if errorlevel 1 exit 1 22 | 23 | copy launcher.exe "%PREFIX%\Scripts\RSetReg.exe" 24 | if errorlevel 1 exit 1 25 | 26 | copy launcher.exe "%PREFIX%\Scripts\Rfe.exe" 27 | if errorlevel 1 exit 1 28 | 29 | copy launcher.exe "%PREFIX%\Scripts\Rgui.exe" 30 | if errorlevel 1 exit 1 31 | 32 | copy launcher.exe "%PREFIX%\Scripts\Rscript.exe" 33 | if errorlevel 1 exit 1 34 | 35 | copy launcher.exe "%PREFIX%\Scripts\Rterm.exe" 36 | if errorlevel 1 exit 1 37 | 38 | @rem XXX: Should we skip this one? 39 | copy launcher.exe "%PREFIX%\Scripts\open.exe" 40 | if errorlevel 1 exit 1 41 | 42 | echo source %SYS_PREFIX:\=/%/etc/profile.d/conda.sh > conda_build.sh 43 | echo conda activate "${PREFIX}" >> conda_build.sh 44 | echo conda activate --stack "${BUILD_PREFIX}" >> conda_build.sh 45 | type "%RECIPE_DIR%\build-r-base.sh" >> conda_build.sh 46 | 47 | set PREFIX=%PREFIX:\=/% 48 | set BUILD_PREFIX=%BUILD_PREFIX:\=/% 49 | set SRC_DIR=%SRC_DIR:\=/% 50 | set MSYSTEM=UCRT64 51 | set MSYS2_PATH_TYPE=inherit 52 | set CHERE_INVOKING=1 53 | bash -lc "./conda_build.sh" 54 | if errorlevel 1 exit 1 55 | 56 | cd "%PREFIX%\lib\R\bin\x64" 57 | gendef R.dll 58 | if errorlevel 1 exit 1 59 | x86_64-w64-mingw32-dlltool -d R.def -l R.lib 60 | if errorlevel 1 exit 1 61 | exit 0 62 | -------------------------------------------------------------------------------- /recipe/0004-Win32-Prevent-conversion-of-R_ARCH-to-abs-Windows-pa.patch: -------------------------------------------------------------------------------- 1 | From bda2525c50e23f0f169f1daf8cde387b12f4d079 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Wed, 15 Dec 2021 07:35:00 +0100 4 | Subject: [PATCH 04/13] Win32: Prevent conversion of R_ARCH to abs Windows path 5 | 6 | --- 7 | src/main/main.c | 28 ++++++++++++++++++++++++++++ 8 | 1 file changed, 28 insertions(+) 9 | 10 | diff --git a/src/main/main.c b/src/main/main.c 11 | index a940dcf..924a4fd 100644 12 | --- a/src/main/main.c 13 | +++ b/src/main/main.c 14 | @@ -912,6 +912,34 @@ void setup_Rmainloop(void) 15 | snprintf(deferred_warnings[ndeferred_warnings++], 250, 16 | "Setting LC_TIME=%.200s failed\n", p); 17 | 18 | + /* Prevent conversion of R_ARCH to an absolute Windows path 19 | + when calling from POSIX (sh.exe) to Windows (R.exe) as 20 | + happens in configure.win scripts while building packages 21 | + using MSYS2. MSYS2_ENV_CONV_EXCL was added for R initially, 22 | + and follows from MSYS2_ARG_CONV_EXCL on which it was modelled. 23 | + */ 24 | + 25 | + char MSYS2ECE_equals[1000+strlen("MSYS2_ENV_CONV_EXCL=")]; 26 | + strcpy(MSYS2ECE_equals, "MSYS2_ENV_CONV_EXCL="); 27 | + char *MSYS2ECE = &MSYS2ECE_equals[strlen("MSYS2_ENV_CONV_EXCL=")]; 28 | + p = getenv("MSYS2_ENV_CONV_EXCL"); 29 | + /* The strstr will match other things that use R_ARCH as a substring 30 | + .. let's assume none do. That part isn't strictly necessary. */ 31 | + if (!p || !strstr(p, "R_ARCH")) { 32 | + if (!p) { 33 | + sprintf(MSYS2ECE, "R_ARCH"); 34 | + putenv(MSYS2ECE_equals); 35 | + } 36 | + else if (strlen(p) + strlen(";R_ARCH") < 1000) { 37 | + strncpy(MSYS2ECE, p ? p : "", 1000); 38 | + strcat(MSYS2ECE, ";R_ARCH"); 39 | + MSYS2ECE[1000 - 1] = '\0'; 40 | + putenv(MSYS2ECE_equals); 41 | + } 42 | + else 43 | + snprintf(deferred_warnings[ndeferred_warnings++], 250, 44 | + "Adding R_ARCH to MSYS2_ENV_CONV_EXCL failed\n"); 45 | + } 46 | /* We set R_ARCH here: Unix does it in the shell front-end */ 47 | char Rarch[30]; 48 | strcpy(Rarch, "R_ARCH="); 49 | -- 50 | 2.39.3 (Apple Git-146) 51 | 52 | -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-win.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: win 7 | pool: 8 | vmImage: windows-2022 9 | strategy: 10 | matrix: 11 | win_64_: 12 | CONFIG: win_64_ 13 | UPLOAD_PACKAGES: 'True' 14 | SHORT_CONFIG: win_64_ 15 | timeoutInMinutes: 360 16 | variables: 17 | CONDA_BLD_PATH: D:\\bld\\ 18 | MINIFORGE_HOME: D:\Miniforge 19 | UPLOAD_TEMP: D:\\tmp 20 | 21 | steps: 22 | 23 | - script: | 24 | call ".scripts\run_win_build.bat" 25 | displayName: Run Windows build 26 | env: 27 | MINIFORGE_HOME: $(MINIFORGE_HOME) 28 | CONDA_BLD_PATH: $(CONDA_BLD_PATH) 29 | PYTHONUNBUFFERED: 1 30 | CONFIG: $(CONFIG) 31 | CI: azure 32 | flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) 33 | remote_url: $(Build.Repository.Uri) 34 | sha: $(Build.SourceVersion) 35 | UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) 36 | UPLOAD_TEMP: $(UPLOAD_TEMP) 37 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 38 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 39 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) 40 | - script: | 41 | set MINIFORGE_HOME=$(MINIFORGE_HOME) 42 | set CI=azure 43 | set CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) 44 | set FEEDSTOCK_NAME=$(build.Repository.Name) 45 | set ARTIFACT_STAGING_DIR=$(Build.ArtifactStagingDirectory) 46 | set CONDA_BLD_DIR=$(CONDA_BLD_PATH) 47 | set BLD_ARTIFACT_PREFIX=conda_artifacts 48 | if "%AGENT_JOBSTATUS%" == "Failed" ( 49 | set ENV_ARTIFACT_PREFIX=conda_envs 50 | ) 51 | call ".scripts\create_conda_build_artifacts.bat" 52 | displayName: Prepare conda build artifacts 53 | condition: succeededOrFailed() 54 | 55 | - task: PublishPipelineArtifact@1 56 | displayName: Store conda build artifacts 57 | condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) 58 | inputs: 59 | targetPath: $(BLD_ARTIFACT_PATH) 60 | artifactName: $(BLD_ARTIFACT_NAME) 61 | 62 | - task: PublishPipelineArtifact@1 63 | displayName: Store conda build environment artifacts 64 | condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) 65 | inputs: 66 | targetPath: $(ENV_ARTIFACT_PATH) 67 | artifactName: $(ENV_ARTIFACT_NAME) 68 | -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-osx.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: osx 7 | pool: 8 | vmImage: macOS-15 9 | strategy: 10 | matrix: 11 | osx_64_: 12 | CONFIG: osx_64_ 13 | UPLOAD_PACKAGES: 'True' 14 | SHORT_CONFIG: osx_64_ 15 | osx_arm64_: 16 | CONFIG: osx_arm64_ 17 | UPLOAD_PACKAGES: 'True' 18 | SHORT_CONFIG: osx_arm64_ 19 | timeoutInMinutes: 360 20 | variables: {} 21 | 22 | steps: 23 | # TODO: Fast finish on azure pipelines? 24 | - script: | 25 | export CI=azure 26 | export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) 27 | export remote_url=$(Build.Repository.Uri) 28 | export sha=$(Build.SourceVersion) 29 | export OSX_FORCE_SDK_DOWNLOAD="1" 30 | export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME 31 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 32 | if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then 33 | export IS_PR_BUILD="True" 34 | else 35 | export IS_PR_BUILD="False" 36 | fi 37 | ./.scripts/run_osx_build.sh 38 | displayName: Run OSX build 39 | env: 40 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 41 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 42 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) 43 | - script: | 44 | export CI=azure 45 | export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) 46 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 47 | export CONDA_BLD_DIR=/Users/runner/miniforge3/conda-bld 48 | export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" 49 | # Archive everything in CONDA_BLD_DIR except environments 50 | export BLD_ARTIFACT_PREFIX=conda_artifacts 51 | if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then 52 | # Archive the CONDA_BLD_DIR environments only when the job fails 53 | export ENV_ARTIFACT_PREFIX=conda_envs 54 | fi 55 | ./.scripts/create_conda_build_artifacts.sh 56 | displayName: Prepare conda build artifacts 57 | condition: succeededOrFailed() 58 | 59 | - task: PublishPipelineArtifact@1 60 | displayName: Store conda build artifacts 61 | condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) 62 | inputs: 63 | targetPath: $(BLD_ARTIFACT_PATH) 64 | artifactName: $(BLD_ARTIFACT_NAME) 65 | 66 | - task: PublishPipelineArtifact@1 67 | displayName: Store conda build environment artifacts 68 | condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) 69 | inputs: 70 | targetPath: $(ENV_ARTIFACT_PATH) 71 | artifactName: $(ENV_ARTIFACT_NAME) 72 | -------------------------------------------------------------------------------- /recipe/0011-Check-for-changes-then-forcibly-mv-in-javareconf.in.patch: -------------------------------------------------------------------------------- 1 | From 9f26da66a9259cc10aa7c45e72bfff7e26600069 Mon Sep 17 00:00:00 2001 2 | From: Marcel Bargull 3 | Date: Wed, 15 Dec 2021 09:40:05 +0100 4 | Subject: [PATCH 11/13] Check for changes then forcibly mv in javareconf.in 5 | 6 | --- 7 | src/scripts/javareconf.in | 16 +++++++++------- 8 | 1 file changed, 9 insertions(+), 7 deletions(-) 9 | 10 | diff --git a/src/scripts/javareconf.in b/src/scripts/javareconf.in 11 | index 133ba02..6e49ea4 100644 12 | --- a/src/scripts/javareconf.in 13 | +++ b/src/scripts/javareconf.in 14 | @@ -419,13 +419,15 @@ else 15 | files="${R_HOME}/etc/Makeconf ${R_HOME}/etc/ldpaths" 16 | fi 17 | for file in $files; do 18 | - ${SED-sed} -e "s|JAVA =.\{0,\}|JAVA = $JAVA|" -e "s|JAVA_HOME =.\{0,\}|JAVA_HOME = ${JAVA_HOME}|" -e "s|: \${JAVA_HOME=.\{1,\}|: \${JAVA_HOME=${JAVA_HOME}}|" -e "s|: \${R_JAVA_LD_LIBRARY_PATH=.\{1,\}|: \${R_JAVA_LD_LIBRARY_PATH=${JAVA_LD_LIBRARY_PATH_SH}}|" -e "s|JAVA_LIBS =.\{0,\}|JAVA_LIBS = ${JAVA_LIBS}|g" -e "s|JAVA_LD_LIBRARY_PATH =.\{0,\}|JAVA_LD_LIBRARY_PATH = ${JAVA_LD_LIBRARY_PATH}|" -e "s|JAVAC =.\{0,\}|JAVAC = $JAVAC|" -e "s|JAVAH =.\{0,\}|JAVAH = $JAVAH|" -e "s|JAR =.\{0,\}|JAR = $JAR|" -e "s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = ${JAVA_CPPFLAGS}|g" "${file}" > "${file}.new" 19 | - if test -f "${file}.new"; then 20 | - mv "${file}.new" "${file}" 21 | - else 22 | - echo "*** cannot create ${file}.new~*** Please run as root if required.~" | ${SED-sed} -e 'y/~/\n/' >&2 23 | - exit 1 24 | - fi 25 | + ${SED-sed} -e "s|JAVA =.\{0,\}|JAVA = $JAVA|" -e "s|JAVA_HOME =.\{0,\}|JAVA_HOME = ${JAVA_HOME}|" -e "s|: \${JAVA_HOME=.\{1,\}|: \${JAVA_HOME=${JAVA_HOME}}|" -e "s|: \${R_JAVA_LD_LIBRARY_PATH=.\{1,\}|: \${R_JAVA_LD_LIBRARY_PATH=${JAVA_LD_LIBRARY_PATH_SH}}|" -e "s|JAVA_LIBS =.\{0,\}|JAVA_LIBS = ${JAVA_LIBS}|g" -e "s|JAVA_LD_LIBRARY_PATH =.\{0,\}|JAVA_LD_LIBRARY_PATH = ${JAVA_LD_LIBRARY_PATH}|" -e "s|JAVAC =.\{0,\}|JAVAC = $JAVAC|" -e "s|JAVAH =.\{0,\}|JAVAH = $JAVAH|" -e "s|JAR =.\{0,\}|JAR = $JAR|" -e "s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = ${JAVA_CPPFLAGS}|g" "${file}" | cmp -s - "${file}" || { 26 | + ${SED-sed} -e "s|JAVA =.\{0,\}|JAVA = $JAVA|" -e "s|JAVA_HOME =.\{0,\}|JAVA_HOME = ${JAVA_HOME}|" -e "s|: \${JAVA_HOME=.\{1,\}|: \${JAVA_HOME=${JAVA_HOME}}|" -e "s|: \${R_JAVA_LD_LIBRARY_PATH=.\{1,\}|: \${R_JAVA_LD_LIBRARY_PATH=${JAVA_LD_LIBRARY_PATH_SH}}|" -e "s|JAVA_LIBS =.\{0,\}|JAVA_LIBS = ${JAVA_LIBS}|g" -e "s|JAVA_LD_LIBRARY_PATH =.\{0,\}|JAVA_LD_LIBRARY_PATH = ${JAVA_LD_LIBRARY_PATH}|" -e "s|JAVAC =.\{0,\}|JAVAC = $JAVAC|" -e "s|JAVAH =.\{0,\}|JAVAH = $JAVAH|" -e "s|JAR =.\{0,\}|JAR = $JAR|" -e "s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = ${JAVA_CPPFLAGS}|g" "${file}" > "${file}.$$" 27 | + if test -f "${file}.$$"; then 28 | + mv -f "${file}.$$" "${file}" 29 | + else 30 | + echo "*** cannot create ${file}.$$~*** Please run as root if required.~" | ${SED-sed} -e 'y/~/\n/' >&2 31 | + exit 1 32 | + fi 33 | + } 34 | done 35 | 36 | echo "Done." 37 | -- 38 | 2.39.3 (Apple Git-146) 39 | 40 | -------------------------------------------------------------------------------- /.scripts/create_conda_build_artifacts.bat: -------------------------------------------------------------------------------- 1 | setlocal enableextensions enabledelayedexpansion 2 | 3 | rem INPUTS (environment variables that need to be set before calling this script): 4 | rem 5 | rem CI (azure/github_actions/UNSET) 6 | rem CI_RUN_ID (unique identifier for the CI job run) 7 | rem FEEDSTOCK_NAME 8 | rem CONFIG (build matrix configuration string) 9 | rem SHORT_CONFIG (uniquely-shortened configuration string) 10 | rem CONDA_BLD_DIR (path to the conda-bld directory) 11 | rem ARTIFACT_STAGING_DIR (use working directory if unset) 12 | rem BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) 13 | rem ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) 14 | 15 | rem OUTPUTS 16 | rem 17 | rem BLD_ARTIFACT_NAME 18 | rem BLD_ARTIFACT_PATH 19 | rem ENV_ARTIFACT_NAME 20 | rem ENV_ARTIFACT_PATH 21 | 22 | rem Check that the conda-build directory exists 23 | if not exist %CONDA_BLD_DIR% ( 24 | echo conda-build directory does not exist 25 | exit 1 26 | ) 27 | 28 | if not defined ARTIFACT_STAGING_DIR ( 29 | rem Set staging dir to the working dir 30 | set ARTIFACT_STAGING_DIR=%cd% 31 | ) 32 | 33 | rem Set a unique ID for the artifact(s), specialized for this particular job run 34 | set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% 35 | if not "%ARTIFACT_UNIQUE_ID%" == "%ARTIFACT_UNIQUE_ID:~0,80%" ( 36 | set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%SHORT_CONFIG% 37 | ) 38 | 39 | rem Make the build artifact zip 40 | if defined BLD_ARTIFACT_PREFIX ( 41 | set BLD_ARTIFACT_NAME=%BLD_ARTIFACT_PREFIX%_%ARTIFACT_UNIQUE_ID% 42 | echo BLD_ARTIFACT_NAME: !BLD_ARTIFACT_NAME! 43 | 44 | set "BLD_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%BLD_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" 45 | 7z a "!BLD_ARTIFACT_PATH!" "%CONDA_BLD_DIR%" -xr^^!.git/ -xr^^!_*_env*/ -xr^^!*_cache/ -bb 46 | if errorlevel 1 exit 1 47 | echo BLD_ARTIFACT_PATH: !BLD_ARTIFACT_PATH! 48 | 49 | if "%CI%" == "azure" ( 50 | echo ##vso[task.setVariable variable=BLD_ARTIFACT_NAME]!BLD_ARTIFACT_NAME! 51 | echo ##vso[task.setVariable variable=BLD_ARTIFACT_PATH]!BLD_ARTIFACT_PATH! 52 | ) 53 | if "%CI%" == "github_actions" ( 54 | echo BLD_ARTIFACT_NAME=!BLD_ARTIFACT_NAME!>> !GITHUB_OUTPUT! 55 | echo BLD_ARTIFACT_PATH=!BLD_ARTIFACT_PATH!>> !GITHUB_OUTPUT! 56 | ) 57 | ) 58 | 59 | rem Make the environments artifact zip 60 | if defined ENV_ARTIFACT_PREFIX ( 61 | set ENV_ARTIFACT_NAME=!ENV_ARTIFACT_PREFIX!_%ARTIFACT_UNIQUE_ID% 62 | echo ENV_ARTIFACT_NAME: !ENV_ARTIFACT_NAME! 63 | 64 | set "ENV_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%ENV_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" 65 | 7z a "!ENV_ARTIFACT_PATH!" -r "%CONDA_BLD_DIR%"/_*_env*/ -bb 66 | if errorlevel 1 exit 1 67 | echo ENV_ARTIFACT_PATH: !ENV_ARTIFACT_PATH! 68 | 69 | if "%CI%" == "azure" ( 70 | echo ##vso[task.setVariable variable=ENV_ARTIFACT_NAME]!ENV_ARTIFACT_NAME! 71 | echo ##vso[task.setVariable variable=ENV_ARTIFACT_PATH]!ENV_ARTIFACT_PATH! 72 | ) 73 | if "%CI%" == "github_actions" ( 74 | echo ENV_ARTIFACT_NAME=!ENV_ARTIFACT_NAME!>> !GITHUB_OUTPUT! 75 | echo ENV_ARTIFACT_PATH=!ENV_ARTIFACT_PATH!>> !GITHUB_OUTPUT! 76 | ) 77 | ) 78 | -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-linux.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: linux 7 | pool: 8 | vmImage: ubuntu-latest 9 | strategy: 10 | matrix: 11 | linux_64_: 12 | CONFIG: linux_64_ 13 | UPLOAD_PACKAGES: 'True' 14 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 15 | SHORT_CONFIG: linux_64_ 16 | linux_aarch64_: 17 | CONFIG: linux_aarch64_ 18 | UPLOAD_PACKAGES: 'True' 19 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 20 | SHORT_CONFIG: linux_aarch64_ 21 | linux_ppc64le_: 22 | CONFIG: linux_ppc64le_ 23 | UPLOAD_PACKAGES: 'True' 24 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 25 | SHORT_CONFIG: linux_ppc64le_ 26 | timeoutInMinutes: 360 27 | variables: {} 28 | 29 | steps: 30 | # configure qemu binfmt-misc running. This allows us to run docker containers 31 | # embedded qemu-static 32 | - script: | 33 | docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes 34 | ls /proc/sys/fs/binfmt_misc/ 35 | condition: not(startsWith(variables['CONFIG'], 'linux_64')) 36 | displayName: Configure binfmt_misc 37 | 38 | - script: | 39 | export CI=azure 40 | export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) 41 | export remote_url=$(Build.Repository.Uri) 42 | export sha=$(Build.SourceVersion) 43 | export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME 44 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 45 | if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then 46 | export IS_PR_BUILD="True" 47 | else 48 | export IS_PR_BUILD="False" 49 | fi 50 | .scripts/run_docker_build.sh 51 | displayName: Run docker build 52 | env: 53 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 54 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 55 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) 56 | - script: | 57 | export CI=azure 58 | export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) 59 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 60 | export CONDA_BLD_DIR=build_artifacts 61 | export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" 62 | # Archive everything in CONDA_BLD_DIR except environments 63 | export BLD_ARTIFACT_PREFIX=conda_artifacts 64 | if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then 65 | # Archive the CONDA_BLD_DIR environments only when the job fails 66 | export ENV_ARTIFACT_PREFIX=conda_envs 67 | fi 68 | ./.scripts/create_conda_build_artifacts.sh 69 | displayName: Prepare conda build artifacts 70 | condition: succeededOrFailed() 71 | 72 | - task: PublishPipelineArtifact@1 73 | displayName: Store conda build artifacts 74 | condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) 75 | inputs: 76 | targetPath: $(BLD_ARTIFACT_PATH) 77 | artifactName: $(BLD_ARTIFACT_NAME) 78 | 79 | - task: PublishPipelineArtifact@1 80 | displayName: Store conda build environment artifacts 81 | condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) 82 | inputs: 83 | targetPath: $(ENV_ARTIFACT_PATH) 84 | artifactName: $(ENV_ARTIFACT_NAME) 85 | -------------------------------------------------------------------------------- /recipe/0014-Use-conda-s-tzdata-package.patch: -------------------------------------------------------------------------------- 1 | From 94f107cf7c6def507ee4065135bd7ca5735deb98 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Tue, 25 Jun 2024 13:06:14 -0500 4 | Subject: [PATCH] Use conda's tzdata package 5 | 6 | There's another instance where R.home("share") is used in macOS 7 | specific code, but that is dead code anyway since the conda tzdata 8 | package does not have a VERSION file. 9 | 10 | --- 11 | src/extra/tzone/localtime.c | 6 +----- 12 | src/library/base/R/datetime.R | 9 +++++---- 13 | 2 files changed, 6 insertions(+), 9 deletions(-) 14 | 15 | diff --git a/src/extra/tzone/localtime.c b/src/extra/tzone/localtime.c 16 | index da2a99cac0..6a2bbae08a 100644 17 | --- a/src/extra/tzone/localtime.c 18 | +++ b/src/extra/tzone/localtime.c 19 | @@ -472,11 +472,7 @@ tzload(const char * name, struct state * const sp, const int doextend) 20 | p = "/var/db/timezone/zoneinfo"; 21 | #endif 22 | if (p == NULL || !strcmp(p, "internal")) { 23 | - p = getenv("R_SHARE_DIR"); 24 | - if(p) 25 | - snprintf(buf, 1000, "%s/zoneinfo", p); 26 | - else 27 | - snprintf(buf, 1000, "%s/share/zoneinfo", getenv("R_HOME")); 28 | + snprintf(buf, 1000, "%s/../../share/zoneinfo", getenv("R_HOME")); 29 | buf[999] = '\0'; 30 | p = buf; 31 | } 32 | diff --git a/src/library/base/R/datetime.R b/src/library/base/R/datetime.R 33 | index f870e95a96..597379bfc6 100644 34 | --- a/src/library/base/R/datetime.R 35 | +++ b/src/library/base/R/datetime.R 36 | @@ -81,7 +81,8 @@ Sys.timezone <- function(location = TRUE) 37 | tzdir <- Sys.getenv("TZDIR") 38 | if(nzchar(tzdir) && !dir.exists(tzdir)) tzdir <- "" 39 | if(!nzchar(tzdir)) { ## See comments in OlsonNames 40 | - if(dir.exists(tzdir <- "/usr/share/zoneinfo") || 41 | + if(dir.exists(tzdir <- file.path(R.home(), "..", "..", "share", "zoneinfo")) || 42 | + dir.exists(tzdir <- "/usr/share/zoneinfo") || 43 | dir.exists(tzdir <- "/share/zoneinfo") || 44 | dir.exists(tzdir <- "/usr/share/lib/zoneinfo") || 45 | dir.exists(tzdir <- "/usr/lib/zoneinfo") || 46 | @@ -1450,10 +1451,10 @@ OlsonNames <- function(tzdir = NULL) 47 | { 48 | if (is.null(tzdir)) { 49 | if(.Platform$OS.type == "windows") 50 | - tzdir <- Sys.getenv("TZDIR", file.path(R.home("share"), "zoneinfo")) 51 | + tzdir <- Sys.getenv("TZDIR", file.path(R.home(), "..", "..", "share", "zoneinfo")) 52 | else { 53 | if(Sys.getenv("TZDIR") == "internal") 54 | - tzdir <- file.path(R.home("share"), "zoneinfo") 55 | + tzdir <- file.path(R.home(), "..", "..", "share", "zoneinfo") 56 | else if (grepl("darwin", R.Version()$os) && 57 | Sys.getenv("TZDIR") == "macOS") { 58 | tzdir <- "/var/db/timezone/zoneinfo" 59 | @@ -1465,7 +1466,7 @@ OlsonNames <- function(tzdir = NULL) 60 | ## We assume that if the second exists that the system was 61 | ## configured with --with-internal-tzcode 62 | tzdirs <- c(Sys.getenv("TZDIR"), # defaults to "" 63 | - file.path(R.home("share"), "zoneinfo"), 64 | + file.path(R.home(), "..", "..", "share", "zoneinfo"), 65 | "/usr/share/zoneinfo", # Linux, macOS, FreeBSD 66 | "/share/zoneinfo", # in musl's search 67 | "/usr/share/lib/zoneinfo", # Solaris, AIX 68 | -- 69 | 2.44.0 70 | 71 | -------------------------------------------------------------------------------- /recipe/notes.md: -------------------------------------------------------------------------------- 1 | # Linux 2 | 3 | All the R libraries are installed into lib/R, requiring the use of custom 4 | rpaths to be set with patchelf. This is set in the meta.yaml. 5 | 6 | R, and several of its dependencies, try to install things into lib64 on 64-bit 7 | Linux, which doesn't work with conda. A way to avoid it is to create a symlink 8 | from lib64/ to lib/ at the beginning of the build and remove it at the end. 9 | 10 | # Windows 11 | 12 | http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-R-under-Windows 13 | and http://cran.r-project.org/bin/windows/base/rw-FAQ.html (especially the 14 | first one) are your guides. 15 | 16 | R uses mingw, not Visual Studio. Download and install the R tools 17 | http://cran.r-project.org/bin/windows/Rtools/. You *must* use these, not some 18 | other mingw install. R_HOME has to be set during the build to the location of 19 | the R installation (C:\R or C:\R64 by default). It's also a good idea to let 20 | the Rtools installer put the tools on the PATH. Be sure to use a normal 21 | cmd shell. The git shell includes its own sh on the PATH, which won't be able 22 | to find the R tools. 23 | 24 | Setting `TMPDIR` is important, as the default isn't very useful on Windows 25 | (`/tmp`). It's apparently relative, so I just used `.`, which uses the source 26 | directory. 27 | 28 | To build the docs, you will need qpdf 29 | http://sourceforge.net/projects/qpdf/ and MiKTeX http://www.miktex.org/. Let 30 | MiKTeX install packages on the fly. You might have to install some things 31 | manually using `mpm` (MiKTeX Package Manager). 32 | 33 | `make distribution` will make *everything*, down to an R installer. I had to 34 | `cp doc\html\logo.jpg %TMPDIR%` (actually `C:\tmp` because it was ignoring 35 | `TMPDIR`). 36 | 37 | You need to grab libjpeg, libpng, and libtiff as described at http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Getting-the-source-files. 38 | 39 | I had to `cp library\graphics\help\figures\pch.pdf doc\manual\`, `cp 40 | library\graphics\help\figures\mai.pdf doc\manual\`, and `cp 41 | library\graphics\help\figures\oma.pdf doc\manual\` for the docs to build 42 | correctly. 43 | 44 | `make distribution` requires the Inno setup installer from 45 | http://jrsoftware.org/. Make sure you get the Unicode one. Install it to 46 | `C:\packages\Inno` (otherwise you will have to edit the Makefile). 47 | 48 | Once you have run `make distribution`, run `cd installer; make imagedir`. This 49 | will put all the files that should be installed into `R-3.2.2` (in the 50 | `installer` directory). This is what you should "install". 51 | 52 | 53 | For 64-bit Windows, you need to copy things from C:\R64 instead of C:\R. If 54 | you try to compile as-is, it will fail. The R docs are a little light on 55 | this. They indicate that they use mingw-w64, leading you to download and 56 | install it from SourceForge. You may also think that you need to edit some of 57 | the source code that comes with R to fix some compiler errors. DON'T DO 58 | THIS. IT'S A TRAP. Only use the compilers that come with Rtools. 59 | 60 | What you need to do is edit the MkRules.dist in src\gnuwin32 and copy it to 61 | MkRules.local. I had to set `WIN = 64`, `MULTI = 64` and clear `BINDIR64` (it 62 | references an executable name that doesn't seem to exist). 63 | 64 | # OS X 65 | 66 | The OS X sections of 67 | http://cran.r-project.org/doc/manuals/r-release/R-admin.html are helpful 68 | here. Make sure to set CLFAGS, etc., or else the R configure script will try 69 | to pick up Fink or Homebrew or whatever. 70 | 71 | Adding 72 | 73 | CC=clang 74 | CXX=clang++ 75 | F77=gfortran-4.8 76 | FC=$F77 77 | OBJC=clang 78 | 79 | to the `config.site` file (according to that page) is a good idea. It seems to 80 | work. 81 | 82 | The `--with-blas="-framework Accelerate" --with-lapack` flags to `configure` 83 | enable the Accelerate framework. The `--with-lapack` flag may cause issues. 84 | -------------------------------------------------------------------------------- /.scripts/run_docker_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 4 | # will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 5 | # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 6 | # benefit from the improvement. 7 | 8 | source .scripts/logging_utils.sh 9 | 10 | ( startgroup "Configure Docker" ) 2> /dev/null 11 | 12 | set -xeo pipefail 13 | 14 | THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" 15 | PROVIDER_DIR="$(basename "$THISDIR")" 16 | 17 | FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" 18 | RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" 19 | 20 | if [ -z ${FEEDSTOCK_NAME} ]; then 21 | export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) 22 | fi 23 | 24 | if [[ "${sha:-}" == "" ]]; then 25 | pushd "${FEEDSTOCK_ROOT}" 26 | sha=$(git rev-parse HEAD) 27 | popd 28 | fi 29 | 30 | docker info 31 | 32 | # In order for the conda-build process in the container to write to the mounted 33 | # volumes, we need to run with the same id as the host machine, which is 34 | # normally the owner of the mounted volumes, or at least has write permission 35 | export HOST_USER_ID=$(id -u) 36 | # Check if docker-machine is being used (normally on OSX) and get the uid from 37 | # the VM 38 | if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then 39 | export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) 40 | fi 41 | 42 | ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" 43 | 44 | if [ -z "$CONFIG" ]; then 45 | set +x 46 | FILES=`ls .ci_support/linux_*` 47 | CONFIGS="" 48 | for file in $FILES; do 49 | CONFIGS="${CONFIGS}'${file:12:-5}' or "; 50 | done 51 | echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" 52 | exit 1 53 | fi 54 | 55 | if [ -z "${DOCKER_IMAGE}" ]; then 56 | SHYAML_INSTALLED="$(shyaml -h || echo NO)" 57 | if [ "${SHYAML_INSTALLED}" == "NO" ]; then 58 | echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" 59 | DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) 60 | if [ "${DOCKER_IMAGE}" = "" ]; then 61 | echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" 62 | DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" 63 | fi 64 | else 65 | DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" 66 | fi 67 | fi 68 | 69 | mkdir -p "$ARTIFACTS" 70 | DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" 71 | rm -f "$DONE_CANARY" 72 | 73 | # Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) 74 | DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" 75 | if [ -z "${CI}" ]; then 76 | DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" 77 | fi 78 | 79 | ( endgroup "Configure Docker" ) 2> /dev/null 80 | 81 | ( startgroup "Start Docker" ) 2> /dev/null 82 | 83 | export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" 84 | export IS_PR_BUILD="${IS_PR_BUILD:-False}" 85 | docker pull "${DOCKER_IMAGE}" 86 | docker run ${DOCKER_RUN_ARGS} \ 87 | -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ 88 | -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ 89 | -e CONFIG \ 90 | -e HOST_USER_ID \ 91 | -e UPLOAD_PACKAGES \ 92 | -e IS_PR_BUILD \ 93 | -e GIT_BRANCH \ 94 | -e UPLOAD_ON_BRANCH \ 95 | -e CI \ 96 | -e FEEDSTOCK_NAME \ 97 | -e CPU_COUNT \ 98 | -e BUILD_WITH_CONDA_DEBUG \ 99 | -e BUILD_OUTPUT_ID \ 100 | -e flow_run_id \ 101 | -e remote_url \ 102 | -e sha \ 103 | -e BINSTAR_TOKEN \ 104 | -e FEEDSTOCK_TOKEN \ 105 | -e STAGING_BINSTAR_TOKEN \ 106 | "${DOCKER_IMAGE}" \ 107 | bash \ 108 | "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" 109 | 110 | # verify that the end of the script was reached 111 | test -f "$DONE_CANARY" 112 | 113 | # This closes the last group opened in `build_steps.sh` 114 | ( endgroup "Final checks" ) 2> /dev/null 115 | -------------------------------------------------------------------------------- /.scripts/run_osx_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # -*- mode: jinja-shell -*- 4 | 5 | source .scripts/logging_utils.sh 6 | 7 | set -xe 8 | 9 | MINIFORGE_HOME="${MINIFORGE_HOME:-${HOME}/miniforge3}" 10 | MINIFORGE_HOME="${MINIFORGE_HOME%/}" # remove trailing slash 11 | export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${MINIFORGE_HOME}/conda-bld}" 12 | 13 | ( startgroup "Provisioning base env with micromamba" ) 2> /dev/null 14 | MICROMAMBA_VERSION="1.5.10-0" 15 | if [[ "$(uname -m)" == "arm64" ]]; then 16 | osx_arch="osx-arm64" 17 | else 18 | osx_arch="osx-64" 19 | fi 20 | MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" 21 | MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" 22 | echo "Downloading micromamba ${MICROMAMBA_VERSION}" 23 | micromamba_exe="$(mktemp -d)/micromamba" 24 | curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" 25 | chmod +x "${micromamba_exe}" 26 | echo "Creating environment" 27 | "${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ 28 | --channel conda-forge \ 29 | pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 30 | echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" 31 | mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" 32 | echo "Cleaning up micromamba" 33 | rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true 34 | ( endgroup "Provisioning base env with micromamba" ) 2> /dev/null 35 | 36 | ( startgroup "Configuring conda" ) 2> /dev/null 37 | echo "Activating environment" 38 | source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" 39 | conda activate base 40 | export CONDA_SOLVER="libmamba" 41 | export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 42 | 43 | 44 | 45 | 46 | 47 | echo -e "\n\nSetting up the condarc and mangling the compiler." 48 | setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml 49 | 50 | if [[ "${CI:-}" != "" ]]; then 51 | mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml 52 | fi 53 | 54 | if [[ "${CI:-}" != "" ]]; then 55 | echo -e "\n\nMangling homebrew in the CI to avoid conflicts." 56 | /usr/bin/sudo mangle_homebrew 57 | /usr/bin/sudo -k 58 | else 59 | echo -e "\n\nNot mangling homebrew as we are not running in CI" 60 | fi 61 | 62 | if [[ "${sha:-}" == "" ]]; then 63 | sha=$(git rev-parse HEAD) 64 | fi 65 | 66 | echo -e "\n\nRunning the build setup script." 67 | source run_conda_forge_build_setup 68 | 69 | 70 | 71 | ( endgroup "Configuring conda" ) 2> /dev/null 72 | 73 | echo -e "\n\nMaking the build clobber file" 74 | make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml 75 | 76 | if [[ -f LICENSE.txt ]]; then 77 | cp LICENSE.txt "recipe/recipe-scripts-license.txt" 78 | fi 79 | 80 | if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then 81 | if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then 82 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" 83 | fi 84 | conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ 85 | ${EXTRA_CB_OPTIONS:-} \ 86 | --clobber-file ./.ci_support/clobber_${CONFIG}.yaml 87 | 88 | # Drop into an interactive shell 89 | /bin/bash 90 | else 91 | 92 | if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then 93 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" 94 | fi 95 | 96 | conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ 97 | --suppress-variables ${EXTRA_CB_OPTIONS:-} \ 98 | --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ 99 | --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" 100 | 101 | ( startgroup "Inspecting artifacts" ) 2> /dev/null 102 | 103 | # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 104 | command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" 105 | 106 | ( endgroup "Inspecting artifacts" ) 2> /dev/null 107 | ( startgroup "Validating outputs" ) 2> /dev/null 108 | 109 | validate_recipe_outputs "${FEEDSTOCK_NAME}" 110 | 111 | ( endgroup "Validating outputs" ) 2> /dev/null 112 | 113 | ( startgroup "Uploading packages" ) 2> /dev/null 114 | 115 | if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then 116 | upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml 117 | fi 118 | 119 | ( endgroup "Uploading packages" ) 2> /dev/null 120 | fi 121 | -------------------------------------------------------------------------------- /recipe/0006-Linux-Do-not-modify-LD_LIBRARY_PATH.patch: -------------------------------------------------------------------------------- 1 | From 6fe39babda9dbb853de5eab3d3e2efba6c0e77f3 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Tue, 2 Jan 2018 15:51:41 +0000 4 | Subject: [PATCH 06/13] Linux: Do not modify LD_LIBRARY_PATH 5 | 6 | --- 7 | Makeconf.in | 3 ++- 8 | configure.ac | 15 ++++++++++++--- 9 | etc/Makeconf.in | 3 ++- 10 | etc/ldpaths.in | 14 ++++++++++++++ 11 | 4 files changed, 30 insertions(+), 5 deletions(-) 12 | 13 | diff --git a/Makeconf.in b/Makeconf.in 14 | index 59b8d7c..0ad81ad 100644 15 | --- a/Makeconf.in 16 | +++ b/Makeconf.in 17 | @@ -67,7 +67,8 @@ MAIN_CFLAGS = @MAIN_CFLAGS@ 18 | MAIN_FFLAGS = @MAIN_FFLAGS@ 19 | MAIN_LD = @MAIN_LD@@BUILD_LTO_TRUE@ $(CFLAGS) $(CPICFLAGS) @LTO_LD@ 20 | MAIN_LDFLAGS = @MAIN_LDFLAGS@ @WANT_R_SHLIB_FALSE@ @USE_EXPORTFILES_TRUE@ -Wl,-bE:$(top_builddir)/etc/R.exp 21 | -MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LIBR0) $(LDFLAGS) 22 | +RPATH_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/lib @RPATH_LDFLAGS@ 23 | +MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LIBR0) $(LDFLAGS) $(RPATH_LDFLAGS) 24 | ## need this for bootstrapping 25 | MKINSTALLDIRS = @R_SHELL@ $(top_srcdir)/src/scripts/mkinstalldirs.in 26 | NOTANGLE = @NOTANGLE@ 27 | diff --git a/configure.ac b/configure.ac 28 | index e033c19..075f3dd 100644 29 | --- a/configure.ac 30 | +++ b/configure.ac 31 | @@ -877,7 +877,7 @@ AC_SUBST(LIBTOOL_DEPS) 32 | 33 | ### * Checks for libraries. 34 | 35 | -## Set up LD_LIBRARY_PATH or equivalent. 36 | +## Add -Wl,-rpath, entries to RPATH_LDFLAGS. 37 | ## 38 | ## What is this doing *HERE*? 39 | ## Should be needed for tests using AC_RUN_IFELSE()? 40 | @@ -904,6 +904,7 @@ case "${host_os}" in 41 | -L*) 42 | lib=`echo ${arg} | sed "s/^-L//"` 43 | R_SH_VAR_ADD(R_LD_LIBRARY_PATH, [${lib}], [${PATH_SEPARATOR}]) 44 | + R_SH_VAR_ADD(RPATH_LDFLAGS, [-Wl,-rpath,${lib}]) 45 | ;; 46 | esac 47 | done 48 | @@ -926,13 +927,20 @@ case "${host_os}" in 49 | Rshlibpath_var=${shlibpath_var} 50 | esac 51 | AC_SUBST(shlibpath_var) 52 | -## Export LD_LIBRARY_PATH or equivalent. 53 | +## Export LD_LIBRARY_PATH or equivalent (except we do not want to do that 54 | +## instead we want to use -Wl,-rpath .. only doing this for Linux for now). 55 | if eval "test -z \"\${${Rshlibpath_var}}\""; then 56 | eval "${Rshlibpath_var}=\"${R_LD_LIBRARY_PATH}\"" 57 | else 58 | eval "${Rshlibpath_var}=\"${R_LD_LIBRARY_PATH}${PATH_SEPARATOR}\${${Rshlibpath_var}}\"" 59 | fi 60 | -eval "export ${Rshlibpath_var}" 61 | +case "${host_os}" in 62 | + linux*) 63 | + ;; 64 | + *) 65 | + eval "export ${Rshlibpath_var}" 66 | + ;; 67 | +esac 68 | AC_SUBST(Rshlibpath_var) 69 | 70 | ## record how to strip shared/dynamic libraries. 71 | @@ -1875,6 +1883,7 @@ AM_CONDITIONAL(DYLIB_UNDEFINED_ALLOWED, [test "x${dylib_undefined_allowed}" = xy 72 | 73 | AC_SUBST(MAIN_LD) 74 | AC_SUBST(MAIN_LDFLAGS) 75 | +AC_SUBST(RPATH_LDFLAGS) 76 | AC_SUBST(CPICFLAGS) 77 | AC_SUBST(CXXPICFLAGS) 78 | AC_SUBST(DYLIB_LD) 79 | diff --git a/etc/Makeconf.in b/etc/Makeconf.in 80 | index d84a912..ec29989 100644 81 | --- a/etc/Makeconf.in 82 | +++ b/etc/Makeconf.in 83 | @@ -108,7 +108,8 @@ LTO_FC_OPT = @LTO_FC@ 84 | ## needed to build applications linking to static libR 85 | MAIN_LD = @MAIN_LD@ 86 | MAIN_LDFLAGS = @MAIN_LDFLAGS@ 87 | -MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS) 88 | +RPATH_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/lib @RPATH_LDFLAGS@ 89 | +MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS) $(RPATH_LDFLAGS) 90 | MKINSTALLDIRS = "$(R_HOME)/bin/mkinstalldirs" 91 | NM = @NM@ 92 | OBJC = @OBJC@ 93 | diff --git a/etc/ldpaths.in b/etc/ldpaths.in 94 | index 314d364..3fb5331 100644 95 | --- a/etc/ldpaths.in 96 | +++ b/etc/ldpaths.in 97 | @@ -1,3 +1,17 @@ 98 | +# https://github.com/conda/conda/issues/1679: 99 | +# Internally R_system() calls system() which 100 | +# uses /bin/sh to launch various programs. If 101 | +# /bin/sh is called with LD_LIBRARY_PATH that 102 | +# loads condas shared libraries things break. 103 | +# It may be that not setting LD_LIBRARY_PATH 104 | +# causes other things to break, in which case 105 | +# R_system() will need to be modified so that 106 | +# it calls execve() with an environment which 107 | +# has these modifications to LD_LIBRARY_PATH 108 | +# removed which may be tricky to orchestrate 109 | +if [ "$(uname -s)" = "Linux" ]; then 110 | + return 0 111 | +fi 112 | : ${JAVA_HOME=@JAVA_HOME@} 113 | : ${R_JAVA_LD_LIBRARY_PATH=@R_JAVA_LD_LIBRARY_PATH@} 114 | if test -n "@R_LD_LIBRARY_PATH@"; then 115 | -- 116 | 2.39.3 (Apple Git-146) 117 | 118 | -------------------------------------------------------------------------------- /.scripts/create_conda_build_artifacts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # INPUTS (environment variables that need to be set before calling this script): 4 | # 5 | # CI (azure/github_actions/UNSET) 6 | # CI_RUN_ID (unique identifier for the CI job run) 7 | # FEEDSTOCK_NAME 8 | # CONFIG (build matrix configuration string) 9 | # SHORT_CONFIG (uniquely-shortened configuration string) 10 | # CONDA_BLD_DIR (path to the conda-bld directory) 11 | # ARTIFACT_STAGING_DIR (use working directory if unset) 12 | # BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) 13 | # ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) 14 | 15 | # OUTPUTS 16 | # 17 | # BLD_ARTIFACT_NAME 18 | # BLD_ARTIFACT_PATH 19 | # ENV_ARTIFACT_NAME 20 | # ENV_ARTIFACT_PATH 21 | 22 | source .scripts/logging_utils.sh 23 | 24 | # DON'T do set -x, because it results in double echo-ing pipeline commands 25 | # and that might end up inserting extraneous quotation marks in output variables 26 | set -e 27 | 28 | # Check that the conda-build directory exists 29 | if [ ! -d "$CONDA_BLD_DIR" ]; then 30 | echo "conda-build directory does not exist" 31 | exit 1 32 | fi 33 | 34 | # Set staging dir to the working dir, in Windows style if applicable 35 | if [[ -z "${ARTIFACT_STAGING_DIR}" ]]; then 36 | if pwd -W; then 37 | ARTIFACT_STAGING_DIR=$(pwd -W) 38 | else 39 | ARTIFACT_STAGING_DIR=$PWD 40 | fi 41 | fi 42 | echo "ARTIFACT_STAGING_DIR: $ARTIFACT_STAGING_DIR" 43 | 44 | FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) 45 | if [ -z ${FEEDSTOCK_NAME} ]; then 46 | export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) 47 | fi 48 | 49 | # Set a unique ID for the artifact(s), specialized for this particular job run 50 | ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" 51 | if [[ ${#ARTIFACT_UNIQUE_ID} -gt 80 ]]; then 52 | ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${SHORT_CONFIG}" 53 | fi 54 | echo "ARTIFACT_UNIQUE_ID: $ARTIFACT_UNIQUE_ID" 55 | 56 | # Set a descriptive ID for the archive(s), specialized for this particular job run 57 | ARCHIVE_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" 58 | 59 | # Make the build artifact zip 60 | if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then 61 | export BLD_ARTIFACT_NAME="${BLD_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" 62 | export BLD_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${BLD_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" 63 | 64 | ( startgroup "Archive conda build directory" ) 2> /dev/null 65 | 66 | # Try 7z and fall back to zip if it fails (for cross-platform use) 67 | if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_DIR" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then 68 | pushd "$CONDA_BLD_DIR" 69 | zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' 70 | popd 71 | fi 72 | 73 | ( endgroup "Archive conda build directory" ) 2> /dev/null 74 | 75 | echo "BLD_ARTIFACT_NAME: $BLD_ARTIFACT_NAME" 76 | echo "BLD_ARTIFACT_PATH: $BLD_ARTIFACT_PATH" 77 | 78 | if [[ "$CI" == "azure" ]]; then 79 | echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" 80 | echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" 81 | elif [[ "$CI" == "github_actions" ]]; then 82 | echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT 83 | echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT 84 | fi 85 | fi 86 | 87 | # Make the environments artifact zip 88 | if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then 89 | export ENV_ARTIFACT_NAME="${ENV_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" 90 | export ENV_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${ENV_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" 91 | 92 | ( startgroup "Archive conda build environments" ) 2> /dev/null 93 | 94 | # Try 7z and fall back to zip if it fails (for cross-platform use) 95 | if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_DIR"/'_*_env*/' -bb; then 96 | pushd "$CONDA_BLD_DIR" 97 | zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' 98 | popd 99 | fi 100 | 101 | ( endgroup "Archive conda build environments" ) 2> /dev/null 102 | 103 | echo "ENV_ARTIFACT_NAME: $ENV_ARTIFACT_NAME" 104 | echo "ENV_ARTIFACT_PATH: $ENV_ARTIFACT_PATH" 105 | 106 | if [[ "$CI" == "azure" ]]; then 107 | echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" 108 | echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" 109 | elif [[ "$CI" == "github_actions" ]]; then 110 | echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT 111 | echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT 112 | fi 113 | fi 114 | -------------------------------------------------------------------------------- /.scripts/build_steps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 4 | # will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 5 | # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 6 | # benefit from the improvement. 7 | 8 | # -*- mode: jinja-shell -*- 9 | 10 | set -xeuo pipefail 11 | export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" 12 | source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh 13 | 14 | 15 | ( endgroup "Start Docker" ) 2> /dev/null 16 | 17 | ( startgroup "Configuring conda" ) 2> /dev/null 18 | 19 | export PYTHONUNBUFFERED=1 20 | export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" 21 | export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" 22 | export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" 23 | 24 | cat >~/.condarc < /opt/conda/conda-meta/history 36 | micromamba install --root-prefix ~/.conda --prefix /opt/conda \ 37 | --yes --override-channels --channel conda-forge --strict-channel-priority \ 38 | pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 39 | export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 40 | 41 | # set up the condarc 42 | setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 43 | 44 | source run_conda_forge_build_setup 45 | 46 | ( 47 | # Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old versions of rpm 48 | # are drastically slowed down when the number of file descriptors is very high. 49 | # This can be visible during a `yum install` step of a feedstock build. 50 | # => Set a lower limit in a subshell for the `yum install`s only. 51 | ulimit -n 1024 52 | 53 | # Install the yum requirements defined canonically in the 54 | # "recipe/yum_requirements.txt" file. After updating that file, 55 | # run "conda smithy rerender" and this line will be updated 56 | # automatically. 57 | /usr/bin/sudo -n yum install -y mesa-libGL-devel mesa-libGLU-devel libX11-devel libXt-devel libXrender-devel libXext-devel libXdmcp xorg-x11-server-Xvfb 58 | ) 59 | 60 | # make the build number clobber 61 | make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 62 | 63 | if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then 64 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" 65 | fi 66 | 67 | 68 | ( endgroup "Configuring conda" ) 2> /dev/null 69 | 70 | if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then 71 | cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" 72 | fi 73 | 74 | if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then 75 | if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then 76 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" 77 | fi 78 | conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ 79 | ${EXTRA_CB_OPTIONS:-} \ 80 | --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" 81 | 82 | # Drop into an interactive shell 83 | /bin/bash 84 | else 85 | conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ 86 | --suppress-variables ${EXTRA_CB_OPTIONS:-} \ 87 | --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ 88 | --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" 89 | ( startgroup "Inspecting artifacts" ) 2> /dev/null 90 | 91 | # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 92 | command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" 93 | 94 | ( endgroup "Inspecting artifacts" ) 2> /dev/null 95 | ( startgroup "Validating outputs" ) 2> /dev/null 96 | 97 | validate_recipe_outputs "${FEEDSTOCK_NAME}" 98 | 99 | ( endgroup "Validating outputs" ) 2> /dev/null 100 | 101 | ( startgroup "Uploading packages" ) 2> /dev/null 102 | 103 | if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then 104 | upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 105 | fi 106 | 107 | ( endgroup "Uploading packages" ) 2> /dev/null 108 | fi 109 | 110 | ( startgroup "Final checks" ) 2> /dev/null 111 | 112 | touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" 113 | -------------------------------------------------------------------------------- /.scripts/run_win_build.bat: -------------------------------------------------------------------------------- 1 | :: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 2 | :: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 3 | :: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 4 | :: benefit from the improvement. 5 | 6 | :: INPUTS (required environment variables) 7 | :: CONFIG: name of the .ci_support/*.yaml file for this job 8 | :: CI: azure, github_actions, or unset 9 | :: MINIFORGE_HOME: where to install the base conda environment 10 | :: UPLOAD_PACKAGES: true or false 11 | :: UPLOAD_ON_BRANCH: true or false 12 | 13 | setlocal enableextensions enabledelayedexpansion 14 | 15 | FOR %%A IN ("%~dp0.") DO SET "REPO_ROOT=%%~dpA" 16 | if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" 17 | :: Remove trailing backslash, if present 18 | if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" 19 | call :start_group "Provisioning base env with micromamba" 20 | set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" 21 | set "MICROMAMBA_VERSION=1.5.10-0" 22 | set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" 23 | set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" 24 | set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" 25 | 26 | echo Downloading micromamba %MICROMAMBA_VERSION% 27 | if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" 28 | powershell -ExecutionPolicy Bypass -Command "(New-Object Net.WebClient).DownloadFile('%MICROMAMBA_URL%', '%MICROMAMBA_EXE%')" 29 | if !errorlevel! neq 0 exit /b !errorlevel! 30 | 31 | echo Creating environment 32 | call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ 33 | --channel conda-forge ^ 34 | pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 35 | if !errorlevel! neq 0 exit /b !errorlevel! 36 | echo Removing %MAMBA_ROOT_PREFIX% 37 | del /S /Q "%MAMBA_ROOT_PREFIX%" >nul 38 | del /S /Q "%MICROMAMBA_TMPDIR%" >nul 39 | call :end_group 40 | 41 | call :start_group "Configuring conda" 42 | 43 | :: Activate the base conda environment 44 | echo Activating environment 45 | call "%MINIFORGE_HOME%\Scripts\activate.bat" 46 | :: Configure the solver 47 | set "CONDA_SOLVER=libmamba" 48 | if !errorlevel! neq 0 exit /b !errorlevel! 49 | set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" 50 | 51 | :: Set basic configuration 52 | echo Setting up configuration 53 | setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml 54 | if !errorlevel! neq 0 exit /b !errorlevel! 55 | echo Running build setup 56 | CALL run_conda_forge_build_setup 57 | 58 | 59 | if !errorlevel! neq 0 exit /b !errorlevel! 60 | 61 | if EXIST LICENSE.txt ( 62 | echo Copying feedstock license 63 | copy LICENSE.txt "recipe\\recipe-scripts-license.txt" 64 | ) 65 | if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( 66 | if [%CROSSCOMPILING_EMULATOR%] == [] ( 67 | set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" 68 | ) 69 | ) 70 | 71 | if NOT [%flow_run_id%] == [] ( 72 | set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" 73 | ) 74 | 75 | call :end_group 76 | 77 | :: Build the recipe 78 | echo Building recipe 79 | conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% 80 | if !errorlevel! neq 0 exit /b !errorlevel! 81 | 82 | call :start_group "Inspecting artifacts" 83 | :: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 84 | WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" 85 | call :end_group 86 | 87 | :: Prepare some environment variables for the upload step 88 | if /i "%CI%" == "github_actions" ( 89 | set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" 90 | set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" 91 | if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( 92 | set "IS_PR_BUILD=True" 93 | ) else ( 94 | set "IS_PR_BUILD=False" 95 | ) 96 | set "TEMP=%RUNNER_TEMP%" 97 | ) 98 | if /i "%CI%" == "azure" ( 99 | set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" 100 | set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" 101 | if /i "%BUILD_REASON%" == "PullRequest" ( 102 | set "IS_PR_BUILD=True" 103 | ) else ( 104 | set "IS_PR_BUILD=False" 105 | ) 106 | set "TEMP=%UPLOAD_TEMP%" 107 | ) 108 | 109 | :: Validate 110 | call :start_group "Validating outputs" 111 | validate_recipe_outputs "%FEEDSTOCK_NAME%" 112 | if !errorlevel! neq 0 exit /b !errorlevel! 113 | call :end_group 114 | 115 | if /i "%UPLOAD_PACKAGES%" == "true" ( 116 | if /i "%IS_PR_BUILD%" == "false" ( 117 | call :start_group "Uploading packages" 118 | if not exist "%TEMP%\" md "%TEMP%" 119 | set "TMP=%TEMP%" 120 | upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml 121 | if !errorlevel! neq 0 exit /b !errorlevel! 122 | call :end_group 123 | ) 124 | ) 125 | 126 | exit 127 | 128 | :: Logging subroutines 129 | 130 | :start_group 131 | if /i "%CI%" == "github_actions" ( 132 | echo ::group::%~1 133 | exit /b 134 | ) 135 | if /i "%CI%" == "azure" ( 136 | echo ##[group]%~1 137 | exit /b 138 | ) 139 | echo %~1 140 | exit /b 141 | 142 | :end_group 143 | if /i "%CI%" == "github_actions" ( 144 | echo ::endgroup:: 145 | exit /b 146 | ) 147 | if /i "%CI%" == "azure" ( 148 | echo ##[endgroup] 149 | exit /b 150 | ) 151 | exit /b 152 | -------------------------------------------------------------------------------- /recipe/launcher.c: -------------------------------------------------------------------------------- 1 | /* 2 | R launcher for Windows 3 | 4 | To build/rebuild with mingw32, do this in the setuptools project directory: 5 | 6 | gcc -DGUI=0 -mno-cygwin -O -s -o setuptools/cli.exe launcher.c 7 | gcc -DGUI=1 -mwindows -mno-cygwin -O -s -o setuptools/gui.exe launcher.c 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define DEBUG 0 19 | 20 | #if __SIZEOF_POINTER__ == 8 21 | # define ARCH "x64" 22 | #else 23 | # define ARCH "i386" 24 | #endif 25 | 26 | int child_pid=0; 27 | 28 | 29 | int fail(char *format, char *data) 30 | { 31 | /* Print error message to stderr and return 2 */ 32 | fprintf(stderr, format, data); 33 | return 2; 34 | } 35 | 36 | 37 | char *quoted(char *data) 38 | { 39 | int i, ln = strlen(data), nb; 40 | 41 | /* We allocate twice as much space as needed to deal with worse-case 42 | of having to escape everything. */ 43 | char *result = calloc(ln * 2 + 3, sizeof(char)); 44 | char *presult = result; 45 | 46 | *presult++ = '"'; 47 | for (nb=0, i=0; i < ln; i++) 48 | { 49 | if (data[i] == '\\') 50 | nb += 1; 51 | else if (data[i] == '"') 52 | { 53 | for (; nb > 0; nb--) 54 | *presult++ = '\\'; 55 | *presult++ = '\\'; 56 | } 57 | else 58 | nb = 0; 59 | *presult++ = data[i]; 60 | } 61 | 62 | for (; nb > 0; nb--) /* Deal w trailing slashes */ 63 | *presult++ = '\\'; 64 | 65 | *presult++ = '"'; 66 | *presult++ = 0; 67 | return result; 68 | } 69 | 70 | 71 | 72 | void pass_control_to_child(DWORD control_type) 73 | { 74 | /* 75 | * distribute-issue207 76 | * passes the control event to child process (Python) 77 | */ 78 | if (!child_pid) { 79 | return; 80 | } 81 | GenerateConsoleCtrlEvent(child_pid, 0); 82 | } 83 | 84 | 85 | BOOL control_handler(DWORD control_type) 86 | { 87 | /* 88 | * distribute-issue207 89 | * control event handler callback function 90 | */ 91 | switch (control_type) { 92 | case CTRL_C_EVENT: 93 | pass_control_to_child(0); 94 | break; 95 | } 96 | return TRUE; 97 | } 98 | 99 | 100 | int create_and_wait_for_subprocess(char* command) { 101 | /* 102 | * distribute-issue207 103 | * launches child process (Python) 104 | */ 105 | DWORD return_value = 0; 106 | LPSTR commandline = command; 107 | STARTUPINFOA s_info; 108 | PROCESS_INFORMATION p_info; 109 | ZeroMemory(&p_info, sizeof(p_info)); 110 | ZeroMemory(&s_info, sizeof(s_info)); 111 | s_info.cb = sizeof(STARTUPINFO); 112 | // set-up control handler callback funciotn 113 | SetConsoleCtrlHandler((PHANDLER_ROUTINE) control_handler, TRUE); 114 | if (!CreateProcessA(NULL, commandline, NULL, NULL, TRUE, 0, NULL, 115 | NULL, &s_info, &p_info)) 116 | { 117 | fprintf(stderr, "failed to create process.\n"); 118 | return 3; 119 | } 120 | child_pid = p_info.dwProcessId; 121 | // wait for Python to exit 122 | WaitForSingleObject(p_info.hProcess, INFINITE); 123 | if (!GetExitCodeProcess(p_info.hProcess, &return_value)) 124 | { 125 | fprintf(stderr, "failed to get exit code from process.\n"); 126 | return 3; 127 | } 128 | return return_value; 129 | } 130 | 131 | 132 | char* join_executable_and_args(char *executable, char **args, int argc) 133 | { 134 | /* 135 | * distribute-issue207 136 | * CreateProcess needs a long string of the executable and command-line arguments, 137 | * so we need to convert it from the args that was built 138 | */ 139 | int len, counter; 140 | char* cmdline; 141 | 142 | len = strlen(executable) + 2; 143 | for (counter=1; counter path && *fn != '\\') 173 | fn--; 174 | fn++; 175 | end = fn - 2; 176 | while (end > path && *end != '\\') 177 | end--; 178 | *end = '\0'; 179 | 180 | /* This is only temporary until {Ana,Mini,}conda activate does 181 | the job for us and can be assumed to have been rolled out.. */ 182 | PATH = getenv("PATH"); 183 | if (PATH != NULL) 184 | { 185 | #define MINGW_W64_PATH "\\Library\\mingw-w64\\bin" 186 | #define MSYS2_PATH "\\Library\\usr\\bin" 187 | if (!strstr(PATH, MINGW_W64_PATH) || 188 | !strstr(PATH, MSYS2_PATH)) 189 | { 190 | size_t newPATHsize = 5 + 1 + strlen(PATH); /* PATH= and NULL terminator. */ 191 | newPATHsize += strlen(path) + strlen(MINGW_W64_PATH) + 1; 192 | newPATHsize += strlen(path) + strlen(MSYS2_PATH) + 1; 193 | newPATH = calloc(newPATHsize, sizeof(char)); 194 | if (newPATH == NULL) 195 | return fail("Could not calloc new PATH (%s)", PATH); 196 | sprintf(newPATH, "PATH=%s" MINGW_W64_PATH ";%s" MSYS2_PATH ";%s", path, path, PATH); 197 | if (putenv(newPATH)) 198 | return fail("Could putenv newPATH (%s)", newPATH); 199 | } 200 | } 201 | strcpy(newpath, path); 202 | strcat(newpath, "\\lib\\R\\bin\\" ARCH "\\"); 203 | strcat(newpath, fn); 204 | 205 | #if DEBUG 206 | printf("==%s==\n", newpath); 207 | #endif 208 | /* Argument array needs to be argc, plus 1 for null sentinel */ 209 | newargs = (char **) calloc(argc + 1, sizeof(char *)); 210 | newargsp = newargs; 211 | 212 | *newargsp++ = quoted(newpath); 213 | for (i = 1; i < argc; i++) 214 | *newargsp++ = quoted(argv[i]); 215 | 216 | *newargsp++ = NULL; 217 | 218 | #if DEBUG 219 | for (i = 0; i <= argc; i++) 220 | printf("- %s\n", newargs[i]); 221 | printf("argc=%d\n", argc); 222 | #endif 223 | 224 | if (is_gui) { 225 | /* Use exec, we don't need to wait for the GUI to finish */ 226 | execv(newpath, (char * const *) (newargs)); 227 | return fail("Could not exec %s", newpath); /* shouldn't get here! */ 228 | } 229 | 230 | /* 231 | * distribute-issue207: using CreateProcessA instead of spawnv 232 | */ 233 | cmdline = join_executable_and_args(newpath, newargs, argc); 234 | return create_and_wait_for_subprocess(cmdline); 235 | } 236 | 237 | 238 | int WINAPI WinMain(HINSTANCE hI, HINSTANCE hP, LPSTR lpCmd, int nShow) 239 | { 240 | return run(__argc, __argv, GUI); 241 | } 242 | 243 | 244 | int main(int argc, char** argv) 245 | { 246 | return run(argc, argv, GUI); 247 | } 248 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | About r-base-feedstock 2 | ====================== 3 | 4 | Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/r-base-feedstock/blob/main/LICENSE.txt) 5 | 6 | Home: http://www.r-project.org/ 7 | 8 | Package license: GPL-2.0-or-later 9 | 10 | Summary: R is a free software environment for statistical computing and graphics. 11 | 12 | Current build status 13 | ==================== 14 | 15 | 16 | 17 | 18 | 19 | 20 | 76 | 77 |
Azure 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 36 | 37 | 38 | 43 | 44 | 45 | 50 | 51 | 52 | 57 | 58 | 59 | 64 | 65 | 66 | 71 | 72 | 73 |
VariantStatus
linux_64 32 | 33 | variant 34 | 35 |
linux_aarch64 39 | 40 | variant 41 | 42 |
linux_ppc64le 46 | 47 | variant 48 | 49 |
osx_64 53 | 54 | variant 55 | 56 |
osx_arm64 60 | 61 | variant 62 | 63 |
win_64 67 | 68 | variant 69 | 70 |
74 |
75 |
78 | 79 | Current release info 80 | ==================== 81 | 82 | | Name | Downloads | Version | Platforms | 83 | | --- | --- | --- | --- | 84 | | [![Conda Recipe](https://img.shields.io/badge/recipe-cross--r--base-green.svg)](https://anaconda.org/conda-forge/cross-r-base) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cross-r-base.svg)](https://anaconda.org/conda-forge/cross-r-base) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cross-r-base.svg)](https://anaconda.org/conda-forge/cross-r-base) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/cross-r-base.svg)](https://anaconda.org/conda-forge/cross-r-base) | 85 | | [![Conda Recipe](https://img.shields.io/badge/recipe-r--base-green.svg)](https://anaconda.org/conda-forge/r-base) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/r-base.svg)](https://anaconda.org/conda-forge/r-base) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/r-base.svg)](https://anaconda.org/conda-forge/r-base) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/r-base.svg)](https://anaconda.org/conda-forge/r-base) | 86 | 87 | Installing r-base 88 | ================= 89 | 90 | Installing `r-base` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: 91 | 92 | ``` 93 | conda config --add channels conda-forge 94 | conda config --set channel_priority strict 95 | ``` 96 | 97 | Once the `conda-forge` channel has been enabled, `cross-r-base, r-base` can be installed with `conda`: 98 | 99 | ``` 100 | conda install cross-r-base r-base 101 | ``` 102 | 103 | or with `mamba`: 104 | 105 | ``` 106 | mamba install cross-r-base r-base 107 | ``` 108 | 109 | It is possible to list all of the versions of `cross-r-base` available on your platform with `conda`: 110 | 111 | ``` 112 | conda search cross-r-base --channel conda-forge 113 | ``` 114 | 115 | or with `mamba`: 116 | 117 | ``` 118 | mamba search cross-r-base --channel conda-forge 119 | ``` 120 | 121 | Alternatively, `mamba repoquery` may provide more information: 122 | 123 | ``` 124 | # Search all versions available on your platform: 125 | mamba repoquery search cross-r-base --channel conda-forge 126 | 127 | # List packages depending on `cross-r-base`: 128 | mamba repoquery whoneeds cross-r-base --channel conda-forge 129 | 130 | # List dependencies of `cross-r-base`: 131 | mamba repoquery depends cross-r-base --channel conda-forge 132 | ``` 133 | 134 | 135 | About conda-forge 136 | ================= 137 | 138 | [![Powered by 139 | NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org) 140 | 141 | conda-forge is a community-led conda channel of installable packages. 142 | In order to provide high-quality builds, the process has been automated into the 143 | conda-forge GitHub organization. The conda-forge organization contains one repository 144 | for each of the installable packages. Such a repository is known as a *feedstock*. 145 | 146 | A feedstock is made up of a conda recipe (the instructions on what and how to build 147 | the package) and the necessary configurations for automatic building using freely 148 | available continuous integration services. Thanks to the awesome service provided by 149 | [Azure](https://azure.microsoft.com/en-us/services/devops/), [GitHub](https://github.com/), 150 | [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), 151 | [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) 152 | it is possible to build and upload installable packages to the 153 | [conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) 154 | channel for Linux, Windows and OSX respectively. 155 | 156 | To manage the continuous integration and simplify feedstock maintenance, 157 | [conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed. 158 | Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of 159 | this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``. 160 | 161 | For more information, please check the [conda-forge documentation](https://conda-forge.org/docs/). 162 | 163 | Terminology 164 | =========== 165 | 166 | **feedstock** - the conda recipe (raw material), supporting scripts and CI configuration. 167 | 168 | **conda-smithy** - the tool which helps orchestrate the feedstock. 169 | Its primary use is in the construction of the CI ``.yml`` files 170 | and simplify the management of *many* feedstocks. 171 | 172 | **conda-forge** - the place where the feedstock and smithy live and work to 173 | produce the finished article (built conda distributions) 174 | 175 | 176 | Updating r-base-feedstock 177 | ========================= 178 | 179 | If you would like to improve the r-base recipe or build a new 180 | package version, please fork this repository and submit a PR. Upon submission, 181 | your changes will be run on the appropriate platforms to give the reviewer an 182 | opportunity to confirm that the changes result in a successful build. Once 183 | merged, the recipe will be re-built and uploaded automatically to the 184 | `conda-forge` channel, whereupon the built conda packages will be available for 185 | everybody to install and use from the `conda-forge` channel. 186 | Note that all branches in the conda-forge/r-base-feedstock are 187 | immediately built and any created packages are uploaded, so PRs should be based 188 | on branches in forks, and branches in the main repository should only be used to 189 | build distinct package versions. 190 | 191 | In order to produce a uniquely identifiable distribution: 192 | * If the version of a package **is not** being increased, please add or increase 193 | the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string). 194 | * If the version of a package **is** being increased, please remember to return 195 | the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string) 196 | back to 0. 197 | 198 | Feedstock Maintainers 199 | ===================== 200 | 201 | * [@conda-forge/r](https://github.com/orgs/conda-forge/teams/r/) 202 | * [@isuruf](https://github.com/isuruf/) 203 | * [@mbargull](https://github.com/mbargull/) 204 | * [@mingwandroid](https://github.com/mingwandroid/) 205 | * [@ocefpaf](https://github.com/ocefpaf/) 206 | * [@sodre](https://github.com/sodre/) 207 | * [@xhochy](https://github.com/xhochy/) 208 | 209 | -------------------------------------------------------------------------------- /recipe/meta.yaml: -------------------------------------------------------------------------------- 1 | {% set native = 'm2w64-' if win else '' %} 2 | {% set posix = 'm2-' if win else '' %} 3 | {% set version = "4.5.2" %} 4 | 5 | package: 6 | name: r-base-split 7 | version: {{ version }} 8 | 9 | source: 10 | - url: https://cran.r-project.org/src/base/R-4/R-{{ version }}.tar.gz 11 | sha256: 0d71ff7106ec69cd7c67e1e95ed1a3cee355880931f2eb78c530014a9e379f20 12 | patches: 13 | - 0001-Darwin-Remove-unicode-elipsis-character-from-grDevic.patch 14 | - 0002-Fix-trio-config.h-include-depth-issue.patch 15 | - 0003-Win32-Do-not-link-static-libgcc.patch 16 | - 0004-Win32-Prevent-conversion-of-R_ARCH-to-abs-Windows-pa.patch 17 | - 0005-Darwin-Avoid-setting-DYLD_FALLBACK_LIBRARY_PATH.patch 18 | - 0006-Linux-Do-not-modify-LD_LIBRARY_PATH.patch 19 | - 0007-javareconf-Do-not-fail-on-compile-fail.patch 20 | - 0008-Revert-part-of-9b818c6dc00143ff18775a4015a3f43b5196f.patch 21 | - 0009-javareconf-macOS-Continue-to-allow-system-Java-lt-9-.patch 22 | # - 0010-Allow-rpath-in-tcltk-dylib-LC_LOAD_DYLIB-command.patch 23 | - 0011-Check-for-changes-then-forcibly-mv-in-javareconf.in.patch 24 | - 0012-Use-LAPACK_LDFLAGS-in-Rlapack_la_LIBADD.patch 25 | - 0014-Use-conda-s-tzdata-package.patch 26 | - 0015-Win32-Fix-COMPILED_BY-for-custom-GCC-pkgversion.patch 27 | - 0018-Fix-path-to-TCL-TK.patch 28 | 29 | build: 30 | number: 2 31 | no_link: 32 | - lib/R/doc/html/packages.html 33 | 34 | outputs: 35 | - name: r-base 36 | script: build-r-base.sh # [not win] 37 | script: bld-r-base.bat # [win] 38 | build: 39 | rpaths: 40 | - lib/R/lib/ 41 | - lib/ 42 | no_link: 43 | # These files are modified by R CMD javareconf and can 44 | # point to different Java implementations in each env. 45 | - lib/R/etc/Makeconf 46 | - lib/R/etc/ldpaths 47 | - lib/R/etc/javaconf 48 | - lib/R/etc/x64/Makeconf 49 | - lib/R/etc/x64/ldpaths 50 | - lib/R/etc/x64/javaconf 51 | detect_binary_files_with_prefix: true 52 | run_exports: 53 | weak: 54 | - {{ pin_subpackage("r-base", min_pin="x.x", max_pin="x.x") }} 55 | noarch: 56 | - {{ pin_subpackage("r-base", min_pin="x.x", max_pin="x.x") }} 57 | requirements: 58 | build: 59 | - gnuconfig # [unix] 60 | - {{ stdlib('c') }} 61 | - {{ compiler('c') }} 62 | - {{ compiler('cxx') }} 63 | - {{ compiler('fortran') }} 64 | - gfortran_impl_{{ build_platform }} {{ fortran_compiler_version }} # [build_platform != target_platform] 65 | - {{ cdt('xorg-x11-proto-devel') }} # [linux] 66 | - {{ cdt('libxrender') }} # [linux] 67 | - {{ cdt('libxext') }} # [linux] 68 | - {{ cdt('libsm-devel') }} # [linux] 69 | - {{ cdt('libice-devel') }} # [linux] 70 | - {{ cdt('libx11-devel') }} # [linux] 71 | - {{ cdt('libxt') }} # [linux] 72 | - {{ cdt('libxt-devel') }} # [linux] 73 | - {{ cdt('libxcb') }} # [linux] 74 | - {{ cdt('libxau') }} # [linux] 75 | - {{ cdt('java-1.7.0-openjdk') }} # [linux] 76 | - {{ posix }}pkg-config 77 | - m2-base # [win] 78 | - m2-diffutils # [win] 79 | - m2-make # [win] 80 | - m2-tar # [win] 81 | - m2-unzip # [win] 82 | - m2-texinfo-tex # [win] 83 | - m2-texinfo # [win] 84 | - m2-curl # [win] 85 | - m2-p7zip # [win] 86 | - miktex # [win] 87 | #- texlive-core # [unix] 88 | - texinfo # [unix] 89 | - openjdk 90 | - autoconf >=2.72 # [unix] 91 | - m2-autoconf2.72 # [win] 2.71 92 | - m2-automake-wrapper # [win] 93 | - create-forwarder-dll # [win] 94 | - automake # [not win] 95 | - make # [not win] 96 | # shellcheck is used to check activation scripts; it is not yet built for linux-ppc64le. 97 | - shellcheck # [unix and build_platform != "linux-ppc64le"] 98 | - libcurl # [not win] 99 | - readline # [build_platform != target_platform] 100 | - libcurl # [build_platform != target_platform] 101 | - liblzma-devel # [build_platform != target_platform] 102 | - libpng # [build_platform != target_platform] 103 | - bzip2 # [build_platform != target_platform] 104 | - cairo # [build_platform != target_platform] 105 | - libjpeg-turbo # [build_platform != target_platform] 106 | - libiconv # [unix and (build_platform != target_platform)] 107 | - glib # [unix and (build_platform != target_platform)] 108 | - bwidget # [build_platform != target_platform] 109 | - tktable # [build_platform != target_platform] 110 | - expat # [build_platform != target_platform] 111 | - pango # [build_platform != target_platform] 112 | - xorg-xproto # [build_platform != target_platform] 113 | - xorg-kbproto # [build_platform != target_platform] 114 | - xorg-xextproto # [build_platform != target_platform] 115 | - xorg-renderproto # [build_platform != target_platform] 116 | - icu # [build_platform != target_platform] 117 | - pcre2 # [build_platform != target_platform] 118 | - tk # [build_platform != target_platform] 119 | - zlib # [build_platform != target_platform] 120 | - libtiff # [build_platform != target_platform] 121 | - libblas # [build_platform != target_platform] 122 | - liblapack # [build_platform != target_platform] 123 | - libdeflate # [build_platform != target_platform] 124 | - llvm-openmp # [osx] 125 | - libgomp # [linux] 126 | host: 127 | - llvm-openmp # [osx] 128 | - libgomp # [linux] 129 | - readline # [not win] 130 | - libcurl 131 | - liblzma-devel 132 | - libpng 133 | - bzip2 134 | - cairo 135 | - gettext # [osx] 136 | - fontconfig # [osx or win] 137 | - libjpeg-turbo 138 | - libdeflate 139 | - libiconv 140 | - libuuid # [linux] 141 | - glib # [unix] 142 | - bwidget 143 | - tktable 144 | - expat # [not win] 145 | - pango # [not win] 146 | - icu 147 | - pcre2 148 | - tk 149 | - zlib 150 | - gsl 151 | - libtiff 152 | - libblas 153 | - liblapack 154 | - tzdata 155 | # sed is in host env because its path is recorded in R's shell wrapper 156 | - sed # [linux] 157 | run: 158 | - _r-mutex 1.* anacondar_1 159 | # Needed by R CMD javareconf 160 | - make # [not win] 161 | - gcc_impl_{{ target_platform }} >={{ c_compiler_version|default("0") }} # [linux or win] 162 | - gxx_impl_{{ target_platform }} >={{ cxx_compiler_version|default("0") }} # [linux or win] 163 | - gfortran_impl_{{ target_platform }} # [linux or win] 164 | - {{ c_compiler|default("blah") }}_{{ target_platform }} >={{ c_compiler_version|default("0") }} # [osx] 165 | - {{ cxx_compiler|default("blah") }}_{{ target_platform }} >={{ cxx_compiler_version|default("0") }} # [osx] 166 | - {{ compiler('fortran') }} # [osx] 167 | - {{ pin_compatible('llvm-openmp', max_pin=None) }} # [osx] 168 | - curl 169 | - libuuid # [linux] 170 | - xorg-libxt # [linux] 171 | - bwidget 172 | - tktable 173 | - tk 174 | # Update the lower bound with the version used in the internal tzdata 175 | - tzdata >=2024a 176 | - sed # [linux] 177 | 178 | test: 179 | commands: 180 | - echo on # [win] 181 | - R -h 182 | - R --version 183 | # Ensure the shared library extension on macOS is also .so 184 | # for better compatibility with pre-compiled binary macOS packages (similar to wheels in python). 185 | - R -e 'print(.Platform$dynlib.ext)' | grep -F -- ".so" # [not win] 186 | - R -e "print(.Platform$dynlib.ext)" | findstr "/C:%SHLIB_EXT%" # [win] 187 | - Rscript --version 188 | - Rscript -e 'cat("ok\n")' | grep -xF ok # [not win] 189 | - Rscript -e "cat('ok\n')" | findstr /X "/C:ok" # [win] 190 | - xvfb-run Rscript -e "library('tcltk');quit(status=is.logical(tclRequire('Tktable')))" # [linux] 191 | - Rscript -e "library('tcltk');quit(status=is.logical(tclRequire('Tktable')))" # [not linux] 192 | # Report on the optional features compiled into this build of R. 193 | - R -e "capabilities()" 194 | # Show third-party graphics software available 195 | - R -e "grSoftVersion()" 196 | # Show environment variables set by R wrapper 197 | - env | R -s -e "env <- Sys.getenv(names=TRUE); writeLines(setdiff(paste(names(env), env, sep='='), readLines(file('stdin'))))" # [not win] 198 | - set | R -s -e "env <- Sys.getenv(names=TRUE); writeLines(setdiff(paste(names(env), env, sep='='), readLines(file('stdin'))))" # [win] 199 | # Show configure variables 200 | - R CMD config --all 201 | # TODO does not work on windows, because winCairo.dll is missing 202 | - Rscript test-svg.R # [not win] 203 | - open # [win] 204 | # There doesn't seem to be a way to test this one 205 | # - RSetReg # [win] 206 | - Rfe --help # [win] 207 | - Rterm --help # [win] 208 | - Rterm --version # [win] 209 | # Prevent regression mentioned in https://github.com/conda-forge/r-base-feedstock/issues/50 210 | - Rscript -e "stopifnot(capabilities('jpeg'), TRUE)" 211 | - Rscript -e "stopifnot(capabilities('png'), TRUE)" 212 | - if not exist %PREFIX%\\Lib\\R\\bin\\x64\\R.lib exit 1 # [win] 213 | # Verify internal-tzcode works without warnings 214 | # See https://stat.ethz.ch/pipermail/r-devel/2014-April/068745.html 215 | - R -e "options(warn=2);Sys.time()" 216 | # check that tzdata version is at least 2024 217 | - R -e "stopifnot(strtoi(substr(attr(OlsonNames(), 'Version'), 1, 4)) >= 2024)" 218 | files: 219 | - test-svg.R 220 | 221 | 222 | - name: cross-r-base 223 | build: 224 | skip: true # [win] 225 | script: install-cross-activate.sh 226 | requirements: 227 | build: 228 | # shellcheck is used to check activation scripts; it is not yet built for linux-ppc64le. 229 | - shellcheck # [build_platform != "linux-ppc64le"] 230 | run: 231 | - {{ pin_subpackage("r-base", exact=True) }} 232 | - rsync 233 | test: 234 | commands: 235 | - test -f $PREFIX/etc/conda/activate.d/activate-cross-r-base.sh 236 | 237 | about: 238 | home: http://www.r-project.org/ 239 | license: GPL-2.0-or-later 240 | license_family: GPL 241 | license_file: COPYING 242 | summary: R is a free software environment for statistical computing and graphics. 243 | 244 | extra: 245 | feedstock-name: r-base 246 | recipe-maintainers: 247 | - conda-forge/r 248 | - isuruf 249 | - mbargull 250 | - mingwandroid 251 | - ocefpaf 252 | - sodre 253 | - xhochy 254 | -------------------------------------------------------------------------------- /recipe/build-r-base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Get an updated config.sub and config.guess 3 | set -exo pipefail 4 | 5 | if [[ ! $target_platform =~ .*win.* ]]; then 6 | cp $BUILD_PREFIX/share/gnuconfig/config.* ./tools 7 | export AUTOCONF=autoconf 8 | else 9 | export AUTOM4TE=autom4te-2.72 10 | export AUTOCONF=autoconf-2.72 11 | fi 12 | 13 | export 14 | 15 | if [[ ${CONDA_BUILD_CROSS_COMPILATION:-0} == 1 ]]; then 16 | export r_cv_header_zlib_h=yes 17 | export r_cv_have_bzlib=yes 18 | export r_cv_have_lzma=yes 19 | export r_cv_have_pcre2utf=yes 20 | export r_cv_have_pcre832=yes 21 | export r_cv_have_curl722=yes 22 | export r_cv_have_curl728=yes 23 | export r_cv_have_curl_https=yes 24 | export r_cv_size_max=yes 25 | export r_cv_prog_fc_char_len_t=size_t 26 | if [[ "${target_platform}" == linux-* ]]; then 27 | export r_cv_kern_usrstack=no 28 | export r_cv_search_xdr='none required' 29 | else 30 | export r_cv_kern_usrstack=yes 31 | export r_cv_search_xdr=no 32 | fi 33 | export ac_cv_lib_icucore_ucol_open=yes 34 | export ac_cv_func_mmap_fixed_mapped=yes 35 | export r_cv_working_mktime=yes 36 | export r_cv_func_ctanh_works=yes 37 | export r_cv_prog_fc_cc_compat_complex=yes 38 | export r_cv_zdotu_is_usable=yes 39 | 40 | if [[ "${target_platform}" == "osx-arm64" || "${target_platform}" == "linux-aarch64" || "${target_platform}" == "linux-ppc64le" ]]; then 41 | export r_cv_func_calloc_works=yes 42 | export r_cv_func_isfinite_works=yes 43 | export r_cv_func_log1p_works=yes 44 | export r_cv_func_sigaction_works=yes 45 | export r_cv_icu=yes 46 | export r_cv_openmp_simdred=yes 47 | export r_cv_putenv_unset2=no 48 | export r_cv_working_ftell=yes 49 | else 50 | echo "Unknown cross compiling architecture" 51 | exit 1 52 | fi 53 | 54 | if [[ "${target_platform}" == "osx-arm64" ]]; then 55 | export r_cv_putenv_unset=no 56 | elif [[ "${target_platform}" == "linux-aarch64" || "${target_platform}" == "linux-ppc64le" ]]; then 57 | export r_cv_putenv_unset=yes 58 | else 59 | echo "Unknown cross compiling architecture" 60 | exit 1 61 | fi 62 | 63 | mkdir -p doc 64 | ( 65 | export CFLAGS="" 66 | 67 | export CXXFLAGS="" 68 | export CC=$CC_FOR_BUILD 69 | export CXX=$CXX_FOR_BUILD 70 | export AR=$($CC_FOR_BUILD -print-prog-name=ar) 71 | export F77=${F77//$HOST/$BUILD} 72 | export F90=${F90//$HOST/$BUILD} 73 | export F95=${F95//$HOST/$BUILD} 74 | export FC=${FC//$HOST/$BUILD} 75 | export GFORTRAN=${FC//$HOST/$BUILD} 76 | export LD=${LD//$HOST/$BUILD} 77 | export FFLAGS=${FFLAGS//$PREFIX/$BUILD_PREFIX} 78 | export FORTRANFLAGS=${FORTRANFLAGS//$PREFIX/$BUILD_PREFIX} 79 | # Filter out -march=.* from F*FLAGS 80 | re='\-march\=[^[:space:]]*(.*)' 81 | if [[ "${FFLAGS}" =~ $re ]]; then 82 | export FFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 83 | fi 84 | re='\-march\=[^[:space:]]*(.*)' 85 | if [[ "${FORTRANFLAGS}" =~ $re ]]; then 86 | export FORTRANFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 87 | fi 88 | # Filter out -mtune=.* from F*FLAGS 89 | re='\-mtune\=[^[:space:]]*(.*)' 90 | if [[ "${FFLAGS}" =~ $re ]]; then 91 | export FFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 92 | fi 93 | re='\-mtune\=[^[:space:]]*(.*)' 94 | if [[ "${FORTRANFLAGS}" =~ $re ]]; then 95 | export FORTRANFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 96 | fi 97 | export LDFLAGS=${LDFLAGS//$PREFIX/$BUILD_PREFIX} 98 | export CPPFLAGS=${CPPFLAGS//$PREFIX/$BUILD_PREFIX} 99 | export NM=$($CC_FOR_BUILD -print-prog-name=nm) 100 | export PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig 101 | export CONDA_BUILD_CROSS_COMPILATION=0 102 | export HOST=$BUILD 103 | export PREFIX=$BUILD_PREFIX 104 | export IS_MINIMAL_R_BUILD=1 105 | # Use the original script without the prepended activation commands. 106 | /bin/bash ${RECIPE_DIR}/build-r-base.sh 107 | ) 108 | fi 109 | 110 | aclocal -I m4 111 | ${AUTOCONF} 112 | 113 | # Filter out -std=.* from CXXFLAGS as it disrupts checks for C++ language levels. 114 | re='(.*[[:space:]])\-std\=[^[:space:]]*(.*)' 115 | if [[ "${CXXFLAGS}" =~ $re ]]; then 116 | export CXXFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 117 | fi 118 | 119 | re2='(.*[[:space:]])\-I.*[^[:space:]]*(.*)' 120 | if [[ "${CPPFLAGS}" =~ $re2 ]]; then 121 | export CPPFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 122 | fi 123 | # if [[ "${CFLAGS}" =~ $re2 ]]; then 124 | # export CFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 125 | # fi 126 | re3='(.*[[:space:]])\-L.*[^[:space:]]*(.*)' 127 | if [[ "${CPPFLAGS}" =~ $re3 ]]; then 128 | export CPPFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 129 | fi 130 | # if [[ "${CFLAGS}" =~ $re3 ]]; then 131 | # export CFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 132 | # fi 133 | # if [[ "${LDFLAGS}" =~ $re3 ]]; then 134 | # export LDFLAGS="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" 135 | # fi 136 | 137 | # Without this, dependency scanning fails (but with it CDT libuuid / Xt fails to link 138 | # which we hack around with config.site) 139 | 140 | if [[ "$target_platform" == "win-"* ]]; then 141 | export CPPFLAGS="${CPPFLAGS} -I$PREFIX/Library/include" 142 | else 143 | export CPPFLAGS="${CPPFLAGS} -I$PREFIX/include" 144 | fi 145 | 146 | export TCL_CONFIG=${PREFIX}/lib/tclConfig.sh 147 | export TK_CONFIG=${PREFIX}/lib/tkConfig.sh 148 | export TCL_LIBRARY=${PREFIX}/lib/tcl8.6 149 | export TK_LIBRARY=${PREFIX}/lib/tk8.6 150 | # BUILD_PREFIX does not get considered for prefix replacement. 151 | [[ -n ${AR} ]] && export AR=$(basename ${AR}) 152 | [[ -n ${CC} ]] && export CC=$(basename ${CC}) 153 | [[ -n ${GCC} ]] && export GCC=$(basename ${GCC}) 154 | [[ -n ${CXX} ]] && export CXX=$(basename ${CXX}) 155 | [[ -n ${F77} ]] && export F77=$(basename ${F77}) 156 | [[ -n ${FC} ]] && export FC=$(basename ${FC}) 157 | [[ -n ${LD} ]] && export LD=$(basename ${LD}) 158 | [[ -n ${RANLIB} ]] && export RANLIB=$(basename ${RANLIB}) 159 | [[ -n ${STRIP} ]] && export STRIP=$(basename ${STRIP}) 160 | export OBJC=${CC} 161 | INSTALL_NAME_TOOL=${INSTALL_NAME_TOOL:-install_name_tool} 162 | 163 | Linux() { 164 | # If lib/R/etc/javaconf ends up with anything other than ~autodetect~ 165 | # for any value (except JAVA_HOME) then 'R CMD javareconf' will never 166 | # change it, so we prevent configure from finding Java. post-install 167 | # and activate scripts now call 'R CMD javareconf'. 168 | unset JAVA_HOME 169 | 170 | export CPPFLAGS="${CPPFLAGS} -Wl,-rpath-link,${PREFIX}/lib" 171 | 172 | # Make sure curl is found from PREFIX instead of BUILD_PREFIX 173 | rm -f "${BUILD_PREFIX}/bin/curl-config" 174 | 175 | mkdir -p ${PREFIX}/lib 176 | # Tricky libuuid resolution issues against CentOS6's libSM. I may need to add some symbols to our libuuid library. 177 | # Works for configure: 178 | # . /opt/conda/bin/activate /home/rdonnelly/r-base-bld/_build_env 179 | # x86_64-conda_cos6-linux-gnu-cc -o conftest -L/home/rdonnelly/r-base-bld/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib64 conftest.c -lXt -lX11 -lrt -ldl -lm -luuid -L$PREFIX/lib -licuuc -licui18n 180 | # if [[ ${ARCH} == 32 ]]; then 181 | # export CPPFLAGS="-L${BUILD_PREFIX}/${HOST}/sysroot/usr/lib ${CPPFLAGS}" 182 | # export CFLAGS="-I${BUILD_PREFIX}/${HOST}/sysroot/usr/lib ${CFLAGS}" 183 | # export CXXFLAGS="-I${BUILD_PREFIX}/${HOST}/sysroot/usr/lib ${CXXFLAGS}" 184 | # else 185 | # export CPPFLAGS="-L${BUILD_PREFIX}/${HOST}/sysroot/usr/lib64 ${CPPFLAGS}" 186 | # export CFLAGS="-I${BUILD_PREFIX}/${HOST}/sysroot/usr/lib64 ${CFLAGS}" 187 | # export CXXFLAGS="-I${BUILD_PREFIX}/${HOST}/sysroot/usr/lib64 ${CXXFLAGS}" 188 | # fi 189 | echo "ac_cv_lib_Xt_XtToolkitInitialize=yes" > config.site 190 | export CONFIG_SITE=${PWD}/config.site 191 | if [[ "${IS_MINIMAL_R_BUILD:-0}" == "1" ]]; then 192 | CONFIGURE_ARGS="--without-x --with-blas=-lblas --with-lapack=-llapack" 193 | else 194 | CONFIGURE_ARGS="--with-x --with-blas=-lblas --with-lapack=-llapack" 195 | fi 196 | ./configure --prefix=${PREFIX} \ 197 | --host=${HOST} \ 198 | --build=${BUILD} \ 199 | --enable-shared \ 200 | --enable-R-shlib \ 201 | --disable-prebuilt-html \ 202 | --enable-memory-profiling \ 203 | --with-tk-config=${TK_CONFIG} \ 204 | --with-tcl-config=${TCL_CONFIG} \ 205 | --with-pic \ 206 | --with-cairo \ 207 | --with-readline \ 208 | --with-recommended-packages=no \ 209 | --without-libintl-prefix \ 210 | --without-internal-tzcode \ 211 | ${CONFIGURE_ARGS} \ 212 | LIBnn=lib || (cat config.log; exit 1) 213 | 214 | if cat src/include/config.h | grep "undef HAVE_PANGOCAIRO"; then 215 | echo "Did not find pangocairo, refusing to continue" 216 | cat config.log | grep pango 217 | exit 1 218 | fi 219 | 220 | make clean 221 | make -j${CPU_COUNT} ${VERBOSE_AT} 222 | # echo "Running make check-all, this will take some time ..." 223 | # make check-all -j1 V=1 > $(uname)-make-check.log 2>&1 || make check-all -j1 V=1 > $(uname)-make-check.2.log 2>&1 224 | 225 | make install 226 | 227 | # fail if build did not use external BLAS/LAPACK 228 | if [[ -e ${PREFIX}/lib/R/lib/libRblas.so || -e ${PREFIX}/lib/R/lib/libRlapack.so ]]; then 229 | echo "Test failed: Detected generic R BLAS/LAPACK" 230 | exit 1 231 | fi 232 | 233 | # Prevent C and C++ extensions from linking to libgfortran. 234 | sed -i -r 's|(^LDFLAGS = .*)-lgfortran|\1|g' ${PREFIX}/lib/R/etc/Makeconf 235 | 236 | pushd ${PREFIX}/lib/R/etc 237 | # See: https://github.com/conda/conda/issues/6701 238 | chmod g+w Makeconf ldpaths 239 | popd 240 | 241 | # Remove hard coded paths to these commands in the build machine 242 | sed -i.bak 's/PAGER=.*/PAGER=${PAGER-less}/g' ${PREFIX}/lib/R/etc/Renviron 243 | sed -i.bak 's/TAR=.*/TAR=${TAR-tar}/g' ${PREFIX}/lib/R/etc/Renviron 244 | sed -i.bak 's/R_GZIPCMD=.*/R_GZIPCMD=${R_GZIPCMD-gzip}/g' ${PREFIX}/lib/R/etc/Renviron 245 | rm ${PREFIX}/lib/R/etc/Renviron.bak 246 | } 247 | 248 | # This was an attempt to see how far we could get with using Autotools as things 249 | # stand. On 3.2.4, the build system attempts to compile the Unix code which works 250 | # to an extent, finally falling over due to fd_set references in sys-std.c when 251 | # it should be compiling sys-win32.c instead. Eventually it would be nice to fix 252 | # the Autotools build framework so that can be used for Windows builds too. 253 | Mingw_w64_autotools() { 254 | unset JAVA_HOME 255 | 256 | mkdir -p ${PREFIX}/lib 257 | export TCL_CONFIG=${PREFIX}/Library/mingw-w64/lib/tclConfig.sh 258 | export TK_CONFIG=${PREFIX}/Library/mingw-w64/lib/tkConfig.sh 259 | export TCL_LIBRARY=${PREFIX}/Library/mingw-w64/lib/tcl8.6 260 | export TK_LIBRARY=${PREFIX}/Library/mingw-w64/lib/tk8.6 261 | export CPPFLAGS="${CPPFLAGS} -I${SRC_DIR}/src/gnuwin32/fixed/h" 262 | if [[ "${ARCH}" == "64" ]]; then 263 | export CPPFLAGS="${CPPFLAGS} -DWIN=64 -DMULTI=64" 264 | fi 265 | ./configure --prefix=${PREFIX} \ 266 | --host=x86_64-w64-mingw32 \ 267 | --enable-shared \ 268 | --enable-R-shlib \ 269 | --disable-prebuilt-html \ 270 | --enable-memory-profiling \ 271 | --with-tk-config=$TK_CONFIG \ 272 | --with-tcl-config=$TCL_CONFIG \ 273 | --with-x=no \ 274 | --with-readline=no \ 275 | --with-recommended-packages=no \ 276 | LIBnn=lib 277 | 278 | make -j${CPU_COUNT} ${VERBOSE_AT} 279 | # echo "Running make check-all, this will take some time ..." 280 | # make check-all -j1 V=1 > $(uname)-make-check.log 2>&1 281 | make install 282 | } 283 | 284 | # Use the hand-crafted makefiles. 285 | Mingw_w64_makefiles() { 286 | local _use_msys2_mingw_w64_tcltk=yes 287 | local _debug=no 288 | 289 | # Instead of copying a MkRules.dist file to MkRules.local 290 | # just create one with the options we know our toolchains 291 | # support, and don't set any 292 | if [[ "${ARCH}" == "64" ]]; then 293 | CPU="x86-64" 294 | HOST="x86_64-w64-mingw32" 295 | R_ARCH="x64" 296 | else 297 | CPU="i686" 298 | HOST="i686-w64-mingw32" 299 | fi 300 | 301 | export CPATH=${PREFIX}/Library/include 302 | export LIBRARY_PATH=${PREFIX}/Library/lib 303 | 304 | # Some hints from https://www.r-bloggers.com/an-openblas-based-rblas-for-windows-64-step-by-step/ 305 | echo "LEA_MALLOC = YES" > "${SRC_DIR}/src/gnuwin32/MkRules.local" 306 | echo "BINPREF = ${HOST}-" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 307 | echo "BINPREF64 = ${HOST}-" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 308 | echo "MULTI = " >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 309 | # BUILD_HTML causes filenames with special characters to be created, see 310 | # https://github.com/conda-forge/r-base-feedstock/pull/177#issuecomment-845279175 311 | # echo "BUILD_HTML = YES" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 312 | echo "WIN = ${ARCH}" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 313 | if [[ "${_debug}" == "yes" ]]; then 314 | echo "EOPTS = -march=${CPU} -mtune=generic -O0" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 315 | echo "DEBUG = 1" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 316 | else 317 | # -O3 is used by R by default. It might be sensible to adopt -O2 here instead? 318 | echo "EOPTS = -march=${CPU} -mtune=generic" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 319 | fi 320 | echo "OPENMP = -fopenmp" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 321 | echo "PTHREAD = -pthread" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 322 | echo "COPY_RUNTIME_DLLS = 1" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 323 | echo "TEXI2ANY = texi2any" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 324 | echo "TCL_VERSION = 86" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 325 | echo "USE_CAIRO = YES" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 326 | echo "CAIRO_LIBS = \"-lcairo -lfontconfig\"" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 327 | echo "USE_LIBCURL = YES" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 328 | echo "CURL_LIBS = -lcurl" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 329 | echo "USE_ICU = YES" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 330 | echo "ICU_PATH = ${PREFIX}/Library/" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 331 | echo "ICU_LIBS = -licuin -licuuc -licudt -L\"${PREFIX}/Library/lib\"" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 332 | # This won't take and we'll force the issue at the end of the build* It's not really clear 333 | # if this is the best way to achieve my goal here (shared libraries, libpng, curl etc) but 334 | # it seems fairly reasonable all options considered. On other OSes, it's for '/usr/local' 335 | echo "LOCAL_SOFT = ${PREFIX}/Library/" >> "${SRC_DIR}/src/gnuwin32/MkRules.local" 336 | sed -i 's|-lwebp ||g' "${SRC_DIR}/src/library/grDevices/src/Makefile.win" 337 | sed -i 's|-DCURL_STATICLIB ||g' "${SRC_DIR}/src/modules/internet/Makefile.win" 338 | sed -i 's|-DLZMA_API_STATIC ||g' "${SRC_DIR}/src/library/utils/src/Makefile.win" 339 | sed -i 's|-DLZMA_API_STATIC ||g' "${SRC_DIR}/src/main/Makefile.win" 340 | sed -i 's|-DPCRE2_STATIC ||g' "${SRC_DIR}/src/main/Makefile.win" 341 | # Allow overriding TCL_VERSION 342 | sed -i 's|TCL_VERSION = 86|TCL_VERSION = 86t|g' "${SRC_DIR}/src/gnuwin32/fixed/etc/Makeconf" 343 | 344 | # We are not using rtools 345 | sed -i 's|# INSTALLER-BUILD|# INSTALLER-BUILD2|g' "${SRC_DIR}/src/gnuwin32/installer/Makefile" 346 | 347 | # R_ARCH looks like an absolute path (e.g. "/x64"), so MSYS2 will convert it. 348 | # We need to prevent that from happening. 349 | export MSYS2_ARG_CONV_EXCL="R_ARCH" 350 | cd "${SRC_DIR}/src/gnuwin32" 351 | if [[ "${_use_msys2_mingw_w64_tcltk}" == "yes" ]]; then 352 | # rinstaller and crandir would come after manuals (if it worked with MSYS2/mingw-w64-{tcl,tk}, in which case we'd just use make distribution anyway) 353 | echo "***** R-${PACKAGE_VERSION} Build started *****" 354 | for _stage in all cairodevices vignettes manuals; do 355 | echo "***** R-${PACKAGE_VERSION} Stage started: ${_stage} *****" 356 | make R_PKGS_RECOMMENDED= ${_stage} -j${CPU_COUNT} || exit 1 357 | done 358 | else 359 | echo "***** R-${PACKAGE_VERSION} Stage started: distribution *****" 360 | # NOTE: If you want to build the "distribution" target, you have to handle Inno Setup. 361 | # I.e., either patch out Inno Setup usage generally or, if that is not possible, 362 | # reintroduce Inno Setup download, set ISDIR etc. as done in r-base=4.1.3 builds. 363 | make distribution -j${CPU_COUNT} || exit 1 364 | fi 365 | # The flakiness mentioned below can be seen if the values are hacked to: 366 | # supremum error = 0.022 with p-value= 1e-04 367 | # FAILED 368 | # Error in dkwtest("beta", shape1 = 0.2, shape2 = 0.2) : dkwtest failed 369 | # Execution halted 370 | # .. and testsuite execution is forced with: 371 | # pushd /c/Users/${USER}/mc3/conda-bld/work/R-revised/tests 372 | # ~/mc3/conda-bld/work/R-revised/bin/x64/R CMD BATCH --vanilla --no-timing ~/mc3/conda-bld/work/R-revised/tests/p-r-random-tests.R ~/gd/r-language/mingw-w64-p-r-random-tests.R.win.out 373 | # .. I need to see if this can be repeated on other systems and reported upstream or investigated more, it is very rare and I don't think warrants holding things up. 374 | # echo "Running make check-all (up to 3 times, there is some flakiness in p-r-random-tests.R), this will take some time ..." 375 | # make check-all -j1 > make-check.log 2>&1 || make check-all -j1 > make-check.2.log 2>&1 || make check-all -j1 > make-check.3.log 2>&1 376 | cd installer 377 | make R_PKGS_RECOMMENDED= imagedir 378 | 379 | # Copied to ${PREFIX}/lib to mirror the unix layout so we can use "noarch: generic" packages for any that do not require compilation. 380 | mkdir -p "${PREFIX}"/lib 381 | cp -Rf R-${PKG_VERSION}/. "${PREFIX}"/lib/R 382 | 383 | PREFIX_WIN=$(cygpath -w ${PREFIX}) 384 | 385 | sed -i "s|-lgfortran |${PREFIX}/Library/${HOST}/lib/libgfortran.dll.a |g" "${PREFIX}"/lib/R/etc/${R_ARCH}/Makeconf 386 | cat "${PREFIX}"/lib/R/etc/${R_ARCH}/Makeconf 387 | 388 | rm -rf ${PREFIX}/lib/R/share/zoneinfo 389 | 390 | rm -rf ${PREFIX}/lib/R/bin/${R_ARCH}/Rblas.dll 391 | rm -rf ${PREFIX}/lib/R/bin/${R_ARCH}/Rlapack.dll 392 | 393 | create-forwarder-dll ${PREFIX_WIN}\\Library\\bin\\libblas.dll ${PREFIX_WIN}\\lib\\R\\bin\\${R_ARCH}\\Rblas.dll --no-temp-dir 394 | create-forwarder-dll ${PREFIX_WIN}\\Library\\bin\\liblapack.dll ${PREFIX_WIN}\\lib\\R\\bin\\${R_ARCH}\\Rlapack.dll --no-temp-dir 395 | 396 | return 0 397 | } 398 | 399 | Darwin() { 400 | unset JAVA_HOME 401 | # Ensure the shared library extension on macOS is also .so 402 | # for better compatibility with pre-compiled binary macOS packages (similar to wheels in python). 403 | unset SHLIB_EXT 404 | 405 | # May want to strip these from Makeconf at the end. 406 | CFLAGS="-isysroot ${CONDA_BUILD_SYSROOT} "${CFLAGS} 407 | LDFLAGS="-Wl,-dead_strip_dylibs -isysroot ${CONDA_BUILD_SYSROOT} "${LDFLAGS} 408 | CPPFLAGS="-isysroot ${CONDA_BUILD_SYSROOT} "${CPPFLAGS} 409 | 410 | # Our libuuid causes problems: 411 | # In file included from qdPDF.c:29: 412 | # In file included from ./qdPDF.h:3: 413 | # In file included from ../../../../include/R_ext/QuartzDevice.h:103: 414 | # In file included from /opt/MacOSX10.9.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:23: 415 | # In file included from /opt/MacOSX10.9.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23: 416 | # In file included from /opt/MacOSX10.9.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20: 417 | # In file included from /opt/MacOSX10.9.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:208: 418 | # In file included from /opt/MacOSX10.9.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/HFSVolumes.h:25: 419 | # .. apart from this issue there seems to be a segfault: 420 | # https://rt.cpan.org/Public/Bug/Display.html?id=104394 421 | # http://openradar.appspot.com/radar?id=6069753579831296 422 | # .. anyway, uuid is part of libc on Darwin, so let's just try to use that. 423 | rm -f "${PREFIX}"/include/uuid/uuid.h 424 | 425 | # Make sure curl is found from PREFIX instead of BUILD_PREFIX 426 | rm -f "${BUILD_PREFIX}/bin/curl-config" 427 | 428 | ./configure --prefix=${PREFIX} \ 429 | --host=${HOST} \ 430 | --build=${BUILD} \ 431 | --with-sysroot=${CONDA_BUILD_SYSROOT} \ 432 | --enable-shared \ 433 | --enable-R-shlib \ 434 | --with-tk-config=${TK_CONFIG} \ 435 | --with-tcl-config=${TCL_CONFIG} \ 436 | --with-blas=-lblas \ 437 | --with-lapack=-llapack \ 438 | --enable-R-shlib \ 439 | --enable-memory-profiling \ 440 | --without-x \ 441 | --enable-R-framework=no \ 442 | --with-included-gettext=yes \ 443 | --without-internal-tzcode \ 444 | --with-recommended-packages=no || (cat config.log; false) 445 | 446 | # Horrendous hack to make up for what seems to be bugs (or over-cautiousness?) in ld64's -dead_strip_dylibs (and/or -no_implicit_dylibs) 447 | sed -i'.bak' 's|-lgobject-2.0 -lglib-2.0 -lintl||g' src/library/grDevices/src/cairo/Makefile 448 | rm src/library/grDevices/src/cairo/Makefile.bak 449 | 450 | make clean 451 | if [[ ${CONDA_BUILD_CROSS_COMPILATION:-0} == 1 ]]; then 452 | cp $BUILD_PREFIX/lib/R/doc/NEWS.rds doc/ 453 | cp $BUILD_PREFIX/lib/R/doc/NEWS.2.rds doc/ 454 | cp $BUILD_PREFIX/lib/R/doc/NEWS.3.rds doc/ 455 | cp $BUILD_PREFIX/share/man/man1/R.1 doc/ 456 | EXTRA_MAKE_ARGS="R_EXE=echo" 457 | fi 458 | make -j${CPU_COUNT} ${VERBOSE_AT} ${EXTRA_MAKE_ARGS} 459 | # echo "Running make check-all, this will take some time ..." 460 | # make check-all -j1 V=1 > $(uname)-make-check.log 2>&1 461 | make install ${EXTRA_MAKE_ARGS} 462 | 463 | # fail if build did not use external BLAS/LAPACK 464 | if [[ -e ${PREFIX}/lib/R/lib/libRblas.dylib || -e ${PREFIX}/lib/R/lib/libRlapack.dylib ]]; then 465 | echo "Test failed: Detected generic R BLAS/LAPACK" 466 | exit 1 467 | fi 468 | 469 | pushd ${PREFIX}/lib/R/etc 470 | sed -i'.bak' -r "s|-isysroot ${CONDA_BUILD_SYSROOT}||g" Makeconf 471 | sed -i'.bak' -r "s|$BUILD_PREFIX/lib/gcc|$PREFIX/lib/gcc|g" Makeconf 472 | sed -i'.bak' -r "s|-lemutls_w||g" Makeconf 473 | sed -i'.bak' -r "s/-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}//g" Makeconf 474 | rm Makeconf.bak 475 | # See: https://github.com/conda/conda/issues/6701 476 | chmod g+w Makeconf ldpaths 477 | popd 478 | } 479 | 480 | # Need this for running R in build directory without installing 481 | export TZDIR=$PREFIX/share/zoneinfo 482 | 483 | case "${target_platform}" in 484 | osx-* ) 485 | Darwin 486 | ;; 487 | linux-* ) 488 | Linux 489 | ;; 490 | win-* ) 491 | # Mingw_w64_autotools 492 | Mingw_w64_makefiles 493 | ;; 494 | esac 495 | case "${target_platform}" in 496 | osx-* | linux-* ) 497 | for action in activate deactivate; do 498 | if [[ "${build_platform}" != linux-ppc64le ]] ; then 499 | shellcheck --shell=sh --severity=style --enable=check-unassigned-uppercase \ 500 | "${RECIPE_DIR}/${action}-${PKG_NAME}.sh" 501 | fi 502 | mkdir -p "${PREFIX}/etc/conda/${action}.d" 503 | cp "${RECIPE_DIR}/${action}-${PKG_NAME}.sh" "${PREFIX}/etc/conda/${action}.d/" 504 | done 505 | ;; 506 | esac 507 | 508 | if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then 509 | pushd $BUILD_PREFIX/lib/R 510 | for f in $(find . -type f); do 511 | if [[ ! -f $PREFIX/lib/R/$f ]]; then 512 | mkdir -p $PREFIX/lib/R/$(dirname $f) 513 | cp $f $PREFIX/lib/R/$f 514 | fi 515 | done 516 | fi 517 | 518 | if [[ -f $PREFIX/lib/R/etc/Makeconf ]]; then 519 | mv $PREFIX/lib/R/etc/Makeconf . 520 | echo "R_HOME=$PREFIX/lib/R" > $PREFIX/lib/R/etc/Makeconf 521 | cat Makeconf >> $PREFIX/lib/R/etc/Makeconf 522 | fi 523 | --------------------------------------------------------------------------------