summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-22 19:28:20 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-22 19:28:20 +0100
commitb3e549a2dbf1b74c3ea7b1e4321c20953fc2ce11 (patch)
tree7fa8dd3cdf49109260690a7467fc7e1942da7139 /package
parentad4d82c5d728f87fc1bc04cce9ed2c17dbfdbd6d (diff)
Patch for irssi with perl support
Diffstat (limited to 'package')
-rw-r--r--package/irssi/irssi.mk45
1 files changed, 45 insertions, 0 deletions
diff --git a/package/irssi/irssi.mk b/package/irssi/irssi.mk
new file mode 100644
index 0000000..1a76be0
--- /dev/null
+++ b/package/irssi/irssi.mk
@@ -0,0 +1,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
+