7e7e977
#% global hgdate 51702867d932
cvsextras e704a40
dae02cb
Summary:		JavaScript interpreter and libraries
dae02cb
Name:		js
Christopher Aillon dcaeaed
Epoch:		1
dae02cb
Version:		1.8.5
Christopher Aillon 6643608
Release:		7%{?hgdate:.hg%{hgdate}}%{?dist}
5a0781e
# The sources are triple licensed, but when we link against readline which is
5a0781e
# GPL, the result can only be GPL.
da1edf8
%if 0%{?_without_readline:1}
dae02cb
License:		GPLv2+ or LGPLv2+ or MPLv1.1
da1edf8
%else
dae02cb
License:		GPLv2+
da1edf8
%endif
dae02cb
Group:		Development/Languages
dae02cb
URL:			http://www.mozilla.org/js/
7e7e977
Source0:		http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
f254e0e
Patch0:			js-1.8.5-64bit-big-endian.patch
f254e0e
Patch1:			js-1.8.5-secondary-jit.patch
0a8f23b
Patch2:			js185-destdir.patch
dae02cb
Provides:		libjs = %{version}-%{release}
7f8b7c2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
Christopher Aillon dcaeaed
Buildrequires:	nspr-devel >= 4.7
Christopher Aillon dcaeaed
BuildRequires:  python
Christopher Aillon dcaeaed
BuildRequires:  zip
Christopher Aillon dcaeaed
Buildrequires:	readline-devel
Christopher Aillon dcaeaed
BuildRequires:  ncurses-devel
Christopher Aillon dcaeaed
BuildRequires:  autoconf213
7f8b7c2
cvsextras e704a40
cvsextras e704a40
%description
5473449
JavaScript is the Netscape-developed object scripting language used in millions
5473449
of web pages and server applications worldwide. Netscape's JavaScript is a
5473449
superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
5473449
with only mild differences from the published standard.
cvsextras e704a40
8834fbc
cvsextras e704a40
%package devel
cvsextras e704a40
Summary: Header files, libraries and development documentation for %{name}
cvsextras e704a40
Group: Development/Libraries
Christopher Aillon e534b91
Requires: %{name} = %{epoch}:%{version}-%{release}
0fa987f
Requires: pkgconfig
0a8f23b
Requires: ncurses-devel readline-devel
da1edf8
Provides: libjs-devel = %{version}-%{release}
cvsextras e704a40
cvsextras e704a40
%description devel
cvsextras e704a40
This package contains the header files, static libraries and development
cvsextras e704a40
documentation for %{name}. If you like to develop programs using %{name},
cvsextras e704a40
you will need to install %{name}-devel.
cvsextras e704a40
8834fbc
cvsextras e704a40
%prep
dae02cb
# All patches come from old version and maintainer. I think it is Fedora related only
7e7e977
%setup -q -n %{name}-%{version}
f254e0e
%patch0 -p2 -b .64bit-big-endian
f254e0e
%patch1 -p2 -b .secondary-jit
0a8f23b
%patch2 -p0 -b .destdir
7e7e977
cd js
8834fbc
dae02cb
# Rm parts with spurios licenses, binaries
dae02cb
# Some parts under BSD (but different suppliers): src/assembler
dae02cb
#rm -rf src/assembler src/yarr/yarr src/yarr/pcre src/yarr/wtf src/v8-dtoa
dae02cb
rm -rf src/ctypes/libffi src/t src/tests/src/jstests.jar src/tracevis src/v8
dae02cb
dae02cb
pushd src
dae02cb
autoconf-2.13
0a8f23b
%configure \
0a8f23b
    --with-system-nspr \
0a8f23b
    --enable-threadsafe \
0a8f23b
%if 0%{!?_without_readline:1}
Christopher Aillon dcaeaed
    --enable-readline \
