Bug 236152 - irc/weechat: Optionally support Guile scripts
Summary: irc/weechat: Optionally support Guile scripts
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bernard Spil
URL:
Keywords: feature, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-03-02 15:04 UTC by Jérémy "Vrakfall" Lecocq
Modified: 2019-06-07 18:26 UTC (History)
4 users (show)

See Also:


Attachments
Adds lang/guile2 scriptinh support within irc/weechat (2.88 KB, patch)
2019-03-02 15:06 UTC, Jérémy "Vrakfall" Lecocq
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jérémy "Vrakfall" Lecocq 2019-03-02 15:04:36 UTC
Since 0.4.1 (24th May 2013), irc/weechat doesn't include lang/guile2 which there wasn't a port of back then. That lack of got solved the 25th May 2014, tho guile2 hasn't been included back into the port ever since.

Guile is necessary to load custom `.scm` scripts within the weechat.

Looking at how weechat dynamically discovers the presence of guile, simply removing `-DENABLE_GUILE=no` from the Makefile and depending on the port lang/guile2 *should* be enough so weechat autoloads the plugin at startup time. This (the plugin load) has been confirmed by another user on #freebsd, tho he didn't try to load a script with it.
The changes he used to test it is attached to this bug report. I sadly haven't tried it *yet*.

Attention tho, weechat requires that guile is of version >=2.0 and <2.2! Please see [1].

I hope I filed this bug report correctly as this is a first time for me and thank you for the hard work so far!

[1]: https://github.com/weechat/weechat/issues/1098
Comment 1 Jérémy "Vrakfall" Lecocq 2019-03-02 15:06:51 UTC
Created attachment 202502 [details]
Adds lang/guile2 scriptinh support within irc/weechat
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2019-03-04 09:01:25 UTC
Hi Jérémy,

Do you do ports more often? This looks very good! Thanks!

You're removing the -DENABLE_GUILE from the CMAKE_ARGS completely. Is that default off anyway? I would assume we'd need a GUILE_CMAKE_BOOL= ENABLE_GUILE to make it enable/disable based on the option.

Cheers, Bernard.
Comment 3 Bernard Spil freebsd_committer freebsd_triage 2019-03-04 09:04:22 UTC
(In reply to Bernard Spil from comment #2)
Scrap that... It does that properly in the loop...
Comment 4 Andrew "RhodiumToad" Gierth 2019-03-04 10:45:21 UTC
(In reply to Bernard Spil from comment #2)

Hi, for the record the port patch was from me (I was the "other user" Jérémy mentioned).
Comment 5 Jérémy "Vrakfall" Lecocq 2019-03-04 11:08:48 UTC
Yeah, I didn't patch anything, I'm not used to doing Makefiles. Thanks to Andrew for that. I didn't name him because he didn't tell me if he wanted/allowed me to.

Also, I'm pretty sure weechat looks for all its plugins at build time, including guile2, so it defaults to on. That's why they had to disable it in 2013.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-20 07:25:17 UTC
Assign to maintainer

@Brnrd Yep, ENABLE_GUILE cmake arg/bool needs to made conditional on the GUILE option
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-06-07 18:22:42 UTC
A commit references this bug:

Author: brnrd
Date: Fri Jun  7 18:21:58 UTC 2019
New revision: 503643
URL: https://svnweb.freebsd.org/changeset/ports/503643

Log:
  rc/weechat: Update to 2.5

   - Add Guile support [1]

  PR:		236152 [1]
  Submitted by:	Jeremy "Vrakfall" Lecoc<jeremy artphotolaurent be> [1]

Changes:
  head/irc/weechat/Makefile
  head/irc/weechat/distinfo
  head/irc/weechat/files/patch-CMakeLists.txt
  head/irc/weechat/pkg-plist
Comment 8 Bernard Spil freebsd_committer freebsd_triage 2019-06-07 18:26:57 UTC
Thanks for the patch Andrew! and thanks Jeremy for creating the PR. You should now be able to select the GUILE option. If anything's amiss, open a new PR (preferably with patch)