diff --git a/bitfurnace/recipe.yaml b/bitfurnace/recipe.yaml new file mode 100644 index 0000000..74bc900 --- /dev/null +++ b/bitfurnace/recipe.yaml @@ -0,0 +1,19 @@ +context: + name: bitfurnace + version: 0.1.1 + +package: + name: '{{ name|lower }}' + version: '{{ version }}' + +source: + git_url: file:///Users/wolfvollprecht/Programs/bitfurnace + git_rev: main + + +build: + number: 0 + noarch: true + script: + - cp -r bitfurnace $PREFIX + diff --git a/bzip2/build.py b/bzip2/build.py new file mode 100644 index 0000000..68b50d6 --- /dev/null +++ b/bzip2/build.py @@ -0,0 +1,50 @@ +from make import Make + +import shutil +import glob +from pathlib import Path + +def install(from_path, to_path, follow_symlinks=False): + fp = str(from_path) + tp = str(to_path) + + to_path.mkdir(parents=True, exist_ok=True) + + if '*' in fp: + for f in glob.glob(fp): + shutil.copy(f, tp, follow_symlinks=follow_symlinks) + else: + shutil.copy(fp, tp, follow_symlinks=follow_symlinks) + +class UnixRecipe(Make): + + def get_install_args(self): + return self.default_install_args + self.install_args + + def install(self): + run(['make', 'install'] + self.get_install_args()) + if not features.static: + if target_platform.startswith('linux'): + run(['make', '-f', 'Makefile-libbz2_so'] + self.get_install_args()) + install(f'libbz2.so.{pkg_version}', prefix / 'lib') + Path(prefix / 'lib' / 'libbz2.so').symlink_to(prefix / 'lib' / f'libbz2.so.{pkg_version}') + else: + run([cc] + f'-shared -Wl,-install_name -Wl,libbz2.dylib -o libbz2.{pkg_version}.dylib blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o'.split()) + + install(f'libbz2.{pkg_version}.dylib', prefix / 'lib') + Path(prefix / 'lib' / 'libbz2.dylib').symlink_to(prefix / 'lib' / f'libbz2.{pkg_version}.dylib') + + Path(prefix / 'lib' / 'libbz2.a').unlink() + + def __init__(self): + self.cflags += ['-Wall', '-Winline', '-O2', '-g', '-D_FILE_OFFSET_BITS=64', '-fPIC'] + + cflags = ' '.join(self.cflags) + self.build_args = [f'CFLAGS={cflags}'] + self.install_args = [f'CFLAGS={cflags}'] + + +if target_platform.startswith('win'): + pass +else: + Recipe = UnixRecipe diff --git a/bzip2/build.sh b/bzip2/build.sh deleted file mode 100644 index 7a1c1d5..0000000 --- a/bzip2/build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -ex - -# toolchain flags + bzip flags + fpic -export CFLAGS="${CFLAGS} -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -fPIC" -USED_CC=${GCC:-${CC}} - -if [[ "${FEATURE_STATIC}" == "1" ]]; then - make install PREFIX=${PREFIX} CFLAGS="${CFLAGS}" CC="${USED_CC}" -j${CPU_COUNT} -else - make install PREFIX=${PREFIX} CFLAGS="${CFLAGS}" CC="${USED_CC}" -j${CPU_COUNT} - # build shared library - if [[ ${target_platform} =~ .*linux.* ]]; then - make -f Makefile-libbz2_so CFLAGS="${CFLAGS}" CC="${USED_CC}" -j${CPU_COUNT} - ln -s libbz2.so.${PKG_VERSION} libbz2.so - cp -d libbz2.so* ${PREFIX}/lib/ - elif [[ ${target_platform} == osx-* ]]; then - ${USED_CC} -shared -Wl,-install_name -Wl,libbz2.dylib -o libbz2.${PKG_VERSION}.dylib blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o - cp libbz2.${PKG_VERSION}.dylib ${PREFIX}/lib/ - ln -s libbz2.${PKG_VERSION}.dylib ${PREFIX}/lib/libbz2.dylib - fi - rm -rf $PREFIX/lib/libbz2.a -fi - diff --git a/bzip2/recipe.yaml b/bzip2/recipe.yaml index 8225b01..25e3970 100644 --- a/bzip2/recipe.yaml +++ b/bzip2/recipe.yaml @@ -19,6 +19,7 @@ build: requirements: build: - '{{ compiler("c") }}' + - bitfurnace # - sel(win): jom - sel(win): cmake - sel(win): ninja diff --git a/conda_build_config.yaml b/conda_build_config.yaml index 900a67b..560d8a5 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -5,4 +5,4 @@ MACOSX_DEPLOYMENT_TARGET: # [osx] - 11.0 # [osx and arm64] - 10.9 # [osx and x86_64] CONDA_BUILD_SYSROOT: - - /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk # [osx and arm64] + - /opt/MacOSX11.0.sdk # [osx and arm64] diff --git a/libarchive/build.py b/libarchive/build.py new file mode 100644 index 0000000..1494765 --- /dev/null +++ b/libarchive/build.py @@ -0,0 +1,39 @@ +from bitfurnace.autotools import Autotools + +class Recipe(Autotools): + + def get_configure_args(self): + configure_args = [] + + if features.static: + configure_args += ['--enable-static', '--disable-shared'] + else: + configure_args += ['--disable-static', '--enable-shared'] + + def add_feature(feat, opt): + if feat: + configure_args.append(f'--with-{opt}') + else: + configure_args.append(f'--without-{opt}') + + if target_platform.startswith('osx'): + configure_args += ['--with-iconv'] + else: + configure_args += ['--without-iconv'] + if features.zstd: + self.ldflags += ['-pthread'] + + add_feature(features.bzip2, 'bz2lib') + add_feature(features.lz4, 'lz4') + add_feature(features.xz, 'lzma') + add_feature(features.lzo, 'lzo2') + add_feature(features.zstd, 'zstd') + add_feature(features.openssl, 'openssl') + + configure_args += [ + '--without-cng', + '--without-nettle', + '--without-expat', + ] + + return configure_args \ No newline at end of file diff --git a/libarchive/build.sh b/libarchive/build.sh deleted file mode 100644 index 794c095..0000000 --- a/libarchive/build.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -set -x -autoreconf -vfi -mkdir build-${HOST} && pushd build-${HOST} - -if [[ "${FEATURE_STATIC}" == "1" ]]; then - BUILD_TYPE="--enable-static --disable-shared" -else - BUILD_TYPE="--disable-static --enable-shared" -fi -if [ "$(uname)" == "Darwin" ]; then - WITH_ICONV="--with-iconv" -else - WITH_ICONV="--without-iconv" - # link pthread for zstd - if [[ "${FEATURE_ZSTD}" == "1" ]]; then - export LDFLAGS="${LDFLAGS} -pthread" - fi -fi - -${SRC_DIR}/configure --prefix=${PREFIX} ${BUILD_TYPE} \ - $(feature $FEATURE_ZLIB --with-zlib --without-zlib) \ - $(feature $FEATURE_BZIP2 --with-bz2lib --without-bz2lib) \ - $(feature $FEATURE_LZ4 --with-lz4 --without-lz4) \ - $(feature $FEATURE_XZ --with-lzma --without-lzma) \ - $(feature $FEATURE_LZO --with-lzo2 --without-lzo2) \ - $(feature $FEATURE_ZSTD --with-zstd --without-zstd) \ - $(feature $FEATURE_OPENSSL --with-openssl --without-openssl) \ - --without-cng \ - --without-nettle \ - $(feature $FEATURE_XML2 --with-xml2 --without-xml2) \ - --without-expat \ - $WITH_ICONV - -make -j${CPU_COUNT} ${VERBOSE_AT} -make install diff --git a/libarchive/recipe.yaml b/libarchive/recipe.yaml index bab23cd..456eadd 100644 --- a/libarchive/recipe.yaml +++ b/libarchive/recipe.yaml @@ -31,6 +31,7 @@ build: requirements: build: - '{{ compiler("c") }}' + - bitfurnace # Does not work in this recips at present # we manually convert C99 to C89 instead. # - c99-to-c89 # [win and vc<14] @@ -45,74 +46,74 @@ requirements: - sel(win): m2-patch host: - sel(win and vc<14): msinttypes - - sel(osx): libiconv-static + - sel(osx): libiconv run: - - sel(osx): libiconv-static + - sel(osx): libiconv features: - name: zlib default: true requirements: host: - - zlib-static + - zlib run: - - zlib-static + - zlib - name: zstd default: true requirements: host: - - zstd-static + - zstd run: - - zstd-static + - zstd - name: openssl default: true requirements: host: - - openssl-static + - openssl run: - - openssl-static + - openssl - name: lzo default: true requirements: host: - - lzo-static + - lzo run: - - lzo-static + - lzo - name: xz default: true requirements: host: - - xz-static + - xz run: - - xz-static + - xz - name: bzip2 default: true requirements: host: - - bzip2-static + - bzip2 run: - - bzip2-static + - bzip2 - name: lz4 default: true requirements: host: - - lz4-c-static + - lz4-c run: - - lz4-c-static + - lz4-c - name: xml2 default: true requirements: host: - - libxml2-static + - libxml2 run: - - libxml2-static + - libxml2 - name: static default: false diff --git a/libssh2/build.sh b/libssh2/build.sh index 8409492..0527707 100644 --- a/libssh2/build.sh +++ b/libssh2/build.sh @@ -1,31 +1,2 @@ -#!/bin/bash +from cmake import CMake -# copy files which are missing from the release tarball -# see: https://github.com/libssh2/libssh2/issues/379 -# TODO: remove this in the 1.9.1 or later releases -cp ${RECIPE_DIR}/missing_files/*.c tests/ - -# We use a repackaged cmake from elsewhere to break a build cycle. -export PATH=${PREFIX}/cmake-bin/bin:${PATH} - -mkdir build && cd build - -if [[ "${FEATURE_STATIC}" == "1" ]]; then - BUILD_TYPE="-D BUILD_SHARED_LIBS=OFF" -else - BUILD_TYPE="-D BUILD_SHARED_LIBS=ON" -fi - -cmake ${CMAKE_ARGS} \ - -D CMAKE_INSTALL_PREFIX=$PREFIX \ - -D CMAKE_PREFIX_PATH=$PREFIX \ - $BUILD_TYPE \ - -D CRYPTO_BACKEND=OpenSSL \ - -D CMAKE_INSTALL_LIBDIR=lib \ - -D ENABLE_ZLIB_COMPRESSION=ON \ - -D CMAKE_INSTALL_RPATH=$PREFIX/lib \ - $SRC_DIR - -make -j${CPU_COUNT} -# ctest # fails on the docker image -make install diff --git a/libssh2/recipe.yaml b/libssh2/recipe.yaml index 7c4e24e..5829c54 100644 --- a/libssh2/recipe.yaml +++ b/libssh2/recipe.yaml @@ -18,18 +18,16 @@ requirements: build: # This breals a dependency cycle: # curl->libssh2->cmake->curl + - '{{ compiler("c") }}' - sel(win): cmake-binary - sel(not win): cmake-no-system - - sel(not (osx and arm64)): '{{ compiler("c") }}' - - sel(osx and arm64): '{{ compiler("clang_bootstrap") }}' - - sel(win): ninja - - sel(unix): make + - ninja host: - - openssl-static - - zlib-static + - openssl + - zlib run: - - openssl-static - - zlib-static + - openssl + - zlib # test: # commands: diff --git a/reproc/build_c.py b/reproc/build_c.py new file mode 100644 index 0000000..467e291 --- /dev/null +++ b/reproc/build_c.py @@ -0,0 +1,6 @@ +from cmake import CMake + +class Recipe(CMake): + cmake_configure_args = { + 'BUILD_SHARED_LIBS': not features.static + } \ No newline at end of file diff --git a/reproc/build_c.sh b/reproc/build_c.sh deleted file mode 100644 index d6ea618..0000000 --- a/reproc/build_c.sh +++ /dev/null @@ -1,14 +0,0 @@ -mkdir -p build; cd build - -if [[ "${FEATURE_STATIC}" == "1" ]]; then - BUILD_TYPE="-DBUILD_SHARED_LIBS=OFF" -else - BUILD_TYPE="-DBUILD_SHARED_LIBS=ON" -fi - -cmake .. \ - -DCMAKE_INSTALL_PREFIX=$PREFIX \ - -DCMAKE_INSTALL_LIBDIR=lib \ - ${BUILD_TYPE} - -make install -j${CPU_COUNT} \ No newline at end of file diff --git a/reproc/build_cpp.py b/reproc/build_cpp.py new file mode 100644 index 0000000..c8ebadc --- /dev/null +++ b/reproc/build_cpp.py @@ -0,0 +1,11 @@ +from cmake import CMake + +class Recipe(CMake): + cmake_configure_args = { + 'BUILD_SHARED_LIBS': not features.static, + 'REPROC++': True + } + + def pre_configure(self): + if (self.workdir / "CMakeCache.txt").exists(): + (self.workdir / "CMakeCache.txt").unlink() \ No newline at end of file diff --git a/reproc/build_cpp.sh b/reproc/build_cpp.sh deleted file mode 100644 index 1892c06..0000000 --- a/reproc/build_cpp.sh +++ /dev/null @@ -1,16 +0,0 @@ -mkdir -p build-cpp; cd build-cpp -rm -rf CMakeCache.txt - -if [[ "${FEATURE_STATIC}" == "1" ]]; then - BUILD_TYPE="-DBUILD_SHARED_LIBS=OFF" -else - BUILD_TYPE="-DBUILD_SHARED_LIBS=ON" -fi - -cmake .. \ - -DCMAKE_INSTALL_PREFIX=$PREFIX \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DREPROC++=ON \ - ${BUILD_TYPE} - -make install -j${CPU_COUNT} \ No newline at end of file diff --git a/reproc/recipe.yaml b/reproc/recipe.yaml index b3abd7b..049b08f 100644 --- a/reproc/recipe.yaml +++ b/reproc/recipe.yaml @@ -23,29 +23,27 @@ outputs: name: reproc build: script: - - sel(unix): build_c.sh - - sel(win): build_c.bat + - build_c.py requirements: build: - '{{ compiler("c") }}' - cmake - - sel(unix): make - - sel(win): ninja + - bitfurnace + - ninja - package: name: reproc-cpp build: script: - - sel(unix): build_cpp.sh - - sel(win): build_cpp.bat + - build_cpp.py requirements: build: - '{{ compiler("c") }}' - '{{ compiler("cxx") }}' - cmake - - sel(unix): make - - sel(win): ninja + - bitfurnace + - ninja host: - - "{{ pin_subpackage('reproc-static', exact=True ) }}" + - "{{ pin_subpackage('reproc', exact=True ) }}" about: home: https://github.com/DaanDeMeyer/reproc diff --git a/xz/build.sh b/xz/build.sh index 697ef2d..78fc3fe 100644 --- a/xz/build.sh +++ b/xz/build.sh @@ -1,23 +1,24 @@ -#!/bin/bash - # TODO?! # autoreconf -vfi +# cp $BUILD_PREFIX/share/gnuconfig/config.* . +export PYTHONPATH="${PYTHONPATH}:/Users/wolfvollprecht/Programs/bitfurnace" +python3 ~/Programs/bitfurnace/bitfurnace/runner.py $RECIPE_DIR/build.py -if [[ "${FEATURE_STATIC}" == "1" ]]; then - BUILD_TYPE="--enable-static --disable-shared" -else - BUILD_TYPE="--disable-static --enable-shared" -fi +# if [[ "${FEATURE_STATIC}" == "1" ]]; then +# BUILD_TYPE="--enable-static --disable-shared" +# else +# BUILD_TYPE="--disable-static --enable-shared" +# fi -./configure --prefix=${PREFIX} \ - --build=${BUILD} \ - --host=${HOST} \ - ${BUILD_TYPE} +# ./configure --prefix=${PREFIX} \ +# --build=${BUILD} \ +# --host=${HOST} \ +# ${BUILD_TYPE} -make -j${CPU_COUNT} ${VERBOSE_AT} +# make -j${CPU_COUNT} ${VERBOSE_AT} -if [[ "$CONDA_BUILD_CROSS_COMPILATION" != 1 ]]; then - make check -fi +# if [[ "$CONDA_BUILD_CROSS_COMPILATION" != 1 ]]; then +# make check +# fi -make install +# make install diff --git a/xz/recipe.yaml b/xz/recipe.yaml index fc69843..78ea068 100644 --- a/xz/recipe.yaml +++ b/xz/recipe.yaml @@ -27,6 +27,9 @@ requirements: - sel(win): ninja - sel(not win): make - sel(not win): automake + - sel(not win): autoconf + - sel(not win): gettext + - sel(not win): gnuconfig - sel(not win): libtool host: - sel(win and vc<14): msinttypes diff --git a/zlib/bld.bat b/zlib/bld.bat deleted file mode 100644 index 3c5f0e8..0000000 --- a/zlib/bld.bat +++ /dev/null @@ -1,35 +0,0 @@ -set LIB=%LIBRARY_LIB%;%LIB% -set LIBPATH=%LIBRARY_LIB%;%LIBPATH% -set INCLUDE=%LIBRARY_INC%;%INCLUDE%;%RECIPE_DIR% - -mkdir build -cd build -:: Configure. -cmake -G "Ninja" ^ - -D CMAKE_BUILD_TYPE=Release ^ - -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ - -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ - -DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" ^ - %SRC_DIR% -if errorlevel 1 exit 1 - -:: Build. -ninja install --verbose -if errorlevel 1 exit 1 - -:: Test. -rem ctest -if errorlevel 1 exit 1 - - -del %LIBRARY_LIB%\zlib.lib -del %LIBRARY_BIN%\zlib.dll - -:: Some OSS libraries are happier if z.lib exists, even though it's not typical on Windows. -rem copy %LIBRARY_LIB%\zlib.lib %LIBRARY_LIB%\z.lib || exit 1 - -:: Qt in particular goes looking for this one (as of 4.8.7). -rem copy %LIBRARY_LIB%\zlib.lib %LIBRARY_LIB%\zdll.lib || exit 1 - -:: Copy license file to the source directory so conda-build can find it. -rem copy %RECIPE_DIR%\license.txt %SRC_DIR%\license.txt || exit 1 diff --git a/zlib/build.py b/zlib/build.py new file mode 100644 index 0000000..14347e9 --- /dev/null +++ b/zlib/build.py @@ -0,0 +1,47 @@ +# from bitfurnace.autotools import Autotools + +# class Recipe(Autotools): + +# def get_configure_args(self): +# return self.configure_args + ["--static"] + +# def __init__(self): +# self.cflags += ['-fPIC'] +# self.cxxflags += ['-fPIC'] + +from bitfurnace.cmake import CMake +import pathlib + +def safe_unlink(p): + assert(prefix in p.parents) + p.unlink() + +def rm(path): + if isinstance(path, pathlib.PurePath): + safe_unlink(path) + else: + for p in path: + safe_unlink(p) + +class Recipe(CMake): + + def post_install(self): + if target_platform.startswith('win'): + (library_lib / "zlib.lib").unlink() + (library_bin / "zlib.dll").unlink() + else: + print(features) + if not features.static: + # delete the .a library + rm(prefix / "lib" / "libz.a") + else: + rm((prefix / "lib").glob("libz*.dylib")) + + def __init__(self): + print("Activated features: ", features) + + if target_platform.startswith('win'): + self.cmake_args["CMAKE_C_FLAGS_RELEASE"] = "/MT /O2 /Ob2 /DNDEBUG" + self.cflags += ['-fPIC'] + self.cxxflags += ['-fPIC'] + diff --git a/zlib/build.sh b/zlib/build.sh deleted file mode 100644 index 2a482da..0000000 --- a/zlib/build.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -export CFLAGS="${CFLAGS} -fPIC" -export CXXFLAGS="${CXXFLAGS} -fPIC" - -if [[ "${FEATURE_STATIC}" == "1" ]]; then - BUILD_TYPE="--static" -else - BUILD_TYPE="--shared" -fi - -./configure \ - --prefix=${PREFIX} \ - ${BUILD_TYPE} - -make -j${CPU_COUNT} ${VERBOSE_AT} - -if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then - make check -fi -make install - -# Remove man files. -rm -rf $PREFIX/share - -# Copy license file to the source directory so conda-build can find it. -cp $RECIPE_DIR/license.txt $SRC_DIR/license.txt - -if [[ "${FEATURE_STATIC}" != "1" ]]; then - rm -rf $PREFIX/lib/libz.a -fi; \ No newline at end of file diff --git a/zlib/recipe.yaml b/zlib/recipe.yaml index 4d05bd6..001c84e 100644 --- a/zlib/recipe.yaml +++ b/zlib/recipe.yaml @@ -18,10 +18,10 @@ build: requirements: build: + - bitfurnace - '{{ compiler("c") }}' - - sel(win): cmake - - sel(win): ninja - - sel(unix): make + - cmake + - ninja features: - name: static diff --git a/zstd/build.py b/zstd/build.py new file mode 100644 index 0000000..7f1e81e --- /dev/null +++ b/zstd/build.py @@ -0,0 +1,12 @@ +from cmake import CMake + +class Recipe(CMake): + cmakelists_dir = src_dir / "build" / "cmake" + workdir = src_dir / "cmake_build" + + cmake_configure_args = { + 'ZSTD_LEGACY_SUPPORT': True, + 'ZSTD_BUILD_PROGRAMS': False, + 'ZSTD_BUILD_CONTRIB': False, + 'ZSTD_PROGRAMS_LINK_SHARED': True + } diff --git a/zstd/build.sh b/zstd/build.sh deleted file mode 100644 index 2c3a911..0000000 --- a/zstd/build.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -set -ex - -export CFLAGS="${CFLAGS} -O3 -fPIC" - -# # Fix undefined clock_gettime (Is this needed? See above) -# if [[ ${target_platform} =~ linux.* ]]; then -# export LDFLAGS="${LDFLAGS} -lrt" -# fi - -# declare -a _CMAKE_EXTRA_CONFIG - -# if [[ ${HOST} =~ .*darwin.* ]]; then -# if [[ ${_XCODE_BUILD} == yes ]]; then -# CMAKE_GENERATOR="Xcode" -# _CMAKE_EXTRA_CONFIG+=(-DCMAKE_OSX_ARCHITECTURES=x86_64) -# _CMAKE_EXTRA_CONFIG+=(-DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT}) -# _VERBOSE="" -# fi -# unset MACOSX_DEPLOYMENT_TARGET -# export MACOSX_DEPLOYMENT_TARGET -# _CMAKE_EXTRA_CONFIG+=(-DCMAKE_AR=${AR}) -# _CMAKE_EXTRA_CONFIG+=(-DCMAKE_RANLIB=${RANLIB}) -# _CMAKE_EXTRA_CONFIG+=(-DCMAKE_LINKER=${LD}) -# fi - -# if [[ ${HOST} =~ .*linux.* ]]; then -# # I hate you so much CMake. -# LIBPTHREAD=$(find ${PREFIX} -name "libpthread.so") -# _CMAKE_EXTRA_CONFIG+=(-DPTHREAD_LIBRARY=${LIBPTHREAD}) -# LIBRT=$(find ${PREFIX} -name "librt.so") -# _CMAKE_EXTRA_CONFIG+=(-DRT_LIBRARIES=${LIBRT}) -# fi - -pushd build/cmake - -if [[ "$FEATURE_STATIC" == "1" ]]; then - STATIC_ARGS="-DZSTD_BUILD_STATIC=ON -DZSTD_BUILD_SHARED=OFF -DZSTD_BUILD_TESTS=1" -else - STATIC_ARGS="-DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_TESTS=0" -fi; - -# FULL_AR=`which ${AR}` -# -DCMAKE_AR=${FULL_AR} \ -cmake -G"${CMAKE_GENERATOR}" \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ - -DCMAKE_INSTALL_LIBDIR="lib" \ - -DCMAKE_PREFIX_PATH="${PREFIX}" \ - -DZSTD_LEGACY_SUPPORT=1 \ - -DZSTD_BUILD_PROGRAMS=0 \ - -DZSTD_BUILD_CONTRIB=0 \ - -DZSTD_PROGRAMS_LINK_SHARED=ON \ - ${STATIC_ARGS} \ - "${_CMAKE_EXTRA_CONFIG[@]}" - -make -j${CPU_COUNT} install -# make test -popd \ No newline at end of file diff --git a/zstd/recipe.yaml b/zstd/recipe.yaml index 1f463e2..4832c2f 100644 --- a/zstd/recipe.yaml +++ b/zstd/recipe.yaml @@ -24,27 +24,26 @@ requirements: - '{{ compiler("c") }}' - '{{ compiler("cxx") }}' - sel(win): msinttypes - - sel(unix): make - - sel(win): ninja + - ninja - cmake + - bitfurnace -# test: -# commands: -# - zstd -be -i5 +test: + commands: + - sel(feature_programs): zstd -be -i5 -# - sel(unix): test -f ${PREFIX}/include/{{ name }}.h -# - sel(unix): test ! -f ${PREFIX}/lib/lib{{ name }}.a -# - sel(linux): test -f ${PREFIX}/lib/lib{{ name }}.so -# - sel(osx): test -f ${PREFIX}/lib/lib{{ name }}.dylib + - sel(unix): test -f ${PREFIX}/include/{{ name }}.h + - sel(unix): test ! -f ${PREFIX}/lib/lib{{ name }}.a + - sel(linux): test -f ${PREFIX}/lib/lib{{ name }}.so + - sel(osx): test -f ${PREFIX}/lib/lib{{ name }}.dylib -# - sel(win): if not exist %LIBRARY_INC%\{{ name }}.h exit 1 -# - sel(win): if not exist %LIBRARY_BIN%\lib{{ name }}.dll exit 1 -# - sel(win): if not exist %LIBRARY_LIB%\lib{{ name }}.lib exit 1 -# - sel(win): if exist %LIBRARY_LIB%\lib{{ name }}_static.lib exit 1 + - sel(win): if not exist %LIBRARY_INC%\{{ name }}.h exit 1 + - sel(win): if not exist %LIBRARY_BIN%\lib{{ name }}.dll exit 1 + - sel(win): if not exist %LIBRARY_LIB%\lib{{ name }}.lib exit 1 + - sel(win): if exist %LIBRARY_LIB%\lib{{ name }}_static.lib exit 1 -# - sel(unix): export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig -# - sel(unix): test -f ${PREFIX}/lib/pkgconfig/lib{{ name }}.pc -# - sel(unix): pkg-config --cflags lib{{ name }} + - sel(unix): test -f ${PREFIX}/lib/pkgconfig/lib{{ name }}.pc + - sel(unix): pkg-config --cflags lib{{ name }} features: - name: static