0a8f23b
%endif
Christopher Aillon dcaeaed
%{nil}
0a8f23b
dae02cb
popd
dae02cb
8834fbc
# Create pkgconfig file
3030100
cat > libjs.pc << 'EOF'
8834fbc
prefix=%{_prefix}
2d03bb8
exec_prefix=%{_prefix}
2d03bb8
libdir=%{_libdir}
2d03bb8
includedir=%{_includedir}
8834fbc
8834fbc
Name: libjs
8834fbc
Description: JS library
0a8f23b
Requires: nspr >= 4.7
dae02cb
Version: %{version}
8834fbc
Libs: -L${libdir} -ljs
0a8f23b
Cflags: -DXP_UNIX=1 -DJS_THREADSAFE=1 -I${includedir}/js
8834fbc
EOF
8834fbc
cvsextras e704a40
cvsextras e704a40
%build
7e7e977
cd js
3030100
make %{?_smp_mflags} -C src
8834fbc
cvsextras e704a40
%install
7e7e977
cd js
Christopher Aillon dcaeaed
make -C src install DESTDIR=%{buildroot}
0a8f23b
# We don't want this
Christopher Aillon dcaeaed
rm -f %{buildroot}%{_bindir}/js-config
3030100
install -m 0755 src/jscpucfg src/shell/js \
Christopher Aillon dcaeaed
       %{buildroot}%{_bindir}/
