Bug 240162

Summary: databases/ruby-xapian does not build with ruby 2.6
Product: Ports & Packages Reporter: Matthias Fechner <mfechner>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Many People CC: mfechner
Priority: --- Flags: bugzilla: maintainer-feedback? (sunpoet)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 240094    
Attachments:
Description Flags
Fix ruby 2.6 build error. none

Description Matthias Fechner freebsd_committer freebsd_triage 2019-08-28 10:09:48 UTC
Switching the ruby version to 2.6 (see depending PR) you will see the following error message:
http://package18.nyi.freebsd.org/data/120amd64-default-PR238988/2019-08-28_05h21m12s/logs/ruby26-xapian-1.4.12.log

Should we mark this port broken with ruby 2.6?
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2019-08-28 20:53:22 UTC
Created attachment 206989 [details]
Fix ruby 2.6 build error.
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2019-08-29 17:55:45 UTC
I'm testing the similar patch.

--- Makefile    (revision 510163)
+++ Makefile    (working copy)
@@ -50,4 +50,10 @@
 post-patch:
        @${REINPLACE_CMD} -e 's|-lstdc++||g' ${WRKSRC}/configure

-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${RUBY_VER} >= 2.6
+BUILD_DEPENDS+=        rubygem-rdoc>=0:devel/rubygem-rdoc
+.endif
+
+.include <bsd.port.post.mk>
Comment 3 Matthias Fechner freebsd_committer freebsd_triage 2019-08-30 09:14:07 UTC
yes that would also be a solution, but as the aim is to switch ruby to version 2.6, it is maybe overkill.
I tested it with ruby 2.5 and it builds fine, so there is maybe not really a need to include this check.

But how you do it is your decision ;)
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-08-31 07:59:00 UTC
A commit references this bug:

Author: sunpoet
Date: Sat Aug 31 07:58:03 UTC 2019
New revision: 510358
URL: https://svnweb.freebsd.org/changeset/ports/510358

Log:
  Fix build with Ruby 2.6

  PR:		240162
  Submitted by:	mfechner

Changes:
  head/databases/ruby-xapian/Makefile
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2019-08-31 08:06:05 UTC
Committed. Thanks!