Bug 260027

Summary: net-p2p/amule: aMule 2.3.3 won't build if MONOLITHIC option unset
Product: Ports & Packages Reporter: Jeffery Telford <echoxxzz>
Component: Individual Port(s)Assignee: Barbara Guida <bar>
Status: Closed FIXED    
Severity: Affects Many People CC: echoxxzz
Priority: --- Flags: bugzilla: maintainer-feedback? (bar)
Version: Latest   
Hardware: Any   
OS: Any   

Description Jeffery Telford 2021-11-24 17:39:31 UTC
If the MONOLITHIC option is unset aMule won't build and gives the following errors during the package build stage:

===>  Building package for amule-2.3.3
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/Mac_Gray.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/gnome.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/kde4.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/papirus.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/priscilla.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/tango.zip:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/net-p2p/amule/work/stage/usr/local/share/amule/skins/xfce.zip:No such file or directory
*** Error code 1
Comment 1 Jeffery Telford 2021-11-24 17:43:17 UTC
I found those zip file but they're in the /usr/ports/net-p2p/amule/work/aMule-2.3.3/src/skins folder.

Also if I run "make config" again and re-enable the "Monolithic" option and then run "make" it does nothing until I purge the work folder. Usually when I change an option and run make it will rebuild the port. The good news at least it build this time.
Comment 2 Barbara Guida freebsd_committer 2021-11-24 17:49:04 UTC
Can you try after updating your ports tree?
I've committed a fix about an hour ago.
Comment 3 Jeffery Telford 2021-11-25 02:30:41 UTC
It only seems to include the skin zip files if you select MONOLITHIC but I think it should also include the skins even if you just select AMULEGUI as it too would be skinable.

My fix was to add this to the Makefile:

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MAMULEGUI} || ${PORT_OPTIONS:MMONOLITHIC}
PLIST_SUB+=     AMULESKIN=""
.else
PLIST_SUB+=     AMULESKIN="@comment "
.endif


and I changed the PKG-PLIST and edit the lines for the skins to this:

%%AMULESKIN%%%%DATADIR%%/skins/Mac_Gray.zip
%%AMULESKIN%%%%DATADIR%%/skins/gnome.zip
%%AMULESKIN%%%%DATADIR%%/skins/kde4.zip
%%AMULESKIN%%%%DATADIR%%/skins/papirus.zip
%%AMULESKIN%%%%DATADIR%%/skins/priscilla.zip
%%AMULESKIN%%%%DATADIR%%/skins/tango.zip
%%AMULESKIN%%%%DATADIR%%/skins/xfce.zip

and now it includes the zip files in the pkg file if I select just MONOLITHIC or just AMULEGUI.
Comment 4 Jeffery Telford 2021-11-28 04:07:53 UTC
I found another bug in the Makefile. 

Even though the DEBUG option is unset it still compiles with debugging output.

The default ./configuration option is to compile with debugging support enabled you need to explicitly disable it.

In the Makefile:

DEBUG_CONFIGURE_ON=    --enable-debug

needs to change to,

DEBUG_CONFIGURE_OFF=    --disable-debug

then it works as expected.
Comment 5 Jeffery Telford 2021-11-28 04:53:03 UTC
The only downside to actually getting the amuled deamon to run without debugging is it randomly core dumps on me. If I use amuled with debugging enabled it never core dumps. Since debugging was always enabled (even though it said it was unset) I never got this problem until now. I'm running it in a Freebsd 13-P4 jail.
Comment 6 Barbara Guida freebsd_committer 2021-12-02 14:34:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=927ad383075a183f711afb4b00d6c9539015ea41

commit 927ad383075a183f711afb4b00d6c9539015ea41
Author:     Barbara Guida <bar@FreeBSD.org>
AuthorDate: 2021-11-26 06:59:49 +0000
Commit:     Barbara Guida <bar@FreeBSD.org>
CommitDate: 2021-11-26 06:59:49 +0000

    net-p2p/amule: fix pkg-plist for AMULEGUI as well.

    While here, update WX from 2.8 to 3.0 because amulegui seems to not always work correctly with 2.8.

    PR:     26002
    Reported by:    echoxxzz@gmail.com

 net-p2p/amule/Makefile  | 10 ++++++++--
 net-p2p/amule/pkg-plist | 14 +++++++-------
 2 files changed, 15 insertions(+), 9 deletions(-)


A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=27392cf64d50cd1898f83624a588bc5c1b5f27d0

commit 27392cf64d50cd1898f83624a588bc5c1b5f27d0
Author:     Barbara Guida <bar@FreeBSD.org>
AuthorDate: 2021-12-01 08:04:39 +0000
Commit:     Barbara Guida <bar@FreeBSD.org>
CommitDate: 2021-12-01 08:04:39 +0000

    net-p2p/amule: correct the inverted logic for DEBUG option.

    PR:     26002
    Reported by:    echoxxzz@gmail.com

 net-p2p/amule/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)