[MacPorts] #17342: MacPorts - new port - shells/osh
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: --------------------------------+------------------------------------------- Hello, I have attached a working Portfile for shells/osh. I am the upstream developer/maintainer of this software. I have been using it on Mac OS X since 2005. NOTE: Manually, it has no problem building as a universal binary, but I did not see an evident way to make this happen from the Portfile. This software does not use configure, just make and make install. -- J.A. Neitzel -- Ticket URL: <http://trac.macports.org/ticket/17342> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Changes (by blb@…): * port: => osh Comment: With configure-based software, the universal variant usually comes free. However, if you aren't using configure you'll need to define it manually: {{{ variant universal { steps to enable universal build here } }}} See [source:trunk/dports/archivers/zip/Portfile zip] or [source:trunk/dports/devel/class-dump/Portfile class-dump] for a couple of examples. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…): Thanks a lot for that info! I attached an updated Portfile. Now, it allows both native and universal (+universal) builds. I had to add: {{{ INSTALL=${configure.install} }}} ... to destroot.args because it seems adding the universal variant and something to do w/ configure.* stepped on INSTALL. This caused destroot to fail because all attempted invocations of /usr/bin/install resulted in a not found error. Looks like INSTALL was equivalent to the empty string or NULL or something. Anyway, it works now. Is there anything else I need to know? I am certainly open to suggestions. -- J.A. Neitzel -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…): Oh, [http://trac.macports.org/wiki/LeopardProblems environment variables ... configure/build] sounds very similar to the problem I noticed w/ INSTALL. I suppose it could be related, but I do not know enough about the inner workings of MacPorts and/or TCL to say more. So, adding INSTALL=${configure.install} to destroot.args seems reasonable in this case. But I am willing to be wrong of course ;^) -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by blb@…): It definitely looks like the Tcl env bug to me, as I removed the INSTALL=... here and had no problems building with and without +universal, on a trunk-based MacPorts. It appears that destroot fails to work but doesn't return a non-zero exit status, so when using MacPorts 1.6 odd things will probably happen. In that case we should probably leave the INSTALL=... stuff in there just to work around the bug, with a comment that it can be removed after 1.7 is released. Other than that, the epoch line can be removed as it defaults to 0 when not present, which is fine. So if the removal of epoch and a comment about INSTALL is okay, I can add the port? -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…):
In that case we should probably leave the INSTALL=... stuff in there just to work around the bug, with a comment that it can be removed after 1.7 is released.
OK, comment added.
... the epoch line can be removed as it defaults to 0 when not present, which is fine.
OK, epoch removed.
So if the removal of epoch and a comment about INSTALL is okay, I can add the port?
Well, I noticed and fixed another problem. It was related to build.args. Something was happening to PREFIX=... in the shuffle. This in turn caused SYSCONFDIR in the Makefile to revert to its default value of /usr/local/etc instead of the intended value of /opt/local/etc. Thus, I replaced build.args w/ configure.pre_args. I have attached the new Portfile. This time I have covered all the bases. Testing shows everything referring to the appropriate file system locations. If it all looks good to you, please do add the port at your convenience. Feel free to modify my INSTALL=... comment if it does not sound kosher to you. -- J.A. Neitzel -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…):
Well, I noticed and fixed another problem. It was related to build.args. Thus, I replaced build.args w/ configure.pre_args.
This actually makes sense given that configure.cmd is equal to ${build.cmd} in this case. In effect, making build == configure turns the build phase into a no-op as as `make all' has already been performed in the configure phase. In any case, what else needs to happen to add the port? Please let me know as time permits. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by blb@…): Hmm, a trunk-based MacPorts (what will be 1.7) doesn't like INSTALL being set in destroot.args but env works fine. Also, since you aren't really doing any configure steps, how about not having configure at all and moving the build stuff to just the build phase, as it does appear to simplify things a bit. Will attach what I'm thinking about, let me know. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…):
Hmm, a trunk-based MacPorts (what will be 1.7) doesn't like INSTALL being set in destroot.args but env works fine.
Both work fine in 1.6. So, let's use the env version to cover both. Thus, the destroot phase is OK.
... how about not having configure at all and moving the build stuff to just the build phase, as it does appear to simplify things a bit.
I agree, but there is one catch. {{{ build.args PREFIX=${prefix} }}} ... At least in 1.6, build phase PREFIX=... gets overwritten by the +universal build.args when doing a {{{ port install osh +universal }}} ... Using build.pre_args globally avoids this conflict. To have a valid osh installation, PREFIX and SYSCONFDIR cannot get lost in the build phase. I have attached Portfile.jan with this fix. Native (non-universal) installation example and results follow (debug log attached). {{{ % sudo fd2 port -d install osh > jan_install_osh.log % port installed osh The following ports are currently installed: osh @20081122_0 (active) % file /opt/local/bin/osh /opt/local/bin/osh: Mach-O executable i386 % strings /opt/local/bin/osh | grep /opt/local/etc /opt/local/etc/osh.logout /opt/local/etc/osh.oshrc /opt/local/etc/osh.login }}} Universal installation example and results follow (debug log attached). {{{ % sudo fd2 port -d install osh +universal > jan_install_osh_universal.log % port installed osh The following ports are currently installed: osh @20081122_0+universal (active) % file /opt/local/bin/osh /opt/local/bin/osh: Mach-O universal binary with 2 architectures /opt/local/bin/osh (for architecture i386): Mach-O executable i386 /opt/local/bin/osh (for architecture ppc7400): Mach-O executable ppc % strings /opt/local/bin/osh | grep /opt/local/etc /opt/local/etc/osh.login /opt/local/etc/osh.oshrc /opt/local/etc/osh.logout }}} Before fixing w/ build.pre_args, the output from grep was zero length w/ an exit status of 1. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…): And for some finishing touches, I added a post-destroot to install some important docs from the osh sources. E.g., all but one of the [A-Z][A-Z]* files. Portfile.jan1 attached. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by blb@…): Replying to [comment:9 jan+mp@…]:
At least in 1.6, build phase PREFIX=... gets overwritten by the +universal build.args when doing a
Ah, missed that somehow, must have been too quick when testing...a cleaner solutions is to use {{{build.args-append}}} in the universal variant so build.args can still be used in both places. {{{ build.args ${build.target} PREFIX=${prefix} ... variant universal { build.args-append CFLAGS="${configure.universal_cflags}" LDFLAGS="${configure.universal_ldflags}" }}} -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…): Replying to [comment:11 blb@…]:
Ah, missed that somehow, must have been too quick when testing...a cleaner solutions is to use {{{build.args-append}}} in the universal variant so build.args can still be used in both places.
OK, I updated Portfile.jan2 according to your suggestion and attached it. Thanks blb for all your help with this. The port can be added now if you agree that it is ready. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh --------------------------------+------------------------------------------- Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Keywords: | Port: osh --------------------------------+------------------------------------------- Comment(by jan+mp@…): Oh, I forgot to say... I tested the updated Portfile.jan2 by using the same procedures as before and got the expected results. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17342: MacPorts - new port - shells/osh ---------------------------------+------------------------------------------ Reporter: jan+mp@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Resolution: fixed | Keywords: Port: osh | ---------------------------------+------------------------------------------ Changes (by blb@…): * status: new => closed * resolution: => fixed Comment: Looks good, added in r42556; thanks. -- Ticket URL: <http://trac.macports.org/ticket/17342#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts