Re: mail/filtermail fails to build with 13.0-CURRENT

2020-07-01 Thread Mike Clarke
On Monday, 29 June 2020 21:43:28 BST Jung-uk Kim wrote:
> I just checked the upstream and it seems the problem does not exist any
> more after this commit.
> 
> https://sourceforge.net/p/mailfilter/code/ci/52e08609da8133e2cc0acd1961ebc1
> e1537f0c54
> 
> Most applications should have similar fixes because all major Linux
> distros are using Flex 2.6 now.  If you are maintaining such
> applications, you should update the ports, add devel/flex to
> BUILD_DEPENDS, and set FLEX=${LOCALBASE}/bin/flex for releng/stable
> branches.

Thanks Jung-uk Kim, your info got me moving along the right track.

I've patched the port to upgrade it to 0.8.6 and incorporated your 
suggestions about devel/flex for releng/stable. I also needed to 
conditionally add CPPFLAGS+= -I${LOCALBASE}/include/flex to prevent flex 
2.5.37 from the rev 12 base system from being used.

With these changes filtermail 0.8.6 now builds and works on both 12.1-RELEASE 
and 13.0-CURRENT but before I go ahead and submit a patch there's a point I'm 
a bit concerned about.

I've successfully followed all the steps for testing the port in section 3.4 
of the Porter's Handbook except for the final step, make package (as user), 
which failed. Initially it was because I did not have write access to the 
port directory. After temporarily running chmod a+w filtermail I was able to 
build the package but the final step of copying it to /usr/ports/packages/
All/filtermail-0.8.6.txz not surprisingly failed. I'm puzzled why there is 
this requirement to be able to build as a user when the default permissions 
on the ports directories prevent this for unprivileged users.

I'm fairly confident that my patches to the port are working OK but this is a 
task I rarely get involved with so I've appended the Makefile to this email 
in case anybody can spot anything I've not done correctly.

I made the dependency of textproc/flex conditional on OSVERSION < 130. I 
suppose that will only be correct if flex was in base from the start of 13.0-
CURRENT, if not is there a more specific value I should test against?

# $FreeBSD: head/mail/filtermail/Makefile 436247 2017-03-15 14:45:30Z mat $

PORTNAME=   filtermail
PORTVERSION=0.8.6
CATEGORIES= mail
MASTER_SITES=   http://sourceforge.net/projects/mailfilter/files/Mailfilter/
DISTNAME=   mailfilter-${PORTVERSION}

MAINTAINER= jmc-filterm...@milibyte.co.uk
COMMENT=Filter mail on a POP3 server: saves downloading spam

LICENSE=GPLv3

.include 
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 130
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex
.endif

USES=   bison gmake ssl

# This port is filtermail, but the author called it mailfilter. To avoid a
#  clash with another port called mailfilter, we change all files
#  installed by this port from the form *mailfilter* to the form
#  *filtermail*, and similarly the names in the man pages.

EXTRACT_CMD=${GZIP_CMD}
EXTRACT_BEFORE_ARGS=-dc
EXTRACT_AFTER_ARGS= | ${SED} 's/[mM][aA][iI][lL][fF][iI][lL][tT][eE][rR]/
filtermail/g' | ${TAR} -xf -

WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}

GNU_CONFIGURE=  yes
MAKE_JOBS_UNSAFE=   yes

CPPFLAGS+=  -I${LOCALBASE}/include
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 130
CPPFLAGS+=  -I${LOCALBASE}/include/flex
FLEX=${LOCALBASE}/bin/flex
.endif
LDFLAGS+=   -L${LOCALBASE}/lib

PLIST_FILES=bin/${PORTNAME} \
man/man1/${PORTNAME}.1.gz \
man/man5/${PORTNAME}ex.5.gz \
man/man5/${PORTNAME}rc.5.gz

post-patch:
@${REINPLACE_CMD} -e 's|filtermail.sourceforge|
mailfilter.sourceforge|g' ${WRKSRC}/README

post-extract:
@${RM} ${WRKSRC}/src/getopt.h

.include 


-- 
Mike Clarke


___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: mail/filtermail fails to build with 13.0-CURRENT

2020-06-29 Thread Jung-uk Kim
On 20. 6. 29., Jung-uk Kim wrote:
> On 20. 6. 27., Dimitry Andric wrote:
>> On 27 Jun 2020, at 17:56, Mike Clarke
>>  wrote:
>>> As someone with very little experience with C++ I'd welcome
>>> advice on how to fix this for 13.0- CURRENT. It builds without
>>> problem on 12.1-RELEASE
>> ...
>>> rcfile.ll:151:14: error: no viable overloaded '=' yyin = new
>>> ifstream (sub_file.c_str ());  ^
>>> 
>>
>> This appears to be caused by a recent update to contrib/flex
>> from 2.5.37 (7 years old) to 2.6.4, in r362333, where upstream
>> changed yyin and yyout from pointers to references:
>>
>>
https://github.com/westes/flex/commit/336a1deaa57975f34cd732d656d1c0cbe3d5233a
>>
>>
>>
>>
Unfortunately this can break existing .ll files. They will have to be
patched, but this is made more difficult by having the new version of
flex in 13-CURRENT.
>
> I just checked the upstream and it seems the problem does not
> exist any more after this commit.
>
>
https://sourceforge.net/p/mailfilter/code/ci/52e08609da8133e2cc0acd1961ebc1e1537f0c54
>
>
>
Most applications should have similar fixes because all major
> Linux distros are using Flex 2.6 now.  If you are maintaining such
>  applications, you should update the ports, add devel/flex to
 ^^
