tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cross-compiling textproc/icu



To cross-compile, textproc/icu must be configured with —with-cross-build= pointing to a pre-compiled native version of the icu source tree.  Thus, two compilations are required: (i) a native build and (ii) a cross build.

One option is to do this manually, i.e., run the following commands

	make USE_CROSS_COMPILE=no
	make

and add something like the following to textproc/icu/Makefile

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/icu/Makefile,v
retrieving revision 1.149
diff -u -r1.149 Makefile
--- Makefile	16 Jun 2023 16:53:24 -0000	1.149
+++ Makefile	14 Sep 2023 20:16:14 -0000
@@ -35,6 +35,10 @@
 CONFIGURE_ARGS+=	--disable-threads
 .endif
 
+.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+CONFIGURE_ARGS+=	--with-cross-build=${.CURDIR}/work/icu/source
+.endif
+
 .include "../../mk/compiler.mk"
 
 # from ICU_CHECK_MH_FRAG in source/acinclude.m4

In itself, this is not quite the right solution, because “work” should really be replaced with a variable.

Additionally, this cannot work without manual intervention.

What are better ideas?

Should the cross build extract twice and build twice?

Thanks for your input.

Cheers,
Brook




Home | Main Index | Thread Index | Old Index