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