Created attachment 149027 [details] Patch to apply when lang/perl5.20 is installed Error messages such as: Amanda/Application.c: In function 'SWIG_AsCharPtrAndSize': Amanda/Application.c:1580: error: 'bool' undeclared (first use in this function) Amanda/Application.c:1580: note: each undeclared identifier is reported only once for each function it appears in Amanda/Application.c:1580: error: expected ':' before numeric constant appears only when lang/perl5.20 is installed, it compiles flawlessly when lang/perl5.16 is installed. I have yet to try lang/perl5.18. I have good reason to believe this bug also affects misc/amanda-server under the same conditions. Workaround: Remove the three lines: #ifdef bool #undef bool #endif from these 17 files: perl/Amanda/Application.c perl/Amanda/Archive.c perl/Amanda/Cmdline.c perl/Amanda/Config.c perl/Amanda/Debug.c perl/Amanda/Device.c perl/Amanda/Disklist.c perl/Amanda/Feature.c perl/Amanda/Header.c perl/Amanda/Logfile.c perl/Amanda/MainLoop.c perl/Amanda/NDMP.c perl/Amanda/Tapelist.c perl/Amanda/Tests.c perl/Amanda/Util.c perl/Amanda/Xfer.c perl/Amanda/XferServer.c See attached patch.
Maintainers CC'd
Is this PR still valid after the update of amanda to 3.3.6 ?
(In reply to John Marino from comment #2) > Is this PR still valid after the update of amanda to 3.3.6 ? Yes.
I was going to ask if this patch still applied, but I think this might be a better fix: (in amanda-server/Makefile) post-install: ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/Application.c What do you think? Will it accurately prevent the removal of the bool definition and save a repetitive patch?
(In reply to John Marino from comment #4) > I was going to ask if this patch still applied, but I think this might be a > better fix: > > (in amanda-server/Makefile) > post-install: > ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/Application.c > > > What do you think? Will it accurately prevent the removal of the bool > definition and save a repetitive patch? oh, it's 17 files. How about? post-install: ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/*.c 17 patches is very obnoxious.
Trond, I am awaiting a response. The PR is stuck. Will my suggestion save 17 patches?
(In reply to John Marino from comment #5) > (In reply to John Marino from comment #4) > > I was going to ask if this patch still applied, but I think this might be a > > better fix: > > > > (in amanda-server/Makefile) > > post-install: > > ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/Application.c > > > > > > What do you think? Will it accurately prevent the removal of the bool > > definition and save a repetitive patch? > > oh, it's 17 files. How about? > > post-install: > ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/*.c > > > 17 patches is very obnoxious. post-install will be to late in the process, this needs to happen before compilation. Is there a make target called post-patch?
(In reply to Trond.Endrestol from comment #7) > (In reply to John Marino from comment #5) > > (In reply to John Marino from comment #4) > > > I was going to ask if this patch still applied, but I think this might be a > > > better fix: > > > > > > (in amanda-server/Makefile) > > > post-install: > > > ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/Application.c > > > > > > > > > What do you think? Will it accurately prevent the removal of the bool > > > definition and save a repetitive patch? > > > > oh, it's 17 files. How about? > > > > post-install: > > ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/*.c > > > > > > 17 patches is very obnoxious. > > post-install will be to late in the process, this needs to happen before > compilation. > > Is there a make target called post-patch? Or maybe pre-build?
(In reply to John Marino from comment #6) > Is there a make target called post-patch? yes, there is and yes it should be post-patch. It was just muscle memory that typed post-install.
(In reply to John Marino from comment #9) > (In reply to John Marino from comment #6) > > Is there a make target called post-patch? > > yes, there is and yes it should be post-patch. It was just muscle memory > that typed post-install. All went well just now on a system running FreeBSD/amd64 9.3-STABLE r274128 with a ports tree as of r372762, and the following in misc/amanda-server/Makefile.local: post-patch: ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/*.c No need for my 17 patches as a single file, nor as 17 separate files. Ship it!
I'll promote this PR because it's two lines that somebody can cut and paste, but I highly recommend that you upload a new attachment with a patch to the makefile (don't forget to increment PORTREVISION) some people will skip picking up a PR with no patch. to committer: if there's no new patch, add this to the makefile and increment PORTREVISION: post-patch: ${REINPLACE_CMD} -e 's|#undef bool||g' ${WRKSRC}/perl/Amanda/*.c
Created attachment 149587 [details] New patch for misc/amanda-server/Makefile
i'll take it -- PR timed out as well, so maintainer approval no longer required.
A commit references this bug: Author: marino Date: Wed Nov 19 20:38:02 UTC 2014 New revision: 372813 URL: https://svnweb.freebsd.org/changeset/ports/372813 Log: misc/amanda-client: Fix build with perl 5.20 PR: 194811 Submitted by: Trond Endrestol Approved by: maintainer timeout Changes: head/misc/amanda-server/Makefile
Done!