#40614 closed submission (fixed)
mozjs17 @17.0.0 new Portfile
Reported by: | juanrgar (Juan R. García Blanco) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), akitada@…, nerdling (Jeremy Lavergne) | |
Port: | mozjs17 |
Description (last modified by nerdling (Jeremy Lavergne))
Please find attached a Portfile for mozjs17-17.0.0. to js). There're two existing ports that could provide this software; they need a version update though. These two ports are spidermonkey and spidermonkey185. mozjs17-17.0.0 ships with an updated pkg-config .pc file, and it's now called mozjs17-17.0. This is, at least, required by gjs and gobject-introspection packages.
Attachments (3)
Change History (19)
comment:1 Changed 11 years ago by juanrgar (Juan R. García Blanco)
Cc: | juanrgar@… added |
---|
comment:2 Changed 11 years ago by mf2k (Frank Schima)
Keywords: | js mozilla removed |
---|---|
Version: | 2.2.0 |
comment:3 Changed 11 years ago by juanrgar (Juan R. García Blanco)
Please don't try to use this Portfile. It compiles and installs fine; you can even run the js console. However, the dylib seems to be not generated correctly. I'll update it soon.
comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added; juanrgar@… removed |
---|
Supersedes #40017. Last time I looked into the spidermonkey situation it seemed like a good idea to create separate ports for each major version of the engine. That's why we made a separate spidermonkey185 port instead of updating the spidermonkey port, and why I think this port should be called mozjs17 perhaps, not just mozjs.
comment:5 Changed 11 years ago by juanrgar (Juan R. García Blanco)
Ok. I just uploaded working Portfile. It still has not variants though. I plan to add a few ones soon, as I think mozjs has some interesting options. I've changed the port name; now it's called mozjs17, to avoid dangerous updates for future versions of mozjs.
comment:6 Changed 11 years ago by juanrgar (Juan R. García Blanco)
I forgot to mention that I'd be more than happy to apply fixes to this base Portfile. This is one of the first Portfiles I've written, so it's prone to errors ;)
Changed 11 years ago by juanrgar (Juan R. García Blanco)
mozjs17@17.0.0 Portfile
comment:7 Changed 11 years ago by juanrgar (Juan R. García Blanco)
Just attached a new version of the Portfile with a couple of new variants added.
comment:8 follow-up: 11 Changed 11 years ago by nerdling (Jeremy Lavergne)
Cc: | akitada@… snc@… added |
---|---|
Description: | modified (diff) |
Port: | mozjs17 added; mozjs removed |
Summary: | mozjs @17.0.0 new Portfile → mozjs17 @17.0.0 new Portfile |
juanrgar: any particular reason why readline should be disabled? Do you also know when the llvm hacks are needed?
akitada: do you see any particular problems with this?
comment:9 Changed 11 years ago by nerdling (Jeremy Lavergne)
junargar: Variant name llvm-hacks is not valid; use [A-Za-z0-9_]+ only
comment:10 Changed 11 years ago by nerdling (Jeremy Lavergne)
This package also fails to configure for me.
checking that static assertion macros used in autoconf tests work... no configure: error: Compiler cannot compile macros used in autoconf tests. Command failed: cd "/opt/pspp/var/macports/build/_Users_aeetes_dports_lang_mozjs17/mozjs17/work/mozjs17.0.0/js/src" && ./configure --prefix=/opt/pspp --with-system-nspr --enable-system-ffi --disable-readline --enable-threadsafe Exit code: 1
Attaching config.log.
Changed 11 years ago by nerdling (Jeremy Lavergne)
Attachment: | config.log.xz added |
---|
configure phase failure
comment:11 Changed 11 years ago by neverpanic (Clemens Lang)
Replying to snc@…:
juanrgar: any particular reason why readline should be disabled?
This was my suggestion and allows distributing the port. Since this is a JavaScript runtime often used by other dependent ports rather than used for local development (where having the readline stuff would be beneficiary), I think disabling it in favor of binary distribution is a good thing.
comment:12 Changed 11 years ago by juanrgar (Juan R. García Blanco)
I recently upgraded to Mavericks and the build started failing, so now I've included a source patch.
@snc
- readline is disabled because of the reason cal gave. After reading a little bit about readline, I agree with him.
- I've added a dependency on xorg-libXt after checking your config.log. Thank you very much for providing me with it. I didn't notice mozjs17 requires Intrinsic.h.
- I've changed llvm-hacks to llvm_hacks as variant name; I actually don't know where are llvm-hacks needed. I did a quick search and found nothing; I think that if agreed this variant could be removed.
Could you please try the new port version? That would be very helpful for me to continue fixing errors. Also, since mozjs24 release is approaching, everything we learn from mozjs17 could potentially apply to the new version.
comment:13 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Some feedback:
- The whitespace should conform to the modeline, i.e. indentations should be at multiples of 4 spaces.
- The
reinplace
being done in post-extract should be done in post-patch. configure.cc
is being set to "clang" andconfigure.cxx
is being set to "clang++". Why is this? Are llvm-gcc or gcc not suitable? If not, then they should be blacklisted withcompiler.blacklist
and MacPorts should be allowed to populateconfigure.compiler
,configure.cc
andconfigure.cxx
itself.
comment:14 Changed 11 years ago by juanrgar (Juan R. García Blanco)
Thank you very much :)
- I've got modelines disabled in vim. Now I think it's better formatted. Although I'm not sure if the two main columns are well indented; I mean sometimes the second column is not indented at a multiple of 4, although the first line is.
- I guess the reinplace is the last thing I want to do before configuring and building the port.
- I took that from the spidermonkey build instructions (https://developer.mozilla.org/en-US/docs/SpiderMonkey/Build_Documentation). They read as follows:
Note: If you are on Mac and getting an error similar to "checking whether the C compiler (gcc-4.2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables." You can try configuring like so: CC=clang CXX=clang++ ./configure
I've tested on SL, and I got that exact message. Anyways, I agree that the fact that gcc is not suitable does not mean that the only capable compiler would be clang. I've blacklisted all gcc compilers, since the docs do not specify which versions could cause trouble.
Changed 11 years ago by juanrgar (Juan R. García Blanco)
Attachment: | mozjs17.tgz added |
---|
mozjs17 Portfile and patch
comment:15 Changed 11 years ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in r113785 with the following changes:
- Added section that sets
configure.cxx_stdlib
tolibstdc++
(or appends-stdlib=libstdc++
toconfigure.cxxflags
for versions of base that don't haveconfigure.cxx_stdlib
support). This fixes the configure phase for me, which previously failed because the configure script apparently setsMACOSX_DEPLOYMENT_TARGET
to a version that doesn't have the newer libc++ library, causing clang to refuse to build.
Thanks for your work and sorry that I didn't find some time to look at this any earlier.
comment:16 Changed 11 years ago by neverpanic (Clemens Lang)
Oh, and please test whether my fix works on a non-trunk installation – I didn't verify this (but I'm pretty sure it will work).
Cc Me!