Sorry, I meant textproc/flex.

Jung-uk Kim

> BUILD_DEPENDS, and set FLEX=${LOCALBASE}/bin/flex for releng/stable
> branches.
>
> In fact, I've waited long enough (3.5 years) to not break existing
>  ports.  I thought we should be fine by now but I guess I was
> wrong. :-(
>
> Please let me know if you need any help.
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: mail/filtermail fails to build with 13.0-CURRENT

2020-06-29 Thread Jung-uk Kim
On 20. 6. 27., Dimitry Andric wrote:
> On 27 Jun 2020, at 17:56, Mike Clarke  wrote:
>> As someone with very little experience with C++ I'd welcome advice on how to 
>> fix this for 13.0-
>> CURRENT. It builds without problem on 12.1-RELEASE
> ...
>> rcfile.ll:151:14: error: no viable overloaded '='
>>yyin = new ifstream (sub_file.c_str ());
>> ^ 
> 
> This appears to be caused by a recent update to contrib/flex from 2.5.37 (7 
> years old) to 2.6.4, in r362333, where upstream changed yyin and yyout from 
> pointers to references:
> 
> https://github.com/westes/flex/commit/336a1deaa57975f34cd732d656d1c0cbe3d5233a
> 
> Unfortunately this can break existing .ll files. They will have to be 
> patched, but this is made more difficult by having the new version of flex in 
> 13-CURRENT.

I just checked the upstream and it seems the problem does not exist any
more after this commit.

https://sourceforge.net/p/mailfilter/code/ci/52e08609da8133e2cc0acd1961ebc1e1537f0c54

Most applications should have similar fixes because all major Linux
distros are using Flex 2.6 now.  If you are maintaining such
applications, you should update the ports, add devel/flex to
BUILD_DEPENDS, and set FLEX=${LOCALBASE}/bin/flex for releng/stable
branches.

In fact, I've waited long enough (3.5 years) to not break existing
ports.  I thought we should be fine by now but I guess I was wrong. :-(

Please let me know if you need any help.

Jung-uk Kim
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: mail/filtermail fails to build with 13.0-CURRENT

2020-06-27 Thread Mike Clarke
On Saturday, 27 June 2020 17:23:26 BST Kurt Jaeger wrote:

> > As someone with very little experience with C++ I'd welcome advice on how
> > to fix this for 13.0- CURRENT. It builds without problem on 12.1-RELEASE
> 
> Did you build it in poudriere ?

No, the reason I'm trying to get it to work is because it recently failed to 
build on the 
FreeBSD package build server with poudriere for 13.0-CURRENT http://
beefy18.nyi.freebsd.org/data/head-amd64-default/p540358_s362600/logs/
filtermail-0.8.3_1.log[1] .

I've tried building on my home PC using make and get the same error.

-- 
Mike Clarke


[1] http://beefy18.nyi.freebsd.org/data/head-amd64-default/p540358_s362600/logs/
filtermail-0.8.3_1.log
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: mail/filtermail fails to build with 13.0-CURRENT

2020-06-27 Thread Dimitry Andric
On 27 Jun 2020, at 17:56, Mike Clarke  wrote:
> As someone with very little experience with C++ I'd welcome advice on how to 
> fix this for 13.0-
> CURRENT. It builds without problem on 12.1-RELEASE
...
> rcfile.ll:151:14: error: no viable overloaded '='
>yyin = new ifstream (sub_file.c_str ());
> ^ 

This appears to be caused by a recent update to contrib/flex from 2.5.37 (7 
years old) to 2.6.4, in r362333, where upstream changed yyin and yyout from 
pointers to references:

https://github.com/westes/flex/commit/336a1deaa57975f34cd732d656d1c0cbe3d5233a

Unfortunately this can break existing .ll files. They will have to be patched, 
but this is made more difficult by having the new version of flex in 13-CURRENT.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: mail/filtermail fails to build with 13.0-CURRENT

2020-06-27 Thread Kurt Jaeger
Hi!

> As someone with very little experience with C++ I'd welcome advice on how to 
> fix this for 13.0-
> CURRENT. It builds without problem on 12.1-RELEASE

Did you build it in poudriere ?

I've tested the build in poudriere, was fine. I tested it using
make and it failed, but with a different error.

The poudriere build log:

https://people.freebsd.org/~pi/logs/filtermail.txt

The error building with make:

rcfile.cc:814:8: error: member reference type 'std::istream *' (aka
  'basic_istream *') is a pointer; did you mean to use '->'?
yyin.rdbuf(std::cin.rdbuf());
^
->

-- 
p...@opsec.eu+49 171 3101372Now what ?
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"