Opened 15 years ago

Closed 5 years ago

#24904 closed enhancement (wontfix)

ice-cpp, ice-java, ice-python, ice-python25, ice-python26: simplify

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: blair (Blair Zajac)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: nerdling (Jeremy Lavergne), cooljeanius (Eric Gallager)
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 (5)

branch.diff (3.4 KB) - added by ryandesign (Ryan Carsten Schmidt) 15 years ago.
use ${branch} variable
distfiles.diff (3.4 KB) - added by ryandesign (Ryan Carsten Schmidt) 15 years ago.
clean up distfiles
patch.diff (3.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 15 years ago.
patch phase
worksrcpath.diff (13.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 14 years ago.
use worksrcpath and build.dir variables
variants.diff (3.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 14 years ago.
make variants self-contained

Download all attachments as: .zip

Change History (17)

Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: branch.diff added

use ${branch} variable

comment:1 Changed 15 years ago by blair (Blair Zajac)

Status: newassigned

Thanks, applied the branch in r67683.

Next please :)

comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)


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.

Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: distfiles.diff added

clean up distfiles

comment:3 Changed 15 years ago by blair (Blair Zajac)

There was a point when there were separate distfiles, such as Google Protocol Buffer support.

Fixed in r67707 and r67708.

comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)


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.

Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: patch.diff added

patch phase

comment:5 Changed 15 years ago by blair (Blair Zajac)

ice-java fixed in r67800 and ice-cpp fixed in r67802.

comment:6 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)


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 14 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: worksrcpath.diff added

use worksrcpath and build.dir variables

comment:7 Changed 14 years ago by blair (Blair Zajac)

Thanks! Applied in r67860.

comment:8 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)


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.

Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: variants.diff added

make variants self-contained

comment:9 Changed 14 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Along these lines, is it handling the architectures properly, either through build.arch or supported_archs?

comment:10 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:11 Changed 10 years ago by jmroot (Joshua Root)

These ports have been replaced by zeroc-ice34, zeroc-ice34-java, nothing (ice-python was simply deleted), py25-zeroc-ice, and py26-zeroc-ice, respectively. py*-zeroc-ice were subsequently replaced by py*-zeroc-ice34. You should probably review how much of this is still relevant.

comment:12 Changed 5 years ago by mf2k (Frank Schima)

Resolution: wontfix
Status: assignedclosed
Version: 1.8.2

Closing this since none of these ports exist anymore.

$ port list ice-cpp ice-java ice-python ice-python25 ice-python26
$ 

And zeroc-ice34, at least, uses ${branch}.

Note: See TracTickets for help on using tickets.