diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index a20f315..875d996 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -13,6 +13,7 @@ jobs: UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 + variables: {} steps: # configure qemu binfmt-misc running. This allows us to run docker containers @@ -25,6 +26,9 @@ jobs: - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 9e4e167..ae4e0e7 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -12,11 +12,15 @@ jobs: CONFIG: osx_64_ UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 + variables: {} steps: # TODO: Fast finish on azure pipelines? - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index f11959c..5ef2903 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' cdt_name: - cos6 channel_sources: @@ -27,5 +31,7 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version +- - c_stdlib_version + - cdt_name zlib: - '1.2' diff --git a/.ci_support/migrations/harfbuzz8.yaml b/.ci_support/migrations/harfbuzz8.yaml deleted file mode 100644 index b63c19e..0000000 --- a/.ci_support/migrations/harfbuzz8.yaml +++ /dev/null @@ -1,7 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 -harfbuzz: -- '8' -migrator_ts: 1693002656.2545004 diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 31745b6..70574e1 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -3,7 +3,11 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '15' +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.9' channel_sources: - conda-forge channel_targets: @@ -13,7 +17,7 @@ curl: cxx_compiler: - clangxx cxx_compiler_version: -- '15' +- '16' freetype: - '2' harfbuzz: diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5c1867e..d54f8e2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @scopatz @xmnlab \ No newline at end of file +* @jan-janssen @scopatz @xmnlab \ No newline at end of file diff --git a/.gitignore b/.gitignore index c89ecb7..179afe5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,24 @@ -*.pyc +# User content belongs under recipe/. +# Feedstock configuration goes in `conda-forge.yml` +# Everything else is managed by the conda-smithy rerender process. +# Please do not modify + +# Ignore all files and folders in root +* +!/conda-forge.yml + +# Don't ignore any files/folders if the parent folder is 'un-ignored' +# This also avoids warnings when adding an already-checked file with an ignored parent. +!/**/ +# Don't ignore any files/folders recursively in the following folders +!/recipe/** +!/.ci_support/** -build_artifacts +# Since we ignore files/folders recursively, any folders inside +# build_artifacts gets ignored which trips some build systems. +# To avoid that we 'un-ignore' all files/folders recursively +# and only ignore the root build_artifacts folder. +!/build_artifacts/** +/build_artifacts + +*.pyc diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index f6b8686..5f63870 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,14 +28,15 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 - -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 +mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -72,9 +73,10 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ + --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c..aff009f 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..00f377a 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -21,6 +21,12 @@ if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) fi +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + docker info # In order for the conda-build process in the container to write to the mounted @@ -91,6 +97,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 5ef2a19..165fa51 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -22,11 +22,13 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 -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 +mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" @@ -45,6 +47,10 @@ else echo -e "\n\nNot mangling homebrew as we are not running in CI" fi +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup @@ -71,9 +77,10 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then /bin/bash else - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ + --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/README.md b/README.md index 359e22e..e5a76b8 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ available continuous integration services. Thanks to the awesome service provide [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the -[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +[conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) channel for Linux, Windows and OSX respectively. To manage the continuous integration and simplify feedstock maintenance @@ -179,6 +179,7 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@jan-janssen](https://github.com/jan-janssen/) * [@scopatz](https://github.com/scopatz/) * [@xmnlab](https://github.com/xmnlab/) diff --git a/build-locally.py b/build-locally.py index 3f4b7a7..e0d408d 100755 --- a/build-locally.py +++ b/build-locally.py @@ -64,8 +64,9 @@ def verify_config(ns): 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=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) diff --git a/recipe/Makefile-shared-libs-linux.patch b/recipe/Makefile-shared-libs-linux.patch index 292901f..230bff0 100644 --- a/recipe/Makefile-shared-libs-linux.patch +++ b/recipe/Makefile-shared-libs-linux.patch @@ -1,25 +1,36 @@ ---- Makefile.orig 2020-03-25 11:02:34.874709800 -0500 -+++ Makefile 2020-03-26 15:50:24.164426027 -0500 -@@ -20,7 +20,7 @@ +From 878885071139f3252283d27bc7a35519f00b4962 Mon Sep 17 00:00:00 2001 +From: Jan Janssen +Date: Thu, 28 Mar 2024 15:45:22 -0500 +Subject: [PATCH] Linux patch + +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 53cf06f..9414928 100644 +--- a/Makefile ++++ b/Makefile +@@ -21,7 +21,7 @@ include Makethird # Do not specify CFLAGS or LIBS on the make invocation line - specify # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that # set a variable that was set on the command line. -CFLAGS += $(XCFLAGS) -Iinclude +CFLAGS += $(XCFLAGS) -Iinclude -fPIC LIBS += $(XLIBS) -lm - + ifneq ($(threading),no) -@@ -415,10 +415,10 @@ +@@ -487,10 +487,10 @@ install-docs: install -m 644 docs/man/*.1 $(DESTDIR)$(mandir)/man1 install -d $(DESTDIR)$(docdir) - install -d $(DESTDIR)$(docdir)/examples -+ #install -d $(DESTDIR)$(docdir)/examples - install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir) -- install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir) ++ # install -d $(DESTDIR)$(docdir)/examples + install -m 644 README CHANGES $(DESTDIR)$(docdir) +- install -m 644 $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir) - install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples -+ #install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir) -+ #install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples ++ # install -m 644 $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir) ++ # install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples + + install: install-libs install-apps install-docs - tarball: - bash scripts/archive.sh diff --git a/recipe/Makefile-shared-libs-osx.patch b/recipe/Makefile-shared-libs-osx.patch index 660f37c..e9ccdeb 100644 --- a/recipe/Makefile-shared-libs-osx.patch +++ b/recipe/Makefile-shared-libs-osx.patch @@ -1,6 +1,17 @@ ---- Makefile.ori 2022-08-15 23:32:42.950710308 -0400 -+++ Makefile 2022-08-26 17:13:29.495341185 -0400 -@@ -21,7 +21,7 @@ +From 2011279b784a4a27334ee8a6740fae9377bd7763 Mon Sep 17 00:00:00 2001 +From: Jan Janssen +Date: Thu, 28 Mar 2024 15:52:14 -0500 +Subject: [PATCH] macOS + +--- + Makefile | 49 +++++++++++++++---------------------------------- + 1 file changed, 15 insertions(+), 34 deletions(-) + +diff --git a/Makefile b/Makefile +index 53cf06f..740b393 100644 +--- a/Makefile ++++ b/Makefile +@@ -21,7 +21,7 @@ include Makethird # Do not specify CFLAGS or LIBS on the make invocation line - specify # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that # set a variable that was set on the command line. @@ -9,12 +20,12 @@ LIBS += $(XLIBS) -lm ifneq ($(threading),no) -@@ -270,46 +270,27 @@ +@@ -293,46 +293,27 @@ generate: source/html/css-properties.h # --- Library --- -ifeq ($(shared),yes) --MUPDF_LIB = $(OUT)/libmupdf.$(SO) +-MUPDF_LIB = $(OUT)/libmupdf.$(SO)$(SO_VERSION) -ifeq ($(SO),dll) -MUPDF_LIB_IMPORT = $(OUT)/libmupdf_$(SO).a -LIBS_TO_INSTALL_IN_BIN = $(MUPDF_LIB) @@ -63,23 +74,21 @@ $(PKCS7_LIB) : $(PKCS7_OBJ) + $(LINK_CMD) -v -shared -Wl,-install_name -Wl,libmupdf-pkcs7.dylib -undefined dynamic_lookup + -+LIBS_TO_INSTALL_IN_LIB := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB) ++LIBS_TO_INSTALL_IN_LIB := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB) # --- Main tools and viewers --- -@@ -457,12 +457,12 @@ +@@ -487,10 +468,10 @@ install-docs: install -m 644 docs/man/*.1 $(DESTDIR)$(mandir)/man1 install -d $(DESTDIR)$(docdir) - install -d $(DESTDIR)$(docdir)/examples + # install -d $(DESTDIR)$(docdir)/examples - install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir) -- install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir) + install -m 644 README CHANGES $(DESTDIR)$(docdir) +- install -m 644 $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir) - install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples -+ # install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir) ++ # install -m 644 $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir) + # install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples install: install-libs install-apps install-docs - tarball: - bash scripts/archive.sh diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 81c236e..08a54c3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "mupdf" %} -{% set version = "1.22.2" %} +{% set version = "1.24.0" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://www.mupdf.com/downloads/archive/mupdf-{{ version }}-source.tar.gz - sha256: 54c66af4e6ef8cea9867cc0320ef925d561b42919ea0d4f89db5c9ef485bbeb7 + sha256: 52f63003a6f4d89f234e9edfb4b4c83d216b83aaeb323cfda6047cb754599ae0 patches: # Make shared libs, rather than static @@ -19,8 +19,7 @@ source: - Makerules.patch # [osx] build: - number: 1 - # TODO: enable again osx when possible + number: 0 skip: true # [win] missing_dso_whitelist: # [osx] - /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT # [osx] @@ -79,3 +78,4 @@ extra: recipe-maintainers: - xmnlab - scopatz + - jan-janssen