Opened 15 years ago

Closed 14 years ago

#24795 closed submission (fixed)

New port: Mozilla's Rhino

Reported by: franck@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: franck.cassedanne@…
Port: rhino

Description (last modified by roederja)

Portfile for Mozilla's Rhino (JavaScript Engine).

Attachments (4)

Portfile (2.6 KB) - added by franck@… 15 years ago.
ports/java/rhino/Portfile
Portfile.2 (2.6 KB) - added by franck.cassedanne@… 14 years ago.
Portfile-rhino.diff (765 bytes) - added by franck.cassedanne@… 14 years ago.
Portfile.3 (2.8 KB) - added by franck.cassedanne@… 14 years ago.
The rhino script now passes arguments e.g. "rhino -help". Livecheck.regex has been updated. Test phase added.

Download all attachments as: .zip

Change History (10)

Changed 15 years ago by franck@…

Attachment: Portfile added

ports/java/rhino/Portfile

comment:1 Changed 14 years ago by roederja

Description: modified (diff)

The portfile looks good. I have one suggestion: Can you rewrite the part

system "cd ${javadir}/${name}/bin \
&& echo \"java -jar ${prefix}/share/java/${name}/js.jar\" > ${destroot}${prefix}/bin/rhino \
&& chmod +x ${destroot}${prefix}/bin/rhino"

such that it does not use system commands?

See here: http://wiki.tcl.tk/367 . Alternatively you could add the rhino file to the files folder and simply copy it over during installation.

Changed 14 years ago by franck.cassedanne@…

Attachment: Portfile.2 added

Changed 14 years ago by franck.cassedanne@…

Attachment: Portfile-rhino.diff added

comment:2 in reply to:  1 Changed 14 years ago by franck.cassedanne@…

Replying to jann@…:

The portfile looks good. I have one suggestion: Can you rewrite the part

system "cd ${javadir}/${name}/bin \
&& echo \"java -jar ${prefix}/share/java/${name}/js.jar\" > ${destroot}${prefix}/bin/rhino \
&& chmod +x ${destroot}${prefix}/bin/rhino"

such that it does not use system commands?

See here: http://wiki.tcl.tk/367 . Alternatively you could add the rhino file to the files folder and simply copy it over during installation.

As per suggested, added a patch using tcl own commands over system ones -- many thanks for suggesting this.

comment:3 Changed 14 years ago by hamish@…

The 'rhino' script that this Portfile creates doesn't pass arguments on, so you can't run a javascript script from the command line. The Ubuntu start scripts uses a command line along the lines of:

java -classpath /usr/share/java/js.jar org.mozilla.javascript.tools.shell.Main $@

Changed 14 years ago by franck.cassedanne@…

Attachment: Portfile.3 added

The rhino script now passes arguments e.g. "rhino -help". Livecheck.regex has been updated. Test phase added.

comment:4 in reply to:  3 Changed 14 years ago by franck.cassedanne@…

Replying to hamish@…:

The 'rhino' script that this Portfile creates doesn't pass arguments on, so you can't run a javascript script from the command line. The Ubuntu start scripts uses a command line along the lines of:

java -classpath /usr/share/java/js.jar org.mozilla.javascript.tools.shell.Main $@

Cheers for pointing this out -- the portfile was updated accordingly.

comment:5 Changed 14 years ago by franck.cassedanne@…

Cc: franck.cassedanne@… added

Cc Me!

comment:6 Changed 14 years ago by jmroot (Joshua Root)

Keywords: java javascript removed
Port: rhino added
Resolution: fixed
Status: newclosed
Version: 1.8.2
Note: See TracTickets for help on using tickets.