diff --git a/bootstrap-carla.sh b/bootstrap-carla.sh index 70ae505..67835e4 100755 --- a/bootstrap-carla.sh +++ b/bootstrap-carla.sh @@ -207,7 +207,7 @@ fi if [ "${WIN32}" -eq 1 ] && [ "${CROSS_COMPILING}" -eq 1 ]; then PYTHONPATH="${PAWPAW_PREFIX}/lib/python3.8/site-packages" - if [ "${CROSS_COMPILING}" -eq 1 ] && [ ! -e "${PYTHONPATH}/liblo.pyd" ]; then + if [ ! -e "${PYTHONPATH}/liblo.pyd" ]; then ln -sv "${PYTHONPATH}"/pyliblo-*.egg/*.so "${PYTHONPATH}/liblo.pyd" fi unset PYTHONPATH diff --git a/bootstrap-mod.sh b/bootstrap-mod.sh index fe01bad..f44fcaf 100755 --- a/bootstrap-mod.sh +++ b/bootstrap-mod.sh @@ -61,9 +61,25 @@ build_waf jack2 "${JACK2_VERSION}" "${JACK2_EXTRAFLAGS}" AGGDRAW_VERSION="1.3.11" +if [ "${WIN32}" -eq 1 ]; then + export AGGDRAW_FREETYPE_ROOT="${PAWPAW_PREFIX}" + export EXTRA_CFLAGS="$(${PAWPAW_PREFIX}/bin/pkg-config --cflags python3 freetype2 libpng)" + export EXTRA_LDFLAGS="-shared $(${PAWPAW_PREFIX}/bin/pkg-config --libs python3 freetype2 libpng) -lgdi32 -lkernel32 -luser32" +fi + download aggdraw "${AGGDRAW_VERSION}" "https://files.pythonhosted.org/packages/ef/29/fddf555c68920bb0aff977425af786226db2a78379e706951ff32b4492ef" build_python aggdraw "${AGGDRAW_VERSION}" +unset AGGDRAW_FREETYPE_ROOT + +if [ "${WIN32}" -eq 1 ] && [ "${CROSS_COMPILING}" -eq 1 ]; then + PYTHONPATH="${PAWPAW_PREFIX}/lib/python3.8/site-packages" + if [ ! -e "${PYTHONPATH}/aggdraw.pyd" ]; then + ln -sv "${PYTHONPATH}"/aggdraw-*.egg/*.so "${PYTHONPATH}/aggdraw.pyd" + fi + unset PYTHONPATH +fi + # --------------------------------------------------------------------------------------------------------------------- # tornado diff --git a/patches/Python/win32/9001-pawpaw-needed-changes.patch b/patches/Python/win32/9001-pawpaw-needed-changes.patch index d70c4af..41c6bf1 100644 --- a/patches/Python/win32/9001-pawpaw-needed-changes.patch +++ b/patches/Python/win32/9001-pawpaw-needed-changes.patch @@ -32,6 +32,20 @@ index dddf412..3edccb6 100644 result = RE_VERSION.search(out_string) if result is None: return None +diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py +index f159586..004e89f 100644 +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -200,6 +200,9 @@ class UnixCCompiler(CCompiler): + + if sys.platform == 'darwin': + linker = _osx_support.compiler_fixup(linker, ld_args) ++ else: ++ ld_args += linker[i+offset+1:] ++ linker = [linker[i+offset]] + + self.spawn(linker + ld_args) + except DistutilsExecError as msg: diff --git a/Misc/python.pc.in b/Misc/python.pc.in index 3900190..a14e42b 100644 --- a/Misc/python.pc.in diff --git a/patches/aggdraw/01_fix-build.patch b/patches/aggdraw/01_fix-build.patch new file mode 100644 index 0000000..f11ebb0 --- /dev/null +++ b/patches/aggdraw/01_fix-build.patch @@ -0,0 +1,26 @@ +diff --git a/agg2/include/agg_array.h b/agg2/include/agg_array.h +index 37684d1..3a0f5c0 100644 +--- a/agg2/include/agg_array.h ++++ b/agg2/include/agg_array.h +@@ -520,7 +520,7 @@ namespace agg + int8u* ptr = m_buf_ptr; + if(alignment > 1) + { +- unsigned align = (alignment - (unsigned long)(ptr) % alignment) % alignment; ++ unsigned align = (alignment - (uintptr_t)(ptr) % alignment) % alignment; + size += align; + ptr += align; + if(size <= m_rest) +diff --git a/aggdraw.cxx b/aggdraw.cxx +index 0ad56c7..b6f1912 100644 +--- a/aggdraw.cxx ++++ b/aggdraw.cxx +@@ -49,7 +49,7 @@ + #define Q(x) #x + #define QUOTE(x) Q(x) + +-#if defined(_MSC_VER) ++#if defined(_WIN32) + #define WINDOWS_LEAN_AND_MEAN + #include + #endif