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