diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index e8029d9..88fd9c1 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -49,10 +49,9 @@ jobs: condition: contains(variables['CONFIG'], 'vs2008') displayName: Patch vs2008 (if needed) - - task: CondaEnvironment@1 inputs: - packageSpecs: 'python=3.9 conda-build conda "conda-forge-ci-setup=3" pip boa' # Optional + packageSpecs: 'python=3.9 conda-build conda pip boa conda-forge-ci-setup=3' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment diff --git a/.ci_support/README b/.ci_support/README index e4e2dce..a47316b 100644 --- a/.ci_support/README +++ b/.ci_support/README @@ -1 +1,6 @@ -This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly. \ No newline at end of file +This file is automatically generated by conda-smithy. If any +particular build configuration is expected, but it is not found, +please make sure all dependencies are satisfiable. To add/modify any +matrix elements, you should create/change conda-smithy's input +recipe/conda_build_config.yaml and re-render the recipe, rather than +editing these files directly. diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 1facf86..3520bad 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -3,7 +3,7 @@ alsa_lib: c_compiler: - gcc c_compiler_version: -- '9' +- '10' cdt_name: - cos6 channel_sources: @@ -13,14 +13,18 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '9' +- '10' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 glib: - '2' +jpeg: +- '9' libpng: - '1.6' pin_run_as_build: + jpeg: + max_pin: x libpng: max_pin: x.x zlib: diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 89fb278..55c0ef0 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -5,7 +5,7 @@ alsa_lib: c_compiler: - gcc c_compiler_version: -- '9' +- '10' cdt_arch: - aarch64 cdt_name: @@ -17,14 +17,18 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '9' +- '10' docker_image: - quay.io/condaforge/linux-anvil-aarch64 glib: - '2' +jpeg: +- '9' libpng: - '1.6' pin_run_as_build: + jpeg: + max_pin: x libpng: max_pin: x.x zlib: diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 9f59024..19edab2 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -3,7 +3,7 @@ alsa_lib: c_compiler: - gcc c_compiler_version: -- '9' +- '10' cdt_name: - cos7 channel_sources: @@ -13,14 +13,18 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '9' +- '10' docker_image: - quay.io/condaforge/linux-anvil-ppc64le glib: - '2' +jpeg: +- '9' libpng: - '1.6' pin_run_as_build: + jpeg: + max_pin: x libpng: max_pin: x.x zlib: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 2a6cd7b..2c7b25c 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '11' +- '12' channel_sources: - conda-forge channel_targets: @@ -11,14 +11,18 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '11' +- '12' glib: - '2' +jpeg: +- '9' libpng: - '1.6' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: + jpeg: + max_pin: x libpng: max_pin: x.x zlib: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 422a402..64266cc 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '11' +- '12' channel_sources: - conda-forge channel_targets: @@ -11,14 +11,18 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '11' +- '12' glib: - '2' +jpeg: +- '9' libpng: - '1.6' macos_machine: - arm64-apple-darwin20.0.0 pin_run_as_build: + jpeg: + max_pin: x libpng: max_pin: x.x zlib: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 1023a10..9970241 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -8,7 +8,11 @@ cxx_compiler: - vs2017 glib: - '2' +jpeg: +- '9' pin_run_as_build: + jpeg: + max_pin: x zlib: max_pin: x.x target_platform: diff --git a/.gitattributes b/.gitattributes index ce52713..7f32763 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,6 +9,7 @@ bld.bat text eol=crlf # github helper pieces to make some files not show up in diffs automatically .azure-pipelines/* linguist-generated=true .circleci/* linguist-generated=true +.ci_support/README linguist-generated=true .drone/* linguist-generated=true .drone.yml linguist-generated=true .github/* linguist-generated=true diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index a1fb123..9f9a60f 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -29,8 +29,10 @@ conda-build: CONDARC -mamba install --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge -mamba update --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge +mamba install --update-specs --yes --quiet --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 0c6515f..9236239 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -14,7 +14,7 @@ set -xeo pipefail THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" PROVIDER_DIR="$(basename $THISDIR)" -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" if [ -z ${FEEDSTOCK_NAME} ]; then diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 6774b01..3d85505 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -23,9 +23,11 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base -echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." -mamba install -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa -mamba update -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa +echo -e "\n\nInstalling ['conda-forge-ci-setup=3'] and conda-build." +mamba install --update-specs --quiet --yes --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 @@ -51,7 +53,6 @@ source run_conda_forge_build_setup ( endgroup "Configuring conda" ) 2> /dev/null - echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml @@ -59,17 +60,32 @@ if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi -conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} -( startgroup "Validating outputs" ) 2> /dev/null -validate_recipe_outputs "${FEEDSTOCK_NAME}" +if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" + fi + conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ + ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml -( endgroup "Validating outputs" ) 2> /dev/null + # Drop into an interactive shell + /bin/bash +else + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + ( startgroup "Validating outputs" ) 2> /dev/null -( startgroup "Uploading packages" ) 2> /dev/null + validate_recipe_outputs "${FEEDSTOCK_NAME}" -if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml -fi + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml + fi -( endgroup "Uploading packages" ) 2> /dev/null \ No newline at end of file + ( endgroup "Uploading packages" ) 2> /dev/null +fi \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index 8b74348..eec38a0 100755 --- a/build-locally.py +++ b/build-locally.py @@ -22,10 +22,6 @@ def setup_environment(ns): os.environ["MINIFORGE_HOME"] = os.path.join( os.path.dirname(__file__), "miniforge3" ) - if "OSX_SDK_DIR" not in os.environ: - os.environ["OSX_SDK_DIR"] = os.path.join( - os.path.dirname(__file__), "SDKs" - ) def run_docker_build(ns): @@ -65,11 +61,12 @@ def verify_config(ns): raise ValueError( f"only Linux/macOS configs currently supported, got {ns.config}" ) - elif ns.config.startswith("osx") and platform.system() == "Darwin": + elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=/opt'" - "to download the SDK automatically to '/opt/MacOSX.sdk'" + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " + "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) diff --git a/recipe/jpeg-win.patch b/recipe/jpeg-win.patch new file mode 100644 index 0000000..972f710 --- /dev/null +++ b/recipe/jpeg-win.patch @@ -0,0 +1,16 @@ +--- plugins_good/ext/jpeg/meson.build 2022-02-03 20:53:32.000000000 +0100 ++++ plugins_good/ext/jpeg/meson.build 2022-03-09 10:33:53.947810300 +0100 +@@ -5,8 +5,12 @@ + 'gstjpegdec.c', + ] + +-jpeglib = dependency('libjpeg', required : get_option('jpeg'), ++jpeglib = dependency('libjpeg', required : false, + fallback: ['libjpeg-turbo', 'jpeg_dep']) ++if not jpeglib.found() ++ c_comp = meson.get_compiler('c') ++ jpeglib = c_comp.find_library('libjpeg', has_headers: ['jpeglib.h'], required : get_option('jpeg')) ++endif + + if jpeglib.found() + gstjpeg = library('gstjpeg', diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6343aa7..2ad8928 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,9 +14,11 @@ source: - url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-{{ version }}.tar.xz sha256: 2d119c15ab8c9e79f8cd3c6bf582ff7a050b28ccae52ab4865e1a1464991659c folder: plugins_good + patches: + - jpeg-win.patch # [win] build: - number: 0 + number: 1 outputs: - name: gstreamer @@ -183,10 +185,11 @@ outputs: - glib - libxcb # [linux] - jack >=1.9.7 # [linux64] - - lame # [linux] + - lame # [unix] - mpg123 # [linux64 or osx] - zlib # [not ppc64le] - libsoup # [not ppc64le] + - jpeg run: - {{ pin_compatible('gstreamer') }} - {{ pin_subpackage('gst-plugins-base') }} @@ -196,9 +199,14 @@ outputs: commands: - test -f $PREFIX/lib/gstreamer-1.0/libgstalpha${SHLIB_EXT} # [unix] - test -f $PREFIX/lib/gstreamer-1.0/libgstdebug${SHLIB_EXT} # [unix] + - test -f $PREFIX/lib/gstreamer-1.0/libgstjack${SHLIB_EXT} # [linux64] + - test -f $PREFIX/lib/gstreamer-1.0/libgstjpeg${SHLIB_EXT} # [unix] + - test -f $PREFIX/lib/gstreamer-1.0/libgstlame${SHLIB_EXT} # [unix] + - test -f $PREFIX/lib/gstreamer-1.0/libgstmpg123${SHLIB_EXT} # [linux64 or osx] - test -f $PREFIX/lib/gstreamer-1.0/libgstspectrum${SHLIB_EXT} # [unix] - if not exist %LIBRARY_LIB%\\gstreamer-1.0\\gstalpha.dll exit 1 # [win] - if not exist %LIBRARY_LIB%\\gstreamer-1.0\\gstdebug.dll exit 1 # [win] + - if not exist %LIBRARY_LIB%\\gstreamer-1.0\\gstjpeg.dll exit 1 # [win] - if not exist %LIBRARY_LIB%\\gstreamer-1.0\\gstspectrum.dll exit 1 # [win] - gst-inspect-1.0 --plugin alpha about: