Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/1] package/python-pyicu: fix build
@ 2023-06-13 20:25 Bernd Kuhls
  2023-07-01 21:01 ` Thomas Petazzoni via buildroot
       [not found] ` <20230701230134.6c2314e4__32130.2583602787$1688245321$gmane$org@windsurf>
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2023-06-13 20:25 UTC (permalink / raw)
  To: buildroot; +Cc: Asaf Kahlon

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@t-online.de>
---
v3: use environment variables as proposed by the package author
v2: prefer pkg-config (Yann), as proposed
    https://patchwork.ozlabs.org/project/buildroot/patch/20230516173411.823978-1-bernd.kuhls@t-online.de/

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

diff --git a/package/python-pyicu/python-pyicu.mk b/package/python-pyicu/python-pyicu.mk
index 512b2f857f..427ebbfe52 100644
--- a/package/python-pyicu/python-pyicu.mk
+++ b/package/python-pyicu/python-pyicu.mk
@@ -12,4 +12,11 @@ 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`" \
+	ICU_BASE="$(STAGING_DIR)/usr" \
+	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))
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-02 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13 20:25 [Buildroot] [PATCH v3 1/1] package/python-pyicu: fix build Bernd Kuhls
2023-07-01 21:01 ` Thomas Petazzoni via buildroot
     [not found] ` <20230701230134.6c2314e4__32130.2583602787$1688245321$gmane$org@windsurf>
2023-07-02 10:25   ` Bernd Kuhls

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox