Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24502 - Change Sablotron to use JavaScript
Summary: Change Sablotron to use JavaScript
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Text-Markup Team (OBSOLETE)
URL:
Whiteboard:
Keywords: EBUILD
Depends on: 28175
Blocks:
  Show dependency tree
 
Reported: 2003-07-14 23:51 UTC by Zhen Lin
Modified: 2006-01-22 14:12 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The ebuild (sablotron-0.97-r1.ebuild,1.01 KB, text/plain)
2003-07-14 23:53 UTC, Zhen Lin
Details
the ebuild (sablotron-0.97-r1.ebuild,1.04 KB, text/plain)
2003-08-22 22:31 UTC, Zhen Lin
Details
sablotron-1.0.1-r1.ebuild (sablotron-1.0.1-r1.ebuild,1.53 KB, text/plain)
2004-09-01 23:29 UTC, Mamoru KOMACHI (RETIRED)
Details
dev-lang/spidermonkey-1.5_rc5-r1/CONTENTS (CONTENTS,3.61 KB, text/plain)
2004-09-01 23:37 UTC, Zhen Lin
Details
sablotron-1.0.1-r1.ebuild (sablotron-1.0.1-r1.ebuild,1.52 KB, text/plain)
2004-09-03 14:38 UTC, Mamoru KOMACHI (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zhen Lin 2003-07-14 23:51:44 UTC
Since spidermonkey was unmasked on 11th July, I submit this ebuild. 

USE="java" will cause the JavaScript extension to be enabled... Perhaps USE="js"
or USE="spidermonkey" will be better.
Comment 1 Zhen Lin 2003-07-14 23:53:05 UTC
Created attachment 14495 [details]
The ebuild

Additionally, any ebuilds using sablotron may have to link with libjs.so (i.e.
recompile with EXTRA_LIBS=-ljs)
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2003-08-22 02:09:07 UTC
Sorry, I know nothing about sablotron - I can assist if there are perl related problems with the ebuild, but other than that I'm not qualified to handle this.
Comment 3 Brandon Hale (RETIRED) gentoo-dev 2003-08-22 07:47:18 UTC
The URL to the project page has changed, please update the ebuild accordingly.
Also, please not that JavaScript is *completely* unrelated to Java. USE="java" is completely out of place here, you might look into local use settings like those found in the mozilla ebuilds. New ebuilds should also be ~arch for all architectures, this build marks x86 as stable. If you need any assistance in improving these aspects of the ebuild, feel free to contact me.
Comment 4 Zhen Lin 2003-08-22 22:31:09 UTC
Created attachment 16492 [details]
the ebuild

Updated ebuild

USE="javascript"
Comment 5 Brandon Hale (RETIRED) gentoo-dev 2003-08-30 21:00:20 UTC
Don't forget IUSE ;)
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-09-01 23:27:58 UTC
Hi, sorry for the delay. I'm looking at the ebuild and it seems
okay to add javascript local USE flag to sablotron. However,
I have a question -- why does it add -I/usr/lib/mozilla/include/js?
If it uses headers from mozilla, mozilla needs to be added to DEPEND.
(and if you remove it --enable-javascript won't work)
dev-lang/spidermonkey seems to install only /usr/include/jsautocfg.h.
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-09-01 23:29:47 UTC
Created attachment 38728 [details]
sablotron-1.0.1-r1.ebuild

Updated to 1.0.1. (Didn't touch DEPEND)
Comment 8 Zhen Lin 2004-09-01 23:37:31 UTC
Created attachment 38729 [details]
dev-lang/spidermonkey-1.5_rc5-r1/CONTENTS

spidermonkey also installs a number of Javascript headers into
/usr/lib/mozilla/include/js. See the attached CONTENTS file.

For some reason the build process doesn't add it automatically to the command
line
Comment 9 Zhen Lin 2004-09-01 23:39:22 UTC
Also, I'd like to mention that a number of other ebuilds are affected by +javascript on sablotron, noticably mod_php and php.

--with-sablot-js must be passed to the php configure script in order to build successfully, if sablotron has JS linked in.
Comment 10 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-09-02 01:10:19 UTC
okay, thanks. I'll add ewarn and tell php herd about it. If you
have any other particular packages in mind, please let me know what 
packages are actually affected.

However, the version of spidermonkey (1.5_rc5-r1) doesn't exist
in Portage tree. Where did you get it from? Also, if spidermonkey 
1.5_rc5-r1 installs /usr/lib/mozilla/include/js/* it will conflict
with mozilla, won't it?
Comment 11 Zhen Lin 2004-09-02 04:02:48 UTC
Clarification: The PHP configure script must be passed --with-sablot-js=yes, not merely --with-sablot-js

Apologies, -r1 is a local ebuild, with this modification:

 src_compile() {
+       echo $'install-headers: $(JS_HFILES)
+\tinstall -g root -o root -m 555 -d $(DESTDIR)/usr/lib/mozilla/include/js
+\tinstall -g root -o root -m 444 $^ $(DESTDIR)/usr/lib/mozilla/include/js' >> Makefile.ref
        make -f Makefile.ref BUILD_OPT=1 || die
 }

Clearly, this accounts for the discrepancy between your CONTENTS and mine.

Indeed, this conflicts with the headers installed by Mozilla. I am not sure if Sablotron works with the Mozilla headers and libraries.

If that is the case, one possible solution is to not install the library and /usr/lib/mozilla headers if mozilla is detected (in the spidermonkey ebuild), and depend on mozilla instead.
Comment 12 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-09-03 14:38:46 UTC
Created attachment 38848 [details]
sablotron-1.0.1-r1.ebuild

All right, I committed spidermonkey-1.6_rc6-r1.ebuild,
which installs all the headers needed by sablotron.
It no longer depends on js headers from mozilla.
JavaScript works fine with the modified sablotron.
Comment 13 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-09-03 14:45:29 UTC
php herd members: I'd like to commit sablot-1.0.1-r1.ebuild, which
enables JavaScript support with USE="javascript". However, Zhen
told me in Comment #9 and #11 that php configure script must be 
passed '--with-sablot-js=yes' if sablotron is compiled with 
JavaScript support. Can you guys update php/mod_php ebuild/eclass
to include it? If JavaScript is compiled in, `ldd /usr/bin/sabcmd`
returns 

usata@rico /tmp % ldd /usr/bin/sabcmd
        linux-gate.so.1 =>  (0xffffe000)
        libsablot.so.0 => /usr/lib/libsablot.so.0 (0xb7eec000)
        libstdc++.so.5 => /usr/lib/gcc-lib/i686-gentoo-linux/3.3.4/libstdc++.so.5 (0xb7e35000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7e15000)
        libjs.so => /usr/lib/libjs.so (0xb7d91000)
        libperl.so.1 => /usr/lib/libperl.so.1 (0xb7c80000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7c6e000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7c58000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7c54000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7c26000)
        libutil.so.1 => /lib/libutil.so.1 (0xb7c22000)
        libm.so.6 => /lib/libm.so.6 (0xb7bff000)
        libc.so.6 => /lib/libc.so.6 (0xb7aee000)
        libgcc_s.so.1 => /usr/lib/gcc-lib/i686-gentoo-linux/3.3.4/libgcc_s.so.1 (0xb7ae4000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fec000)

(see libjs.so in the output) Hope this will help.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-09-03 19:31:29 UTC
usata: 
your change effects the stable php4 only. php5 moved away from using sablotron.

put together a patch for php-sapi.eclass based on USE=javascript and attach it here.

--with-sablot-js is not an enable flag, it's a path flag, with special behaviors for inputs of 'shared' and 'yes'. In general it should be set to 
--with-sablot-js=/usr - but you're responsible for testing this :-). /me hates JS, but only due to very bad experiences having to redo other people's JS.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2005-08-11 05:01:28 UTC
What's the status here?
Comment 16 Luca Longinotti (RETIRED) gentoo-dev 2005-10-23 14:00:43 UTC
Anyway, any news here?
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-01-22 14:12:56 UTC
Well, let us know if/when something goes on here...

Meanwhile, marking LATER.