Bug 280164 - irc/inspircd: 4.0.1 fails to build when PCRE is enabled (patch included)
Summary: irc/inspircd: 4.0.1 fails to build when PCRE is enabled (patch included)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dries Michiels
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2024-07-06 21:07 UTC by Fabian Wenk
Modified: 2024-07-13 14:23 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (driesm)


Attachments
inspircd-4.0.1_1 patch (1.70 KB, patch)
2024-07-06 21:07 UTC, Fabian Wenk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Wenk 2024-07-06 21:07:10 UTC
Created attachment 251905 [details]
inspircd-4.0.1_1 patch

When the config option PCRE is enabled, the build fails with this:

Could not read modules/m_regex_pcre.cpp at make/calcdep.pl line 157.
gmake: *** [GNUmakefile:210: target] Error 2


When checking what is there, I did found this:

riddler:/usr/ports/irc/inspircd/work/inspircd-4.0.1/src/modules/ # ls -l m_regex_pcre.cpp
lrwxr-xr-x  1 root  wheel  22 Jul  6 20:09 m_regex_pcre.cpp@ -> extra/m_regex_pcre.cpp
riddler:/usr/ports/irc/inspircd/work/inspircd-4.0.1/src/modules/ # ls -l extra/m_regex_* 
-rw-r--r--  1 root  wheel  4659 Jul  2 23:54 extra/m_regex_pcre2.cpp
-rw-r--r--  1 root  wheel  2832 Jul  2 23:54 extra/m_regex_posix.cpp
-rw-r--r--  1 root  wheel  2839 Jul  2 23:54 extra/m_regex_re2.cpp
riddler:/usr/ports/irc/inspircd/work/inspircd-4.0.1/src/modules/ # 

Removing the PCRE option would work and the port does build. Also adjusting the Makefile and pkg-plist from pcre to pcre2 and then enable PCRE2 (instead of PCRE) does help too. Patch is attached.
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-07-13 13:34:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f5220f2de9de483196ae7f2e830a7001967797ee

commit f5220f2de9de483196ae7f2e830a7001967797ee
Author:     Fabian Wenk <fabian@wenks.ch>
AuthorDate: 2024-07-13 13:03:23 +0000
Commit:     Dries Michiels <driesm@FreeBSD.org>
CommitDate: 2024-07-13 13:32:26 +0000

    irc/inspircd: update PCRE to PCRE2 following upstream

    inspircd would fail to build with the PCRE option as it was renamed.

    PR:     280164

 irc/inspircd/Makefile  | 9 +++++----
 irc/inspircd/pkg-plist | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)
Comment 2 Dries Michiels freebsd_committer freebsd_triage 2024-07-13 13:35:11 UTC
Committed, thanks!
Comment 3 Fabian Wenk 2024-07-13 14:11:21 UTC
(In reply to Dries Michiels from comment #2)

Hello Dries

It seems that you missed some parts out of my patch on the right side of '=', which does also need to be adjusted:

-PCRE_DESC=	Build m_regex_pcre module
+PCRE2_DESC=	Build m_regex_pcre2 module

and:

-PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
-PCRE_VARS=		EXTRAS+=m_regex_pcre.cpp
+PCRE2_LIB_DEPENDS=	libpcre2-8.so:devel/pcre2
+PCRE2_VARS=		EXTRAS+=m_regex_pcre2.cpp

and also here:
-%%PCRE%%libexec/inspircd/modules/m_regex_pcre.so
+%%PCRE2%%libexec/inspircd/modules/m_regex_pcre2.so


Best regards,
Fabian
Comment 4 Dries Michiels freebsd_committer freebsd_triage 2024-07-13 14:23:02 UTC
Sorry about that, I missed those completely ... :)
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-07-13 14:23:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=06b56691df2a515c5fc91d0dd30c7b299b30da4a

commit 06b56691df2a515c5fc91d0dd30c7b299b30da4a
Author:     Dries Michiels <driesm@FreeBSD.org>
AuthorDate: 2024-07-13 14:21:15 +0000
Commit:     Dries Michiels <driesm@FreeBSD.org>
CommitDate: 2024-07-13 14:21:15 +0000

    irc/inspircd: fix PCRE2 option

    PR:     280164

 irc/inspircd/Makefile  | 8 ++++----
 irc/inspircd/pkg-plist | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)