Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Add script to pickup recipes from anaconda repo #47

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# ignore created Berryconda installer files
installer/*/*.sh
nohup.out
8 changes: 8 additions & 0 deletions anaconda_recipes/cmake-binary/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
robocopy cmake-bin %PREFIX%\cmake-bin /E

mkdir %PREFIX%\etc\conda\activate.d
echo set "PATH=%%PATH%%;%PREFIX%\cmake-bin\bin" > %PREFIX%\etc\conda\activate.d\cmake-bin.bat
mkdir %PREFIX%\etc\conda\deactivate.d
echo set "PATH=%%PATH:%PREFIX%\cmake-bin\bin=%%" > %PREFIX%\etc\conda\deactivate.d\cmake-bin.bat

exit /b 0
28 changes: 28 additions & 0 deletions anaconda_recipes/cmake-binary/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

if [[ $(uname) == Darwin ]]; then
pushd cmake-bin/CMake.app/Contents
mkdir ${PREFIX}/cmake-bin
rm -rf bin/cmake-gui
cp -rf bin doc man share ${PREFIX}/cmake-bin
popd
else
cp -rf cmake-bin ${PREFIX}/
if [[ $(uname) == Linux ]] && ( [[ $(uname -m) == i686 ]] || [[ $(uname -m) == ppc64le ]] ); then
[[ -d curl-bin ]] && cp -rf curl-bin/* ${PREFIX}/cmake-bin/
[[ -d expat-bin ]] && cp -rf expat-bin/* ${PREFIX}/cmake-bin/
[[ -d krb5-bin ]] && cp -rf krb5-bin/* ${PREFIX}/cmake-bin/
[[ -d libssh2-bin ]] && cp -rf libssh2-bin/* ${PREFIX}/cmake-bin/
[[ -d ncurses-bin ]] && cp -rf ncurses-bin/* ${PREFIX}/cmake-bin/
[[ -d openssl-bin ]] && cp -rf openssl-bin/* ${PREFIX}/cmake-bin/
[[ -d xz-bin ]] && cp -rf xz-bin/* ${PREFIX}/cmake-bin/
[[ -d zlib-bin ]] && cp -rf zlib-bin/* ${PREFIX}/cmake-bin/
[[ -d bzip2-bin ]] && cp -rf bzip2-bin/* ${PREFIX}/cmake-bin/
fi
fi


mkdir -p $PREFIX/etc/conda/activate.d
echo export PATH=\$PATH:${PREFIX}/cmake-bin/bin > $PREFIX/etc/conda/activate.d/cmake-bin.sh
mkdir -p $PREFIX/etc/conda/deactivate.d
echo export PATH=\${PATH%:${PREFIX}/cmake-bin/bin} > $PREFIX/etc/conda/deactivate.d/cmake-bin.sh
85 changes: 85 additions & 0 deletions anaconda_recipes/cmake-binary/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package:
name: cmake-binary
version: 3.9.1 # [linux64 or win or osx]
version: 3.6.3 # [linux32 or ppc64le]

source:
- url: https://repo.continuum.io/pkgs/free/linux-32/cmake-3.6.3-0.tar.bz2 # [linux32]
folder: cmake-bin # [linux32]
sha256: 3da2fcd9e742378f104938b8ffdb6205dd12d1b3d659c925580bc20d1d762423 # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/curl-7.54.1-0.tar.bz2 # [linux32]
folder: curl-bin # [linux32]
sha256: c18e79bc9e395fbf3f8181ade2712fe1f533e72cd1f40cc7b54a7781da2896e9 # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/expat-2.1.0-0.tar.bz2 # [linux32]
folder: expat-bin # [linux32]
sha256: 44cb0ec5d9f09080532f6ba9a084125cab77617303e3d15004c8639b6886507f # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/krb5-1.13.2-0.tar.bz2 # [linux32]
folder: krb5-bin # [linux32]
sha256: 85051dd1d5f2e445e2210d9b66abd059fdd4a2010110ef36040cd45fdd3faf38 # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/libssh2-1.8.0-0.tar.bz2 # [linux32]
folder: libssh2-bin # [linux32]
sha256: bf297dda04b90092a8d1365dd93fc9de99d14d67213303bd7e2c8e8b9467736b # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/ncurses-5.9-10.tar.bz2 # [linux32]
folder: ncurses-bin # [linux32]
sha256: 0429ff6a84ac2538d21712c896907e060a23c1004571c9c24990ecdd33d3de85 # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/openssl-1.0.2l-0.tar.bz2 # [linux32]
folder: openssl-bin # [linux32]
sha256: 297a5bd913f553772de286c20d1aad16e1374e8f49b45046fdd50d4a70170d09 # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/xz-5.2.3-0.tar.bz2 # [linux32]
folder: xz-bin # [linux32]
sha256: 15d0cee74f649f7a2f530e332e9548757fb7e97665cd2660883a69d2c33a5521 # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/zlib-1.2.11-0.tar.bz2 # [linux32]
folder: zlib-bin # [linux32]
sha256: 3c871e456c13baa7e563bbff0fcf100c8f7e39b4d00cd337485e162d2df417fa # [linux32]
- url: https://repo.continuum.io/pkgs/free/linux-32/bzip2-1.0.6-3.tar.bz2 # [linux32]
folder: bzip2-bin # [linux32]
sha256: 4ecbe0f83d3aef6c7b847651a22817986ad12f1371362cd7f42db6c99485bfea # [linux32]
- url: https://cmake.org/files/v3.9/cmake-3.9.1-Linux-x86_64.tar.gz # [linux64]
folder: cmake-bin # [linux64]
sha256: ecbaf72981ccd09d9dade6d580cf1213eef15ef95a675dd9d4f0d693f134644f # [linux64]
- url: https://repo.continuum.io/pkgs/free/linux-ppc64le/bzip2-1.0.6-3.tar.bz2 # [ppc64le]
folder: bzip2-bin # [ppc64le]
sha256: 9f247e2ec023f3962d171cc7fe165aa5841f2a52e30c79c60d38b8fc2d988f37 # [ppc64le]
- url: https://repo.continuum.io/pkgs/free/linux-ppc64le/cmake-3.6.3-0.tar.bz2 # [ppc64le]
folder: cmake-bin # [ppc64le]
sha256: 5b1a5d67f40db5370ef34390804f3a6db324c4e654efd06b29a201864285d969 # [ppc64le]
- url: https://repo.continuum.io/pkgs/free/linux-ppc64le/curl-7.52.1-0.tar.bz2 # [ppc64le]
folder: curl-bin # [ppc64le]
sha256: 1f4d71aa9195f3e083bf33a69105a16dad8573e1e473ef7710125a4267adfe1b # [ppc64le]
- url: https://repo.continuum.io/pkgs/free/linux-ppc64le/expat-2.1.0-0.tar.bz2 # [ppc64le]
folder: expat-bin # [ppc64le]
sha256: 853ec724256da2a72a6f3c6e99c689163d6af5070a0c0079208348ab33e4c673 # [ppc64le]
- url: https://repo.continuum.io/pkgs/free/linux-ppc64le/openssl-1.0.2l-0.tar.bz2 # [ppc64le]
folder: openssl-bin # [ppc64le]
sha256: 37975342dc390345e994ba7a48cc08c3f5ec10bc9da050d4dbe8ca771f4b8fcc # [ppc64le]
- url: https://repo.continuum.io/pkgs/free/linux-ppc64le/xz-5.2.3-1.tar.bz2 # [ppc64le]
folder: xz-bin # [ppc64le]
sha256: 072a97235fa9d391c6ed423caee1a5beaaf53d9ae1a18ef50dc3ea6ea1a77b94 # [ppc64le]
- url: https://repo.continuum.io/pkgs/free/linux-ppc64le/zlib-1.2.11-1.tar.bz2 # [ppc64le]
folder: zlib-bin # [ppc64le]
sha256: ad16e4dce7b0a7217b0c95319eabb0999a02c4706b8e5bbc7fbfa9d9eb25979c # [ppc64le]
- url: https://cmake.org/files/v3.9/cmake-3.9.1-Darwin-x86_64.tar.gz # [osx]
folder: cmake-bin # [osx]
sha256: b99918b38ba37aaa81314f8a96ced123317d6101b67512bbfa25814a256dcd91 # [osx]
- url: https://cmake.org/files/v3.9/cmake-3.9.1-win64-x64.zip # [win32]
folder: cmake-bin # [win32]
sha256: a3226743c0b160f8f402aa72103a2ec391a8ba5556c49ddd047b1c62a9f75ffb # [win32]
- url: https://cmake.org/files/v3.9/cmake-3.9.1-win32-x86.zip # [win64]
folder: cmake-bin # [win64]
sha256: e0d9501bd34e3100e925dcb2e07f5f0ce8980bdbe5fce0ae950b21368d54c1a1 # [win64]

build:
detect_binary_files_with_prefix: False # [linux32 or ppc64le]

about:
home: http://www.cmake.org/
license: BSD 3-clause
license_family: BSD
summary: CMake is an extensible, open-source system that manages the build process
description: |
CMake is an open-source, cross-platform family of tools designed to build,
test and package software.
dev_url: https://gitlab.kitware.com/cmake/cmake/
doc_url: https://cmake.org/documentation/
doc_source_url: https://github.com/Kitware/CMake/blob/master/README.rst

65 changes: 65 additions & 0 deletions anaconda_recipes/crosstool-ng-bootstrap/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash

export EXTRA_CFLAGS="-I${PREFIX}/include -I${PREFIX}/include/ncurses"
export EXTRA_LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib -lncursesw"
export CPPFLAGS="-I${PREFIX}/include -L${PREFIX}/lib"
export MAKE=$(which make)

if [[ $(uname) == Darwin ]]; then
if ! which objcopy; then
echo "#!/usr/bin/env bash" > ${PWD}/objcopy
echo "exit 0" >> ${PWD}/objcopy
export OBJCOPY=${PWD}/objcopy
chmod +x ${PWD}/objcopy
fi
if ! which readelf; then
echo "#!/usr/bin/env bash" > ${PWD}/readelf
echo "exit 0" >> ${PWD}/readelf
export READELF=${PWD}/readelf
chmod +x ${PWD}/readelf
fi
if ! which help2man; then
echo "#!/usr/bin/env bash" > ${PWD}/help2man
echo "exit 0" >> ${PWD}/help2man
export HELP2MAN=${PWD}/help2man
chmod +x ${PWD}/help2man
fi
export PATH="${PWD}:${PATH}"
export LIBTOOL=${BUILD_PREFIX}/bin/libtool
export LDFLAGS="${LDFLAGS} -lintl"
fi

# -rpath-link is needed because libncursesw.so dependes on libtinfo.so and
# configure will fail to find ncurses without it (if using the conda ncurses
# package).
if [[ ${target_platform} =~ .*linux.* ]]; then
export CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include -Wl,-rpath-link,${PREFIX}/lib"
else
export CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include"
fi

./bootstrap
./configure --prefix=${PREFIX}
make -j${CPU_COUNT} ${VERBOSE_AT}
make install

set -x

# Fix relocation of build tools hardcoded into ct-ng
for SEDFILE in ${PREFIX}/share/crosstool-ng/paths.sh ${PREFIX}/bin/ct-ng; do
mv ${SEDFILE} ${SEDFILE}.orig
cat ${SEDFILE}.orig | \
sed -e "s|${BUILD_PREFIX}|${PREFIX}|g" \
-e "s|.*make -rf|#!${MAKE} -rf|g" > ${SEDFILE}
rm ${SEDFILE}.orig
chmod 775 ${SEDFILE}
echo SEDFILE: ${SEDFILE}
cat ${SEDFILE}
done

# Work around the fact that we need to call make -rf, but to do so we cannot
# use /usr/bin/env, and if we attempt to use a full prefix then we run into
# shebang limits on various distros .. edit, does not seem to be working.
# mv ${PREFIX}/bin/ct-ng ${PREFIX}/bin/ct-ng-mk
# echo '#!/usr/bin/env bash' > ${PREFIX}/bin/ct-ng
# echo "${PREFIX}/bin/make -rf ${PREFIX}/bin/ct-ng-mk \$*" >> ${PREFIX}/bin/ct-ng
59 changes: 59 additions & 0 deletions anaconda_recipes/crosstool-ng-bootstrap/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{% set commit="master" %}

package:
name: crosstool-ng
version: {{ (GIT_DESCRIBE_TAG or "").split("-")[-1] }}.{{ GIT_BUILD_STR }}

source:
git_url: https://github.com/continuumio/crosstool-ng.git
git_tag: {{ commit }}

build:
number: 0
missing_dso_whitelist: # [linux]
- '*' # [linux]

# This package is used during bootstrapping so you need to
# install system packages for all these things instead of
# conda packages. Once you get to the stage of having built
# all these and released them somewhere you can use the non
# bootstrapping version of this package.
requirements:
build:
- {{ compiler('c') }} # [osx]
- autoconf
- automake
- texinfo
- help2man
- gawk
- make
- bash # [osx]
- bison
- flex
- gawk # [osx]
- gettext
- git
- libtool
- sed # [osx]
- unzip
host:
- ncurses
- gettext # [osx]
run:
- bash # [osx]
# Arguably these should be deps for linux too:
- sed # [osx]
- gawk # [osx]
- make

test:
commands:
- ct-ng -h

about:
home: http://crosstool-ng.org/

extra:
recipe-maintainers:
- mingwandroid
- msarahan
23 changes: 23 additions & 0 deletions anaconda_recipes/crosstool-ng/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

export EXTRA_CFLAGS="-I${PREFIX}/include -I${PREFIX}/include/ncurses"
export EXTRA_LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib -lncursesw"
# -rpath-link is needed because libncursesw.so dependes on libtinfo.so and
# configure will fail to find ncurses without it (if using the conda ncurses
# package).

# These get baked into paths.mk but we do not relocate them nor add
# run requirements for them.
unset LIBTOOL
unset LIBTOOLIZE
unset OBJCOPY
unset OBJDUMP
unset READELF
export CPPFLAGS="-I${PREFIX}/include -L${PREFIX}/lib -Wl,-rpath-link,${PREFIX}/lib"
if [[ $(uname) == Darwin ]]; then
export DYLD_FALLBACK_LIBRARY_PATH=${PREFIX}/lib
fi
./bootstrap
./configure --prefix=${PREFIX}
make -j${CPU_COUNT} ${VERBOSE_AT}
make install
52 changes: 52 additions & 0 deletions anaconda_recipes/crosstool-ng/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{% set commit="master" %}

package:
name: crosstool-ng
version: {{ (GIT_DESCRIBE_TAG or "").split("-")[-1] }}.{{ GIT_BUILD_STR }}

source:
git_url: https://github.com/continuumio/crosstool-ng.git
git_tag: {{ commit }}

build:
number: 0
missing_dso_whitelist:
- '*'

requirements:
build:
# TODO :: We need some [not bootstrapping] selector or something?
- {{ compiler('c') }}
- autoconf
- automake
- texinfo
- bison
- flex
- gettext
- git
- help2man
- texinfo
- unzip
host:
- ncurses
- libtool
# There are two packages called 'wget' on defaults, one, the real wget and the other
# a pythonic implementation from Anatoly Techtonik. At present, conda is installing
# the latter unless I force the version(trying without this now, I believe Ilan may
# have removed Anatoly's?
- wget
run:
- ncurses
- libtool

test:
commands:
- ct-ng -h

about:
home: http://crosstool-ng.org/

extra:
recipe-maintainers:
- mingwandroid
- msarahan
Loading