Ticket #24904 (assigned enhancement)
ice-cpp, ice-java, ice-python, ice-python25, ice-python26: simplify
| Reported by: | ryandesign@… | Owned by: | blair@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.2 |
| Keywords: | Cc: | snc@… | |
| Port: | ice-cpp, ice-java, ice-python, ice-python25, ice-python26 |
Description
I noticed the ice ports (ice-cpp, ice-java, ice-python, ice-python25, ice-python26) are a bit complex in some places and don't take full advantage of the facilities and features MacPorts makes available. I'd like to propose some changes to simplify these ports. I suggest I attach a patch that makes one change to all these ports, explain why I recommend these changes, and once you or I commit it, I'll attach another patch with another proposal.
The first suggestion is to make and use a ${branch} variable, as described in PortfileRecipes. This way you don't have to update the master_sites every time the branch number changes.
Attachments
Change History
Changed 3 years ago by ryandesign@…
- Attachment branch.diff added
comment:1 Changed 3 years ago by blair@…
- Status changed from new to assigned
Thanks, applied the branch in r67683.
Next please :)
comment:2 Changed 3 years ago by ryandesign@…
Next, simplify the distfiles. I'd remove setting distfiles and remove the distfile name from inside the checksums definition. You're setting distname, and you only have one distfile, so that's enough.
comment:4 Changed 3 years ago by ryandesign@…
I'd let MacPorts handle the patch phase. In ice-cpp and ice-java you override the patch phase and do the patching manually, but it seems to work fine if you just let MacPorts do it. This patch also includes a refresh of ice-cpp's patchfile so it applies without fuzz.
comment:6 Changed 3 years ago by ryandesign@…
Ok, here's a bigger one to make more use of worksrcpath and build.dir. I see a lot of "${workpath}/Ice-${version}" in these portfiles, and this could be simplified to "${worksrcpath}". And there's several places where you're dealing with a specific subdirectory of ${worksrcpath} -- "cpp" in the ice-cpp port, "java" in the java port, "py" in the python ports -- and this could be further abstracted out into the build.dir variable. This will additionally save you from needing to set test.dir or destroot.dir, since both of those variables' default values is ${build.dir}. And this lets you eliminate some other variables (ice-java and cppdir) which end up being the same as ${build.dir}.
Changed 3 years ago by ryandesign@…
- Attachment worksrcpath.diff added
use worksrcpath and build.dir variables
comment:8 Changed 3 years ago by ryandesign@…
I'd change the variants so all the code relating to the variants is inside the variant declarations. Some disagree, but I find this clearer. The Guide in fact advocates the opposite (advocates doing it the way you already do it in these ports), and this used to be required in older versions of MacPorts, but hasn't been for years, and I no longer recommend it. See #18359.


use ${branch} variable