blob: 1a76be04ad4eb3ad531d11f1ef0246342e4d71fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
################################################################################
#
# irssi
#
################################################################################
# Cross-compilation of the perl plugin is handled by
# patches/irssi/0001-perl-cross-compilation-use-staging-dir.patch:
# when $cross_compiling=yes, configure derives the perl CFLAGS/LDFLAGS from
# the *target* perl installation found in $STAGING_DIR (instead of the host
# perl paths reported by ExtUtils::Embed, which the cross compiler rejects)
# and overrides the MakeMaker variables (PERL_LIB/PERL_ARCHLIB/PERL_INC,
# LD/LDDLFLAGS and the INSTALL* dirs) of the perl XS subdirectories.
#
# The patch modifies configure.ac, so configure must be regenerated: run
# autoreconf ourselves in a PRE_CONFIGURE hook (IRSSI_AUTORECONF cannot be
# used here: buildroot evaluates it when parsing its own package/irssi
# .mk, which happens before this external file is included).
#
# host-perl (same version as the target perl) is used to run Makefile.PL and
# xsubpp during the build, so point configure at it explicitly.
IRSSI_DEPENDENCIES += host-perl host-autoconf host-automake host-libtool host-pkgconf perl
define IRSSI_RUN_AUTORECONF
cd $(@D) && PATH=$(HOST_DIR)/bin:$$PATH autoreconf --force --install
endef
IRSSI_PRE_CONFIGURE_HOOKS += IRSSI_RUN_AUTORECONF
IRSSI_CONF_ENV += \
PATH=$(HOST_DIR)/bin:$$PATH \
ac_cv_path_perlpath=$(HOST_DIR)/bin/perl
# V=1: irssi's Makefile_silent.pm injects $(PL_AM_V_BLIB) in the middle of
# the multi-line pm_to_blib perl command; with V=0 this expands to
# `@echo " BLIB " $@;` and breaks the command ("Failed to find -- in
# @echo| BLIB |pm_to_blib", Error 127). With V=1 it expands to nothing.
IRSSI_MAKE_ENV += \
PATH=$(HOST_DIR)/bin:$$PATH \
V=1
IRSSI_CONF_OPTS += \
--with-perl=module \
--with-perl-lib=site
|