Opened 2 months ago
Last modified 5 weeks ago
#66751 assigned defect
snac @2.18: use the right compiler and flags
Reported by: | ryandesign (Ryan Schmidt) | Owned by: | artkiver (グレェ) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | Cc: | ||
Port: | snac |
Description
snac isn't UsingTheRightCompiler nor flags:
cc -g -Wall -D st_mtim=st_mtimespec -I/opt/local/include -c main.c cc -g -Wall -D st_mtim=st_mtimespec -I/opt/local/include -c data.c cc -g -Wall -D st_mtim=st_mtimespec -I/opt/local/include -c http.c cc -g -Wall -D st_mtim=st_mtimespec -I/opt/local/include -c httpd.c cc -g -Wall -D st_mtim=st_mtimespec -I/opt/local/include -c webfinger.c cc -g -Wall -D st_mtim=st_mtimespec -I/opt/local/include -c activitypub.c cc -g -Wall -D st_mtim=st_mtimespec -I/opt/local/include -c html.c
The port is manually setting use_configure no
and not doing any of the manual work needed to support this properly.
The makefile portgroup could help.
Attachments (1)
Change History (5)
comment:1 Changed 2 months ago by artkiver (グレェ)
comment:2 Changed 2 months ago by artkiver (グレェ)
So, snac 2.19 was released, which reminded me to look into this in more detail.
https://guide.macports.org/chunked/reference.portgroup.html is a bit sparse as far as information on the makefile PortGroup.
https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/makefile-1.0.tcl
Is I guess a useful reference insomuch as it is the TCL being invoked, though I am not sure how well I am parsing it as a human.
Regardless, doing some minor edits to the Portfile
e.g. PortGroup makefile 1.0
Still seems to install OK after I do a port -v clean.
In reading, I thought about adding:
build.args-append CFLAGS=-g -Wall -D st_mtim=st_mtimespec
And it doesn't seem to cause harm?
I even explored removing the
patchfiles Makefile.patch post-patch {reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile}
As well as attempting to add some other things to build.args-append
Such as:
PREFIX=/opt/local and PREFIX_MAN=/opt/local/share/man
But I may have been a bit too ambitious with some of that and seemed to get some errors back when running lint --nitpick for example.
So, at the moment, I have a rather more conservative Portfile with some changes, which seems to function OK; but I am not sure if it addresses all the issues raised here.
I'm attaching it for reference though. Doubtlessly, it can be improved upon somewhat, but I figure best to update the Trac ticket for the time being as no one has replied on IRC to my inquiry yet.
Changed 2 months ago by artkiver (グレェ)
Attachment: | Portfile.2.19.makefileportgroupandsuch added |
---|
Portfile for net/snac which adds the makefile PortGroup, updates the version and checksums for 2.19, updates the long_description and tests OK locally.
comment:3 Changed 2 months ago by artkiver (グレェ)
Well, what "worksforme" on my local system apparently made the build bots unhappy when I submitted a PR:
e.g.
https://github.com/macports/macports-ports/actions/runs/4021961917/jobs/6911272754 https://github.com/macports/macports-ports/actions/runs/4021961917/jobs/6911272700
I can, presumably, revert to an even more conservative Portfile version bump and I am guessing it would pass the CI checks OK, but probably not adequately address the concerns raised here.
comment:4 Changed 5 weeks ago by artkiver (グレェ)
A more conservative PR was submitted here: https://github.com/macports/macports-ports/pull/17799
To update snac to 2.23 to be in alignment with the upstream project.
Thankfully that PR passed the CI build bot checks at least unlike my previous documented attempt, but omits the recommendations and other efforts described in this ticket, even if it does at least address the concerns raised in this one:
https://trac.macports.org/ticket/66989
So, for the time being I am updating this ticket and leaving it open as a reminder that I have additional effort to put in so as to refactor the Portfile to utilize the makefile PortGroup.
Ah, thanks. I will look into this further. I figured there was probably a better way to do this earlier, but I admit I am not super up to speed on portgroups. I will do additional research and experimentation and hopefully get this smoothed out a bit!