]>
Commit | Line | Data |
---|---|---|
f852d988 | 1 | # TODO |
4d92292d | 2 | # - readline not working in d8 (at least arrows) |
855c3a42 JB |
3 | Summary: JavaScript Engine by Google |
4 | Summary(pl.UTF-8): Silnik JavaScript firmy Google | |
b8bbb50f | 5 | Name: v8 |
cfee0c39 | 6 | Version: 3.11.10.25 |
8620f99e | 7 | Release: 1 |
855c3a42 JB |
8 | License: BSD |
9 | Group: Applications | |
cfee0c39 ER |
10 | Source0: http://commondatastorage.googleapis.com/chromium-browser-official/%{name}-%{version}.tar.bz2 |
11 | # Source0-md5: ed471d5c406a2f851afa448e25934c26 | |
855c3a42 JB |
12 | Patch0: %{name}-cstdio.patch |
13 | Patch1: %{name}-strndup.patch | |
14 | Patch2: %{name}-soname.patch | |
15 | Patch3: %{name}-dynlink.patch | |
16 | URL: http://code.google.com/p/v8/ | |
982929a0 | 17 | BuildRequires: libstdc++-devel >= 5:4.0 |
855c3a42 | 18 | BuildRequires: python >= 1:2.4 |
7594b47f | 19 | BuildRequires: readline-devel |
855c3a42 JB |
20 | BuildRequires: scons >= 1.0.0 |
21 | BuildRequires: sed >= 4.0 | |
c9aae908 | 22 | Requires: %{name}-libs = %{version}-%{release} |
c894b44e | 23 | ExclusiveArch: %{ix86} %{x8664} arm |
b8bbb50f AM |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
035f4755 | 26 | %define sover %(echo %{version} | cut -d. -f1-2) |
855c3a42 | 27 | |
b8bbb50f AM |
28 | %description |
29 | V8 is Google's open source JavaScript engine. V8 is written in C++ and | |
30 | is used in Google Chrome, the open source browser from Google. V8 | |
31 | implements ECMAScript as specified in ECMA-262, 3rd edition. | |
32 | ||
855c3a42 JB |
33 | This package contains the V8 developer shell. |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | V8 to mający otwarte źródła silnik JavaScriptu firmy Google. V8 jest | |
37 | napisany w C++ i wykorzystywany w mającej otwarte źródła przeglądarce | |
38 | Google Chrome. V8 implementuje ECMAScript zgodnie ze specyfikacją | |
39 | ECMA-262, edycja 3. | |
40 | ||
41 | Ten pakiet zawiera powłokę programistyczną V8. | |
37bf3af8 ER |
42 | |
43 | %package libs | |
44 | Summary: V8 JavaScript Engine shared library | |
855c3a42 | 45 | Summary(pl.UTF-8): Biblioteka współdzielona silnika JavaScriptu V8 |
37bf3af8 ER |
46 | Group: Libraries |
47 | Conflicts: v8 < 2.0.0 | |
48 | ||
49 | %description libs | |
50 | V8 is Google's open source JavaScript engine. V8 is written in C++ and | |
51 | is used in Google Chrome, the open source browser from Google. V8 | |
52 | implements ECMAScript as specified in ECMA-262, 3rd edition. | |
53 | ||
54 | This package contains the shared library. | |
55 | ||
855c3a42 JB |
56 | %description libs -l pl.UTF-8 |
57 | V8 to mający otwarte źródła silnik JavaScriptu firmy Google. V8 jest | |
58 | napisany w C++ i wykorzystywany w mającej otwarte źródła przeglądarce | |
59 | Google Chrome. V8 implementuje ECMAScript zgodnie ze specyfikacją | |
60 | ECMA-262, edycja 3. | |
61 | ||
62 | Ten pakiet zawiera bibliotekę współdzieloną. | |
63 | ||
b8bbb50f | 64 | %package devel |
855c3a42 JB |
65 | Summary: Development headers for V8 JavaScript engine |
66 | Summary(pl.UTF-8): Pliki nagłówkowe silnika JavaScriptu V8 | |
b8bbb50f | 67 | Group: Development/Libraries |
37bf3af8 | 68 | Requires: %{name}-libs = %{version}-%{release} |
855c3a42 | 69 | Requires: libstdc++-devel |
b8bbb50f AM |
70 | |
71 | %description devel | |
855c3a42 JB |
72 | Development headers for V8 JavaScript engine. |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki nagłówkowe silnika JavaScriptu V8. | |
b8bbb50f AM |
76 | |
77 | %prep | |
ce2a821c | 78 | %setup -q |
855c3a42 JB |
79 | %patch0 -p1 |
80 | %patch1 -p1 | |
ffa963bd | 81 | %patch2 -p1 |
82 | %patch3 -p1 | |
17fde832 | 83 | %{__sed} -i -e "s/'-O3'/'%{rpmcxxflags}'.split(' ')/" SConstruct |
855c3a42 JB |
84 | # some "unused-but-set" warnings |
85 | %{__sed} -i -e "s/'-Werror',//" SConstruct | |
b8bbb50f AM |
86 | |
87 | %build | |
5e90f260 | 88 | # build library |
ffa963bd | 89 | CFLAGS="%{rpmcflags}" |
90 | CXXFLAGS="%{rpmcxxflags}" | |
855c3a42 | 91 | LDFLAGS="%{rpmldflags}" |
ffa963bd | 92 | %if "%{pld_release}" == "ac" |
ce2a821c ER |
93 | CC="%{__cc}4" |
94 | CXX="%{__cxx}4" | |
ffa963bd | 95 | %else |
ce2a821c ER |
96 | CC="%{__cc}" |
97 | CXX="%{__cxx}" | |
ffa963bd | 98 | %endif |
99 | export CFLAGS LDFLAGS CXXFLAGS CC CXX | |
855c3a42 | 100 | %scons library d8 \ |
c894b44e ER |
101 | library=shared \ |
102 | snapshots=on \ | |
adb1d2b8 | 103 | soname=on \ |
7594b47f | 104 | console=readline \ |
5e90f260 | 105 | visibility=default \ |
855c3a42 | 106 | %ifarch %{x8664} |
c894b44e | 107 | arch=x64 \ |
b8bbb50f | 108 | %endif |
c894b44e ER |
109 | env=CCFLAGS:"-fPIC" |
110 | ||
b8bbb50f AM |
111 | %install |
112 | rm -rf $RPM_BUILD_ROOT | |
5e90f260 | 113 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}} |
855c3a42 | 114 | |
f852d988 | 115 | for lib in libv8 libv8preparser; do |
035f4755 ER |
116 | install -p $lib.so $RPM_BUILD_ROOT%{_libdir}/$lib.so.%{version} |
117 | ln -sf $lib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/$lib.so.%{sover} | |
118 | ln -sf $lib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/$lib.so | |
855c3a42 | 119 | done |
f852d988 | 120 | cp -p include/*.h $RPM_BUILD_ROOT%{_includedir} |
b8bbb50f | 121 | |
4d92292d | 122 | install -p d8 $RPM_BUILD_ROOT%{_bindir} |
b8bbb50f AM |
123 | |
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
37bf3af8 ER |
127 | %post libs -p /sbin/ldconfig |
128 | %postun libs -p /sbin/ldconfig | |
b8bbb50f AM |
129 | |
130 | %files | |
131 | %defattr(644,root,root,755) | |
855c3a42 | 132 | %doc AUTHORS ChangeLog LICENSE LICENSE.strongtalk LICENSE.valgrind |
4d92292d | 133 | %attr(755,root,root) %{_bindir}/d8 |
37bf3af8 ER |
134 | |
135 | %files libs | |
982929a0 | 136 | %defattr(644,root,root,755) |
c894b44e | 137 | %attr(755,root,root) %{_libdir}/libv8.so.*.*.* |
035f4755 | 138 | %attr(755,root,root) %ghost %{_libdir}/libv8.so.%{sover} |
855c3a42 | 139 | %attr(755,root,root) %{_libdir}/libv8preparser.so.*.*.* |
035f4755 | 140 | %attr(755,root,root) %ghost %{_libdir}/libv8preparser.so.%{sover} |
b8bbb50f AM |
141 | |
142 | %files devel | |
143 | %defattr(644,root,root,755) | |
c894b44e | 144 | %attr(755,root,root) %{_libdir}/libv8.so |
855c3a42 JB |
145 | %attr(755,root,root) %{_libdir}/libv8preparser.so |
146 | %{_includedir}/v8*.h |