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