├── .github └── workflows │ └── cook.yml ├── .gitignore ├── CRAN.md ├── Makefile ├── README.md ├── build.sh ├── other └── tcltk │ ├── README.md │ ├── Tktable2.10.patch │ ├── build-tcl.sh │ ├── build-tk.sh │ ├── build-tktable.sh │ └── pkgconfig.patch ├── recipes ├── QuantLib ├── apr ├── apr-util ├── autoconf ├── automake ├── bdb ├── bdb.patch ├── blosc ├── blosc.patch ├── boost ├── boost.patch ├── bsdtar ├── cairo ├── cgl ├── clp ├── clp.patch ├── coinutils ├── dylp ├── dylp.patch ├── emacs ├── expat ├── ffi ├── fftw ├── fftw-s ├── flac ├── flint ├── flint.patch ├── fontconfig ├── freetype ├── freexl ├── fribidi ├── gdal ├── gdal.patch ├── geos ├── gettext ├── glib ├── glpk ├── gmp ├── gsl ├── harfbuzz ├── hdf4 ├── hdf5 ├── hwloc ├── icu ├── icu.patch ├── isl ├── jpeg ├── libarchive ├── libarchive.patch ├── libb2 ├── libdeflate ├── libgeotiff ├── libgit2 ├── libogg ├── libpng ├── libpq ├── libsbml ├── libsndfile ├── libssh2 ├── libwebp ├── lz4 ├── m4 ├── m4.patch ├── mpc ├── mpfr ├── netcdf ├── nlopt ├── openjpeg ├── openssl ├── osi ├── pango ├── pcre ├── pcre2 ├── pixman ├── pkgconfig ├── pkgconfig.patch ├── poppler ├── poppler-data ├── poppler.patch ├── proj ├── protobuf ├── qpdf ├── r-base-dev ├── readline5 ├── readline5.patch ├── rsync ├── serf ├── serf.patch ├── sigc++ ├── sqlite3 ├── sqlite3.patch ├── subversion ├── symphony ├── sys-stubs ├── szip ├── texinfo ├── tidy ├── tiff ├── udunits ├── unixodbc ├── utf8proc ├── utf8proc.patch ├── xz ├── zeromq ├── zlib-stub ├── zstd └── zstd.patch ├── scripts ├── add-if-present ├── big-sur-build.sh ├── bootstrap-darwin20-arm64.sh ├── configure.cmake ├── configure.make ├── configure.meson-ninja ├── mkdist.pl └── mkmk.pl └── stubs └── pkgconfig-darwin ├── libcurl.pc ├── libexslt.pc ├── libxml-2.0.pc ├── libxslt.pc └── zlib.pc /.github/workflows/cook.yml: -------------------------------------------------------------------------------- 1 | name: Cook from Recipes 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | target: 7 | description: 'Target of the final "make". Use "all" to build everything (takes a long time!)' 8 | required: false 9 | default: 'r-base-dev' 10 | sdkurl: 11 | description: 'URL of the MacOSX*.sdk.tar.xz tar ball to use. It also determines the `MACOSX_DEPLOYMENT_TARGET`. If not specified, defaults to SDKURL set in the repo.' 12 | required: false 13 | default: '' 14 | bootstrap: 15 | description: 'If "true" bootstraps freetype/harfbuzz circular dependency and r-base-dev - required for real distribution. Set to "false" if you are testing a specific recipe and want to save time.' 16 | required: false 17 | type: boolean 18 | default: true 19 | 20 | jobs: 21 | cook: 22 | runs-on: ${{ matrix.os }} 23 | 24 | name: ${{ matrix.os }} build 25 | 26 | env: 27 | CC: clang 28 | CXX: clang++ 29 | OBJC: clang 30 | OBJCXX: clang++ 31 | SDKURL: ${{ github.event.inputs.sdkurl }} 32 | 33 | strategy: 34 | fail-fast: false 35 | matrix: 36 | os: [ 'macos-13', 'macos-14' ] 37 | 38 | steps: 39 | - uses: actions/checkout@v2 40 | 41 | - name: Remove local stuff 42 | run: | 43 | ## Remove unwanted local files 44 | sudo mkdir /usr/local/.disabled && sudo mkdir -p /opt/R/`uname -m`/bin && sudo chown -R $USER /opt/R 45 | sudo mv /usr/local/* /usr/local/.disabled/ && sudo rm -rf /opt/homebrew 46 | echo /opt/R/`uname -m`/bin > .PATH && cat $GITHUB_PATH >> .PATH && cat .PATH > $GITHUB_PATH && rm .PATH 47 | echo "ARCH=$(uname -m)" > $GITHUB_ENV 48 | 49 | - name: Setup toolchain 50 | run: | 51 | ## Setup SDK 52 | if [ -z "$SDKURL" ]; then SDKURL="${{ secrets.SDKURL }}"; fi 53 | if [ -n "$SDKURL" ]; then 54 | echo Installing SDK.. 55 | sdkname=$(curl -sfSL "$SDKURL" | sudo tar vxz -C /Library/Developer/CommandLineTools/SDKs 2>&1 | sed -n '1s:^x ::p' | sed -E 's:/*$::' ) 56 | if ! echo $sdkname | grep ^MacOSX; then echo "::error:: SDKURL is not valid, the tar ball must contain just the MacOSX*.sdk directory" >&2; exit 1; fi 57 | SDKROOT="/Library/Developer/CommandLineTools/SDKs/$sdkname" 58 | MACOSX_DEPLOYMENT_TARGET="$(echo $sdkname | sed 's:MacOSX::' | sed 's:[.]sdk$::')" 59 | OS_VER=$(echo $MACOSX_DEPLOYMENT_TARGET | awk '{ if ($1 >= 11) print int($1+9); else print int(substr($1,4))+4 }') 60 | echo "SDKROOT=$SDKROOT" >> $GITHUB_ENV 61 | echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET" >> $GITHUB_ENV 62 | echo "OS_VER=$OS_VER" >> $GITHUB_ENV 63 | echo "=== Using SDK: $SDKROOT" 64 | echo "=== Target: macOS $MACOSX_DEPLOYMENT_TARGET" 65 | echo "=== Build: darwin$OS_VER" 66 | sudo xcode-select -s /Library/Developer/CommandLineTools && xcode-select -p 67 | else 68 | echo "::warning::NOTE: no SDKURL provided, so Target/SDK are undefined!" 69 | fi 70 | pip3 install --user cmake ninja meson 71 | PYLIB=$(ls -d ~/Library/Python/3.*/bin | head -n1) 72 | echo $PYLIB >> $GITHUB_PATH 73 | PATH="$PATH:$PYLIB" 74 | echo "Compiler: " 75 | clang --version 76 | cmake --version 77 | echo -n "ninja: " 78 | ninja --version 79 | echo -n "meson: " 80 | meson --version 81 | 82 | - name: Setup XQuartz 83 | run: | 84 | ## Install XQuartz 85 | curl -sSL https://github.com/R-macos/XQuartz/releases/download/XQuartz-2.8.1/XQuartz-2.8.1.tar.xz \ 86 | | sudo tar fxj - -C / && sudo sh /opt/X11/libexec/postinstall 87 | 88 | - name: Build pkg-config 89 | run: ./build.sh -f pkgconfig xz 90 | 91 | - name: Bootstrap freetype/harfbuzz circular dependency 92 | if: ${{ inputs.bootstrap }} 93 | run: | 94 | ./build.sh freetype 95 | ./build.sh harfbuzz 96 | rm -rf build/freetype* 97 | ./build.sh harfbuzz 98 | 99 | - name: Build r-base-dev 100 | if: ${{ inputs.bootstrap }} 101 | run: ./build.sh r-base-dev 102 | 103 | - name: Build ${{ github.event.inputs.target }} 104 | run: ./build.sh ${{ github.event.inputs.target }} 105 | 106 | - name: Make distribution 107 | run: perl scripts/mkdist.pl 108 | 109 | - name: Upload distribution as artifacts 110 | uses: actions/upload-artifact@v4 111 | with: 112 | name: dist-darwin${{ env.OS_VER }}-${{ env.ARCH }} 113 | path: dist 114 | compression-level: 0 115 | retention-days: 3 116 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *~ 3 | -------------------------------------------------------------------------------- /CRAN.md: -------------------------------------------------------------------------------- 1 | ## CRAN setup notes 2 | 3 | This document decribes the CRAN-specific settings used to build the libraries using recipes, distributed at https://mac.R-project.org and used to build R and packages binaries on CRAN. 4 | 5 | ### High Sierra x86_64 build 6 | 7 | This build uses default settings to install to `/usr/local` and `sudo` to adjust permissions. It is recommended to set compilers to `clang` (i.e., `CC=clang`, `CXX=clang++` etc.), but most libraries don't care as Xcode has symlinks from `gcc` to `clang`. 8 | 9 | Binaries are distributed in https://mac.R-project.org/libs-4/ 10 | 11 | ### Big Sur arm64 build 12 | 13 | This build uses non-standard location (`/opt/R/arm64`) to avoid clashes with the libraries in `/usr/local` which often come from legacy Intel builds. Therefore the following settings are used to guarantee single-arch arm64 builds of the libraries which can co-exist with x86_64 binaries: 14 | 15 | ``` 16 | NOSUDO=1 PREFIX=opt/R/arm64 \ 17 | /Library/Frameworks/R.framework/Resources/bin/Rscript scripts/mkmk.R 18 | 19 | NOSUDO=1 PREFIX=opt/R/arm64 PATH=/opt/R/arm64/bin:$PATH \ 20 | PKG_CONFIG_PATH=/opt/R/arm64/lib/pkgconfig:/usr/lib/pkgconfig \ 21 | CC='clang -arch arm64' CXX='clang++ -arch arm64' \ 22 | OBJC='clang -arch arm64' OBJCXX='clang++ -arch arm64' \ 23 | CPPFLAGS=-I/opt/R/arm64/include \ 24 | LDFLAGS=-L/opt/R/arm64/lib \ 25 | make -C build all 26 | ``` 27 | 28 | Note that `/opt/R/arm64` is expected to exist and be writable by the user as the above does not use `sudo` to adjust permissions. 29 | 30 | Binaries in https://mac.R-project.org/libs-arm64/ 31 | 32 | ### Binary installs 33 | 34 | It is possible to generate a `Makefile` which downloads and installs binaries from the above builds instead of re-building them. This can be done by setting `BINARY=1` environment variable when calling `mkmk.R`. Then running, for example, `make cairo` will download and install all libraries necessary to use `cairo`. The build is detected by the architecture of the machine used. 35 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | build/Makefile: scripts/mkmk.R recipes 2 | Rscript scripts/mkmk.R 3 | 4 | clean: 5 | rm -rf build 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Recipes 2 | 3 | This is a system for building static, dependent libraries 4 | for R packages. It is mainly intended to automate the maintenance of 5 | CRAN dependencies for the macOS build system, but the system is intended 6 | to be usable on other platforms as well. Resulting binaries 7 | are available at https://mac.R-project.org/bin/. 8 | 9 | The idea is for package authors to submit pull requests for 10 | dependencies their packages require such that they can be 11 | automatically installed on the build VMs (see below). 12 | 13 | The dependency descriptions are simple DCF files. The format should be 14 | self-explanatory, it follows the same conventions as `DESCRIPTION` 15 | files in R packages. The required fields are `Package`, `Version` and 16 | `Source-URL`. Most common optional fields include `Depends` and 17 | `Configure`. 18 | 19 | There is a Perl script which will process the recipes and create a `make` 20 | file which can be used to build libraries and their dependencies. 21 | 22 | More recently, we have added a user-friendly command line tool simply 23 | called `build.sh` (requires `bash`) which replicates the build as 24 | performed on the CRAN machines. For example, to build all libraries 25 | needed to build R use: 26 | 27 | ./build.sh r-base-dev 28 | 29 | You can replace `r-base-dev` with any recipe or use `all` to build 30 | all recipes (takes hours!). See `./build.sh -h` for a little help page. 31 | Each library is built, packaged and installed. The 32 | default locations used by the above script are `/opt/R/$arch` and 33 | `/usr/local`. The former will be used if present where `$arch` is 34 | typically `x86_64` or `arm64`, otherwise `/usr/local` is the 35 | fall-back (not recommended). 36 | 37 | For a more fine-grained control you can run 38 | `scripts/mkmk.pl` yourself and see the list of environment 39 | variables at the bottom of this page for possible configurations. 40 | 41 | ### Contributing recipes 42 | 43 | To contribute a recipe simply raise a pull request. Please make sure you 44 | test the recipe changes first. As a final check, you should use the 45 | [Cook from Recipes](https://github.com/R-macos/recipes/actions/workflows/cook.yml) 46 | action in your fork which can be triggered manually and builds both on arm64 and x86_64. 47 | You can specify the target recipe you want to test. It will also build all dependencies. 48 | Note that there is a circular depencency between `freetype` and `harfbuzz` which requires 49 | bootstrapping, but unless your recipe involves those two packages you can disable 50 | that step. It is recommended to develop recipes locally first as you can iterate more 51 | quickly, but the action helps finding issues masked by already installed files. 52 | 53 | When writing recipes, please make sure you determine the correct dependencies so the build 54 | order is correct. Do not write recipes for libraries or tools provided by Apple. 55 | 56 | ### Reference 57 | 58 | * `Package:` name of the package (required) 59 | 60 | * `Version:` version of the package (required*). 61 | This version string can be substituted in other directives using `${ver}`. 62 | 63 | * `Source-URL:` URL of the source tar ball (required*) 64 | 65 | * `Source-SHA256:` optional, SHA256 hash of the source file. 66 | If set, the integrity of the downloaded file is checked (recommended). 67 | 68 | * `Depends:` comma separated list of dependent recipes, i.e. recipes 69 | that must be successfully installed before this one. Optional version 70 | specification of the form `rcp (>= min.ver)` is allowed for individual 71 | dependencies. 72 | 73 | Most of the following entries are optional: 74 | 75 | * `Configure[-[-]][-]:` flags to add to the `configure` 76 | script. `` is the lowecase name of the OS as returned by 77 | `uname`, `` is the major version of the OS (`uname -r` up 78 | to the first dot) and `` is the architecture of the 79 | platform. Multiple types can be specified and they are concatenated 80 | using precedence `os, ver, arch`. 81 | 82 | * `Configure-Subdir:` subdirectory containing the sources 83 | 84 | * `Special:` special recipe flags, currently only `in-sources` is 85 | supported which forces the build to be performed inside the 86 | sources. 87 | 88 | * `Distribution-Files:` list of files (or directories) to include 89 | in the final distribution tar ball. Defaults to `${prefix}`. 90 | This directive is intended only for restricting the content, 91 | installation is only supported for content under `${prefix}` 92 | so no files outside that tree can be part of the final 93 | distribution. 94 | 95 | * `Configure-Script:` name of the configure script to use, 96 | defaults to `configure`. If this option is set explicitly, 97 | then the default flags `--with-pic --disable-shared --enable-static` 98 | and `--prefix=/${prefix}` are no longer used under the assumption 99 | that the script is no longer autoconf-based and thus the equivalent 100 | flags should be supplied in `Configure:` or friends. 101 | 102 | * `Configure-Driver:` optional, if set, specifies the executable 103 | that will be called in order to process the configure script. 104 | If not specified it is assumed that the configure script is 105 | executable on its own. 106 | 107 | * `Configure-chmod`: optional, if set, `chmod` is called on the 108 | configure script with the specified value prior to execution. 109 | Most commonly this is set to `+x` if the sources fail to make the 110 | script executable. 111 | 112 | * `Install:` command to perform installation, defaults to 113 | `make install` and currently will be supplied with 114 | `DESTDIR=...` which is expected to be honored. 115 | 116 | * `Build-System:` optional, if specified a driver named 117 | `configure.` is expected to exist in 118 | the `scripts` directory of this project which is copied 119 | to the sources of the library as `configure` and should perform 120 | whatever operations are necessary to make the project 121 | autoconf-compatible. Currently we only provide drivers 122 | `cmake` which supports [CMake](https://cmake.org) and 123 | `meson-ninja` which supports `meson` for configuration and 124 | `ninja` for builds. The latter must be installed, typically 125 | using `pip install meson ninja` (add `--user` if you cannot 126 | install in the system location). 127 | Obviously, such systems are far more fragile 128 | so use only as a last resort. 129 | 130 | * `Suggests:` optional, comma separated list of packages 131 | (see `Depends:`) which are optional, but their presence 132 | can add functionality. Those packages will not be required, 133 | so the build can happen with or without them. If they are present, 134 | their presence will be recorded in the resulting manifest. 135 | 136 | * `Build-Depends:` optional, similar to `Depends:` but the 137 | the listed packages are only required during the build stage and 138 | they will not be included in the binary manifest as dependency. 139 | This is used only for build tools like `automake`. 140 | 141 | * `Postinstall:` optional (avoid if possible), command to run 142 | after `make install` to patch the destination content. The 143 | command is pasted as-is into the `Makefile` after `cd` to the 144 | `--dst` directory so it can use `${prefix}` 145 | to refer to the payload locations before they are `tar`ed up. 146 | 147 | (*) - virtual packages are packages that are only used to trigger 148 | installation of other packages, they only create a target in the 149 | `Makefile`, but don't create any output themselves. 150 | Those don't have `Version:` nor `Source.URL:`. 151 | 152 | NOTE: Originally, the DCF keys were using `R` notation such as 153 | `Source.URL` which was, unfortunately, later mixed with the Debian 154 | notation such as `Build-System`. To make the syntax consistent all 155 | keys are now defined using the Debian notation (so `Source-URL`). 156 | The `R` notation is still accepted (i.e., any `.` in the keys is 157 | treated as `-`), but deprecated. 158 | 159 | ### Building 160 | 161 | Currently the build steps are 162 | 163 | * download source tar ball 164 | * unpack the tar ball 165 | * move the contents to a directory with fixed naming scheme `-` 166 | * if a `.patch` file exists, it will be applied with `-p1` 167 | * create a build object directory `--obj` 168 | * configure in the object directory using all the accumulated flags 169 | from the recipe 170 | * run `make -j12` 171 | * run `make install` with `DESTDIR` set to `--dst` 172 | * change the ownership of content inside `DESTDIR` to 0:0 173 | (unless `tar` supports `--uid`/`--gid` flags - bsdtar does) 174 | * package `${prefix}` inside the destination into a tar ball 175 | * unpack the tar ball in the system location 176 | 177 | Each dependency has to succeed in all the steps above before the next 178 | recipe is used. Makefile is used to determine the dependencies between 179 | the recipes. 180 | 181 | Note: `pkgconfig` system stubs are expected to exist for system 182 | libraries such that they can be used as dependencies by `pkgconfig`. 183 | Some versions of macOS include them, but others may require manual 184 | installation. Most recent macOS versions don't allow stubs in system 185 | location since it is read-only, so adding an alternative path to 186 | `PKG_CONFIG_PATH` may be required. The `build.sh` script automatically 187 | adds the system stubs shipped with the recipes to `PKG_CONFIG_PATH`. 188 | To ensure compatibility the 189 | [sys-stubs](https://github.com/R-macos/recipes/blob/master/recipes/sys-stubs) 190 | recipe provides a package which installs the system stubs (see 191 | [pkgconfig-sys-stubs](https://github.com/R-macos/pkgconfig-sys-stubs) 192 | for the source). 193 | 194 | ### Environment Variables 195 | 196 | The `mkmk.R` script will respect the following environment variables: 197 | 198 | * `TAR` path to the `tar` program. Note that the build system assumes 199 | a tar version that is smart enough to handle all common compression 200 | formats (`gzip`, `bzip2`, `xz`) automatically (i.e., GNU tar does 201 | __not__ work -- if in doubt, download the `bsdtar` binary from 202 | https://mac.r-project.org/bin). 203 | 204 | * `PREFIX` defaults to `usr/local` and is the prefix for all builds. 205 | Note that no special effort is made for packages to respect that 206 | prefix at compile/link time, it is only passed to `--prefix` and 207 | used to package the final tar ball. The recipes can use 208 | `${prefix}` (exact match) to substitute for the _relative_ prefix 209 | path (i.e., without the leading `/`). This is not done at the shell 210 | level, but rather a substitution when generating the `Makefile`. 211 | The `PREFIX` variable is available both at shell level and to the 212 | make commands by default. 213 | 214 | * `NOSUDO` if set to 1 `sudo` will not be used in the 215 | unpacking step. This is mainly useful for user-space 216 | installations when setting `PREFIX` to a location owned by the 217 | user. 218 | 219 | * `PERL` command to run `perl` interprerter. Defaults to `perl`. 220 | 221 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | osname=`uname -s` 4 | osarch=`uname -m` 5 | 6 | ## it is too tedious to maintain two paths, so Perl generator is now 7 | ## default (since it's required for bootstrap anyway) and R is deprecated 8 | : ${PERL=$(command -v perl)} 9 | 10 | args=($@) 11 | for ((i=1;i<=$#;i++)); do 12 | case "x${!i}" in 13 | x--) unset args[$i-1]; break;; 14 | x-f) FORCE=1; unset args[$i-1];; 15 | x-b) BINARY=1; unset args[$i-1];; ## defunct 16 | x-x) USEX11=1; unset args[$i-1];; ## not documented, macOS only 17 | x-p) PERL=$(command -v perl); unset args[$i-1]; if [ -z "$PERL" ]; then PERL=perl; fi;; 18 | x-h) 19 | echo '' 20 | echo " Usage: $0 [-f] [-h] [[--] ...]" 21 | echo '' 22 | echo ' -f - create builds/Makefile even if it exists' 23 | echo ' -- - any further arguments are passed ann not interpreted' 24 | echo ' -h - this help page' 25 | echo ' ... additional arguments passed to make' 26 | echo '' 27 | echo 'The builds are performed in the "builds" subdirectory' 28 | echo '' 29 | exit 0;; 30 | esac 31 | done 32 | 33 | if [ -n "$BINARY" ]; then 34 | echo 'ERROR: Binary installs are no longer supported by this script.' 35 | echo ' Please use https://mac.R-project.org/bin/install.R' 36 | exit 1 37 | fi 38 | 39 | ## auto-detect PREFIX if not specified 40 | if [ -z "$PREFIX" -a x$OSARCH = xarm64 -a x$osname = xDarwin ]; then 41 | PREFIX=opt/R/arm64 42 | fi 43 | if [ -z "$PREFIX" ]; then 44 | if [ -e "/opt/R/$osarch" ]; then 45 | PREFIX="opt/R/$osarch" 46 | else 47 | if [ x$osname = xDarwin ]; then 48 | echo '' 49 | echo "*** WARNING: you are using /usr/local as prefix, this is strongly discuraged" 50 | echo " as it tends to conflict with other package managers on macOS." 51 | echo " Consider creating /opt/R/$osarch instead:" 52 | echo '' 53 | echo " sudo mkdir -p /opt/R/$osarch" 54 | echo " sudo chown \$USER /opt/R/$osarch" 55 | echo '' 56 | fi 57 | PREFIX=usr/local 58 | fi 59 | fi 60 | 61 | ## fall back to CMake.app if necessary 62 | if [ -e /Applications/CMake.app/Contents/bin/cmake ]; then 63 | PATH=$PATH:/Applications/CMake.app/Contents/bin 64 | fi 65 | 66 | ## make sure prefix is first on the PATH 67 | export PATH=/$PREFIX/bin:/$PREFIX/sbin:$PATH 68 | 69 | ## make sure there are no leading slashes 70 | PREFIX=`echo $PREFIX | sed 's:^/*::'` 71 | 72 | ## $PREFIX paths have to be in the flags except for /usr and /usr/local 73 | if [ /"$PREFIX" != /usr/local -a "/$PREFIX" != /usr ]; then 74 | if [ -z "$CPPFLAGS" ]; then 75 | export CPPFLAGS="-I/$PREFIX/include" 76 | fi 77 | if [ -z "$LDFLAGS" ]; then 78 | export LDFLAGS="-L/$PREFIX/lib" 79 | fi 80 | fi 81 | 82 | echo "Building for $osname ($osarch):" 83 | echo "install prefix: /$PREFIX" 84 | 85 | export PREFIX 86 | 87 | if [ ! -e "/$PREFIX/bin" ]; then 88 | mkdir -p "/$PREFIX/bin" 2> /dev/null ## ok to fail, we deal with sudo later 89 | fi 90 | 91 | if touch /$PREFIX/bin/.1; then 92 | echo "sudo not required" 93 | export NOSUDO=1 94 | rm /$PREFIX/bin/.1 95 | else 96 | if [ -n "$NOSUDO" ]; then 97 | echo "ERROR: NOSUDO is set, but /$PREFIX is not writable!" >&2 98 | exit 1 99 | fi 100 | echo "sudo required for installation" 101 | fi 102 | 103 | ## if -f is used we re-build the Makefile regardless 104 | if [ -n "$FORCE" ]; then 105 | rm -f build/Makefile 106 | fi 107 | 108 | ## need to create Makefile? 109 | if [ ! -e build/Makefile ]; then 110 | if [ -n "$PERL" ]; then 111 | RUN="$PERL scripts/mkmk.pl" 112 | echo "Using Perl generator ($PERL)" 113 | else 114 | echo "ERROR: Perl not found. Set PERL if in a non-standard location." 115 | exit 1 116 | fi 117 | 118 | if $RUN; then 119 | echo 'build/Makefile created.' 120 | echo '' 121 | else 122 | echo "ERROR: Makefile generation failed" >&2 123 | exit 1 124 | fi 125 | fi 126 | 127 | if [ x"$osname" = xDarwin ]; then 128 | PWD=`pwd` 129 | ## we are now providing stubs as a recipe so this should no longer be needed 130 | export PKG_CONFIG_PATH=/$PREFIX/lib/pkgconfig:/$PREFIX/share/pkgconfig:$PWD/stubs/pkgconfig-darwin:/usr/lib/pkgconfig 131 | if [ -n "$USEX11" -a -e /usr/X11/lib/pkgconfig ]; then 132 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/X11/lib/pkgconfig:/usr/X11/share/pkgconfig" 133 | fi 134 | fi 135 | 136 | set -e 137 | make -C build "${args[@]}" 138 | -------------------------------------------------------------------------------- /other/tcltk/README.md: -------------------------------------------------------------------------------- 1 | ## Tcl/Tk Build Scripts 2 | 3 | This directory contains build scripts used to build Tcl/Tk X11 4 | binaries as shipped with the CRAN builds of R. They are not included in 5 | recipes (yet), partially because they require special setup which 6 | does not include any libraries from recipes, but instead uses XQuartz 7 | dynamic libraries to avoid conflicts. 8 | 9 | The scripts will build for `/opt/R/` location (where 10 | _``_ is either `arm64` or `x86_64` depending on the machine) using 11 | X11 build of Tk linked against XQuartz with Xft support. Each script 12 | generates one tar ball, there are separate scripts for Tcl, Tk and 13 | TkTable and must be run in that order. The resulting tree (as expected 14 | by the aux.sh script in the R4 packaging system) is created 15 | by simply unpacking all three tar balls into the tcltk-8.6 16 | directory of the packaging system. 17 | 18 | -- 19 | Last updated: 2022-04-18 by Simon Urbanek 20 | -------------------------------------------------------------------------------- /other/tcltk/Tktable2.10.patch: -------------------------------------------------------------------------------- 1 | diff -ru Tktable2.10/generic/tkTableTag.c Tktable2.10-1/generic/tkTableTag.c 2 | --- Tktable2.10/generic/tkTableTag.c 2008-11-15 11:46:57.000000000 +1300 3 | +++ Tktable2.10-1/generic/tkTableTag.c 2021-09-11 16:56:46.000000000 +1200 4 | @@ -212,7 +212,7 @@ 5 | TableJoinTag *jtagPtr = (TableJoinTag *) tagPtr; 6 | 7 | if (jtagPtr->magic != 0x99ABCDEF) { 8 | - panic("bad mojo in TableResetTag"); 9 | + Tcl_Panic("bad mojo in TableResetTag"); 10 | } 11 | 12 | memset((VOID *) jtagPtr, 0, sizeof(TableJoinTag)); 13 | @@ -269,7 +269,7 @@ 14 | unsigned int prio; 15 | 16 | if (jtagPtr->magic != 0x99ABCDEF) { 17 | - panic("bad mojo in TableMergeTag"); 18 | + Tcl_Panic("bad mojo in TableMergeTag"); 19 | } 20 | 21 | #ifndef NO_TAG_PRIORITIES 22 | @@ -432,7 +432,7 @@ 23 | if (bottom) { *bottom = tagPtr->bd[3]; } 24 | break; 25 | default: 26 | - panic("invalid border value '%d'\n", tagPtr->borders); 27 | + Tcl_Panic("invalid border value '%d'\n", tagPtr->borders); 28 | break; 29 | } 30 | return tagPtr->borders; 31 | diff -ru Tktable2.10/generic/tkTableUtil.c Tktable2.10-1/generic/tkTableUtil.c 32 | --- Tktable2.10/generic/tkTableUtil.c 2002-10-16 20:31:48.000000000 +1300 33 | +++ Tktable2.10-1/generic/tkTableUtil.c 2021-09-11 16:56:46.000000000 +1200 34 | @@ -105,7 +105,7 @@ 35 | bordersPtr = &(tagPtr->borders); 36 | bdPtr = tagPtr->bd; 37 | } else { 38 | - panic("invalid type given to TableOptionBdSet\n"); 39 | + Tcl_Panic("invalid type given to TableOptionBdSet\n"); 40 | return TCL_ERROR; /* lint */ 41 | } 42 | 43 | @@ -188,7 +188,7 @@ 44 | } else if (type == BD_TABLE_WIN) { 45 | return ((TableEmbWindow *) widgRec)->borderStr; 46 | } else { 47 | - panic("invalid type given to TableOptionBdSet\n"); 48 | + Tcl_Panic("invalid type given to TableOptionBdSet\n"); 49 | return NULL; /* lint */ 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /other/tcltk/build-tcl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VER=8.6.13 4 | OSVER=`uname -r | sed -E 's:^([0-9]+\.[0-9]+)\..*:\1:'` 5 | ARCH=`uname -m` 6 | 7 | curl -LO https://downloads.sourceforge.net/project/tcl/Tcl/${VER}/tcl${VER}-src.tar.gz 8 | tar fxz tcl${VER}-src.tar.gz 9 | 10 | export CC=clang 11 | export CXX=clang++ 12 | export PREFIX=/opt/R/${ARCH} 13 | export PATH=/opt/R/${ARCH}/bin:$PATH 14 | 15 | WD="`pwd`" 16 | cd tcl${VER}/unix 17 | 18 | ./configure --prefix=/opt/R/${ARCH} --disable-corefoundation --disable-framework 19 | make -j12 && make install DESTDIR="$WD/dst-tcl" 20 | 21 | cd "$WD" 22 | chmod -R g+w dst-tcl 23 | 24 | tar fcz tcl${VER}-darwin${OSVER}-${ARCH}.tar.gz -C dst-tcl --gid 80 --uid 0 opt/R/${ARCH} 25 | -------------------------------------------------------------------------------- /other/tcltk/build-tk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VER=8.6.13 4 | OSVER=`uname -r | sed -E 's:^([0-9]+\.[0-9]+)\..*:\1:'` 5 | ARCH=`uname -m` 6 | 7 | if [ ! -e tk${VER}-src.tar.gz ]; then 8 | curl -LO https://downloads.sourceforge.net/project/tcl/Tcl/${VER}/tk${VER}-src.tar.gz 9 | fi 10 | rm -rf tk${VER} 11 | tar fxz tk${VER}-src.tar.gz 12 | 13 | ## we have to add missing .pc files for XQuartz 14 | if [ ! -e pkgconfig/xproto.pc ]; then 15 | patch -p1 < pkgconfig.patch 16 | fi 17 | 18 | # no, we have to buidl against XQuartz 19 | #export CPPFLAGS=-I/opt/R/${ARCH}/include 20 | #export LDFLAGS=-L/opt/R/${ARCH}/lib 21 | # not yet # export CFLAGS="-arch ${ARCH} -arch x86_64" 22 | export CC=clang 23 | export CXX=clang++ 24 | export PREFIX=/opt/R/${ARCH} 25 | export PATH=/opt/R/${ARCH}/bin:$PATH 26 | 27 | WD="`pwd`" 28 | cd tk${VER}/unix 29 | 30 | export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig:$WD/pkgconfig:/opt/R/${ARCH}/lib/pkgconfig:/usr/lib/pkgconfig 31 | 32 | ./configure --prefix=/opt/R/${ARCH} --disable-corefoundation --disable-framework --disable-aqua --enable-xft 33 | make -j12 && make install DESTDIR="$WD/dst-tk" 34 | 35 | cd "$WD" 36 | 37 | chmod -R g+w dst-tk 38 | ## tk uses invalid ID, need to fix it... 39 | install_name_tool -id /opt/R/${ARCH}/lib/libtk8.6.dylib dst-tk/opt/R/${ARCH}/lib/libtk8.6.dylib 40 | tar fcz tk${VER}-xft-darwin${OSVER}-${ARCH}.tar.gz -C dst-tk --gid 80 --uid 0 opt/R/${ARCH} 41 | -------------------------------------------------------------------------------- /other/tcltk/build-tktable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VER=2.10 4 | OSVER=`uname -r | sed -E 's:^([0-9]+\.[0-9]+)\..*:\1:'` 5 | ARCH=`uname -m` 6 | 7 | curl -LO https://cfhcable.dl.sourceforge.net/project/tktable/tktable/2.10/Tktable2.10.tar.gz #https://fossies.org/linux/privat/Tktable${VER}.tar.gz 8 | tar fxz Tktable${VER}.tar.gz 9 | (cd Tktable${VER} && patch -p1 < ../Tktable${VER}.patch) 10 | 11 | export PATH=/opt/R/${ARCH}/bin:$PATH 12 | 13 | WD="`pwd`" 14 | cd Tktable${VER} 15 | ./configure 16 | make -j12 && make install DESTDIR="$WD/dst-tkt" 17 | 18 | cd "$WD" 19 | chmod -R g+w dst-tkt 20 | 21 | tar fcz tktable${VER}-darwin${OSVER}-${ARCH}.tar.gz -C dst-tkt --gid 80 --uid 0 opt/R/${ARCH} 22 | -------------------------------------------------------------------------------- /other/tcltk/pkgconfig.patch: -------------------------------------------------------------------------------- 1 | diff -ruN 0/pkgconfig/kbproto.pc 1/pkgconfig/kbproto.pc 2 | --- 0/pkgconfig/kbproto.pc 1970-01-01 12:00:00.000000000 +1200 3 | +++ 1/pkgconfig/kbproto.pc 2021-11-16 11:21:21.000000000 +1300 4 | @@ -0,0 +1,9 @@ 5 | +prefix=/opt/X11 6 | +exec_prefix=${prefix} 7 | +libdir=${exec_prefix}/lib 8 | +includedir=${prefix}/include 9 | + 10 | +Name: KBProto 11 | +Description: KB extension headers 12 | +Version: 1.0.7 13 | +Cflags: -I${includedir} 14 | diff -ruN 0/pkgconfig/renderproto.pc 1/pkgconfig/renderproto.pc 15 | --- 0/pkgconfig/renderproto.pc 1970-01-01 12:00:00.000000000 +1200 16 | +++ 1/pkgconfig/renderproto.pc 2021-11-16 11:21:21.000000000 +1300 17 | @@ -0,0 +1,9 @@ 18 | +prefix=/opt/X11 19 | +exec_prefix=${prefix} 20 | +libdir=${exec_prefix}/lib 21 | +includedir=${prefix}/include 22 | + 23 | +Name: RenderProto 24 | +Description: Render extension headers 25 | +Version: 0.11.1 26 | +Cflags: -I${includedir} 27 | diff -ruN 0/pkgconfig/xproto.pc 1/pkgconfig/xproto.pc 28 | --- 0/pkgconfig/xproto.pc 1970-01-01 12:00:00.000000000 +1200 29 | +++ 1/pkgconfig/xproto.pc 2021-11-16 11:21:21.000000000 +1300 30 | @@ -0,0 +1,10 @@ 31 | +prefix=/opt/X11 32 | +exec_prefix=${prefix} 33 | +libdir=${exec_prefix}/lib 34 | +includedir=${prefix}/include 35 | +includex11dir=${prefix}/include/X11 36 | + 37 | +Name: Xproto 38 | +Description: Xproto headers 39 | +Version: 7.0.31 40 | +Cflags: -I${includedir} 41 | -------------------------------------------------------------------------------- /recipes/QuantLib: -------------------------------------------------------------------------------- 1 | Package: QuantLib 2 | Depends: boost 3 | Version: 1.35 4 | Source-URL: https://github.com/lballabio/QuantLib/releases/download/v${ver}/QuantLib-${ver}.tar.gz 5 | Source-SHA256: fd83657bbc69d8692065256699b7424d5a606dff03e7136a820b6e9675016c89 6 | -------------------------------------------------------------------------------- /recipes/apr: -------------------------------------------------------------------------------- 1 | Package: apr 2 | Version: 1.7.3 3 | Source-URL: https://archive.apache.org/dist/apr/apr-${ver}.tar.bz2 4 | Source-SHA256: 455e218c060c474f2c834816873f6ed69c0cf0e4cfee54282cc93e8e989ee59e 5 | -------------------------------------------------------------------------------- /recipes/apr-util: -------------------------------------------------------------------------------- 1 | Package: apr-util 2 | Version: 1.6.3 3 | Depends: apr, pkgconfig, openssl 4 | Source-URL: https://archive.apache.org/dist/apr/apr-util-${ver}.tar.bz2 5 | Source-SHA256: a41076e3710746326c3945042994ad9a4fcac0ce0277dd8fea076fec3c9772b5 6 | Configure: --with-apr=/${PREFIX} --with-crypto --with-openssl=/${PREFIX} 7 | -------------------------------------------------------------------------------- /recipes/autoconf: -------------------------------------------------------------------------------- 1 | Package: autoconf 2 | Version: 2.72 3 | Depends: m4 4 | Source-URL: https://ftp.gnu.org/gnu/autoconf/autoconf-${ver}.tar.gz 5 | Source-SHA256: afb181a76e1ee72832f6581c0eddf8df032b83e2e0239ef79ebedc4467d92d6e 6 | -------------------------------------------------------------------------------- /recipes/automake: -------------------------------------------------------------------------------- 1 | Package: automake 2 | Version: 1.17 3 | Depends: autoconf (>= 2.69) 4 | Source-URL: https://ftp.gnu.org/gnu/automake/automake-${ver}.tar.gz 5 | Source-SHA256: 397767d4db3018dd4440825b60c64258b636eaf6bf99ac8b0897f06c89310acd 6 | -------------------------------------------------------------------------------- /recipes/bdb: -------------------------------------------------------------------------------- 1 | Package: bdb 2 | Version: 6.2.23 3 | Source-URL: http://download.oracle.com/berkeley-db/db-6.2.23.tar.gz 4 | Source-SHA256: 47612c8991aa9ac2f6be721267c8d3cdccf5ac83105df8e50809daea24e95dc7 5 | Configure.script: dist/configure 6 | Configure: --prefix=/${prefix} --enable-stl --disable-shared --enable-static --with-pic 7 | -------------------------------------------------------------------------------- /recipes/bdb.patch: -------------------------------------------------------------------------------- 1 | Only in bdb-6.2.23-1: db-6.2.23 2 | diff -ru bdb-6.2.23/dist/configure bdb-6.2.23-1/dist/configure 3 | --- bdb-6.2.23/dist/configure 2016-03-29 08:45:49 4 | +++ bdb-6.2.23-1/dist/configure 2024-07-25 13:53:13 5 | @@ -19380,13 +19380,13 @@ 6 | class TLSClass2 { 7 | public: static $ax_tls_decl_keyword int tlsvar; 8 | }; 9 | - template $ax_tls_defn_keyword T* TLSClass::tlsvar = NULL; 10 | + template $ax_tls_defn_keyword T* TLSClass::tlsvar = 0; 11 | $ax_tls_defn_keyword int TLSClass2::tlsvar = 1; 12 | static $ax_tls_decl_keyword int x = 0; 13 | int 14 | main () 15 | { 16 | -TLSClass::tlsvar = NULL; TLSClass2::tlsvar = 1; 17 | +TLSClass::tlsvar = 0; TLSClass2::tlsvar = 1; 18 | ; 19 | return 0; 20 | } 21 | diff -ru bdb-6.2.23/src/dbinc/atomic.h bdb-6.2.23-1/src/dbinc/atomic.h 22 | --- bdb-6.2.23/src/dbinc/atomic.h 2016-03-29 08:45:54 23 | +++ bdb-6.2.23-1/src/dbinc/atomic.h 2024-07-25 13:49:02 24 | @@ -70,7 +70,9 @@ 25 | * These have no memory barriers; the caller must include them when necessary. 26 | */ 27 | #define atomic_read(p) ((p)->value) 28 | +#if ! defined(__cplusplus) /* atomic_init is invalid in c++ */ 29 | #define atomic_init(p, val) ((p)->value = (val)) 30 | +#endif 31 | 32 | #ifdef HAVE_ATOMIC_SUPPORT 33 | 34 | -------------------------------------------------------------------------------- /recipes/blosc: -------------------------------------------------------------------------------- 1 | Package: blosc 2 | Version: 1.21.6 3 | Source-URL: https://github.com/Blosc/c-blosc/archive/refs/tags/v${ver}.tar.gz 4 | Source-SHA256: 9fcd60301aae28f97f1301b735f966cc19e7c49b6b4321b839b4579a0c156f38 5 | Depends: lz4, zstd 6 | Build-system: cmake 7 | Configure: -DBUILD_STATIC=ON -DBUILD_SHARED=OFF -DCMAKE_BUILD_TYPE="Release" -DPREFER_EXTERNAL_LZ4=ON -DPREFER_EXTERNAL_ZLIB=ON -DPREFER_EXTERNAL_ZSTD=ON -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF 8 | -------------------------------------------------------------------------------- /recipes/blosc.patch: -------------------------------------------------------------------------------- 1 | diff -ru blosc-1.21.6/blosc.pc.in blosc-1.21.6-1/blosc.pc.in 2 | --- blosc-1.21.6/blosc.pc.in 2024-06-25 03:56:17 3 | +++ blosc-1.21.6-1/blosc.pc.in 2025-02-03 13:51:56 4 | @@ -9,6 +9,6 @@ 5 | URL: https://blosc.org/ 6 | Version: @BLOSC_VERSION_STRING@ 7 | 8 | -Requires: 9 | +Requires: libzstd, liblz4, zlib 10 | Libs: -L${libdir} -L${sharedlibdir} -lblosc 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /recipes/boost: -------------------------------------------------------------------------------- 1 | Package: boost 2 | Version: 1.86.0 3 | Source-URL: https://downloads.sourceforge.net/project/boost/boost/${ver}/boost_1_86_0.tar.bz2 4 | Source-SHA256: 1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b 5 | Configure.driver: sh 6 | -------------------------------------------------------------------------------- /recipes/boost.patch: -------------------------------------------------------------------------------- 1 | diff -Nru test_0.0/configure xx/configure 2 | --- test_0.0/configure 1969-12-31 19:00:00.000000000 -0500 3 | +++ xx/configure 2020-05-28 14:22:40.000000000 -0400 4 | @@ -0,0 +1,16 @@ 5 | +#!/bin/sh 6 | + 7 | +src=`dirname $0` 8 | + 9 | +cat << EOF >> Makefile 10 | +all: 11 | + 12 | +install: 13 | + echo Installing from $src to \$(DESTDIR)/\$(PREFIX) 14 | + echo Current directory $PWD 15 | + mkdir -p \$(DESTDIR)/\$(PREFIX) 16 | + mv ${src}/* . 17 | + ./bootstrap.sh --prefix=\$(DESTDIR)/\$(PREFIX) 18 | + ./b2 --prefix=\$(DESTDIR)/\$(PREFIX) toolset=clang-darwin link=static cxxflags='-Wall -g -O2 -fPIC -fvisibility=hidden' cflags='-Wall -g -O2 -fPIC -fvisibility=hidden' install 19 | + 20 | +EOF 21 | -------------------------------------------------------------------------------- /recipes/bsdtar: -------------------------------------------------------------------------------- 1 | Package: bsdtar 2 | Description: This package is a subset of libarchive, only installing static bsdtar and bsdcat tools 3 | Version: 3.7.7 4 | Depends: libb2, xz, lz4, zstd 5 | Source-URL: https://github.com/libarchive/libarchive/releases/download/v${ver}/libarchive-${ver}.tar.xz 6 | Source-SHA256: 879acd83c3399c7caaee73fe5f7418e06087ab2aaf40af3e99b9e29beb29faee 7 | Distribution.files: ${prefix}/bin/bsdtar ${prefix}/bin/bsdcat 8 | -------------------------------------------------------------------------------- /recipes/cairo: -------------------------------------------------------------------------------- 1 | Package: cairo 2 | Version: 1.17.6 3 | Source-URL: https://download.gnome.org/sources/cairo/1.17/cairo-${ver}.tar.xz 4 | Source-SHA256: 4eebc4c2bad0402bc3f501db184417094657d111fb6c06f076a82ea191fe1faf 5 | Depends: freetype (>= 2.1.9), fontconfig, libpng, pixman (>= 0.30.0) 6 | Configure.darwin: --disable-quartz-font --disable-quartz --disable-quartz-image --disable-qt --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib 7 | -------------------------------------------------------------------------------- /recipes/cgl: -------------------------------------------------------------------------------- 1 | Package: cgl 2 | Version: 0.60.6 3 | Depends: clp 4 | Source-URL: https://github.com/coin-or/Cgl/archive/refs/tags/releases/${ver}.tar.gz 5 | Source-SHA256: 9e2c51ffad816ab408763d6b931e2a3060482ee4bf1983148969de96d4b2c9ce 6 | -------------------------------------------------------------------------------- /recipes/clp: -------------------------------------------------------------------------------- 1 | Package: clp 2 | Version: 1.17.7 3 | Depends: osi 4 | Source-URL: https://github.com/coin-or/Clp/archive/refs/tags/releases/${ver}.tar.gz 5 | Source-SHA256: c4c2c0e014220ce8b6294f3be0f3a595a37bef58a14bf9bac406016e9e73b0f5 6 | -------------------------------------------------------------------------------- /recipes/clp.patch: -------------------------------------------------------------------------------- 1 | --- clp-1.17.6/Clp/clp.pc.in 2020-04-11 16:51:55.000000000 +0100 2 | +++ clp-1.17.6/Clp/clp.pc.in.new 2021-11-16 07:57:18.000000000 +0000 3 | @@ -7,6 +7,6 @@ 4 | Description: COIN-OR Linear Programming Solver 5 | URL: https://projects.coin-or.org/Clp 6 | Version: @PACKAGE_VERSION@ 7 | -Libs: -L${libdir} -lClpSolver -lClp @CLPLIB_PCLIBS@ 8 | +Libs: -L${libdir} -lClpSolver -lClp @CLPLIB_PCLIBS@ -lc++ 9 | Cflags: -I${includedir} 10 | Requires: @CLPLIB_PCREQUIRES@ 11 | --- clp-1.17.6/Clp/src/Clp_C_Interface.cpp~ 2020-04-11 16:51:55.000000000 +0100 12 | +++ clp-1.17.6/Clp/src/Clp_C_Interface.cpp 2021-11-16 08:39:04.000000000 +0000 13 | @@ -375,14 +375,14 @@ 14 | model->model_->chgObjCoefficients(objIn); 15 | } 16 | /* Change matrix coefficients */ 17 | -#if (defined(__cplusplus) && __cplusplus >= 199901L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) 18 | +//#if (defined(__cplusplus) && __cplusplus >= 199901L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) 19 | COINLIBAPI void COINLINKAGE 20 | Clp_modifyCoefficient(Clp_Simplex *model, int row, int column, double newElement, 21 | bool keepZero) 22 | { 23 | model->model_->modifyCoefficient(row, column, newElement, keepZero); 24 | } 25 | -#endif 26 | +//#endif 27 | /* Drops names - makes lengthnames 0 and names empty */ 28 | COINLIBAPI void COINLINKAGE 29 | Clp_dropNames(Clp_Simplex *model) 30 | -------------------------------------------------------------------------------- /recipes/coinutils: -------------------------------------------------------------------------------- 1 | Package: coinutils 2 | Version: 2.11.6 3 | Source-URL: https://github.com/coin-or/CoinUtils/archive/refs/tags/releases/${ver}.tar.gz 4 | Source-SHA256: 6ea31d5214f7eb27fa3ffb2bdad7ec96499dd2aaaeb4a7d0abd90ef852fc79ca 5 | -------------------------------------------------------------------------------- /recipes/dylp: -------------------------------------------------------------------------------- 1 | Package: dylp 2 | Version: 1.10.4 3 | Depends: osi 4 | Source-URL: https://github.com/coin-or/DyLP/archive/refs/tags/releases/1.10.4.tar.gz 5 | Source-SHA256: 5825bede088d78af772cb9a348d10032895d824461c8d22dbd76a70caa8b5b00 6 | -------------------------------------------------------------------------------- /recipes/dylp.patch: -------------------------------------------------------------------------------- 1 | diff -ru dylp-1.10.4/DyLP/configure dylp-1.10.4-1/DyLP/configure 2 | --- dylp-1.10.4/DyLP/configure 2019-02-23 11:11:58.000000000 +1300 3 | +++ dylp-1.10.4-1/DyLP/configure 2021-10-03 18:05:52.000000000 +1300 4 | @@ -25664,7 +25664,7 @@ 5 | 6 | { echo "$as_me:$LINENO: Checking for proper name for isfinite()." >&5 7 | echo "$as_me: Checking for proper name for isfinite()." >&6;} 8 | - ac_name_of_isfinite="unavailable" 9 | + ac_name_of_isfinite="isfinite" 10 | echo "$as_me:$LINENO: checking for finite" >&5 11 | echo $ECHO_N "checking for finite... $ECHO_C" >&6 12 | if test "${ac_cv_func_finite+set}" = set; then 13 | @@ -25969,7 +25969,7 @@ 14 | 15 | { echo "$as_me:$LINENO: Checking for proper name for isnan()." >&5 16 | echo "$as_me: Checking for proper name for isnan()." >&6;} 17 | - ac_name_of_isnan="unavailable" 18 | + ac_name_of_isnan="isnan" 19 | echo "$as_me:$LINENO: checking for isnan" >&5 20 | echo $ECHO_N "checking for isnan... $ECHO_C" >&6 21 | if test "${ac_cv_func_isnan+set}" = set; then 22 | -------------------------------------------------------------------------------- /recipes/emacs: -------------------------------------------------------------------------------- 1 | Package: emacs 2 | Version: 28.2 3 | Depends: pkgconfig 4 | Source-URL: http://ftp.gnu.org/gnu/emacs/emacs-${ver}.tar.xz 5 | Source-SHA256: ee21182233ef3232dc97b486af2d86e14042dbb65bbc535df562c3a858232488 6 | Configure.darwin: --with-x-toolkit=no --without-all --without-x --without-toolkit-scroll-bars --without-ns --with-threads --with-modules 7 | -------------------------------------------------------------------------------- /recipes/expat: -------------------------------------------------------------------------------- 1 | Package: expat 2 | Version: 2.6.4 3 | Source-URL: https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-${ver}.tar.bz2 4 | Source-SHA256: 8dc480b796163d4436e6f1352e71800a774f73dbae213f1860b60607d2a83ada 5 | Build-system: cmake 6 | -------------------------------------------------------------------------------- /recipes/ffi: -------------------------------------------------------------------------------- 1 | Package: ffi 2 | Version: 3.4.2 3 | Source-URL: https://github.com/libffi/libffi/releases/download/v${ver}/libffi-${ver}.tar.gz 4 | Source-SHA256: 540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620 5 | -------------------------------------------------------------------------------- /recipes/fftw: -------------------------------------------------------------------------------- 1 | Package: fftw 2 | Version: 3.3.10 3 | Source-URL: http://www.fftw.org/fftw-${ver}.tar.gz 4 | Source-SHA256: 56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467 5 | -------------------------------------------------------------------------------- /recipes/fftw-s: -------------------------------------------------------------------------------- 1 | #NOTE: this is a copy of fftw compiled in single-precision and --enable-type-prefix, see http://www.fftw.org/fftw3_doc/Precision.html -- it registers as "fftw3f" for cmake and pkgconfig 2 | Package: fftw-s 3 | Version: 3.3.10 4 | Depends: fftw 5 | Source-URL: http://www.fftw.org/fftw-${ver}.tar.gz 6 | Source-SHA256: 56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467 7 | Configure: --enable-type-prefix --enable-float 8 | Distribution-files: ${prefix}/lib 9 | -------------------------------------------------------------------------------- /recipes/flac: -------------------------------------------------------------------------------- 1 | Package: flac 2 | Version: 1.4.3 3 | Source-URL: https://downloads.xiph.org/releases/flac/flac-${ver}.tar.xz 4 | Source-SHA256: 6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70 5 | Depends: libogg 6 | -------------------------------------------------------------------------------- /recipes/flint: -------------------------------------------------------------------------------- 1 | Package: flint 2 | Version: 3.1.3-p1 3 | Source-URL: https://github.com/flintlib/flint/releases/download/v${ver}/flint-${ver}.tar.gz 4 | Source-SHA256: 96637ba9de43397d06657deefe8e6dee9d226992b5526bb1c9a9d563b983e027 5 | Depends: mpfr (>= 4.1.0), gmp (>= 6.2.1) 6 | Special: in-sources 7 | -------------------------------------------------------------------------------- /recipes/flint.patch: -------------------------------------------------------------------------------- 1 | diff -ruN flint-3.1.3-p1/src/double_interval.h flint-3.1.3-p1-patched/src/double_interval.h 2 | --- flint-3.1.3-p1/src/double_interval.h 2024-04-25 17:00:25 3 | +++ flint-3.1.3-p1-patched/src/double_interval.h 2024-08-28 10:47:50 4 | @@ -183,6 +183,7 @@ 5 | di_t arb_get_di(const arb_t x); 6 | void arb_set_di(arb_t res, di_t x, slong prec); 7 | 8 | +static 9 | DOUBLE_INTERVAL_INLINE 10 | double d_randtest2(flint_rand_t state) 11 | { 12 | -------------------------------------------------------------------------------- /recipes/fontconfig: -------------------------------------------------------------------------------- 1 | Package: fontconfig 2 | Version: 2.14.2 3 | Source-URL: https://www.freedesktop.org/software/fontconfig/release/fontconfig-${ver}.tar.xz 4 | Source-SHA256: dba695b57bce15023d2ceedef82062c2b925e51f5d4cc4aef736cf13f60a468b 5 | Configure.darwin: --with-baseconfigdir=/Library/Frameworks/R.framework/Resources/fontconfig/fonts --with-cache-dir=/Library/Frameworks/R.framework/Resources/fontconfig/cache --with-default-fonts=/usr/X11/lib/X11/fonts --with-add-fonts=/System/Library/Fonts,/Library/Fonts,~/Library/Fonts --disable-libxml2 --datadir=/Library/Frameworks/R.framework/Resources/fontconfig 6 | Depends: pkgconfig, freetype (>= 2.5.5), expat 7 | -------------------------------------------------------------------------------- /recipes/freetype: -------------------------------------------------------------------------------- 1 | Package: freetype 2 | Depends: libpng, pkgconfig 3 | Version: 2.13.2 4 | Suggests: harfbuzz 5 | Source-URL: https://download.savannah.gnu.org/releases/freetype/freetype-${ver}.tar.xz 6 | Source-SHA256: 12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d 7 | Configure.darwin: --without-old-mac-fonts --without-fsspec --without-fsref --without--quickdraw-toolbox --without-quickdraw-carbon --without-ats 8 | -------------------------------------------------------------------------------- /recipes/freexl: -------------------------------------------------------------------------------- 1 | Package: freexl 2 | Version: 1.0.6 3 | Source-URL: http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-1.0.6.tar.gz 4 | Source-SHA256: 3de8b57a3d130cb2881ea52d3aa9ce1feedb1b57b7daa4eb37f751404f90fc22 5 | -------------------------------------------------------------------------------- /recipes/fribidi: -------------------------------------------------------------------------------- 1 | Package: fribidi 2 | Version: 1.0.15 3 | Depends: pkgconfig 4 | Source-URL: https://github.com/fribidi/fribidi/releases/download/v${ver}/fribidi-${ver}.tar.xz 5 | Source-SHA256: 0bbc7ff633bfa208ae32d7e369cf5a7d20d5d2557a0b067c9aa98bcbf9967587 6 | -------------------------------------------------------------------------------- /recipes/gdal: -------------------------------------------------------------------------------- 1 | Package: gdal 2 | Version: 3.8.5 3 | Depends: pkgconfig, xz, libpq, proj, openjpeg, libwebp, libgeotiff, freexl, sqlite3, expat, hdf4, hdf5, szip, netcdf, geos, unixodbc, blosc, zstd, openssl, pcre2 4 | Source-URL: https://github.com/OSGeo/gdal/releases/download/v${ver}/gdal-${ver}.tar.gz 5 | Source-SHA256: 0c865c7931c7e9bb4832f50fb53aec8676cbbaccd6e55945011b737fb89a49c2 6 | Build-system: cmake 7 | #Note: their CFLAGS/LIBS detection is broken as usual, requires flags to be manually passed from pkg-config 8 | Configure: -DCMAKE_EXE_LINKER_FLAGS="`pkg-config --static --libs libpq libwebp blosc netcdf`" -DCMAKE_C_FLAGS="`pkg-config --cflags libpq libwebp blosc netcdf`" -DCMAKE_CXX_FLAGS="`pkg-config --cflags libpq libwebp blosc netcdf`" -DGDAL_ENABLE_HDF5_GLOBAL_LOCK=NO -DGDAL_USE_OPENCL=NO -DIconv_LIBRARY=-liconv 9 | Postinstall: sed -E 's:[^ ]+/lib([^ ]+)[.]tbd:-l\1:g' < ${prefix}/lib/pkgconfig/gdal.pc > ${prefix}/lib/pkgconfig/gdal.pc.1 && mv ${prefix}/lib/pkgconfig/gdal.pc.1 ${prefix}/lib/pkgconfig/gdal.pc 10 | -------------------------------------------------------------------------------- /recipes/gdal.patch: -------------------------------------------------------------------------------- 1 | diff -ru gdal-3.10.1/cmake/template/gdal-config.in gdal-3.10.1-2/cmake/template/gdal-config.in 2 | --- gdal-3.10.1/cmake/template/gdal-config.in 2025-01-09 03:54:05 3 | +++ gdal-3.10.1-2/cmake/template/gdal-config.in 2025-02-08 23:28:02 4 | @@ -1,5 +1,5 @@ 5 | #!/bin/sh 6 | -CONFIG_LIBS="@CONFIG_LIBS@" 7 | +CONFIG_LIBS="`pkg-config --libs gdal`" 8 | CONFIG_DEP_LIBS="@CONFIG_DEP_LIBS@" 9 | CONFIG_PREFIX="@CONFIG_PREFIX@" 10 | CONFIG_CFLAGS="@CONFIG_CFLAGS@" 11 | diff -ru gdal-3.10.1/cmake/template/gdal.pc.in gdal-3.10.1-2/cmake/template/gdal.pc.in 12 | --- gdal-3.10.1/cmake/template/gdal.pc.in 2025-01-09 03:54:05 13 | +++ gdal-3.10.1-2/cmake/template/gdal.pc.in 2025-02-08 23:27:09 14 | @@ -15,3 +15,4 @@ 15 | Libs: ${CONFIG_INST_LIBS} 16 | Libs.private: @CONFIG_DEP_LIBS@ 17 | Cflags: ${CONFIG_INST_CFLAGS} 18 | +Requires.private: libpq libtiff-4 netcdf 19 | diff -ru gdal-3.10.1/frmts/hdf5/CMakeLists.txt gdal-3.10.1-2/frmts/hdf5/CMakeLists.txt 20 | --- gdal-3.10.1/frmts/hdf5/CMakeLists.txt 2025-01-09 03:54:06 21 | +++ gdal-3.10.1-2/frmts/hdf5/CMakeLists.txt 2025-02-08 22:45:07 22 | @@ -94,7 +94,9 @@ 23 | target_compile_definitions(gdal_HDF5 PRIVATE -DWIN32) 24 | endif () 25 | target_include_directories(gdal_HDF5 SYSTEM PRIVATE ${HDF5_INCLUDE_DIRS}) 26 | -gdal_target_link_libraries(gdal_HDF5 PRIVATE ${HDF5_C_LIBRARIES}) 27 | +if (DEFINED HDF5_C_LIBRARIES) 28 | + gdal_target_link_libraries(gdal_HDF5 PRIVATE ${HDF5_C_LIBRARIES}) 29 | +endif () 30 | 31 | if (HDF5_BUILD_SHARED_LIBS) 32 | target_compile_definitions(gdal_HDF5 PRIVATE -DH5_BUILT_AS_DYNAMIC_LIB) 33 | -------------------------------------------------------------------------------- /recipes/geos: -------------------------------------------------------------------------------- 1 | Package: geos 2 | Version: 3.13.0 3 | Depends: pkgconfig 4 | Source-URL: http://download.osgeo.org/geos/geos-${ver}.tar.bz2 5 | Source-SHA256: 47ec83ff334d672b9e4426695f15da6e6368244214971fabf386ff8ef6df39e4 6 | Build-system: cmake 7 | -------------------------------------------------------------------------------- /recipes/gettext: -------------------------------------------------------------------------------- 1 | Package: gettext 2 | Version: 0.22.5 3 | Source-URL: https://ftp.gnu.org/pub/gnu/gettext/gettext-${ver}.tar.gz 4 | Source-SHA256: ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0 5 | Depends: texinfo 6 | Configure: --disable-java 7 | -------------------------------------------------------------------------------- /recipes/glib: -------------------------------------------------------------------------------- 1 | Package: glib 2 | Version: 2.76.1 3 | Depends: pixman, pcre, xz, libpng, ffi, gettext 4 | Build-system: meson-ninja 5 | Source-URL: https://download.gnome.org/sources/glib/2.76/glib-${ver}.tar.xz 6 | Source-SHA256: 43dc0f6a126958f5b454136c4398eab420249c16171a769784486e25f2fda19f 7 | Configure.darwin: LDFLAGS='-framework Foundation -L/${prefix}/lib -lbz2 -lpng -lz -lpixman-1 -lxml2 -llzma -liconv' 8 | 9 | -------------------------------------------------------------------------------- /recipes/glpk: -------------------------------------------------------------------------------- 1 | Package: glpk 2 | Version: 5.0 3 | Source-URL: http://ftp.gnu.org/gnu/glpk/glpk-${ver}.tar.gz 4 | Source-SHA256: 4a1013eebb50f728fc601bdd833b0b2870333c3b3e5a816eeba921d95bec6f15 5 | Depends: gmp 6 | Configure: --with-gmp 7 | -------------------------------------------------------------------------------- /recipes/gmp: -------------------------------------------------------------------------------- 1 | Package: gmp 2 | Version: 6.3.0 3 | Source-URL: https://ftp.gnu.org/gnu/gmp/gmp-${ver}.tar.xz 4 | Source-SHA256: a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 5 | Depends: m4 6 | Configure: --enable-cxx 7 | Configure.i386: ABI=32 8 | Configure.ppc: ABI=32 9 | Configure.x86_64: ABI=64 10 | Configure.darwin.x86_64: --build=westmere-apple-darwin`uname -r` 11 | Configure.ppc64: ABI=64 12 | Configure.arm64: ABI=64 13 | -------------------------------------------------------------------------------- /recipes/gsl: -------------------------------------------------------------------------------- 1 | Package: gsl 2 | Version: 2.8 3 | Source-URL: https://ftp.gnu.org/gnu/gsl/gsl-${ver}.tar.gz 4 | Source-SHA256: 6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190 5 | -------------------------------------------------------------------------------- /recipes/harfbuzz: -------------------------------------------------------------------------------- 1 | Package: harfbuzz 2 | Version: 8.5.0 3 | Depends: icu, fribidi, pkgconfig 4 | Suggests: freetype 5 | Source-URL: https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.tar.xz 6 | Source-SHA256: 77e4f7f98f3d86bf8788b53e6832fb96279956e1c3961988ea3d4b7ca41ddc27 7 | -------------------------------------------------------------------------------- /recipes/hdf4: -------------------------------------------------------------------------------- 1 | Package: hdf4 2 | Version: 4.3.0 3 | Source-URL: https://github.com/HDFGroup/hdf4/releases/download/hdf${ver}/hdf${ver}.tar.gz 4 | Source-SHA256: 282b244a819790590950f772095abcaeef405b0f17d2ee1eb5039da698cf938b 5 | Depends: jpeg, szip 6 | Configure: --enable-build-mode=production --enable-hdf4-xdr --with-szip --disable-netcdf --disable-fortran LIBS=-L/${prefix}/lib 7 | Configure.darwin.20: CFLAGS='-Wno-implicit-function-declaration' 8 | Configure.darwin.21: CFLAGS='-Wno-implicit-function-declaration' 9 | -------------------------------------------------------------------------------- /recipes/hdf5: -------------------------------------------------------------------------------- 1 | Package: hdf5 2 | Version: 1.14.5 3 | Source-URL: https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/downloads/hdf5-${ver}.tar.gz 4 | Source-SHA256: ec2e13c52e60f9a01491bb3158cb3778c985697131fc6a342262d32a26e58e44 5 | Depends: szip, jpeg 6 | Configure: --enable-build-mode=production --with-szlib --enable-cxx 7 | -------------------------------------------------------------------------------- /recipes/hwloc: -------------------------------------------------------------------------------- 1 | Package: hwloc 2 | Version: 2.11.1 3 | Build-Depends: automake (>= 1.17) 4 | Source-URL: https://download.open-mpi.org/release/hwloc/v2.11/hwloc-${ver}.tar.gz 5 | Source-SHA256: 9f320925cfd0daeaf3a3d724c93e127ecac63750c623654dca0298504aac4c2c 6 | Configure: --disable-cairo --disable-libxml2 --disable-plugin-dlopen --disable-plugin-ltdl 7 | -------------------------------------------------------------------------------- /recipes/icu: -------------------------------------------------------------------------------- 1 | Package: icu 2 | Version: 71.1 3 | Source-URL: https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.tgz 4 | Source-SHA256: 67a7e6e51f61faf1306b6935333e13b2c48abd8da6d2f46ce6adca24b1e21ebf 5 | Configure: --disable-renaming 6 | Configure.subdir: source 7 | -------------------------------------------------------------------------------- /recipes/icu.patch: -------------------------------------------------------------------------------- 1 | Only in icu-67.1-1: icu 2 | diff -ru icu-67.1/source/common/unicode/uconfig.h icu-67.1-1/source/common/unicode/uconfig.h 3 | --- icu-67.1/source/common/unicode/uconfig.h 2020-04-23 08:04:20.000000000 +1200 4 | +++ icu-67.1-1/source/common/unicode/uconfig.h 2021-02-25 13:54:46.000000000 +1300 5 | @@ -89,7 +89,7 @@ 6 | * @internal 7 | */ 8 | #ifndef U_DISABLE_RENAMING 9 | -#define U_DISABLE_RENAMING 0 10 | +#define U_DISABLE_RENAMING 1 11 | #endif 12 | 13 | /** 14 | -------------------------------------------------------------------------------- /recipes/isl: -------------------------------------------------------------------------------- 1 | Package: isl 2 | Version: 0.25 3 | Depends: gmp 4 | Source-URL: https://libisl.sourceforge.io/isl-${ver}.tar.xz 5 | Source-SHA256: be7b210647ccadf90a2f0b000fca11a4d40546374a850db67adb32fad4b230d9 6 | -------------------------------------------------------------------------------- /recipes/jpeg: -------------------------------------------------------------------------------- 1 | Package: jpeg 2 | Version: 9e 3 | Source-URL: http://www.ijg.org/files/jpegsrc.v${ver}.tar.gz 4 | Source-SHA256: 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d 5 | -------------------------------------------------------------------------------- /recipes/libarchive: -------------------------------------------------------------------------------- 1 | Package: libarchive 2 | Version: 3.7.7 3 | Depends: libb2, xz, lz4, zstd 4 | Source-URL: https://github.com/libarchive/libarchive/releases/download/v${ver}/libarchive-${ver}.tar.xz 5 | Source-SHA256: 879acd83c3399c7caaee73fe5f7418e06087ab2aaf40af3e99b9e29beb29faee 6 | Configure: --disable-maintainer-mode 7 | -------------------------------------------------------------------------------- /recipes/libarchive.patch: -------------------------------------------------------------------------------- 1 | diff -ru libarchive-3.7.2/configure libarchive-3.7.2-1/configure 2 | --- libarchive-3.7.2/configure 2023-09-11 18:05:34 3 | +++ libarchive-3.7.2-1/configure 2023-10-15 23:08:49 4 | @@ -16279,7 +16279,8 @@ 5 | am_save_LIBS="$LIBS" 6 | LIBS="${LIBS} ${LIBICONV}" 7 | if test -n "$LIBICONV"; then 8 | - LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv" 9 | + # FIXME: there is no iconv.pc in iconv # LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv" 10 | + am_save_LIBS="$LIBS" 11 | fi 12 | ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" 13 | if test "x$ac_cv_func_locale_charset" = xyes 14 | diff -ru libarchive-3.7.2/configure.ac libarchive-3.7.2-1/configure.ac 15 | --- libarchive-3.7.2/configure.ac 2023-09-11 18:05:32 16 | +++ libarchive-3.7.2-1/configure.ac 2023-10-15 23:09:02 17 | @@ -435,7 +435,8 @@ 18 | am_save_LIBS="$LIBS" 19 | LIBS="${LIBS} ${LIBICONV}" 20 | if test -n "$LIBICONV"; then 21 | - LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv" 22 | + # FIXME: there is no iconv.pc in iconv # LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv" 23 | + am_save_LIBS="$LIBS" 24 | fi 25 | AC_CHECK_FUNCS([locale_charset]) 26 | LIBS="${am_save_LIBS}" 27 | -------------------------------------------------------------------------------- /recipes/libb2: -------------------------------------------------------------------------------- 1 | Package: libb2 2 | Version: 0.98.1 3 | Source-URL: https://github.com/BLAKE2/libb2/releases/download/v${ver}/libb2-${ver}.tar.gz 4 | Source-SHA256: 53626fddce753c454a3fea581cbbc7fe9bbcf0bc70416d48fdbbf5d87ef6c72e 5 | -------------------------------------------------------------------------------- /recipes/libdeflate: -------------------------------------------------------------------------------- 1 | Package: libdeflate 2 | Version: 1.23 3 | Source-URL: https://github.com/ebiggers/libdeflate/archive/refs/tags/v${ver}.tar.gz 4 | Source-SHA256: 1ab18349b9fb0ce8a0ca4116bded725be7dcbfa709e19f6f983d99df1fb8b25f 5 | Build-system: cmake 6 | Configure: -DLIBDEFLATE_BUILD_SHARED_LIB=OFF 7 | -------------------------------------------------------------------------------- /recipes/libgeotiff: -------------------------------------------------------------------------------- 1 | Package: libgeotiff 2 | Version: 1.7.3 3 | Depends: jpeg, tiff, proj (>= 6.0) 4 | Source-URL: https://github.com/OSGeo/libgeotiff/releases/download/${ver}/libgeotiff-${ver}.tar.gz 5 | Source-SHA256: ba23a3a35980ed3de916e125c739251f8e3266be07540200125a307d7cf5a704 6 | -------------------------------------------------------------------------------- /recipes/libgit2: -------------------------------------------------------------------------------- 1 | Package: libgit2 2 | Version: 1.8.2 3 | Depends: openssl, libssh2 4 | Source-URL: https://github.com/libgit2/libgit2/archive/refs/tags/v${ver}.tar.gz 5 | Source-SHA256: 184699f0d9773f96eeeb5cb245ba2304400f5b74671f313240410f594c566a28 6 | Configure: -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DUSE_SSH=ON 7 | Build-system: cmake 8 | -------------------------------------------------------------------------------- /recipes/libogg: -------------------------------------------------------------------------------- 1 | Package: libogg 2 | Version: 1.3.5 3 | Source-URL: https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-${ver}.tar.gz 4 | Source-SHA256: 0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664 5 | -------------------------------------------------------------------------------- /recipes/libpng: -------------------------------------------------------------------------------- 1 | Package: libpng 2 | Version: 1.6.44 3 | Depends: pkgconfig 4 | Source-URL: https://downloads.sourceforge.net/project/libpng/libpng16/${ver}/libpng-${ver}.tar.xz 5 | Source-SHA256: 60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e 6 | -------------------------------------------------------------------------------- /recipes/libpq: -------------------------------------------------------------------------------- 1 | Package: libpq 2 | Version: 14.17 3 | Source-URL: https://ftp.postgresql.org/pub/source/v${ver}/postgresql-${ver}.tar.bz2 4 | Source-SHA256: 6ce0ccd6403bf7f0f2eddd333e2ee9ba02edfa977c66660ed9b4b1057e7630a1 5 | Configure.x86_64: CFLAGS=-fPIC 6 | Make: make MAKELEVEL=0 -j12 7 | #: we only pick libpq from the entire PostgeSQL installation... 8 | Distribution.files: ${prefix}/include/libpq-fe.h ${prefix}/include/postgres_ext.h ${prefix}/include/pg_config_ext.h ${prefix}/lib/libpq.a ${prefix}/lib/libpgcommon.a ${prefix}/lib/libpgport.a ${prefix}/lib/pkgconfig/libpq.pc 9 | -------------------------------------------------------------------------------- /recipes/libsbml: -------------------------------------------------------------------------------- 1 | Package: libsbml 2 | Version: 5.20.2 3 | Source-URL: https://github.com/sbmlteam/libsbml/archive/refs/tags/v${ver}.tar.gz 4 | Source-SHA256: a196cab964b0b41164d4118ef20523696510bbfd264a029df00091305a1af540 5 | Configure: -DLIBSBML_SKIP_SHARED_LIBRARY=ON -DENABLE_FBC=ON -DENABLE_GROUPS=ON -DWITH_LIBXML=TRUE 6 | Build-system: cmake 7 | -------------------------------------------------------------------------------- /recipes/libsndfile: -------------------------------------------------------------------------------- 1 | Package: libsndfile 2 | Version: 1.1.0 3 | Depends: pkgconfig 4 | Source-URL: https://github.com/libsndfile/libsndfile/releases/download/${ver}/libsndfile-${ver}.tar.xz 5 | Source-SHA256: 0f98e101c0f7c850a71225fb5feaf33b106227b3d331333ddc9bacee190bcf41 6 | -------------------------------------------------------------------------------- /recipes/libssh2: -------------------------------------------------------------------------------- 1 | Package: libssh2 2 | Version: 1.11.1 3 | Depends: openssl 4 | Source-URL: https://github.com/libssh2/libssh2/releases/download/libssh2-${ver}/libssh2-${ver}.tar.gz 5 | Source-SHA256: d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7 6 | Configure: --with-openssl --with-libz 7 | -------------------------------------------------------------------------------- /recipes/libwebp: -------------------------------------------------------------------------------- 1 | Package: libwebp 2 | Version: 1.4.0 3 | Depends: libpng, jpeg 4 | Source-URL: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${ver}.tar.gz 5 | Source-SHA256: 61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 6 | Configure: LIBS=-lz --disable-tiff 7 | -------------------------------------------------------------------------------- /recipes/lz4: -------------------------------------------------------------------------------- 1 | Package: lz4 2 | Version: 1.9.4 3 | Source-URL: https://github.com/lz4/lz4/archive/v${ver}.tar.gz 4 | Source-SHA256: 0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b 5 | Build-system: make 6 | Configure: --set=BUILD_SHARED=no --set=BUILD_STATIC=yes --target=lib-release 7 | -------------------------------------------------------------------------------- /recipes/m4: -------------------------------------------------------------------------------- 1 | Package: m4 2 | Version: 1.4.19 3 | Source-URL: https://ftp.gnu.org/pub/gnu/m4/m4-${ver}.tar.xz 4 | Source-SHA256: 63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96 5 | -------------------------------------------------------------------------------- /recipes/m4.patch: -------------------------------------------------------------------------------- 1 | Only in m4-1.4.19: .prev-version 2 | Only in m4-1.4.19: .tarball-version 3 | diff -ru m4-1.4.19/build-aux/missing m4-1.4.19-1/build-aux/missing 4 | --- m4-1.4.19/build-aux/missing 2021-05-08 09:07:32 5 | +++ m4-1.4.19-1/build-aux/missing 2024-07-25 15:12:08 6 | @@ -1,6 +1,8 @@ 7 | #! /bin/sh 8 | # Common wrapper for a few potentially missing GNU programs. 9 | 10 | +exit 0 11 | + 12 | scriptversion=2018-03-07.03; # UTC 13 | 14 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. 15 | Only in m4-1.4.19-1/build-aux: missing~ 16 | Only in m4-1.4.19-1: m4-1.4.19 17 | diff -ru m4-1.4.19/src/format.c m4-1.4.19-1/src/format.c 18 | --- m4-1.4.19/src/format.c 2021-05-11 09:21:21 19 | +++ m4-1.4.19-1/src/format.c 2024-07-25 15:08:42 20 | @@ -350,10 +350,8 @@ 21 | *p = '\0'; 22 | 23 | /* Our constructed format string in fstart is safe. */ 24 | -#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) 25 | # pragma GCC diagnostic push 26 | # pragma GCC diagnostic ignored "-Wformat-nonliteral" 27 | -#endif 28 | 29 | switch (datatype) 30 | { 31 | -------------------------------------------------------------------------------- /recipes/mpc: -------------------------------------------------------------------------------- 1 | Package: mpc 2 | Version: 1.3.1 3 | Source-URL: https://ftp.gnu.org/gnu/mpc/mpc-${ver}.tar.gz 4 | Source-SHA256: ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 5 | Depends: gmp (>= 5.0.0), mpfr (>= 4.1.0) 6 | -------------------------------------------------------------------------------- /recipes/mpfr: -------------------------------------------------------------------------------- 1 | Package: mpfr 2 | Version: 4.2.0 3 | Source-URL: https://ftp.gnu.org/gnu/mpfr/mpfr-${ver}.tar.gz 4 | Source-SHA256: f1cc1c6bb14d18f0c61cc416e083f5e697b6e0e3cf9630b9b33e8e483fc960f0 5 | Depends: gmp (>= 4.1.0) 6 | -------------------------------------------------------------------------------- /recipes/netcdf: -------------------------------------------------------------------------------- 1 | Package: netcdf 2 | Version: 4.9.2 3 | Depends: hdf5 (>= 1.14), szip 4 | Source-URL: https://github.com/Unidata/netcdf-c/archive/refs/tags/v${ver}.tar.gz 5 | Source-SHA256: bc104d101278c68b303359b3dc4192f81592ae8640f1aee486921138f7f88cb7 6 | Configure: --enable-netcdf-4 LIBS='-L/${prefix}/lib -lsz' 7 | -------------------------------------------------------------------------------- /recipes/nlopt: -------------------------------------------------------------------------------- 1 | Package: nlopt 2 | Version: 2.7.1 3 | Source-URL: https://github.com/stevengj/nlopt/archive/v${ver}.tar.gz 4 | Source-SHA256: db88232fa5cef0ff6e39943fc63ab6074208831dc0031cf1545f6ecd31ae2a1a 5 | Build-system: cmake 6 | -------------------------------------------------------------------------------- /recipes/openjpeg: -------------------------------------------------------------------------------- 1 | Package: openjpeg 2 | Version: 2.5.0 3 | Build-system: cmake 4 | Source-URL: https://github.com/uclouvain/openjpeg/archive/v${ver}.tar.gz 5 | Source-SHA256: 0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a 6 | Comment: cmake doesn't detect any flags correctly so we have to pass 7 | the flags from pkg-config by hand. 8 | Also openjpeg's internal library sources are broken so we cannot 9 | use BUILD_THIRDPARTY:BOOL=ON to work around it. 10 | Note that the library itself doesn't use dependencies, but the tools 11 | do so for now we opt to build the tools and thus need the libraries. 12 | Depends: tiff, libpng 13 | Configure: --prefix=/${prefix} -DCMAKE_EXE_LINKER_FLAGS="`pkg-config --static --libs libtiff-4`" -DCMAKE_C_FLAGS="`pkg-config --cflags libtiff-4`" 14 | -------------------------------------------------------------------------------- /recipes/openssl: -------------------------------------------------------------------------------- 1 | Package: openssl 2 | Version: 3.3.2 3 | Source-URL: https://github.com/openssl/openssl/releases/download/openssl-${ver}/openssl-${ver}.tar.gz 4 | Source-SHA256: 2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281 5 | Configure.script: Configure 6 | Configure: no-shared no-module 7 | Configure.darwin: --prefix=/${prefix} --openssldir=/private/etc/ssl 8 | Configure.darwin.x86_64: darwin64-x86_64-cc enable-ec_nistp_64_gcc_128 9 | Configure.darwin.arm64: darwin64-arm64-cc 10 | Install: make install_sw 11 | -------------------------------------------------------------------------------- /recipes/osi: -------------------------------------------------------------------------------- 1 | Package: osi 2 | Version: 0.108.7 3 | Depends: coinutils 4 | Source-URL: https://github.com/coin-or/Osi/archive/refs/tags/releases/${ver}.tar.gz 5 | Source-SHA256: f1bc53a498585f508d3f8d74792440a30a83c8bc934d0c8ecf8cd8bc0e486228 6 | -------------------------------------------------------------------------------- /recipes/pango: -------------------------------------------------------------------------------- 1 | Package: pango 2 | Version: 1.50.14 3 | Depends: glib, cairo, freetype, harfbuzz, fontconfig, fribidi 4 | Build-system: meson-ninja 5 | Source-URL: https://download.gnome.org/sources/pango/1.50/pango-${ver}.tar.xz 6 | Source-SHA256: 1d67f205bfc318c27a29cfdfb6828568df566795df0cb51d2189cde7f2d581e8 7 | Configure.darwin: LDFLAGS='-framework Foundation -L/${prefix}/lib -lbz2 -lpng -lz -lpixman-1 -lxml2 -llzma -liconv' 8 | -------------------------------------------------------------------------------- /recipes/pcre: -------------------------------------------------------------------------------- 1 | Package: pcre 2 | Version: 8.45 3 | Depends: pkgconfig 4 | Source-URL: https://sourceforge.net/projects/pcre/files/pcre/${ver}/pcre-${ver}.tar.bz2 5 | Source-SHA256: 4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8 6 | Configure: --enable-unicode-properties 7 | Configure.arm64: --disable-jit 8 | -------------------------------------------------------------------------------- /recipes/pcre2: -------------------------------------------------------------------------------- 1 | Package: pcre2 2 | Version: 10.44 3 | Source-URL: https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${ver}/pcre2-${ver}.tar.bz2 4 | Source-SHA256: d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96 5 | Depends: pkgconfig 6 | Configure.darwin: --disable-jit 7 | #Note: JIT is broken - at least on macOS (out of memory errors) 8 | -------------------------------------------------------------------------------- /recipes/pixman: -------------------------------------------------------------------------------- 1 | Package: pixman 2 | Version: 0.42.2 3 | Depends: pkgconfig 4 | Source-URL: https://www.cairographics.org/releases/pixman-${ver}.tar.gz 5 | Source-SHA256: ea1480efada2fd948bc75366f7c349e1c96d3297d09a3fe62626e38e234a625e 6 | Configure.arm64: --disable-arm-a64-neon 7 | -------------------------------------------------------------------------------- /recipes/pkgconfig: -------------------------------------------------------------------------------- 1 | Package: pkgconfig 2 | Version: 0.29.2 3 | Depends: sys-stubs 4 | Source-URL: http://pkgconfig.freedesktop.org/releases/pkg-config-${ver}.tar.gz 5 | Source-SHA256: 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591 6 | Configure: --with-internal-glib --enable-indirect-deps=yes 7 | -------------------------------------------------------------------------------- /recipes/pkgconfig.patch: -------------------------------------------------------------------------------- 1 | diff -ru pkgconfig-0.29.2-0/glib/glib/gatomic.h pkgconfig-0.29.2/glib/glib/gatomic.h 2 | --- pkgconfig-0.29.2-0/glib/glib/gatomic.h 2016-04-12 09:39:26 3 | +++ pkgconfig-0.29.2/glib/glib/gatomic.h 2024-07-25 10:55:53 4 | @@ -167,28 +167,28 @@ 5 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ 6 | (void) (0 ? (gpointer) *(atomic) : 0); \ 7 | (void) (0 ? (val) ^ (val) : 0); \ 8 | - (gssize) __sync_fetch_and_add ((atomic), (val)); \ 9 | + (gssize) __sync_fetch_and_add ((atomic), (gpointer) (val)); \ 10 | })) 11 | #define g_atomic_pointer_and(atomic, val) \ 12 | (G_GNUC_EXTENSION ({ \ 13 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ 14 | (void) (0 ? (gpointer) *(atomic) : 0); \ 15 | (void) (0 ? (val) ^ (val) : 0); \ 16 | - (gsize) __sync_fetch_and_and ((atomic), (val)); \ 17 | + (gsize) __sync_fetch_and_and ((atomic), (gpointer) (val)); \ 18 | })) 19 | #define g_atomic_pointer_or(atomic, val) \ 20 | (G_GNUC_EXTENSION ({ \ 21 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ 22 | (void) (0 ? (gpointer) *(atomic) : 0); \ 23 | (void) (0 ? (val) ^ (val) : 0); \ 24 | - (gsize) __sync_fetch_and_or ((atomic), (val)); \ 25 | + (gsize) __sync_fetch_and_or ((atomic), (gpointer) (val)); \ 26 | })) 27 | #define g_atomic_pointer_xor(atomic, val) \ 28 | (G_GNUC_EXTENSION ({ \ 29 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ 30 | (void) (0 ? (gpointer) *(atomic) : 0); \ 31 | (void) (0 ? (val) ^ (val) : 0); \ 32 | - (gsize) __sync_fetch_and_xor ((atomic), (val)); \ 33 | + (gsize) __sync_fetch_and_xor ((atomic), (gpointer) (val)); \ 34 | })) 35 | 36 | #else /* defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */ 37 | diff -ru pkgconfig-0.29.2-0/glib/glib/gbitlock.c pkgconfig-0.29.2/glib/glib/gbitlock.c 38 | --- pkgconfig-0.29.2-0/glib/glib/gbitlock.c 2016-04-12 09:39:26 39 | +++ pkgconfig-0.29.2/glib/glib/gbitlock.c 2024-07-25 10:59:16 40 | @@ -433,7 +433,7 @@ 41 | gsize v; 42 | 43 | retry: 44 | - v = g_atomic_pointer_or (pointer_address, mask); 45 | + v = g_atomic_pointer_or ((gpointer*) pointer_address, mask); 46 | if (v & mask) 47 | /* already locked */ 48 | { 49 | @@ -489,7 +489,7 @@ 50 | 51 | g_return_val_if_fail (lock_bit < 32, FALSE); 52 | 53 | - v = g_atomic_pointer_or (pointer_address, mask); 54 | + v = g_atomic_pointer_or ((gpointer*) pointer_address, mask); 55 | 56 | return ~v & mask; 57 | #endif 58 | @@ -525,7 +525,7 @@ 59 | volatile gsize *pointer_address = address; 60 | gsize mask = 1u << lock_bit; 61 | 62 | - g_atomic_pointer_and (pointer_address, ~mask); 63 | + g_atomic_pointer_and ((gpointer*) pointer_address, ~mask); 64 | #endif 65 | 66 | { 67 | -------------------------------------------------------------------------------- /recipes/poppler: -------------------------------------------------------------------------------- 1 | Package: poppler 2 | Version: 23.04.0 3 | Source-URL: https://poppler.freedesktop.org/poppler-${ver}.tar.xz 4 | Source-SHA256: b6d893dc7dcd4138b9e9df59a13c59695e50e80dc5c2cacee0674670693951a1 5 | Depends: tiff, cairo 6 | Build-system: cmake 7 | Configure: --prefix=/${prefix} -DCMAKE_EXE_LINKER_FLAGS="`pkg-config --static --libs cairo libtiff-4`" -DCMAKE_C_FLAGS="`pkg-config --cflags cairo libtiff-4`" 8 | -------------------------------------------------------------------------------- /recipes/poppler-data: -------------------------------------------------------------------------------- 1 | Package: poppler-data 2 | Version: 0.4.11 3 | Source-URL: https://poppler.freedesktop.org/poppler-data-${ver}.tar.gz 4 | Source-SHA256: 2cec05cd1bb03af98a8b06a1e22f6e6e1a65b1e2f3816cb3069bb0874825f08c 5 | Build-system: make 6 | -------------------------------------------------------------------------------- /recipes/poppler.patch: -------------------------------------------------------------------------------- 1 | diff -ru poppler-22.03.0-orig/poppler-glib.pc.cmake poppler-22.03.0/poppler-glib.pc.cmake 2 | --- poppler-22.03.0-orig/poppler-glib.pc.cmake 2022-03-01 13:50:27.000000000 -0800 3 | +++ poppler-22.03.0/poppler-glib.pc.cmake 2022-04-17 15:03:24.000000000 -0700 4 | @@ -5,7 +5,7 @@ 5 | Name: poppler-glib 6 | Description: GLib wrapper for poppler 7 | Version: @POPPLER_VERSION@ 8 | -Requires: glib-2.0 >= @GLIB_REQUIRED@ gobject-2.0 >= @GLIB_REQUIRED@ cairo >= @CAIRO_VERSION@ @PC_REQUIRES@ 9 | +Requires: glib-2.0 >= @GLIB_REQUIRED@ gobject-2.0 >= @GLIB_REQUIRED@ cairo >= @CAIRO_VERSION@ gio-2.0 >= @GLIB_REQUIRED@ @PC_REQUIRES@ 10 | @PC_REQUIRES_PRIVATE@ 11 | 12 | Libs: -L${libdir} -lpoppler-glib 13 | diff -ru poppler-22.03.0-orig/poppler.pc.cmake poppler-22.03.0/poppler.pc.cmake 14 | --- poppler-22.03.0-orig/poppler.pc.cmake 2022-03-01 13:50:27.000000000 -0800 15 | +++ poppler-22.03.0/poppler.pc.cmake 2022-04-17 15:05:18.000000000 -0700 16 | @@ -5,6 +5,7 @@ 17 | Name: poppler 18 | Description: PDF rendering library 19 | Version: @POPPLER_VERSION@ 20 | +Requires.private: libtiff-4, cairo 21 | 22 | -Libs: -L${libdir} -lpoppler 23 | +Libs: -L${libdir} -lpoppler -lopenjp2 24 | Cflags: -I${includedir}/poppler 25 | -------------------------------------------------------------------------------- /recipes/proj: -------------------------------------------------------------------------------- 1 | Package: proj 2 | Version: 9.5.1 3 | Depends: pkgconfig, tiff, libpng, jpeg, sqlite3 4 | Source-URL: https://github.com/OSGeo/PROJ/releases/download/${ver}/proj-${ver}.tar.gz 5 | Source-SHA256: a8395f9696338ffd46b0feb603edbb730fad6746fba77753c77f7f997345e3d3 6 | Build-system: cmake 7 | #Note: their CFLAGS/LIBS detection is broken, requires flags to be manually added 8 | Configure: -DCMAKE_EXE_LINKER_FLAGS="`pkg-config --static --libs libtiff-4`" -DCMAKE_C_FLAGS="`pkg-config --cflags libtiff-4`" 9 | -------------------------------------------------------------------------------- /recipes/protobuf: -------------------------------------------------------------------------------- 1 | Package: protobuf 2 | Version: 3.20.2 3 | Source-URL: https://github.com/protocolbuffers/protobuf/releases/download/v${ver}/protobuf-cpp-${ver}.tar.gz 4 | Source-SHA256: a0167e2ba24bba0a180fbc9392f3a43e749d7a26e630fe9c1a1ba32a53675ac3 5 | -------------------------------------------------------------------------------- /recipes/qpdf: -------------------------------------------------------------------------------- 1 | Package: qpdf 2 | Version: 11.9.1 3 | Source-URL: https://github.com/qpdf/qpdf/releases/download/v${ver}/qpdf-${ver}.tar.gz 4 | Source-SHA256: 2ba4d248f9567a27c146b9772ef5dc93bd9622317978455ffe91b259340d13d1 5 | Depends: jpeg, pkgconfig, openssl 6 | Build-system: cmake 7 | -------------------------------------------------------------------------------- /recipes/r-base-dev: -------------------------------------------------------------------------------- 1 | Package: r-base-dev 2 | Description: Virtual package providing all dependent libraries to build R 3 | Depends: xz, tiff, libpng, openssl, jpeg, pcre2, cairo, texinfo, libdeflate, zstd 4 | -------------------------------------------------------------------------------- /recipes/readline5: -------------------------------------------------------------------------------- 1 | Package: readline5 2 | Version: 5.2-014 3 | Source-URL: https://mac.r-project.org/src/readline-${ver}.tar.gz 4 | Source-SHA256: afe3579d32afa23bd601b5ac1e4a494cb4996efc8eb843369c3eb6a07cbd8b0c 5 | -------------------------------------------------------------------------------- /recipes/readline5.patch: -------------------------------------------------------------------------------- 1 | diff -ru readline5-5.2-014/rldefs.h readline5-5.2-014-arm/rldefs.h 2 | --- readline5-5.2-014/rldefs.h 2005-07-05 15:27:25.000000000 +1200 3 | +++ readline5-5.2-014-arm/rldefs.h 2021-12-10 10:10:36.000000000 +1300 4 | @@ -157,4 +157,6 @@ 5 | /* CONFIGURATION SECTION */ 6 | #include "rlconf.h" 7 | 8 | +#include 9 | + 10 | #endif /* !_RLDEFS_H_ */ 11 | -------------------------------------------------------------------------------- /recipes/rsync: -------------------------------------------------------------------------------- 1 | Package: rsync 2 | Version: 3.3.0 3 | Source-URL: https://download.samba.org/pub/rsync/src/rsync-${ver}.tar.gz 4 | Source-SHA256: 7399e9a6708c32d678a72a63219e96f23be0be2336e50fd1348498d07041df90 5 | Depends: zstd, lz4 6 | Configure: --disable-xxhash 7 | -------------------------------------------------------------------------------- /recipes/serf: -------------------------------------------------------------------------------- 1 | Package: serf 2 | Version: 1.3.10 3 | Source-URL: https://archive.apache.org/dist/serf/serf-${ver}.tar.bz2 4 | Source-SHA256: be81ef08baa2516ecda76a77adf7def7bc3227eeb578b9a33b45f7b41dc064e6 5 | Depends: openssl, apr, apr-util 6 | Configure.driver: true 7 | Special: in-sources 8 | -------------------------------------------------------------------------------- /recipes/serf.patch: -------------------------------------------------------------------------------- 1 | diff -ruN serf-1.3.10/Makefile serf-1.3.10-1/Makefile 2 | --- serf-1.3.10/Makefile 1970-01-01 12:00:00 3 | +++ serf-1.3.10-1/Makefile 2024-07-25 11:55:57 4 | @@ -0,0 +1,17 @@ 5 | +ifeq ($(MACOSX_DEPLOYMENT_TARGET),) 6 | + ADDCC= 7 | +else 8 | + ## scons is broken and will override MACOSX_DEPLOYMENT_TARGET so have to force it... 9 | + ARCH=$(shell uname -m) 10 | + ADDCC=CC='clang -arch $(ARCH) -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)' 11 | +endif 12 | + 13 | +all: 14 | + curl -L http://prdownloads.sourceforge.net/scons/scons-local-4.1.0.post1.tar.gz | tar fxz - 15 | + python3 scons.py $(ADDCC) PREFIX=/$(PREFIX) APR=/$(PREFIX)/bin/apr-1-config APU=/$(PREFIX)/bin/apu-1-config APR_STATIC=true CFLAGS='-fPIC $(CFLAGS)' 16 | + 17 | +install: 18 | + for i in lib include lib/pkgconfig; do if [ ! -e "$(DESTDIR)/$(PREFIX)/$$i" ]; then mkdir -p "$(DESTDIR)/$(PREFIX)/$$i"; fi; done 19 | + cp -p libserf-1.a '$(DESTDIR)/$(PREFIX)/lib/' 20 | + cp -p serf-1.pc '$(DESTDIR)/$(PREFIX)/lib/pkgconfig' 21 | + cp -p serf.h serf_bucket_types.h serf_bucket_util.h '$(DESTDIR)/$(PREFIX)/include/' 22 | diff -ruN serf-1.3.10/SConstruct serf-1.3.10-1/SConstruct 23 | --- serf-1.3.10/SConstruct 2023-05-18 21:33:55 24 | +++ serf-1.3.10-1/SConstruct 2024-07-25 11:55:57 25 | @@ -68,7 +68,7 @@ 26 | default_libdir='..' 27 | default_prefix='Debug' 28 | else: 29 | - default_incdir='/usr' 30 | + default_incdir='$PREFIX' 31 | default_libdir='$PREFIX/lib' 32 | default_prefix='/usr/local' 33 | 34 | @@ -426,7 +426,7 @@ 35 | env.get('GSSAPI_LIBS', '')), 36 | }) 37 | 38 | -env.Default(lib_static, lib_shared, pkgconfig) 39 | +env.Default(lib_static, pkgconfig) 40 | 41 | if CALLOUT_OKAY: 42 | conf = Configure(env) 43 | @@ -456,8 +456,7 @@ 44 | % (target_install_shared_path, 45 | install_shared_path))) 46 | 47 | -env.Alias('install-lib', [install_static, install_shared, 48 | - ]) 49 | +env.Alias('install-lib', [install_static]) 50 | env.Alias('install-inc', env.Install(incdir, HEADER_FILES)) 51 | env.Alias('install-pc', env.Install(os.path.join(libdir, 'pkgconfig'), 52 | pkgconfig)) 53 | -------------------------------------------------------------------------------- /recipes/sigc++: -------------------------------------------------------------------------------- 1 | Package: sigc++ 2 | Version: 2.10.3 3 | Depends: pkgconfig 4 | Source-URL: https://download.gnome.org/sources/libsigc++/2.10/libsigc++-${ver}.tar.xz 5 | Source-SHA256: 0b68dfc6313c6cc90ac989c6d722a1bf0585ad13846e79746aa87cb265904786 6 | -------------------------------------------------------------------------------- /recipes/sqlite3: -------------------------------------------------------------------------------- 1 | Package: sqlite3 2 | Version: 3.48.0 3 | #FWIW: 3.49.0 is broken do NOT upgrade 4 | Source-URL: https://www.sqlite.org/2025/sqlite-autoconf-3480000.tar.gz 5 | Source-SHA256: ac992f7fca3989de7ed1fe99c16363f848794c8c32a158dafd4eb927a2e02fd5 6 | #Note: this is needed because their script is broken and fails with standard flags; extra flags from MXE 7 | Configure-script: configure 8 | Configure: --prefix=/${prefix} --disable-shared --enable-static --enable-threadsafe CFLAGS="-fPIC -DSQLITE_ENABLE_COLUMN_METADATA" 9 | -------------------------------------------------------------------------------- /recipes/sqlite3.patch: -------------------------------------------------------------------------------- 1 | diff -Nru sqlite-autoconf-3480000-orig/sqlite3.pc.in sqlite-autoconf-3480000-patched/sqlite3.pc.in 2 | --- sqlite-autoconf-3480000-orig/sqlite3.pc.in 2025-01-14 06:22:34.000000000 -0500 3 | +++ sqlite-autoconf-3480000-patched/sqlite3.pc.in 2025-01-20 13:24:09.316242726 -0500 4 | @@ -9,5 +9,5 @@ 5 | Description: SQL database engine 6 | Version: @PACKAGE_VERSION@ 7 | Libs: -L${libdir} -lsqlite3 8 | -Libs.private: @LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@ 9 | +Libs.private: @LIBS@ 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /recipes/subversion: -------------------------------------------------------------------------------- 1 | Package: subversion 2 | Version: 1.14.3 3 | Source-URL: https://archive.apache.org/dist/subversion/subversion-${ver}.tar.bz2 4 | Source-SHA256: 949efd451a09435f7e8573574c71c7b71b194d844890fa49cd61d2262ea1a440 5 | Depends: openssl, sqlite3, apr, apr-util, serf, utf8proc 6 | Configure: --with-lz4=internal --with-utf8proc=internal LIBS='-L/${prefix}/lib -lssl -lcrypto' 7 | -------------------------------------------------------------------------------- /recipes/symphony: -------------------------------------------------------------------------------- 1 | Package: symphony 2 | Version: 5.6.17 3 | Depends: dylp, cgl 4 | Source-URL: https://github.com/coin-or/SYMPHONY/archive/refs/tags/releases/5.6.17.tar.gz 5 | Source-SHA256: f6c2b9c9e60ebff4a665e243e765649334c5d0680f536d3d9c0c372025ab96dc 6 | -------------------------------------------------------------------------------- /recipes/sys-stubs: -------------------------------------------------------------------------------- 1 | Package: sys-stubs 2 | Version: 1.0 3 | Source-URL: https://mac.r-project.org/pkgconfig-sys-stubs-${ver}.tar.gz 4 | Source-SHA256: 2e057f1274a0dbfffe3bbe89c8200930d170ac5b8b97c4bdfd43cbaa7ad122a3 5 | -------------------------------------------------------------------------------- /recipes/szip: -------------------------------------------------------------------------------- 1 | Package: szip 2 | Version: 2.1.1 3 | Source-URL: https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz 4 | Source-SHA256: 21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412 5 | -------------------------------------------------------------------------------- /recipes/texinfo: -------------------------------------------------------------------------------- 1 | Package: texinfo 2 | Version: 7.1 3 | Source-URL: https://ftp.gnu.org/gnu/texinfo/texinfo-${ver}.tar.gz 4 | Source-SHA256: dd5710b3a53ac002644677a06145748e260592a35be182dc830ebebb79c5d5a0 5 | -------------------------------------------------------------------------------- /recipes/tidy: -------------------------------------------------------------------------------- 1 | Package: tidy 2 | Version: 5.8.0 3 | Source-URL: https://github.com/htacg/tidy-html5/archive/refs/tags/${ver}.tar.gz 4 | Source-SHA256: 59c86d5b2e452f63c5cdb29c866a12a4c55b1741d7025cf2f3ce0cde99b0660e 5 | Build-system: cmake 6 | Note: there is a typo in tidy's CMakeLists.txt (they mistyped BUILD_SHARED_LIBS as BUILD_SHARED_LIB) 7 | Configure: -DBUILD_SHARED_LIB=OFF 8 | -------------------------------------------------------------------------------- /recipes/tiff: -------------------------------------------------------------------------------- 1 | Package: tiff 2 | Version: 4.7.0 3 | Source-URL: http://download.osgeo.org/libtiff/tiff-${ver}.tar.gz 4 | Source-SHA256: 67160e3457365ab96c5b3286a0903aa6e78bdc44c4bc737d2e486bcecb6ba976 5 | Depends: jpeg, xz, libwebp, libdeflate, zstd 6 | -------------------------------------------------------------------------------- /recipes/udunits: -------------------------------------------------------------------------------- 1 | Package: udunits 2 | Version: 2.2.28 3 | Was.Source.URL: https://artifacts.unidata.ucar.edu/repository/downloads-udunits/${ver}/udunits-${ver}.tar.gz 4 | Source-URL: https://github.com/s-u/UDUNITS-2/releases/download/v${ver}/udunits-${ver}.tar.gz 5 | Source-SHA256: 590baec83161a3fd62c00efa66f6113cec8a7c461e3f61a5182167e0cc5d579e 6 | -------------------------------------------------------------------------------- /recipes/unixodbc: -------------------------------------------------------------------------------- 1 | Package: unixodbc 2 | Version: 2.3.11 3 | Source-URL: http://www.unixodbc.org/unixODBC-${ver}.tar.gz 4 | Source-SHA256: d9e55c8e7118347e3c66c87338856dad1516b490fb7c756c1562a2c267c73b5c 5 | -------------------------------------------------------------------------------- /recipes/utf8proc: -------------------------------------------------------------------------------- 1 | Package: utf8proc 2 | Version: 2.7.0 3 | Source-URL: https://github.com/JuliaStrings/utf8proc/archive/v${ver}.tar.gz 4 | Source-SHA256: 4bb121e297293c0fd55f08f83afab6d35d48f0af4ecc07523ad8ec99aa2b12a1 5 | Configure.driver: true 6 | Special: in-sources 7 | -------------------------------------------------------------------------------- /recipes/utf8proc.patch: -------------------------------------------------------------------------------- 1 | diff -ru utf8proc-2.6.1/Makefile utf8proc-2.6.1-fixed/Makefile 2 | --- utf8proc-2.6.1/Makefile 2020-12-16 10:36:45.000000000 +1300 3 | +++ utf8proc-2.6.1-fixed/Makefile 2021-07-06 13:30:10.000000000 +1200 4 | @@ -36,7 +36,7 @@ 5 | endif 6 | 7 | # installation directories (for 'make install') 8 | -prefix=/usr/local 9 | +prefix=/$(PREFIX) 10 | libdir=$(prefix)/lib 11 | includedir=$(prefix)/include 12 | pkgconfigdir=$(libdir)/pkgconfig 13 | @@ -48,7 +48,7 @@ 14 | 15 | .PHONY: all clean data update manifest install 16 | 17 | -all: libutf8proc.a libutf8proc.$(SHLIB_EXT) 18 | +all: libutf8proc.a 19 | 20 | clean: 21 | rm -f utf8proc.o libutf8proc.a libutf8proc.$(SHLIB_VERS_EXT) libutf8proc.$(SHLIB_EXT) 22 | @@ -102,18 +102,13 @@ 23 | -e 's#VERSION#$(MAJOR).$(MINOR).$(PATCH)#' \ 24 | libutf8proc.pc.in > libutf8proc.pc 25 | 26 | -install: libutf8proc.a libutf8proc.$(SHLIB_EXT) libutf8proc.$(SHLIB_VERS_EXT) libutf8proc.pc 27 | +install: libutf8proc.a libutf8proc.pc 28 | mkdir -m 755 -p $(DESTDIR)$(includedir) 29 | $(INSTALL) -m 644 utf8proc.h $(DESTDIR)$(includedir) 30 | mkdir -m 755 -p $(DESTDIR)$(libdir) 31 | $(INSTALL) -m 644 libutf8proc.a $(DESTDIR)$(libdir) 32 | - $(INSTALL) -m 755 libutf8proc.$(SHLIB_VERS_EXT) $(DESTDIR)$(libdir) 33 | mkdir -m 755 -p $(DESTDIR)$(pkgconfigdir) 34 | $(INSTALL) -m 644 libutf8proc.pc $(DESTDIR)$(pkgconfigdir)/libutf8proc.pc 35 | - ln -f -s libutf8proc.$(SHLIB_VERS_EXT) $(DESTDIR)$(libdir)/libutf8proc.$(SHLIB_EXT) 36 | -ifneq ($(OS),Darwin) 37 | - ln -f -s libutf8proc.$(SHLIB_VERS_EXT) $(DESTDIR)$(libdir)/libutf8proc.so.$(MAJOR) 38 | -endif 39 | 40 | MANIFEST.new: 41 | rm -rf tmp 42 | Only in utf8proc-2.6.1-fixed: Makefile~ 43 | -------------------------------------------------------------------------------- /recipes/xz: -------------------------------------------------------------------------------- 1 | Package: xz 2 | Version: 5.6.3 3 | Source-URL: https://github.com/tukaani-project/xz/releases/download/v${ver}/xz-${ver}.tar.gz 4 | Source-SHA256: b1d45295d3f71f25a4c9101bd7c8d16cb56348bbef3bbc738da0351e17c73317 5 | -------------------------------------------------------------------------------- /recipes/zeromq: -------------------------------------------------------------------------------- 1 | Package: zeromq 2 | Version: 4.3.4 3 | Depends: pkgconfig 4 | Source-URL: https://github.com/zeromq/libzmq/releases/download/v${ver}/zeromq-${ver}.tar.gz 5 | Source-SHA256: c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5 6 | ##: Due to a bug in ZMQ we have to force CC=C++ since it's trying to link C++ with C linker which fails 7 | Configure.darwin.13: CC=clang++ CXX=clang++ 8 | -------------------------------------------------------------------------------- /recipes/zlib-stub: -------------------------------------------------------------------------------- 1 | Package: zlib-stub 2 | Description: System stub for zlib 3 | Version: 0.1 4 | Source-URL: https://mac.R-project.org/zlib-stub-${ver}.tar.gz 5 | Source-SHA256: 57d4ef04eecd8522f27eac4ed3daaeb2adef8e4e8bd1c27efe84cacebc41a222 6 | -------------------------------------------------------------------------------- /recipes/zstd: -------------------------------------------------------------------------------- 1 | Package: zstd 2 | Version: 1.5.5 3 | Source-URL: https://github.com/facebook/zstd/releases/download/v${ver}/zstd-${ver}.tar.gz 4 | Source-SHA256: 9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 5 | Depends: lz4, xz 6 | Configure.chmod: +x 7 | Configure: -DZSTD_BUILD_CONTRIB=ON -DZSTD_LEGACY_SUPPORT=ON -DZSTD_ZLIB_SUPPORT=ON -DZSTD_LZMA_SUPPORT=ON -DZSTD_LZ4_SUPPORT=ON 8 | -------------------------------------------------------------------------------- /recipes/zstd.patch: -------------------------------------------------------------------------------- 1 | diff -ruN zstd-1.5.1/configure zstd-1.5.1-fix/configure 2 | --- zstd-1.5.1/configure 1969-12-31 19:00:00.000000000 -0500 3 | +++ zstd-1.5.1-fix/configure 2021-12-28 22:35:37.000000000 -0500 4 | @@ -0,0 +1,41 @@ 5 | +#!/bin/bash 6 | + 7 | +BD="`pwd`" 8 | +SD="`dirname $0`" 9 | +SD="`(cd $SD && pwd)`" 10 | + 11 | +echo Copying sources ... 12 | +## zstd can only build in-sources 13 | +cp -r $SD/* . 14 | + 15 | +echo Collecting env vars from arguments: 16 | +while (( "$#" )); do 17 | + if echo "$1" | grep -E '^[A-Z]+=' >/dev/null; then 18 | + export "$1" 19 | + echo " $1" 20 | + else 21 | + if echo "$1" | grep '^--prefix='; then 22 | + PREFIX=`echo $1 | sed 's:^--prefix=/*::'` 23 | + else 24 | + MARGS+=("$1") 25 | + fi 26 | + fi 27 | + shift 28 | +done 29 | + 30 | +if [ -z "$PREFIX" ]; then 31 | + PREFIX=usr/local 32 | + echo "PREFIX no specified, falling back to $PREFIX" 33 | +fi 34 | +echo "Setting prefix=/$PREFIX" 35 | + 36 | +cat > Makefile <!" >&2 5 | exit 1 6 | fi 7 | 8 | PKG="$1" 9 | shift 10 | 11 | ## any suggests? 12 | if [ -z "$1" ]; then exit 0; fi 13 | 14 | ADD='' 15 | 16 | while (( "$#" )); do 17 | if [ -e $1 ]; then 18 | ADD="$ADD $1" 19 | fi 20 | shift 21 | done 22 | 23 | if [ -n "$ADD" ]; then 24 | sed -E -i '' "s/(^BuiltWith: .*)\$/\1$ADD/" "$PKG" 25 | grep ^BuiltWith: "$PKG" 26 | fi 27 | -------------------------------------------------------------------------------- /scripts/big-sur-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ ! -e build.sh ]; then 6 | echo "Please run this script from the root of the recipes" >&2 7 | exit 1 8 | fi 9 | 10 | while (( "$#" )); do 11 | if [ "x$1" = x--tools ]; then RUN_TOOLS=1; fi 12 | if [ "x$1" = x--all ]; then RUN_ALL=1; fi 13 | if [ "x$1" = x--cran ]; then AS_CRAN=1; fi 14 | if [ "x$1" = x--continue -o "x$1" = x-c ]; then DO_CONT=1; fi 15 | if [ "x$1" = x-h -o "x$1" = x--help ]; then 16 | echo '' 17 | echo " Usage: $0 [-h|--help] [-c|--continue] [--cran] [--tools | --all]" 18 | echo '' 19 | echo " Default is --base (r-base-dev), tools include emacs and subversion." 20 | echo '' 21 | echo ' --cran enforces existence of all tools and locations, otherwise' 22 | echo ' they are optional' 23 | echo '' 24 | exit 0 25 | fi 26 | shift 27 | done 28 | 29 | if [ -n "$AS_CRAN" ]; then 30 | ENVOK=yes 31 | echo Checking build environment ... 32 | if [ ! -e /Volumes/Temp ]; then 33 | echo "ERROR: /Volumes/Temp does not exist!" >&2 34 | ENVOK=no 35 | else 36 | if [ ! -e /Volumes/Temp/tmp ]; then 37 | mkdir -p /Volumes/Temp/tmp 38 | fi 39 | echo " - /Volumes/Temp/tmp OK" 40 | fi 41 | if [ ! -e /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk ]; then 42 | echo "ERROR: macOS 11 SDK is missing" >&2 43 | ENVOK=no 44 | else 45 | echo " - SDK OK" 46 | fi 47 | if [ ! -e /Applications/CMake.app/Contents/bin/cmake ]; then 48 | echo "ERROR: CMake is missing" >&2 49 | ENVOK=no 50 | else 51 | echo " - CMake OK" 52 | fi 53 | if ! command -v meson > /dev/null; then 54 | PYLIB=$(ls -d ~/Library/Python/3.*/bin | tail -n1) 55 | if [ -n "$PYLIB" ]; then 56 | export PATH=$PATH:$PYLIB 57 | echo " - Adding Python 3 user library to PATH" 58 | fi 59 | fi 60 | if ! command -v meson > /dev/null; then 61 | echo " - Installing meson" 62 | pip3 install --user meson 63 | fi 64 | if ! command -v ninja > /dev/null; then 65 | echo " - Installing ninja" 66 | pip3 install --user ninja 67 | fi 68 | command -v meson 69 | command -v ninja 70 | if [ ! -e ~/.gnu-mirror ]; then 71 | ## GNU server is terribly slow so set a more sane mirror 72 | echo https://mirror.endianness.com/gnu/ > ~/.gnu-mirror 73 | fi 74 | export PREFIX="opt/R/`uname -m`" 75 | echo Setup target /$PREFIX 76 | if [ ! -e "/$PREFIX" ]; then 77 | mkdir -p "/$PREFIX" 78 | fi 79 | fi 80 | 81 | if [ -e /Volumes/Temp/tmp ]; then 82 | export TMPDIR=/Volumes/Temp/tmp 83 | fi 84 | 85 | if [ -e /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk ]; then 86 | export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk 87 | else 88 | echo "WARNING: MacOSX11.sdk not present, using default SDK which may be newer!" 89 | fi 90 | 91 | export MACOSX_DEPLOYMENT_TARGET=11.0 92 | export OS_VER=20 93 | 94 | # for cmake, meson and ninja 95 | 96 | if [ -e /Applications/CMake.app/Contents/bin ]; then 97 | export PATH=$PATH:/Applications/CMake.app/Contents/bin 98 | fi 99 | 100 | if ! command -v cmake > /dev/null; then 101 | echo "ERROR: cmake not found" >&2 102 | exit 1 103 | fi 104 | 105 | if command -v meson > /dev/null && command -v ninja > /dev/null; then 106 | echo "ninja and meson are already on the PATH" 107 | else 108 | PYLIB=$(ls -d ~/Library/Python/3.*/bin | tail -n1) 109 | if [ -z "$PYLIB" ]; then 110 | echo "ERROR: cannot find Python 3 binaries. Use pip3 install --user meson ninja" 111 | exit 1 112 | fi 113 | export PATH=$PATH:$PYLIB 114 | if command -v meson > /dev/null && command -v ninja > /dev/null; then 115 | echo "ninja and meson found in $PYLIB" 116 | else 117 | echo "ERROR: cannot find ninja/meson 3 binaries. Use pip3 install --user meson ninja" 118 | exit 1 119 | fi 120 | fi 121 | 122 | ## check if freetype is built with harfbuzz - we cannot continue if it's not 123 | RECPT=`ls -d build/freetype-* | head -n1` 124 | if [ -z "$RECPT" ] || ! grep '^BuiltWith:.*harfbuzz' "$RECPT" >/dev/null 2>&1; then 125 | [ -n "$DO_CONT"] && echo "WARNING: freetype bootstrap is not complete - have to ignore --continue" 126 | unset DO_CONT 127 | fi 128 | 129 | if [ -z "$DO_CONT" ]; then 130 | ## freetype and harfbuzz have a circular dependency 131 | ## and need to be bootstrapped in the order FT -> HB -> FT 132 | echo '' 133 | echo " ----- Bootstrapping freetype" 134 | echo '' 135 | ./build.sh -f -p freetype 136 | ./build.sh -f -p harfbuzz 137 | rm -rf build/freetype-2.* 138 | echo '' 139 | echo " ----- Re-building freetype with Harfbuzz" 140 | echo '' 141 | ./build.sh -f -p freetype 142 | fi 143 | 144 | if [ ! -e build/r-base-dev ]; then unset DO_CONT; fi 145 | 146 | ## required 147 | if [ -z "$DO_CONT" ]; then 148 | echo '' 149 | echo " ----- Building r-base-dev" 150 | echo '' 151 | ./build.sh -f -p r-base-dev 152 | fi 153 | 154 | ## NOTE: CRAN R also uses: readline5 pango 155 | if [ -n "$AS_CRAN" -a -z "$DO_CONT" ]; then 156 | ./build.sh -f -p readline5 157 | ## pango has to be built last due to glib causing issues 158 | fi 159 | 160 | ## useful 161 | if [ -n "$RUN_TOOLS" ]; then 162 | echo '' 163 | echo " ----- Building tools" 164 | echo '' 165 | ./build.sh -f -p subversion emacs 166 | fi 167 | 168 | ## all others 169 | if [ -n "$RUN_ALL" ]; then 170 | echo '' 171 | echo " ----- Building all" 172 | echo '' 173 | ./build.sh -f -p all 174 | fi 175 | 176 | echo '' 177 | echo ' NOTE: if you want to disable fail-fast, use' 178 | echo ' ./build.sh -f -p -- -k all' 179 | 180 | echo '' 181 | echo "=== DONE" 182 | echo '' 183 | echo 'Consider running scripts/mkdist.pl' 184 | echo '' 185 | -------------------------------------------------------------------------------- /scripts/bootstrap-darwin20-arm64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # settings used to bootstrap libraries on CRAN for arm64 R builds 4 | 5 | ## desination, __no__ leading slash! 6 | DSTPATH=opt/R/arm64 7 | 8 | if [ ! -e /Library/Frameworks/R.framework/Resources/bin/Rscript ]; then 9 | echo '' 10 | echo 'ERROR: R framework not found. Please install R from CRAN first (just framework is sufficient)' 11 | echo '' 12 | exit 1 13 | fi 14 | 15 | if [ ! -e scripts/mkmk.R ]; then 16 | echo '' 17 | echo 'Please run this script from the recipes root directory via' 18 | echo '' 19 | echo ' scripts/bootstrap-darwin20-arm64.sh' 20 | echo '' 21 | exit 1 22 | fi 23 | 24 | if [ "x$1" = "x-h" ]; then 25 | echo '' 26 | echo ' Usage: scripts/bootstrap-darwin20-arm64.sh [-h|-a]' 27 | echo '' 28 | echo 'Must be run from the recipes root directory' 29 | echo 'Default invocation builds binaries necessary for R.' 30 | echo 'Option -a builds all recipes' 31 | echo '' 32 | exit 0 33 | fi 34 | 35 | if [ ! -e /$DSTPATH ]; then 36 | mkdir -p /$DSTPATH 37 | if [ ! -e /$DSTPATH ]; then 38 | echo '' 39 | echo "ERROR: cannot create /$DSTPATH" 40 | echo ' Please adjust permissions or create it yourself with something like:' 41 | echo '' 42 | echo " sudo mkdir -p /$DSTPATH" 43 | echo " sudo chown \$USER /$DSTPATH" 44 | echo '' 45 | exit 1 46 | fi 47 | fi 48 | 49 | NOSUDO=1 PREFIX=$DSTPATH /Library/Frameworks/R.framework/Resources/bin/Rscript scripts/mkmk.R 50 | 51 | ## pkgconfig must be built first 52 | NOSUDO=1 PREFIX=$DSTPATH PATH=/$DSTPATH/bin:$PATH PKG_CONFIG_PATH=/$DSTPATH/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig CC='clang -arch arm64' CXX='clang++ -arch arm64' OBJC='clang -arch arm64' CPPFLAGS=-I/$DSTPATH/include LDFLAGS=-L/$DSTPATH/lib make -C build pkgconfig 53 | 54 | ## add zlib system stub 55 | cp -p stubs/pkgconfig-darwin/zlib.pc /$DSTPATH/lib/pkgconfig/ 56 | 57 | ## build all R dependencies 58 | NOSUDO=1 PREFIX=$DSTPATH PATH=/$DSTPATH/bin:$PATH PKG_CONFIG_PATH=/$DSTPATH/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig CC='clang -arch arm64' CXX='clang++ -arch arm64' OBJC='clang -arch arm64' CPPFLAGS=-I/$DSTPATH/include LDFLAGS=-L/$DSTPATH/lib make -C build \ 59 | xz tiff libpng openssl jpeg pcre2 cairo texinfo 60 | 61 | ## external: to build R we also need gfortran which is not part of the recipes 62 | 63 | ## everything else is optional for packages 64 | if [ "x$1" = x-a ]; then 65 | NOSUDO=1 PREFIX=$DSTPATH PATH=/$DSTPATH/bin:$PATH PKG_CONFIG_PATH=/$DSTPATH/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig CC='clang -arch arm64' CXX='clang++ -arch arm64' OBJC='clang -arch arm64' CPPFLAGS=-I/$DSTPATH/include LDFLAGS=-L/$DSTPATH/lib make -k -C build all 66 | fi 67 | -------------------------------------------------------------------------------- /scripts/configure.cmake: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This is a small wrapper that makes cmake work in autoconf setting 3 | # (C)2021 Simon Urbanek, License: MIT 4 | # based on ideas by Brian Ripley 5 | 6 | echo -n 'Checking for cmake ... ' 7 | : ${CMAKE=`which cmake`} 8 | # on macOS CMake is an application 9 | if [ -z "$CMAKE" -a -e "/Applications/CMake.app/Contents/bin/cmake" ]; then 10 | CMAKE=/Applications/CMake.app/Contents/bin/cmake 11 | fi 12 | if [ -z "$CMAKE" ]; then 13 | echo 'NOT FOUND' 14 | echo 'ERROR: cannot find cmake! This package requires cmake to build' 15 | exit 1 16 | fi 17 | echo $CMAKE 18 | echo -n 'Checking if it works ...' 19 | if $CMAKE --version >/dev/null; then 20 | echo yes 21 | else 22 | echo NO 23 | echo 'ERROR: cannot find cmake! This package requires cmake to build' 24 | exit 1 25 | fi 26 | 27 | BD="`pwd`" 28 | SD="`dirname $0`" 29 | SD="`(cd $SD && pwd)`" 30 | 31 | echo Collecting env vars from arguments: 32 | while (( "$#" )); do 33 | if echo "$1" | grep -E '^[A-Z]+=' >/dev/null; then 34 | export "$1" 35 | echo " $1" 36 | else 37 | if echo "$1" | grep '^--prefix='; then 38 | PREFIX=`echo $1 | sed 's:^--prefix=/*::'` 39 | MARGS+=("-DCMAKE_INSTALL_PREFIX=/$PREFIX") 40 | else 41 | MARGS+=("$1") 42 | fi 43 | fi 44 | shift 45 | done 46 | 47 | echo Invoking cmake: 48 | set -x 49 | (cd "$BD" && $CMAKE "$SD" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:bool=OFF -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON "${MARGS[@]}" ) || (echo '*** FAILED' >&2; exit 1) 50 | set +x 51 | 52 | echo "Makefile generated." 53 | -------------------------------------------------------------------------------- /scripts/configure.make: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This is a small wrapper that makes simple Makefile work in autoconf setting 3 | # (C)2022 Simon Urbanek, License: MIT 4 | # 5 | # Special arguments: 6 | # --prefix= => prefix=/ 7 | # --target= specifies the build target (empty by default) 8 | # --install= specifies the install target ('install' by default) 9 | # --set=<...> defines explicit make argument/variable (needed to 10 | # distinguish FOO=bar env var from FOO=bar make var (as --set=FOO=bar). 11 | # Any arguments of the form XXX=YY will be converted to 12 | # environment variables. Any other arguments are passed to make. 13 | 14 | BD="`pwd`" 15 | SD="`dirname $0`" 16 | SD="`(cd $SD && pwd)`" 17 | 18 | default_target='' 19 | install_target=install 20 | 21 | echo Collecting env vars from arguments: 22 | while (( "$#" )); do 23 | if echo "$1" | grep -E '^[A-Z]+=' >/dev/null; then 24 | export "$1" 25 | echo " $1" 26 | else 27 | case "$1" in 28 | --prefix=*) 29 | PREFIX=`echo $1 | sed 's:^--prefix=/*::'` 30 | echo " prefix=/$PREFIX" 31 | MARGS+=("prefix=/$PREFIX") 32 | ;; 33 | --target=*) 34 | default_target=`echo $1 | sed 's:^--target=::'` 35 | echo " (default build target: ${default_target})" 36 | ;; 37 | --install=*) 38 | install_target=`echo $1 | sed 's:^install=::'` 39 | echo " (install target: ${default_target})" 40 | ;; 41 | --set=*) 42 | MARGS+=("`echo $1 | sed 's:^--set=::'`") 43 | ;; 44 | *) 45 | MARGS+=("$1") 46 | ;; 47 | esac 48 | fi 49 | shift 50 | done 51 | 52 | echo "Build args: ${MARGS[@]} ${default_target}" 53 | echo "Install args: ${install_target} DESTDIR=\$(DESTDIR) ${MARGS[@]}" 54 | 55 | echo Copying sources ... 56 | cp -p -R "${SD}/" . 57 | 58 | mv "$BD/Makefile" "$BD/Makefile.real" 59 | 60 | cat > "$BD/Makefile" << EOF 61 | all: 62 | make -f Makefile.real ${MARGS[@]} ${default_target} 63 | 64 | install: 65 | make -f Makefile.real ${install_target} DESTDIR=\$(DESTDIR) ${MARGS[@]} 66 | 67 | .PHONY: all install 68 | 69 | EOF 70 | 71 | echo "Makefile generated." 72 | -------------------------------------------------------------------------------- /scripts/configure.meson-ninja: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This is a small wrapper that makes meson work in autoconf setting 3 | # (C)2021 Simon Urbanek, License: MIT 4 | 5 | echo -n 'Checking for meson ... ' 6 | if meson --version > /dev/null; then 7 | echo OK 8 | else 9 | echo 'missing' 10 | echo 'ERROR: cannot find meson! This package requires meson and ninja' 11 | exit 1 12 | fi 13 | 14 | echo -n 'Checking for ninja ... ' 15 | if ninja --version > /dev/null; then 16 | echo OK 17 | else 18 | echo 'missing' 19 | echo 'ERROR: cannot find ninja! This package requires meson and ninja' 20 | exit 1 21 | fi 22 | 23 | BD="`pwd`" 24 | SD="`dirname $0`" 25 | SD="`(cd $SD && pwd)`" 26 | 27 | echo Collecting env vars from arguments: 28 | while (( "$#" )); do 29 | if echo "$1" | grep -E '^[A-Z]+=' >/dev/null; then 30 | export "$1" 31 | echo " $1" 32 | else 33 | MARGS+=("$1") 34 | fi 35 | shift 36 | done 37 | 38 | echo Invoking meson: 39 | set -x 40 | (cd "$SD" && meson setup "${MARGS[@]}" --default-library static "$BD" ) || (echo '*** FAILED' >&2; exit 1) 41 | set +x 42 | 43 | cat > "$BD/Makefile" << EOF 44 | all: 45 | ninja -j10 46 | 47 | install: 48 | DESTDIR=\$(DESTDIR) meson install 49 | EOF 50 | 51 | echo "Makefile generated." 52 | 53 | -------------------------------------------------------------------------------- /scripts/mkdist.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | ( -d "scripts" ) || die "ERROR: please run this from the project root!\n\n"; 4 | 5 | ( -d "build" ) || die "ERROR: cannot find build directory with binaries!\n\n"; 6 | 7 | mkdir "dist" if ( ! -e "dist" ); 8 | 9 | $xz = `which xz`; chomp $xz; 10 | if ( $xz eq '' ) { 11 | $arch = `uname -m`; chomp $arch; 12 | if ( -x "/opt/R/$arch/bin/xz" ) { 13 | $xz = "/opt/R/$arch/bin/xz"; 14 | } elsif ( -x "/usr/local/bin/xz" ) { 15 | $xz = "/usr/local/bin/xz"; 16 | } else { 17 | die "ERROR: cannot find xz to re-compress binary tar balls!"; 18 | } 19 | } 20 | 21 | open OUT, ">dist/PACKAGES"; 22 | 23 | @b = ; 24 | @a = ; 25 | 26 | foreach $fn (@b, @a) { 27 | $pkg = $fn; 28 | $pkg =~ s/.*\///; 29 | $pkg =~ s/-darwin.*.tar.gz$//; 30 | $pkg =~ s/\.bundle$//; 31 | 32 | $dep = ''; $name = ''; 33 | if ( -e "build/$pkg" ) { 34 | my $bundle = 0; 35 | open IN, "build/$pkg"; 36 | while () { 37 | if (/^Package:/) { 38 | chomp; 39 | s/^Package: *//; 40 | $name = $_; 41 | } 42 | if (/^Bundle:/) { 43 | chomp; 44 | s/^Bundle: *//; 45 | $name = $_; 46 | $bundle = 1; 47 | } 48 | } 49 | close IN; 50 | ( $name ne '') || die "ERROR: receipt $pkg does not include package name!\n"; 51 | ( -e "recipes/$name" ) || die "ERROR: cannot find recipe for $name!\n"; 52 | open IN, "recipes/$name"; 53 | while () { ## fill in those from the recipe, not the receipt 54 | $dep .= $_ if (/^(Depends|Suggest|Build[-.]Dep)/i); 55 | } 56 | my $sha = ''; 57 | if (!$bundle) { 58 | my $xfn = $fn; 59 | $xfn =~ s/.*\//dist\//; 60 | $xfn =~ s/\.tar\.gz/.tar.xz/; 61 | ($atime, $mtime) = (stat($fn))[8,9]; 62 | ($xmtime) = (stat($xfn))[9]; 63 | if ( -e $xfn && $xmtime == $mtime) { 64 | print "$fn has not changed, skipping re-compression\n"; 65 | } else { 66 | print "Re-compressing $fn -> $xfn\n"; 67 | system("gzip -dc $fn | $xz -c9 > '$xfn'") == 0 || die("Cannot re-compress!"); 68 | system("ls -l $fn"); 69 | ($atime, $mtime) = (stat($fn))[8,9]; 70 | utime($atime, $mtime, $xfn); 71 | system("ls -l $xfn"); 72 | } 73 | $sha = `openssl sha256 $xfn | sed 's:.*= ::'`; 74 | chomp $sha; 75 | $sha="Binary-SHA256: $sha\n" if ($sha ne ''); 76 | } 77 | $out = ''; 78 | open IN, "build/$pkg"; 79 | while () { 80 | s/\.tar\.gz/.tar.xz/g; 81 | $_ = '' if (/^BuiltWith: *$/); 82 | $out .= (/^Depend/) ? $dep : $_; 83 | $out .= $sha if (/^Binary/); 84 | } 85 | close IN; 86 | print OUT $out; 87 | } else { 88 | print STDERR "WARNING: $fn ($name) has no recipe\n"; 89 | } 90 | } 91 | close OUT; 92 | -------------------------------------------------------------------------------- /scripts/mkmk.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | ## this script generates build/Makefile 3 | ## which is used to build libraries according to the recipes 4 | 5 | my $default_prefix = "usr/local"; 6 | 7 | my $root = `pwd`; 8 | chomp $root; 9 | 10 | my @f = map { /[.~]/ ? () : ($_) } ; 11 | 12 | my $binary = $ENV{"BINARY"} + 0; 13 | my $binary_url = $ENV{"BINARY_URL"} + 0; 14 | my $noinstall = $ENV{"NOINSTALL"} + 0 > 0 ? "#" : ""; 15 | my $jobs = $ENV{"JOBS"} + 0 > 0 ? $ENV{"JOBS"} : "12"; 16 | 17 | my %pkgs; 18 | 19 | my $bin = "$root/scripts"; 20 | 21 | my $prefix = $ENV{"PREFIX"}; 22 | $prefix = $default_prefix if ($prefix eq ''); 23 | 24 | ## strip any leading / - it has to be a relative path and no double // 25 | $prefix =~ s/^\/+//; 26 | 27 | my @pparts = split /\/+/, $prefix; 28 | my $ndir = @pparts; 29 | 30 | my $sudo = ($ENV{"NOSUDO"} + 0) > 0 ? "" : "sudo "; 31 | 32 | my $curl = $ENV{"CURL"}; 33 | if ($curl eq '') { 34 | $curl = ( -e "$root/scripts/curl" ) ? "$root/scripts/curl" : "curl"; 35 | } 36 | 37 | my $tarspec = $prefix; 38 | ## Recent macOS makes /usr/local read-only, so we exclude /usr/local itself 39 | $tarspec = "$prefix/*" if ($prefix eq 'usr/local'); 40 | 41 | sub read_dcf { 42 | my %h; 43 | my $fn = $_[0], $key, $par = 1, $section = 1; 44 | open IN, $fn || die "Cannot open $fn"; 45 | while () { 46 | chomp; 47 | if (/^([#A-Za-z\._0-9\-]+):\s*(.*)$/) { 48 | if ($section > 1) { 49 | print STDERR "WARNING: more than one paragraph in $fn, ignoring\n"; 50 | return %h; 51 | } 52 | $key = lc($1); 53 | my $val = $2; 54 | ## make . (R-syntax) and - (Debian) equivalent 55 | $key =~ s/[-.]/-/g; 56 | if ($h{$key} ne '') { 57 | print STDERR "WARNING: duplicate section '$key' in $fn\n"; 58 | $h{$key} .= " $val"; 59 | } else { 60 | $h{$key} = $val; 61 | } 62 | } elsif (/^\s+(.*)/) { 63 | if ($key eq '') { 64 | print STDERR "ERROR: invalid DCF file $fn, continuation without parent: $_\n"; 65 | exit 1; 66 | } 67 | if ($section > 1) { 68 | print STDERR "WARNING: more than one paragraph in $fn, ignoring\n"; 69 | return %h; 70 | } 71 | $h{$key} .= " $_"; 72 | } elsif (/^$/) { 73 | $section++; 74 | } else { 75 | print STDERR "ERROR: invalid DCF file $fn: $_\n"; 76 | exit 1; 77 | } 78 | } 79 | return %h; 80 | } 81 | 82 | sub get_deps { 83 | my @a = split /\s*,\s*/, $_[0]; 84 | return map { 85 | my %d; 86 | my $pkg = $_; 87 | if (/(.*) \(([<=>]+)\s*([0-9.]+)\)/) { 88 | $d{'op'} = $2; 89 | $d{'ver'} = $3; 90 | $pkg = $1; 91 | } 92 | $d{'name'} = $pkg; 93 | \%d; 94 | } @a; 95 | } 96 | 97 | foreach $fn (@f) { 98 | my %d = read_dcf($fn); 99 | my $ver = $d{"version"}; 100 | 101 | ## replace ${prefix} with the prefix 102 | foreach (keys %d) { $d{$_} =~ s/\$\{prefix\}/$prefix/ge; } 103 | ## replace ${ver} with the version 104 | foreach (keys %d) { $d{$_} =~ s/\$\{ver\}/$ver/ge; } 105 | 106 | my $src = $d{"source-url"}; 107 | my $pkg = $d{"package"}; 108 | my $dep = $d{"depends"}; 109 | my $bdep = $d{"build-depends"}; 110 | my $sug = $d{"suggests"}; 111 | 112 | ## we can't check everything, but at least pkg/ver are used in names so should be sane 113 | if ($pkg !~ /^[A-Za-z0-9.+-]+$/) { 114 | print STDERR "ERROR: Invalid package name in $fn: \"$pkg\"\n"; 115 | exit 1; 116 | } 117 | if ($ver ne '' && $ver !~ /^[A-Za-z0-9.+-]+$/) { 118 | print STDERR "ERROR: Invalid version in $fn: \"$ver\"\n"; 119 | exit 1; 120 | } 121 | 122 | # print "=== $fn:\n"; 123 | # foreach (sort(keys(%d))) { print "$_: $d{$_}\n"; } 124 | 125 | my @deps = get_deps($dep); 126 | my @sugs = get_deps($sug); 127 | my @bdeps = get_deps($bdep); 128 | # print "$fn: '$dep' "; foreach (@deps) { my %h=%$_; print "[$h{name}] "; }; print "\n"; 129 | 130 | if ($ver eq '' && $src eq '') { ## virtual 131 | $pkgs{$pkg} = { pkg => $pkg, dep => \@deps, bdep => \@bdeps, sug => \@sugs, d => \%d }; 132 | } else { 133 | ## this is a hack: GNU server is incredibly slow (we are talking 134 | ## dial-up modem speeds!) so switch to a local mirror if set 135 | if (($gnu_url=`cat ~/.gnu-mirror 2>/dev/null`) ne '') { 136 | chomp $gnu_url; 137 | $src =~ s/https?:\/\/ftp\.gnu\.org\/(pub\/|)gnu\//$gnu_url/ge; 138 | } 139 | 140 | $patch = (-e "$root/$fn.patch") ? "$root/$fn.patch" : ""; 141 | $pkgs{$pkg} = { pkg => $pkg, ver => $ver, dep => \@deps, bdep => \@bdeps, src => $src, d => \%d, patch => $patch, sug => \@sugs }; 142 | } 143 | } 144 | 145 | my $ok = 1; 146 | 147 | ## check dependencies 148 | foreach my $name (keys %pkgs) { 149 | my %pkg = %{$pkgs{$name}}; 150 | my @adep = @{$pkg{dep}}; 151 | push @adep, @{$pkg{bdep}}; 152 | foreach my $c (@adep) { 153 | my %cond = %$c; 154 | if ($cond{name} ne '') { 155 | if (! defined $pkgs{$cond{name}}) { 156 | print STDERR "ERROR: $name requires $cond{name} for which we have no recipe"; 157 | $ok = 0; 158 | } elsif ($cond{op} ne '') { 159 | if ($cond{op} ne ">=") { 160 | print STDERR "WARNING: $name uses condition $cond{name} $cond{op} $cond{ver}, but we only supprot >= operators at this point"; 161 | } else { 162 | # FIXME: implement version comparison 163 | # if (pkgs[[cond$name]]$nver < cond$version) { 164 | # message("ERROR: ", pkg, "requires ",cond$name," ",cond$op, " ", as.character(cond$version), ", but ", cond$name, " is only available in ", pkgs[[cond$name]]$ver) 165 | # ok <- FALSE 166 | # } 167 | } 168 | } 169 | } 170 | } 171 | if (!$ok) { 172 | print STDERR "=== bailing out, dependencies not met ===\n\n"; 173 | exit 1; 174 | } 175 | } 176 | 177 | my $os = lc `uname`; chomp $os; 178 | my $arch = lc `uname -m`; chomp $arch; 179 | my $os_ver = `uname -r`; chomp $os_ver; 180 | $os_ver=$ENV{OS_VER} if ($ENV{OS_VER} ne ''); 181 | my $os_maj = $os_ver; 182 | $os_maj =~ s/\..*//; 183 | $os_maj = "$os.$os_maj"; 184 | 185 | ## auto-detect the binaries to pull from mac.R-project.org 186 | if ($binary && $binary_url eq '') { 187 | if ($os eq "darwin") { 188 | print STDERR "BINARY_URL must be set for anything other than macOS\n"; 189 | exit 1; 190 | } 191 | if ($arch eq "arm64") { 192 | $os_maj = "darwin.20"; 193 | $binary_url = "https://mac.r-project.org/libs-arm64"; 194 | } else { 195 | $os_maj = "darwin.17"; 196 | $binary_url = "https://mac.r-project.org/libs-4"; 197 | } 198 | } 199 | 200 | ## default flags 201 | $cfgflags = "--with-pic --disable-shared --enable-static"; 202 | 203 | sub cfg { 204 | my %d = %{$_[0]}; 205 | ## set the default cfgflags unless Configure.script is set 206 | ## in which case we can't assume it is autoconf-based 207 | my @f; 208 | push @f, $cfgflags if ($d{'configure-script'} eq '' && $d{'build-system'} eq ''); 209 | foreach (("configure", "configure-$os", "configure-$os_maj", "configure-$arch", 210 | "configure-$os-$arch", "configure-$os_maj-$arch")) { 211 | push @f, $d{$_} if ($d{$_} ne ''); 212 | } 213 | 214 | ## this is not completely fool-proof, but we try to accept --prefix overrides and not step on them 215 | my $tst = ' ' . join ' ', @f; 216 | @f = ("--prefix=/$prefix", @f) if (!($d{'configure-script'} ne '' || $tst =~ / --prefix=/)); 217 | 218 | return join ' ', @f; 219 | } 220 | 221 | sub chkhash { 222 | my %d = %{$_[0]}; 223 | if ($d{'source-sha256'} ne '') { 224 | return '&& [ '.lc($d{'source-sha256'}).' = `openssl sha256 $@ | sed '."'s:.*= ::'".'` ]'; 225 | } 226 | return ''; 227 | } 228 | 229 | system "mkdir -p build/src 2>/dev/null"; 230 | open OUT, ">build/Makefile" || die "ERROR: cannot create build/Makefile"; 231 | 232 | my $TAR = $ENV{"TAR"}; 233 | my $tarflags=''; 234 | 235 | $TAR = 'tar' if ($TAR eq ''); 236 | print OUT "TAR='$TAR'\nPREFIX='$prefix'\n\nbuild_all: all\n\n"; 237 | 238 | if(system("$TAR c --uid 0 /dev/null > /dev/null 2>&1")) { 239 | print "NOTE: your tar does not support --uid so it won't be set\n"; 240 | } else { 241 | $tarflags='--uid 0 --gid 80'; 242 | } 243 | 244 | sub dep_targets { 245 | my $sep = $_[1]; 246 | $sep = ' ' if ($seq eq ''); 247 | my $res = join ' ', map { 248 | my %d = %$_; 249 | my $name = $d{name}; 250 | my %p = %{$pkgs{$name}}; 251 | ($p{ver} eq '') ? $name : "$name-$p{ver}"; 252 | } @{$_[0]}; 253 | return $res; 254 | } 255 | 256 | ## quote string using ' quotes 257 | sub shQuote { 258 | my $a = $_[0]; 259 | $a =~ s/'/'\\''/g; ## ' -> '\'' 260 | $a = "'$a'"; 261 | ## in case quoted ' is first or last remove the empty string 262 | $a =~ s/^''//; 263 | $a =~ s/''$//; 264 | return $a; 265 | } 266 | 267 | my @srctars; ## list of all source tar balls 268 | my %srcused; ## count how often each src is used 269 | 270 | foreach my $name (sort keys %pkgs) { 271 | my %pkg = %{$pkgs{$name}}; 272 | my %d = %{$pkg{d}}; 273 | my $pv = "$pkg{pkg}-$pkg{ver}"; 274 | my $bsys = ($d{'build-system'} ne '') ? $d{'build-system'} : ''; 275 | if ($bsys ne '') { 276 | $bsys = "$root/scripts/configure.$bsys"; 277 | if (! -e $bsys) { 278 | print STDERR "ERROR: I can't find driver for the build system $bsys (package $pkg{pkg})\n"; 279 | exit 1; 280 | } 281 | } 282 | 283 | my $dist = ($d{'distribution-files'} ne '') ? $d{'distribution-files'} : $tarspec; 284 | my $srcdir = ($d{'configure-subdir'} ne '') ? "/$d{'configure-subdir'}" : ''; 285 | my $cfg_scr = ($d{'configure-script'} ne '') ? $d{'configure-script'} : 'configure'; 286 | my $cfg_proc = ($d{'configure-driver'} ne '') ? $d{'configure-driver'} : ''; 287 | my $cfg_chmod = ($d{'configure-chmod'} ne '') ? $d{'configure-chmod'} : ''; 288 | my $mkinst = ($d{'install'} ne '') ? $d{'install'} : "make install"; 289 | my $tar = $pkg{src}; 290 | $tar =~ s/.*\///; 291 | $tar = $name."-$tar" if ($tar =~ /^[0-9]/); ## GitHub creates dangerous tar bombs - prepend recipe name in those cases for sanity 292 | $tar = $name."-$1" if ($tar =~ /^v([0-9].*)/); ## some use v prefix, so catch those and strip the prefix 293 | if ($pkg{ver} eq '') { ## virtual 294 | print OUT "$pkg{pkg}: ".dep_targets($pkg{bdep})." ".dep_targets($pkg{dep})."\n\techo 'Bundle: $pkg{pkg}~Depends: $d{depends}~BuiltWith: ".dep_targets($pkg{dep}, ", ")."~BuiltFor: $os_maj-$arch~' | tr '~' '\\n' > '\$\@' && cp '\$\@' '\$\@.bundle' && touch '\$\@'\n"; 295 | next; 296 | } 297 | my $postinst = ($d{'postinstall'} ne '') ? " && ( cd $root/build/$pv-dst && $d{'postinstall'} )" : ''; 298 | if (!$binary) { 299 | if ($d{special} =~ /in-sources/) { ## requires in-sources install 300 | $cfg_chmod = "chmod $cfg_chmod ".shQuote($cfg_scr)." && " if ($cfg_chmod ne ''); 301 | print OUT "$pv-dst: src/$pv ".dep_targets($pkg{bdep})." ".dep_targets($pkg{dep})."\n\trm -rf $pv-obj \$\@ && rsync -a src/$pv$srcdir/ $pv-obj/ && cd $pv-obj && ${cfg_chmod}PREFIX=$prefix $cfg_proc ./$cfg_scr ".cfg($pkg{d})." && PREFIX=$prefix make MAKELEVEL=0 -j$jobs && PREFIX=$prefix $mkinst DESTDIR=$root/build/$pv-dst$postinst\n\n"; 302 | } else { 303 | $cfg_chmod = "chmod $cfg_chmod ".shQuote("../src/$pv$srcdir/$cfg_scr")." && " if ($cfg_chmod ne ''); 304 | print OUT "$pv-dst: src/$pv ".dep_targets($pkg{bdep})." ".dep_targets($pkg{dep})."\n\trm -rf $pv-obj \$\@ && mkdir $pv-obj && cd $pv-obj && ${cfg_chmod}PREFIX=$prefix $cfg_proc ../src/$pv$srcdir/$cfg_scr ".cfg($pkg{d})." && PREFIX=$prefix make MAKELEVEL=0 -j$jobs && PREFIX=$prefix $mkinst DESTDIR=$root/build/$pv-dst$postinst\n\n"; 305 | } 306 | $do_patch = ($pkg{patch} ne '') ? "&& patch -p1 < ".shQuote($pkg{patch}) : ''; 307 | $do_patch = "$do_patch && cp ". shQuote($bsys) ." configure" if ($bsys ne ''); 308 | print OUT "src/$pv: src/$tar\n\tmkdir -p src/$pv && (cd src/$pv && \$(TAR) fxj ../$tar && mv */* . $do_patch)\n"; 309 | if ($srcused{$tar} < 1) { 310 | push @srctars, "src/$tar"; 311 | $srcused{$tar}++; 312 | print OUT "src/$tar:\n\t$curl -fL -o \$\@ '$pkg{src}'".chkhash($pkg{d})."\n"; 313 | print OUT "src/$tar.sha256: src/$tar\n\topenssl sha256 \$^ > \$\@\n"; 314 | } 315 | print OUT "src/$name.hash: src/$tar.sha256\n\tsed -e 's:.* ::' -e 's/^/Source-SHA256: /' \$^ > \$\@\n"; 316 | print OUT "$pv-$os_maj-$arch.tar.gz: $pv-dst\n\tif [ ! -e \$^/$prefix/pkg ]; then mkdir \$^/$prefix/pkg; fi\n\t(cd \$^ && find $dist > $prefix/pkg/$pv-$os_maj-$arch.list )\n$chown\t\$(TAR) fcz '\$\@' $tarflags -C '\$^' $dist $prefix/pkg\n"; 317 | } else { 318 | print OUT "$pv-$os_maj-$arch.tar.gz:\n\t$curl -LO $binary_url/\$\@\n"; 319 | } 320 | print OUT "$pv: $pv-$os_maj-$arch.tar.gz\n\t$noinstall$sudo\$(TAR) fxz '\$^' -C /$prefix --strip $ndir && echo 'Package: $pkg{pkg}~Version: $pkg{ver}~Depends: $d{depends}~BuiltWith: ".dep_targets($pkg{dep}, ", ")."~BuiltFor: $os_maj-$arch~Binary: $pv-$os_maj-$arch.tar.gz~' | tr '~' '\\n' > '\$\@' && '$bin/add-if-present' '\$\@' ".dep_targets($pkg{sug}, ", ")." && touch '\$\@'\n"; 321 | print OUT "$pkg{pkg}: $pv\n\n"; 322 | } 323 | #for (pkg in virt) { 324 | # cat(pkg$pkg,": ",dep.targets(pkg$dep),"\n\ttouch '$@'\n") 325 | #} 326 | 327 | print OUT "\n\nall: ". join(' ', map { ($pkgs{$_}{ver}) ? $pkgs{$_}{pkg}.'-'.$pkgs{$_}{ver} : ''; } sort keys %pkgs). "\n\n"; 328 | print OUT "download: ". join(' ', @srctars) ."\n\n.PHONY: all build_all download\n\n"; 329 | print OUT "hash: ". join(' ', map { ($pkgs{$_}{ver}) ? "src/$_.hash" : ''; } sort keys %pkgs) ."\n\n.PHONY: all build_all download hash\n\n"; 330 | close OUT; 331 | 332 | print "\nCreated build/Makefile\n\nUse make -C build to build and install a recipe\n\n"; 333 | 334 | -------------------------------------------------------------------------------- /stubs/pkgconfig-darwin/libcurl.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | supported_protocols="DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS LDAP LDAPS MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP" 7 | supported_features="AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy" 8 | 9 | Name: libcurl 10 | URL: https://curl.se/ 11 | Description: Library to transfer files with ftp, http, etc. 12 | Version: 7.54.0 13 | Requires: 14 | Cflags: -I${includedir} 15 | Libs: -L${libdir} -lcurl 16 | -------------------------------------------------------------------------------- /stubs/pkgconfig-darwin/libexslt.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | 7 | Name: libexslt 8 | Version: 0.8.13 9 | Description: EXSLT Extension library 10 | Requires: libxml-2.0 11 | Libs: -L${libdir} -lexslt -lxslt -lxml2 -lz -lpthread -licucore -lm 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /stubs/pkgconfig-darwin/libxml-2.0.pc: -------------------------------------------------------------------------------- 1 | ## For use with macOS system libxml2, 2 | ## which seems to have been 2.9.4 (May 2016) for a long time 3 | prefix=/usr 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include/libxml2 7 | modules=1 8 | 9 | Name: libXML 10 | Version: 2.9.4 11 | Description: libXML library version2. 12 | Requires: 13 | Libs: -lxml2 14 | ## static libs most likely need -llzma -liconv 15 | Libs.private: -lpthread -lz -lm 16 | Cflags: -I${includedir} 17 | -------------------------------------------------------------------------------- /stubs/pkgconfig-darwin/libxslt.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | 7 | Name: libxslt 8 | Version: 1.1.24 9 | Description: XSLT library version 2. 10 | Requires: libxml-2.0 11 | Libs: -L${libdir} -lxslt -lxml2 -lz -lpthread -licucore -lm 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /stubs/pkgconfig-darwin/zlib.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: zlib 7 | Description: zlib (system) 8 | Version: 1.2.11 9 | Libs: -lz 10 | Cflags: -I${includedir} 11 | --------------------------------------------------------------------------------