Page MenuHomeFreeBSD

ftp/lftp: Fix build with non-default LOCALBASE
AbandonedPublic

Authored by loader on Jun 10 2018, 7:07 AM.

Details

Summary

Building ftp/lftp when ${LOCALBASE} is not /usr/local, ${WRKSRC}/configure
tries to find Readline headers in /usr/include not the current ${LOCALBASE}

checking for termcap.h... yes
checking for library containing tigetstr... -ltinfo
checking for tgetstr... yes
checking for Readline headers in /usr/include... not found
checking for Readline... no
configure: error: cannot find readline library, install readline-devel package
===>  Script "configure" failed unexpectedly.
Please report the problem to martymac@FreeBSD.org [maintainer] and attach the
"/usr/ports/ftp/lftp/work/lftp-4.8.3/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
/pkg/tools/sbin/pkg-static info -g -Ea).
*** Error code 1

There's a -f missing for /usr/include/readline/readline.h on line 50396,
which makes readline_prefix=/usr, that's the reason we see /usr/include in the log:
checking for Readline headers in /usr/include... not found

${WRKSRC}/configure:

 50394                  if test -f /usr/local/include/readline.h -o -f /usr/local/include/readline/readline.h; then
 50395              readline_prefix=/usr/local
 50396          elif test -f /usr/include/readline.h -o /usr/include/readline/readline.h; then
 50397              readline_prefix=/usr
 50398          else
 50399              readline_prefix=""
 50400          fi
... ...
 50431      if test -n "$readline_prefix"; then
 50432          readline_include_dir="$readline_prefix/include"
... ...
 50462  $as_echo_n "checking for Readline headers in $readline_include_dir... " >&6; }

Proposed commit log message:

ftp/lftp: Fix build with non-default LOCALBASE

Reviewed_by: koobs, martymac
Approved by: koobs (mentor), martymac (maintainner)
Differential_Revision: D15731
Test Plan
  • portlint: OK (

WARN: /usr/ports/ftp/lftp/files/patch-doc-lftp.1: patch was not generated using `make makepatch''. It is recommended to use `make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
WARN: /usr/ports/ftp/lftp/files/patch-lib-cdefs.h: patch was not generated using `make makepatch''. It is recommended to use `make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
WARN: /usr/ports/ftp/lftp/files/patch-po-Makevars: patch was not generated using `make makepatch''. It is recommended to use `make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
WARN: /usr/ports/ftp/lftp/files/patch-src-Makefile.in: patch was not generated using `make makepatch''. It is recommended to use `make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
0 fatal errors and 4 warnings found.
)

  • testport: OK (poudriere: 1200065, [armv7, aarch64], '', tested)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17130
Build 16985: arc lint + arc unit

Event Timeline

loader created this revision.Jun 10 2018, 7:07 AM
loader edited the summary of this revision. (Show Details)Jun 10 2018, 7:09 AM

Hi,

Regarding the missing -f argument, this is something to patch in m4/lftp_lib_readline.m4. I'll report that upstream, thanks!

Meanwhile, to set a specific LOCALBASE only for readline, using a post-patch target seems a bit overkill to me.

Would adding the following line to the port :

CONFIGURE_ARGS+= --with-readline=${LOCALBASE}

work for you ? It should skip the wrong test and set the correct path. Can you try that ?

If it works, I can add that temporary workaround to the port while waiting for the configure script to be fixed upstream.

Best regards,

Ganael.

Hi,
Regarding the missing -f argument, this is something to patch in m4/lftp_lib_readline.m4. I'll report that upstream, thanks!
Meanwhile, to set a specific LOCALBASE only for readline, using a post-patch target seems a bit overkill to me.
Would adding the following line to the port :
CONFIGURE_ARGS+= --with-readline=${LOCALBASE}
work for you ? It should skip the wrong test and set the correct path. Can you try that ?
If it works, I can add that temporary workaround to the port while waiting for the configure script to be fixed upstream.

Hi Ganael,

Yes, it works and looks better, thanks. :)

loader abandoned this revision.Jun 12 2018, 11:00 AM