[2038] | 1 | %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
---|
| 2 | |
---|
[2346] | 3 | %global somajor 3 |
---|
| 4 | %global sominor 0 |
---|
[2595] | 5 | %global sobuild 12 |
---|
[2038] | 6 | %global sover %{somajor}.%{sominor}.%{sobuild} |
---|
| 7 | |
---|
[2595] | 8 | %define svnrevision 6522 |
---|
[2076] | 9 | |
---|
[2038] | 10 | Name: v8 |
---|
[2076] | 11 | Version: %{sover} |
---|
| 12 | Release: 1%{?svnrevision:.svn%svnrevision}%{?_dist_release} |
---|
[2277] | 13 | Provides: lib%{name} = %{version}-%{release} |
---|
[2038] | 14 | Summary: JavaScript Engine |
---|
| 15 | Summary(ja): JavaScript エンジン |
---|
| 16 | Group: System Environment/Libraries |
---|
| 17 | License: BSD |
---|
| 18 | URL: http://code.google.com/p/v8 |
---|
[2076] | 19 | Source0: %{name}-%{version}%{?svnrevision:.svn%svnrevision}.tar.bz2 |
---|
| 20 | Source10: v8-snapshot.sh |
---|
[2277] | 21 | Patch0: v8-2.5.9-buildfix.patch |
---|
[2076] | 22 | |
---|
[2038] | 23 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 24 | ExclusiveArch: %{ix86} x86_64 arm |
---|
| 25 | |
---|
[2076] | 26 | BuildRequires: scons |
---|
| 27 | BuildRequires: readline-devel |
---|
| 28 | |
---|
[2038] | 29 | %description |
---|
| 30 | V8 is Google's open source JavaScript engine. V8 is written in C++ and is used |
---|
| 31 | in Google Chrome, the open source browser from Google. V8 implements ECMAScript |
---|
| 32 | as specified in ECMA-262, 3rd edition. |
---|
| 33 | #' |
---|
| 34 | |
---|
| 35 | %description -l ja |
---|
| 36 | V8 は Google のオープンソース JavaScript エンジンです。 |
---|
| 37 | V8 で C++ 書かれており、Google 発のオープンソースブラウザである |
---|
| 38 | Google Chrome で使われています。 |
---|
| 39 | V8 は ECMA-262 第 3 版で指定されている ECMAScript を満たしています。 |
---|
| 40 | |
---|
| 41 | %package devel |
---|
| 42 | Group: Development/Libraries |
---|
| 43 | Summary: Development headers and libraries for v8 |
---|
| 44 | Requires: %{name} = %{version}-%{release} |
---|
[2277] | 45 | Provides: lib%{name}-devel = %{version}-%{release} |
---|
[2038] | 46 | |
---|
| 47 | %description devel |
---|
| 48 | Development headers, libraries and tools for v8. |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | %prep |
---|
| 52 | %setup -q |
---|
[2277] | 53 | %patch0 -p0 -b .orig |
---|
[2038] | 54 | |
---|
| 55 | # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code |
---|
[2277] | 56 | PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS \' | %__sed "s/ /',/g" | %__sed "s/',/', '/g"` |
---|
| 57 | %__sed -i "s|'-O3',|$PARSED_OPT_FLAGS '-fno-strict-aliasing',|g" SConstruct |
---|
[2038] | 58 | |
---|
| 59 | |
---|
| 60 | %build |
---|
| 61 | %if %{?_dist_release} == "vl6" |
---|
| 62 | export GCC_VERSION="44" |
---|
| 63 | %endif |
---|
| 64 | scons library=shared snapshots=on %{_smp_mflags} \ |
---|
| 65 | %ifarch x86_64 |
---|
[2277] | 66 | arch=x64 \ |
---|
[2038] | 67 | %endif |
---|
[2277] | 68 | visibility=default \ |
---|
| 69 | env=CCFLAGS:"-fPIC" |
---|
[2038] | 70 | |
---|
| 71 | # When will people learn to create versioned shared libraries by default? |
---|
| 72 | # first, lets get rid of the old .so |
---|
[2277] | 73 | %__rm -f libv8.so |
---|
[2038] | 74 | # Now, lets make it right. |
---|
[2277] | 75 | %__cxx $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared \ |
---|
| 76 | -Wl,-soname,libv8.so.%{somajor} \ |
---|
| 77 | obj/release/*.os \ |
---|
| 78 | obj/release/extensions/*.os \ |
---|
| 79 | %ifarch arm |
---|
| 80 | obj/release/arm/*.os \ |
---|
| 81 | %endif |
---|
| 82 | %ifarch %{ix86} |
---|
| 83 | obj/release/ia32/*.os \ |
---|
| 84 | %endif |
---|
| 85 | %ifarch x86_64 |
---|
| 86 | obj/release/x64/*.os \ |
---|
| 87 | %endif |
---|
| 88 | ; |
---|
[2038] | 89 | # We need to do this so d8 can link against it. |
---|
| 90 | %__ln_s -f libv8.so.%{sover} libv8.so |
---|
| 91 | |
---|
| 92 | scons d8 %{_smp_mflags} \ |
---|
| 93 | %ifarch x86_64 |
---|
[2277] | 94 | arch=x64 \ |
---|
[2038] | 95 | %endif |
---|
[2277] | 96 | library=shared snapshots=on console=readline visibility=default |
---|
[2038] | 97 | |
---|
| 98 | # Ahem |
---|
[2277] | 99 | %__rm -f d8 |
---|
[2038] | 100 | |
---|
[2277] | 101 | %__cxx $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 |
---|
[2038] | 102 | |
---|
| 103 | |
---|
| 104 | %install |
---|
| 105 | %__rm -rf %{buildroot} |
---|
[2277] | 106 | |
---|
| 107 | [ -f libv8.so ] && [ ! -f libv8.so.%{sover} ] && %__mv libv8.so libv8.so.%{sover} |
---|
[2038] | 108 | %__mkdir_p %{buildroot}%{_includedir} |
---|
| 109 | %__mkdir_p %{buildroot}%{_libdir} |
---|
| 110 | %__install -p include/*.h %{buildroot}%{_includedir} |
---|
| 111 | %__install -p libv8.so.%{sover} %{buildroot}%{_libdir} |
---|
| 112 | %__mkdir_p %{buildroot}%{_bindir} |
---|
| 113 | %__install -p -m0755 d8 %{buildroot}%{_bindir} |
---|
| 114 | |
---|
| 115 | %__install -d %{buildroot}%{python_sitelib} |
---|
| 116 | %__install -pm644 tools/js2c.py %{buildroot}%{python_sitelib} |
---|
| 117 | %__install -pm644 tools/jsmin.py %{buildroot}%{python_sitelib} |
---|
| 118 | |
---|
| 119 | cd %{buildroot}%{_libdir} |
---|
| 120 | %__ln_s -f libv8.so.%{sover} libv8.so |
---|
| 121 | %__ln_s -f libv8.so.%{sover} libv8.so.%{somajor} |
---|
| 122 | %__ln_s -f libv8.so.%{sover} libv8.so.%{somajor}.%{sominor} |
---|
| 123 | |
---|
| 124 | %__chmod -x %{buildroot}%{_includedir}/v8*.h |
---|
| 125 | |
---|
| 126 | |
---|
[2277] | 127 | # %check |
---|
| 128 | # tools/test.py --no-build -p dots --shell d8 |
---|
| 129 | |
---|
[2038] | 130 | %clean |
---|
| 131 | %__rm -rf %{buildroot} |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | %post -p /sbin/ldconfig |
---|
| 135 | %postun -p /sbin/ldconfig |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | %files |
---|
| 139 | %defattr(-,root,root,-) |
---|
| 140 | %doc AUTHORS ChangeLog LICENSE |
---|
| 141 | %{_bindir}/d8 |
---|
| 142 | %{_libdir}/*.so.* |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | %files devel |
---|
| 146 | %defattr(-,root,root,-) |
---|
| 147 | %{_includedir}/*.h |
---|
| 148 | %{_libdir}/*.so |
---|
| 149 | %{python_sitelib}/*.py* |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | %changelog |
---|
[2595] | 153 | * Sat Jan 29 2011 Munehiro Yamamoto <munepi@vinelinux.org> - 3.0.12-1.svn6522 |
---|
| 154 | - source 3.0.12 rev.6387 |
---|
| 155 | |
---|
| 156 | * Sat Jan 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> - 3.0.9-1.svn6387 |
---|
| 157 | - source 3.0.9 rev.6387 |
---|
| 158 | |
---|
[2405] | 159 | * Thu Dec 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 3.0.4-1.svn6102 |
---|
| 160 | - source 3.0.4 rev.6102 |
---|
| 161 | |
---|
[2346] | 162 | * Sat Dec 11 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 3.0.0-1.svn5932 |
---|
| 163 | - source 3.0.0 rev.5932 |
---|
| 164 | |
---|
[2277] | 165 | * Sat Dec 04 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.5.9-1.svn5896 |
---|
| 166 | - source 2.5.9 rev.5896 |
---|
| 167 | |
---|
| 168 | * Fri Nov 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.5.8-1.svn5891 |
---|
| 169 | - source 2.5.8 rev.5891 |
---|
| 170 | |
---|
| 171 | * Thu Nov 11 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.5.6-1.svn5808 |
---|
| 172 | - source 2.5.6 rev.5808 |
---|
| 173 | |
---|
| 174 | * Sun Oct 31 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.5.2-1.svn5743 |
---|
| 175 | - source 2.5.2 rev.5743 |
---|
| 176 | |
---|
[2076] | 177 | * Sat Oct 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.4.9-1.svn5631 |
---|
| 178 | - source 2.4.9 rev.5631 |
---|
| 179 | |
---|
[2038] | 180 | * Sun Oct 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.4.8-1 |
---|
| 181 | - initial build |
---|
| 182 | |
---|
| 183 | * Sat Sep 18 2010 Lubomir Rintel <lkundrak@v3.sk> - 2.4.4-1 |
---|
| 184 | - Newer version |
---|
| 185 | |
---|
| 186 | - Package based on 2.3.11-1.20100831svn5385 by Tom "spot" Callaway |
---|
| 187 | * Wed Sep 15 2010 Lubomir Rintel <lkundrak@v3.sk> - 2.3.8-2 |
---|
| 188 | - Package based on 2.3.11-1.20100831svn5385 by Tom "spot" Callaway |
---|