1 |
%define _requires_exceptions devel(libnspr4\\|devel(libplc4\\|devel(libplds4 |
%define _requires_exceptions devel(libnspr4\\|devel(libplc4\\|devel(libplds4 |
2 |
|
|
3 |
%define major 1 |
%define major 1 |
4 |
%define libname %mklibname %{name} %{major} |
%define libname %mklibname mozjs185_ %{major} |
5 |
%define develname %mklibname %{name} -d |
%define develname %mklibname mozjs185 -d |
6 |
|
|
7 |
%define epoch 1 |
%define epoch 1 |
8 |
|
|
9 |
%define real_version 1.7.0 |
%define real_version 1.8.5 |
10 |
|
%define short_version 185 |
11 |
|
|
12 |
Summary: JavaScript engine |
Summary: SpiderMonkey, the Mozilla JavaScript engine |
13 |
Name: js |
Name: js |
14 |
Version: 1.70 |
Version: 1.85 |
15 |
Release: %mkrel 7 |
Release: %mkrel 1 |
16 |
License: MPL |
License: MPL |
17 |
Group: Development/Other |
Group: Development/Other |
18 |
URL: http://www.mozilla.org/js/ |
URL: http://www.mozilla.org/js/ |
19 |
Source0: http://ftp.mozilla.org/pub/mozilla.org/js/js-%{real_version}.tar.gz |
Source0: http://ftp.mozilla.org/pub/mozilla.org/js/%{name}%{short_version}-1.0.0.tar.gz |
20 |
Patch1: js-va_copy.diff |
Patch0: js-1.8.5-fix-destdir.patch |
|
Patch2: js-editline.diff |
|
|
Patch3: js-1.7.0-make.patch |
|
|
Patch4: js-shlib.patch |
|
|
Patch5: js-ldflags.patch |
|
|
Patch6: js-1.7.0-threadsafe.patch |
|
|
Patch7: js-format_not_a_string_literal_and_no_format_arguments.diff |
|
21 |
BuildRequires: multiarch-utils >= 1.0.3 |
BuildRequires: multiarch-utils >= 1.0.3 |
22 |
BuildRequires: edit-devel |
BuildRequires: edit-devel |
23 |
BuildRequires: nspr-devel |
BuildRequires: nspr-devel |
24 |
|
BuildRequires: python |
25 |
Requires: %{libname} = %{epoch}:%{version}-%{release} |
Requires: %{libname} = %{epoch}:%{version}-%{release} |
26 |
Epoch: %{epoch} |
Epoch: %{epoch} |
27 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
54 |
Epoch: %{epoch} |
Epoch: %{epoch} |
55 |
|
|
56 |
%description -n %{develname} |
%description -n %{develname} |
57 |
These are the header files for %{libname} |
These are the header files for development with SpiderMonkey. |
58 |
|
|
59 |
%prep |
%prep |
60 |
|
%setup -q -n %{name}-%{real_version}/js/src |
61 |
%setup -q -n %{name} |
%patch0 -p3 -b .destdir~ |
|
|
|
|
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do |
|
|
if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null |
|
|
done |
|
|
|
|
|
%patch1 -p1 -b .va_copy |
|
|
%patch2 -p0 -b .editline |
|
|
%patch3 -p1 -b .make |
|
|
%patch4 -p0 -b .shlib |
|
|
%patch5 -p0 -b .ldflags |
|
|
%patch6 -p1 -b .threadsafe |
|
|
%patch7 -p0 -b .format_not_a_string_literal_and_no_format_arguments |
|
62 |
|
|
63 |
%build |
%build |
64 |
export CFLAGS="%{optflags} -fno-stack-protector -DPIC -fPIC -D_REENTRANT" |
%configure2_5x --enable-readline \ |
65 |
export XCFLAGS="$CFLAGS" |
--enable-threadsafe \ |
66 |
export BUILD_OPT=1 |
--enable-ctypes \ |
67 |
export LDFLAGS="%{ldflags}" |
--with-system-nspr |
68 |
|
%make |
|
make -C src -f Makefile.ref \ |
|
|
JS_THREADSAFE="1" \ |
|
|
XCFLAGS="$CFLAGS" \ |
|
|
BUILD_OPT="1" \ |
|
|
JS_EDITLINE="1" \ |
|
|
LDFLAGS="%{ldflags}" |
|
|
|
|
|
# create pkgconfig file |
|
|
# pkgconfig can't find libjs without it |
|
|
%{__cat} > libjs.pc << 'EOF' |
|
|
prefix=%{_prefix} |
|
|
exec_prefix=%{_prefix} |
|
|
libdir=%{_libdir} |
|
|
includedir=%{_includedir} |
|
|
|
|
|
Name: libjs |
|
|
Description: %{summary} |
|
|
Version: %{version} |
|
|
Libs: -L\${libdir} -ljs |
|
|
Cflags: -I\${includedir}/js-%{version} |
|
|
EOF |
|
69 |
|
|
70 |
%install |
%install |
71 |
rm -rf %{buildroot} |
rm -rf %{buildroot} |
72 |
|
|
73 |
install -d %{buildroot}%{_bindir} |
%makeinstall_std |
74 |
install -d %{buildroot}%{_libdir} |
%multiarch_includes %{buildroot}%{_includedir}/js/jsautocfg.h |
|
install -d %{buildroot}%{_includedir}/js-%{version} |
|
|
|
|
|
# install headers |
|
|
install -m0644 src/*.h %{buildroot}%{_includedir}/js-%{version}/ |
|
|
install -m0644 src/js.msg %{buildroot}%{_includedir}/js-%{version}/ |
|
|
install -m0644 src/*.tbl %{buildroot}%{_includedir}/js-%{version}/ |
|
|
install -m0644 src/Linux_All_OPT.OBJ/jsautocfg.h %{buildroot}%{_includedir}/js-%{version}/ |
|
|
|
|
|
# install shared library |
|
|
install -m0755 src/Linux_All_OPT.OBJ/lib%{name}.so \ |
|
|
%{buildroot}%{_libdir}/lib%{name}.so.%{major} |
|
|
ln -snf lib%{name}.so.%{major} %{buildroot}%{_libdir}/lib%{name}.so |
|
|
|
|
|
# install static library |
|
|
install -m0644 src/Linux_All_OPT.OBJ/lib%{name}.a %{buildroot}%{_libdir}/ |
|
|
|
|
|
# install binary |
|
|
install -m0755 src/Linux_All_OPT.OBJ/%{name} %{buildroot}%{_bindir}/ |
|
|
install -m0755 src/Linux_All_OPT.OBJ/jscpucfg %{buildroot}%{_bindir}/ |
|
|
|
|
|
# install pkgconfig file |
|
|
mkdir -p %{buildroot}%{_libdir}/pkgconfig/ |
|
|
install -m0644 libjs.pc %{buildroot}%{_libdir}/pkgconfig/ |
|
|
|
|
|
%multiarch_includes %{buildroot}%{_includedir}/js-%{version}/jsautocfg.h |
|
75 |
|
|
76 |
%clean |
%clean |
77 |
rm -rf %{buildroot} |
rm -rf %{buildroot} |
83 |
%files -n %{libname} |
%files -n %{libname} |
84 |
%defattr(-,root,root) |
%defattr(-,root,root) |
85 |
%doc src/README.html |
%doc src/README.html |
86 |
%{_libdir}/*.so.* |
%{_libdir}/*.so.%{major} |
87 |
|
|
88 |
%files -n %{develname} |
%files -n %{develname} |
89 |
%defattr(-,root,root) |
%defattr(-,root,root) |