source: projects/specs/trunk/v/v8/v8-vl.spec @ 2076

Revision 2076, 4.5 KB checked in by munepi, 14 years ago (diff)

updated chromium, v8

Line 
1%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2
3# For the 1.2 branch, we use 0s here
4# For 1.3+, we use the three digit versions
5%global somajor 2
6%global sominor 4
7%global sobuild 9
8%global sover %{somajor}.%{sominor}.%{sobuild}
9
10%define svnrevision 5631
11
12Name:           v8
13Version:        %{sover}
14Release:        1%{?svnrevision:.svn%svnrevision}%{?_dist_release}
15Summary:        JavaScript Engine
16Summary(ja):    JavaScript エンジン
17Group:          System Environment/Libraries
18License:        BSD
19URL:            http://code.google.com/p/v8
20# U=http://v8.googlecode.com/svn/trunk/
21# R=$(svn log $U |awk '/^r[0-9]* / {r=$1} /2\.4\.8/ {print r; exit}')
22# svn export -$R $U v8-2.4.8
23# tar cjf v8-2.4.8.tar.bz2 v8-2.4.8
24Source0:        %{name}-%{version}%{?svnrevision:.svn%svnrevision}.tar.bz2
25Source10:       v8-snapshot.sh
26
27BuildRoot:      %{_tmppath}/%{name}-%{version}-root
28ExclusiveArch:  %{ix86} x86_64 arm
29
30BuildRequires:  scons
31BuildRequires:  readline-devel
32
33%description
34V8 is Google's open source JavaScript engine. V8 is written in C++ and is used
35in Google Chrome, the open source browser from Google. V8 implements ECMAScript
36as specified in ECMA-262, 3rd edition.
37#'
38
39%description -l ja
40V8 は Google のオープンソース JavaScript エンジンです。
41V8 で C++ 書かれており、Google 発のオープンソースブラウザである
42Google Chrome で使われています。
43V8 は ECMA-262 第 3 版で指定されている ECMAScript を満たしています。
44
45%package devel
46Group:          Development/Libraries
47Summary:        Development headers and libraries for v8
48Requires:       %{name} = %{version}-%{release}
49
50%description devel
51Development headers, libraries and tools for v8.
52
53
54%prep
55%setup -q
56
57# -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code
58PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter\'| %__sed "s/ /',/g" | %__sed "s/',/', '/g"`
59%__sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct
60
61
62%build
63%if %{?_dist_release} == "vl6"
64export GCC_VERSION="44"
65%endif
66scons library=shared snapshots=on %{_smp_mflags} \
67%ifarch x86_64
68        arch=x64 \
69%endif
70        visibility=default \
71        env=CCFLAGS:"-fPIC"
72
73# When will people learn to create versioned shared libraries by default?
74# first, lets get rid of the old .so
75%__rm -rf libv8.so
76# Now, lets make it right.
77%ifarch arm
78g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} obj/release/*.os obj/release/arm/*.os
79%endif
80%ifarch %{ix86}
81g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} obj/release/*.os obj/release/ia32/*.os
82%endif
83%ifarch x86_64
84g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} obj/release/*.os obj/release/x64/*.os
85%endif
86
87# We need to do this so d8 can link against it.
88%__ln_s -f libv8.so.%{sover} libv8.so
89
90scons d8 %{_smp_mflags} \
91%ifarch x86_64
92        arch=x64 \
93%endif
94        library=shared snapshots=on console=readline visibility=default
95
96# Ahem
97%__rm -rf d8
98
99g++ $RPM_OPT_FLAGS -o d8 obj/release/d8-debug.os obj/release/d8-posix.os obj/release/d8-readline.os obj/release/d8.os obj/release/d8-js.os -lpthread -lreadline -lpthread -L. -lv8
100
101
102%install
103%__rm -rf %{buildroot}
104%__mkdir_p %{buildroot}%{_includedir}
105%__mkdir_p %{buildroot}%{_libdir}
106%__install -p include/*.h %{buildroot}%{_includedir}
107%__install -p libv8.so.%{sover} %{buildroot}%{_libdir}
108%__mkdir_p %{buildroot}%{_bindir}
109%__install -p -m0755 d8 %{buildroot}%{_bindir}
110
111%__install -d %{buildroot}%{python_sitelib}
112%__install -pm644 tools/js2c.py %{buildroot}%{python_sitelib}
113%__install -pm644 tools/jsmin.py %{buildroot}%{python_sitelib}
114
115cd %{buildroot}%{_libdir}
116%__ln_s -f libv8.so.%{sover} libv8.so
117%__ln_s -f libv8.so.%{sover} libv8.so.%{somajor}
118%__ln_s -f libv8.so.%{sover} libv8.so.%{somajor}.%{sominor}
119
120%__chmod -x %{buildroot}%{_includedir}/v8*.h
121
122
123%clean
124%__rm -rf %{buildroot}
125
126
127%post -p /sbin/ldconfig
128%postun -p /sbin/ldconfig
129
130
131%files
132%defattr(-,root,root,-)
133%doc AUTHORS ChangeLog LICENSE
134%{_bindir}/d8
135%{_libdir}/*.so.*
136
137
138%files devel
139%defattr(-,root,root,-)
140%{_includedir}/*.h
141%{_libdir}/*.so
142%{python_sitelib}/*.py*
143
144
145%changelog
146* Sat Oct 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.4.9-1.svn5631
147- source 2.4.9 rev.5631
148
149* Sun Oct 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.4.8-1
150- initial build
151
152* Sat Sep 18 2010 Lubomir Rintel <lkundrak@v3.sk> - 2.4.4-1
153- Newer version
154
155- Package based on 2.3.11-1.20100831svn5385 by Tom "spot" Callaway
156* Wed Sep 15 2010 Lubomir Rintel <lkundrak@v3.sk> - 2.3.8-2
157- Package based on 2.3.11-1.20100831svn5385 by Tom "spot" Callaway
Note: See TracBrowser for help on using the repository browser.