diff --git a/taskcluster/kinds/toolchain/kind.yml b/taskcluster/kinds/toolchain/kind.yml index 124e9e0fb..0a514b442 100644 --- a/taskcluster/kinds/toolchain/kind.yml +++ b/taskcluster/kinds/toolchain/kind.yml @@ -143,8 +143,11 @@ tasks: description: build cyhunspell binary wheel run: script: build-hunspell.sh + arguments: + - hunspell.patch resources: - taskcluster/scripts/toolchain/build-hunspell.sh + - taskcluster/scripts/toolchain/hunspell.patch toolchain-artifact: public/build/cyhunspell-2.0.3-cp312-cp312-linux_x86_64.whl fetches: fetch: diff --git a/taskcluster/scripts/toolchain/build-hunspell.sh b/taskcluster/scripts/toolchain/build-hunspell.sh index 0453b7356..f2b01562a 100755 --- a/taskcluster/scripts/toolchain/build-hunspell.sh +++ b/taskcluster/scripts/toolchain/build-hunspell.sh @@ -2,8 +2,18 @@ set -e set -x +pushd `dirname $0` &>/dev/null +MY_DIR=$(pwd) +popd &>/dev/null + +patch=${1:-none} + HUNSPELL_DIR=$MOZ_FETCHES_DIR/hunspell +if [ "$patch" != "none" ]; then + patch -d ${HUNSPELL_DIR} -p1 < ${MY_DIR}/${patch} +fi + cd $HUNSPELL_DIR python3 setup.py bdist_wheel whl=$(ls dist/*.whl) diff --git a/taskcluster/scripts/toolchain/hunspell.patch b/taskcluster/scripts/toolchain/hunspell.patch new file mode 100644 index 000000000..05ee50130 --- /dev/null +++ b/taskcluster/scripts/toolchain/hunspell.patch @@ -0,0 +1,23 @@ +diff --git a/hunspell/hunspell.cpp b/hunspell/hunspell.cpp +index 27ff298..efccd2e 100644 +--- a/hunspell/hunspell.cpp ++++ b/hunspell/hunspell.cpp +@@ -229,17 +229,17 @@ END: Cython Metadata */ + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) +- #define CYTHON_USE_PYLONG_INTERNALS 1 ++ #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5) + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2