From c069836a064a716cd7b3a0f579fc5bdeed36d3fd Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Thu, 30 Aug 2018 12:10:49 +0000 Subject: [PATCH] misc/linm: Fix build with Clang 6 In file included from mlsdialog.cpp:1: ./mlsdialog.h:30:10: error: cannot initialize return object of type 'void *' with an rvalue of type 'bool' return false; ^~~~~ http://beefy12.nyi.freebsd.org/data/head-amd64-default/p478276_s338342/logs/errors/linm-0.8.1.1_5.log - Fix build on 12.0 too; it fails to link and seems to want iconv from ports for the //TRANSLIT extension /usr/bin/ld: error: undefined symbol: libiconv_open >>> referenced by mlslocale.cpp >>> mlslocale.o:(MLSUTIL::code_convert(char const*, char const*, char const*)) in archive ../../lib/libmlscommon.a --- misc/linm/Makefile | 11 ++++------- misc/linm/files/patch-lib_mlsdialog.h | 16 ++++++++++++++++ misc/linm/files/patch-src_ncurses_Makefile.in | 11 +++++++++++ 3 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 misc/linm/files/patch-lib_mlsdialog.h create mode 100644 misc/linm/files/patch-src_ncurses_Makefile.in diff --git a/misc/linm/Makefile b/misc/linm/Makefile index 41dd129ace16..2b5633ed4d25 100644 --- a/misc/linm/Makefile +++ b/misc/linm/Makefile @@ -3,7 +3,7 @@ PORTNAME= linm DISTVERSION= 0.8.1-1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= misc shells MASTER_SITES= http://kldp.net/frs/download.php/4508/ DISTNAME= ${PORTNAME}_${DISTVERSION} @@ -14,24 +14,21 @@ COMMENT= Clone of Mdir, mc-style terminal file manager LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= gettext pkgconfig gmake libtool ncurses ssl +USES= gettext iconv:translit pkgconfig gmake localbase libtool ncurses ssl GNU_CONFIGURE= yes -CONFIGURE_ARGS= --enable-cfgpath="${ETCDIR}" +CONFIGURE_ARGS= --enable-cfgpath="${ETCDIR}" ${ICONV_CONFIGURE_ARG} MAKE_JOBS_UNSAFE= yes INSTALL_TARGET= install-strip WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R} -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib - OPTIONS_DEFINE= SMB DOCS OPTIONS_SUB= yes SMB_CONFIGURE_ENV_OFF= ac_cv_lib_smbclient_smbc_new_context=no SMB_CPPFLAGS= -I${SAMBAINCLUDES} SMB_LIBS= -L${SAMBALIBS} -SMB_USES= iconv samba:lib +SMB_USES= samba:lib post-patch: @${REINPLACE_CMD} -e 's|configpath|cfgpath|g' ${WRKSRC}/configure diff --git a/misc/linm/files/patch-lib_mlsdialog.h b/misc/linm/files/patch-lib_mlsdialog.h new file mode 100644 index 000000000000..c9d5ee95c5d2 --- /dev/null +++ b/misc/linm/files/patch-lib_mlsdialog.h @@ -0,0 +1,16 @@ +In file included from mlsdialog.cpp:1: +./mlsdialog.h:30:10: error: cannot initialize return object of type 'void *' with an rvalue of type 'bool' + return false; + ^~~~~ + +--- lib/mlsdialog.h.orig 2018-08-30 11:11:28 UTC ++++ lib/mlsdialog.h +@@ -27,7 +27,7 @@ class MlsDialog (public) + virtual void* MsgWaitBox(const string& sTitle, const string& sMsg) + { + cout << "MsgWaitBox :: " << sTitle << "Msg :: " << sMsg << endl; +- return false; ++ return NULL; + } + virtual void MsgWaitEnd(void* ) {} + virtual int InputBox(const string& sTitle, string& sInputStr, bool /*bPasswd*/ = false) diff --git a/misc/linm/files/patch-src_ncurses_Makefile.in b/misc/linm/files/patch-src_ncurses_Makefile.in new file mode 100644 index 000000000000..34264b0b36f0 --- /dev/null +++ b/misc/linm/files/patch-src_ncurses_Makefile.in @@ -0,0 +1,11 @@ +--- src/ncurses/Makefile.in.orig 2018-08-30 11:32:53 UTC ++++ src/ncurses/Makefile.in +@@ -279,7 +279,7 @@ linm_LDADD = $(top_builddir)/lib/libmlscommon.a \ + $(top_builddir)/editor/libeditor.a \ + $(top_builddir)/panel/common/libpanelcommon.a \ + $(top_builddir)/panel/vfs/archive/liblinmpluginarc.la \ +- $(top_builddir)/panel/vfs/ftp/liblinmpluginftp.la @LIBINTL@ \ ++ $(top_builddir)/panel/vfs/ftp/liblinmpluginftp.la @LIBICONV@ @LIBINTL@ \ + $(am__append_1) $(am__append_2) + all: all-recursive +