Bug 259101 - devel/newt: configure fails after upgrade 0.52.21
Summary: devel/newt: configure fails after upgrade 0.52.21
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Neel Chauhan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-12 12:30 UTC by Boris Korzun
Modified: 2021-10-14 08:28 UTC (History)
4 users (show)

See Also:


Attachments
Fix for --with-python (697 bytes, patch)
2021-10-13 08:31 UTC, Stewart Morgan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Korzun 2021-10-12 12:30:26 UTC
There's a configure error after upgrade to 0.52.21:

=====
checking libintl.h presence... yes                                                                                        
checking for libintl.h... yes                                                                                             
checking for python versions... ./configure: 3839: Syntax error: ")" unexpected (expecting "fi")                          
===>  Script "configure" failed unexpectedly.                                                                             
Please report the problem to ports@FreeBSD.org [maintainer] and attach the                                                
"/wrkdirs/usr/ports/devel/newt/work/newt-0.52.21/config.log" including the                                                
output of the failure of your make command. Also, it might be a good idea to                                              
provide an overview of all packages installed on your system (e.g. a                                                      
/usr/local/sbin/pkg-static info -g -Ea).                                                                                  
*** Error code 1                                                                                                          
=====

There's no config.log in newt-0.52.21 directory.
Comment 1 Stewart Morgan 2021-10-13 08:31:28 UTC
Created attachment 228653 [details]
Fix for --with-python

The post-patch-PYTHON-on target in Makefile is what breaks configure.ac by incorrectly assumeing the PYTHONVERS defintion it is updating is on one line (and presumably it was in the previous release).
Fortunately, the new release's configure.ac file allows specifying the Python version by argument, so this patch removes the redundant Makefile target and uses --with-python=${PYTHON_VERSION}.
Works for me on 12.2-amd64 (with Python 3.8)
Comment 2 Stewart Morgan 2021-10-13 08:48:56 UTC
Just to add that, though not strictly related to this bug, I also had to change the SOVERSION variable so that it matched the pkg-plist:
-SOVERSION=     ${PORTVERSION:R:E}
+SOVERSION=     ${PORTVERSION:R}
Comment 3 Boris Korzun 2021-10-13 08:59:14 UTC
Hi Stewart,

thx for the patch. It works for me on stable/13-amd64 also.
Comment 4 Neel Chauhan freebsd_committer 2021-10-13 15:13:02 UTC
Committed!
Comment 5 commit-hook freebsd_committer 2021-10-13 15:13:18 UTC
A commit in branch main references this bug:

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

commit 6147179016a67da893ace8f2df6d8c89e56ad0bb
Author:     Boris Korzun <drtr0jan@yandex.ru>
AuthorDate: 2021-10-13 15:12:23 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2021-10-13 15:12:23 +0000

    devel/newt: Fix configure failure after update to 0.52.21

    PR:     259101

 devel/newt/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Comment 6 Boris Korzun 2021-10-14 08:28:30 UTC
(In reply to Neel Chauhan from comment #4)

Hi Neel,

thx for the commit. But I am not an author. Stewart Morgan is author.