3030100
rm -rf %{buildroot}%{_libdir}/*.a
3030100
rm -rf %{buildroot}%{_libdir}/*.la
0a8f23b
0a8f23b
# For compatibility
0a8f23b
# XXX do we really need libjs?!?!?!
0a8f23b
pushd %{buildroot}%{_libdir}
3030100
ln -s libmozjs185.so.1.0 libmozjs.so.1
3030100
ln -s libmozjs185.so.1.0 libjs.so.1
Christopher Aillon dcaeaed
ln -s libmozjs185.so libmozjs.so
Christopher Aillon dcaeaed
ln -s libmozjs185.so libjs.so
0a8f23b
popd
8834fbc
3030100
install -m 0644 libjs.pc %{buildroot}%{_libdir}/pkgconfig/
8834fbc
8834fbc
%clean
3030100
rm -rf %{buildroot}
8834fbc
da1edf8
da1edf8
%post -p /sbin/ldconfig
cvsextras e704a40
da1edf8
%postun -p /sbin/ldconfig
cvsextras e704a40
cvsextras e704a40
cvsextras e704a40
%files
b10b068
%defattr(-,root,root,-)
7e7e977
%doc js/src/README.html
cvsextras e704a40
%{_bindir}/js
cvsextras e704a40
%{_libdir}/*.so.*
cvsextras e704a40
cvsextras e704a40
%files devel
b10b068
%defattr(-,root,root,-)
cvsextras e704a40
%{_bindir}/jscpucfg
8834fbc
%{_libdir}/pkgconfig/*.pc
cvsextras e704a40
%{_libdir}/*.so
0a8f23b
%{_includedir}/js
cvsextras e704a40
cvsextras e704a40
%changelog
0a8f23b
* Wed Jun 22 2011 Colin Walters <walters@verbum.org> - 1:1.8.5-6
0a8f23b
- Include mozjs185.pc, clean up build
0a8f23b
- Based on work from Christopher Aillon <caillon@redhat.com>
0a8f23b
- Switch to using make install DESTDIR=, instead of hardcoding build rules.
0a8f23b
- Add DESTDIR= patch from GNOME 3.2 jhbuild
0a8f23b
- Make mozjs185 the canonical target for both libmozjs and libmozjs185.
0a8f23b
f254e0e
* Fri May 27 2011 Dan Horák <dan[at]danny.cz> - 1.8.5-5
f254e0e
- add secondary arch patches from xulrunner
f254e0e
Christopher Aillon e534b91
* Tue Apr 12 2011 Christopher Aillon <caillon@redhat.com> - 1.8.5-4
Christopher Aillon e534b91
- devel subpackage needs to ask for the newly added epoch
Christopher Aillon e534b91
fb7e633
* Tue Apr 12 2011 Pavel Alexeev <Pahan@Hubbitus.info> - 1.8.5-3
fb7e633
- Add Epoch: 1 to allow update of 1.70-13 version.
fb7e633
bc65eae
* Sat Apr 9 2011 Pavel Alexeev <Pahan@Hubbitus.info> - 1.8.5-2
bc65eae
- Correct symlink to provide backward capabiliies libjs.so.1
bc65eae
7e7e977
* Wed Apr 6 2011 Pavel Alexeev <Pahan@Hubbitus.info> - 1.8.5-1
7e7e977
- Update to release.
7e7e977
- Remove unneeded anymore patches.
7e7e977
- Add backward capability symlink.
7e7e977
dae02cb
* Sat Feb 12 2011 Pavel Alexeev <Pahan@Hubbitus.info> - 1.8.5-0.hg51702867d932
dae02cb
- Build version 1.8.5 by update request - BZ#676441 from Firefox 4.0 mercurial repository.
dae02cb
- Gone -DJS_C_STRINGS_ARE_UTF8
dae02cb
- Add BR autoconf213, change build system to use configure.
dae02cb
- Adopt patch0 (js-1.7.0-make.patch -> js-1.8.5-make.patch)
dae02cb
- Adopt patch1 (js-shlib.patch -> js-1.8.5-shlib.patch)
dae02cb
- Remove Patch2 (js-1.5-va_copy.patch) and Patch3 (js-ldflags.patch)
dae02cb
- Add BR python, zip.
dae02cb
95f49ae
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.70-13
95f49ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
95f49ae
d313361
* Wed Jun 16 2010 Pavel Alexeev <Pahan@Hubbitus.info> - 1.70-12
d313361
- Add UTF-8 support (add -DJS_C_STRINGS_ARE_UTF8 ) by request Peter Halliday: BZ#576585
d313361
ff91a1a
* Mon Jun 14 2010 Dan Horák <dan[at]danny.cz> - 1.70-11
ff91a1a
- updated the va_copy patch for s390
ff91a1a
024d2e1
* Mon Jan 25 2010 Pavel Alexeev <Pahan@Hubbitus.info> - 1.70-10
1f65f23
- Remove static library from -devel - %%{_libdir}/*.a (bz#556057) to meet guidelines.
1f65f23
7f8b7c2
* Sun Aug 2 2009 Pavel Alexeev <Pahan@Hubbitus.info> - 1.70-8
7f8b7c2
- Reformat spec with tabs.
7f8b7c2
- By report of Thomas Sondergaard (BZ#511162) Add -DXP_UNIX=1 -DJS_THREADSAFE=1 flags and nspr requires into libjs.pc
7f8b7c2
5e8c7f4
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.70-7
5e8c7f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5e8c7f4
1a61086
* Fri May 29 2009 Dan Horak <dan[at]danny.cz> 1.70-6
1a61086
- update the va_copy patch for s390x
1a61086
babcfb8
* Thu Apr  9 2009 Matthias Saou <http://freshrpms.net/> 1.70-5
5473449
- Update description (#487903).
5473449
5473449
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
519d009
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
519d009
William Jon McCann e530b3a
* Wed Jun  4 2008 Jon McCann <jmccann@redhat.com> - 1.70-3
William Jon McCann e530b3a
- Add two missing files (#449715)
William Jon McCann e530b3a
608b2d9
* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.70-2
608b2d9
- Rebuild for perl 5.10 (again)
608b2d9
0fa987f
* Sun Feb  3 2008 Matthias Saou <http://freshrpms.net/> 1.70-1
0fa987f
- Update to 1.7.0, as 1.70 to avoid introducing an epoch for now...
0fa987f
- Remove no longer provided perlconnect parts.
0fa987f
bc4adb9
* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.60-6
bc4adb9
- BR: perl(ExtUtils::Embed)
bc4adb9
ec4133b
* Sun Jan 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.60-5
ec4133b
- rebuild for new perl
ec4133b
64ec618
* Wed Aug 22 2007 Matthias Saou <http://freshrpms.net/> 1.60-4
64ec618
- Rebuild for new BuildID feature.
64ec618
5a0781e
* Mon Aug  6 2007 Matthias Saou <http://freshrpms.net/> 1.60-3
5a0781e
- Update License field.
5a0781e
- Add perl(ExtUtils::MakeMaker) build requirement to pull in perl-devel.
5a0781e
b10b068
* Fri Feb  2 2007 Matthias Saou <http://freshrpms.net/> 1.60-2
b10b068
- Include jsopcode.tbl and js.msg in devel (#235481).
b10b068
- Install static lib mode 644 instead of 755.
b10b068
4bf7776
* Fri Feb  2 2007 Matthias Saou <http://freshrpms.net/> 1.60-1
4bf7776
- Update to 1.60.
4bf7776
- Rebuild in order to link against ncurses instead of termcap (#226773).
4bf7776
- Add ncurses-devel build requirement and patch s/termcap/ncurses/ in.
4bf7776
- Change mode of perl library from 555 to 755 (#224603).
4bf7776
2d03bb8
* Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 1.5-6
2d03bb8
- Fix pkgconfig file (#204232 & dupe #204236).
2d03bb8
717526c
* Mon Jul 24 2006 Matthias Saou <http://freshrpms.net/> 1.5-5
717526c
- FC6 rebuild.
717526c
- Enable JS_THREADSAFE in the build (#199696), add patch and nspr build req.
717526c
c79687c
* Mon Mar  6 2006 Matthias Saou <http://freshrpms.net/> 1.5-4
c79687c
- FC5 rebuild.
c79687c
725c6c2
* Thu Feb  9 2006 Matthias Saou <http://freshrpms.net/> 1.5-3
725c6c2
- Rebuild for new gcc/glibc.
725c6c2
725c6c2
* Mon Jan 30 2006 Matthias Saou <http://freshrpms.net/> 1.5-2
33732a4
- Fix .pc file.
33732a4
725c6c2
* Thu Jan 26 2006 Matthias Saou <http://freshrpms.net/> 1.5-1
8834fbc
- Update to 1.5.0 final.
8834fbc
- Spec file cleanups.
8834fbc
- Move docs from devel to main, since we need the license there.
8834fbc
- Remove no longer needed js-perlconnect.patch.
8834fbc
- Update js-1.5-va_copy.patch.
8834fbc
- Include a pkgconfig file (#178993).
8834fbc
6e51bbf
* Tue Apr 19 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.6
6e51bbf
- Link shared lib with libperl.
6e51bbf
d95312a
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
d95312a
- rebuilt
d95312a
1d45f82
* Mon Feb 14 2005 David Woodhouse <dwmw2@infradead.org> - 1.5-0.rc6a.4
b10b068
- Take js-va_copy.patch out of %%ifarch x86_64 so it fixes the PPC build too
1d45f82
94dde0c
* Sun Feb 13 2005 Thorsten Leemhuis <fedora at leemhuis dot info> - 1.5-0.rc6a.3
94dde0c
- Add js-va_copy.patch to fix x86_64; Patch was found in a Mandrake srpm
94dde0c
da1edf8
* Sat Dec 11 2004 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.2
da1edf8
- Include perlconnect.
da1edf8
- Include readline support, rebuild using "--without readline" to disable.
da1edf8
- Add libjs* provides for upstream compatibility.
da1edf8
- Install header files in %%{_includedir} instead of %%{_includedir}/js.
da1edf8
cvsextras e704a40
* Tue Jun 15 2004 Matthias Saou <http://freshrpms.net> 1.5-0.rc6a
cvsextras e704a40
- Update to 1.5rc6a.
cvsextras e704a40
cvsextras e704a40
* Tue Mar 02 2004 Dag Wieers <dag@wieers.com> - 1.5-0.rc6
cvsextras e704a40
- Initial package. (using DAR)
8834fbc