diff mbox series

[v4,1/1] package/python-pyicu: fix build

Message ID 20230702103121.289122-1-bernd@kuhls.net
State Accepted
Headers show
Series [v4,1/1] package/python-pyicu: fix build | expand

Commit Message

Bernd Kuhls July 2, 2023, 10:31 a.m. UTC
Fixes:
http://autobuild.buildroot.net/results/977/977c043615603dd3541e23b81c5f11374606aff6/

Set environment variables to cross-compile friendly values, this prevents
icu-config picking up host libraries:
https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L89
https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L179
https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L216

This follows the upstream build docs:
https://gitlab.pyicu.org/main/pyicu#building-pyicu

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
v4: removed variable ICU_BASE (Thomas)

 package/python-pyicu/python-pyicu.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Arnout Vandecappelle July 3, 2023, 6:17 p.m. UTC | #1
On 02/07/2023 12:31, Bernd Kuhls wrote:
> Fixes:
> http://autobuild.buildroot.net/results/977/977c043615603dd3541e23b81c5f11374606aff6/
> 
> Set environment variables to cross-compile friendly values, this prevents
> icu-config picking up host libraries:
> https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L89
> https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L179
> https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L216
> 
> This follows the upstream build docs:
> https://gitlab.pyicu.org/main/pyicu#building-pyicu
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
> v4: removed variable ICU_BASE (Thomas)
> 
>   package/python-pyicu/python-pyicu.mk | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/package/python-pyicu/python-pyicu.mk b/package/python-pyicu/python-pyicu.mk
> index 090ed51bff..213c099d07 100644
> --- a/package/python-pyicu/python-pyicu.mk
> +++ b/package/python-pyicu/python-pyicu.mk
> @@ -12,4 +12,10 @@ PYTHON_PYICU_LICENSE_FILES = LICENSE
>   PYTHON_PYICU_DEPENDENCIES = icu
>   PYTHON_PYICU_SETUP_TYPE = setuptools
>   
> +PYTHON_PYICU_ENV += \
> +	ICU_VERSION="`$(PKG_CONFIG_HOST_BINARY) icu-i18n --modversion`" \
> +	PYICU_CFLAGS="`$(PKG_CONFIG_HOST_BINARY) icu-i18n --variable=CXXFLAGS`" \
> +	PYICU_LFLAGS="`$(PKG_CONFIG_HOST_BINARY) icu-i18n --libs-only-L` \
> +		`$(PKG_CONFIG_HOST_BINARY) icu-i18n --libs-only-l`"
> +
>   $(eval $(python-package))
Peter Korsgaard July 16, 2023, 8:07 p.m. UTC | #2
On 02/07/2023 12.31, Bernd Kuhls wrote:
> Fixes:
> http://autobuild.buildroot.net/results/977/977c043615603dd3541e23b81c5f11374606aff6/
> 
> Set environment variables to cross-compile friendly values, this prevents
> icu-config picking up host libraries:
> https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L89
> https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L179
> https://gitlab.pyicu.org/main/pyicu/-/blob/main/setup.py#L216
> 
> This follows the upstream build docs:
> https://gitlab.pyicu.org/main/pyicu#building-pyicu
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
> v4: removed variable ICU_BASE (Thomas)

Committed to 2023.02.x and 2023.05.x, thanks.
diff mbox series

Patch

diff --git a/package/python-pyicu/python-pyicu.mk b/package/python-pyicu/python-pyicu.mk
index 090ed51bff..213c099d07 100644
--- a/package/python-pyicu/python-pyicu.mk
+++ b/package/python-pyicu/python-pyicu.mk
@@ -12,4 +12,10 @@  PYTHON_PYICU_LICENSE_FILES = LICENSE
 PYTHON_PYICU_DEPENDENCIES = icu
 PYTHON_PYICU_SETUP_TYPE = setuptools
 
+PYTHON_PYICU_ENV += \
+	ICU_VERSION="`$(PKG_CONFIG_HOST_BINARY) icu-i18n --modversion`" \
+	PYICU_CFLAGS="`$(PKG_CONFIG_HOST_BINARY) icu-i18n --variable=CXXFLAGS`" \
+	PYICU_LFLAGS="`$(PKG_CONFIG_HOST_BINARY) icu-i18n --libs-only-L` \
+		`$(PKG_CONFIG_HOST_BINARY) icu-i18n --libs-only-l`"
+
 $(eval $(python-package))