Update live ebuild to use gyp build. Fix minor problems: readline support, soname...
authorPaweł Hajdan <phajdan.jr@gentoo.org>
Wed, 12 Oct 2011 18:18:48 +0000 (18:18 +0000)
committerPaweł Hajdan <phajdan.jr@gentoo.org>
Wed, 12 Oct 2011 18:18:48 +0000 (18:18 +0000)
Package-Manager: portage-2.1.10.11/cvs/Linux i686

dev-lang/v8/ChangeLog
dev-lang/v8/Manifest
dev-lang/v8/files/v8-gentoo-bug-349794-r0.patch [deleted file]
dev-lang/v8/files/v8-upstream-bug-1016-r0.patch [deleted file]
dev-lang/v8/files/v8-upstream-bug-1326-r0.patch [deleted file]
dev-lang/v8/files/v8-upstream-bug-773-r0.patch [deleted file]
dev-lang/v8/v8-3.6.5.1.ebuild
dev-lang/v8/v8-9999.ebuild

index 9c9e6a4d6a7e455a0e1529f4c763f309cf4d9733..f1becb76e52124de179291917ebc960efc43870f 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for dev-lang/v8
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/ChangeLog,v 1.81 2011/10/12 02:58:55 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/ChangeLog,v 1.82 2011/10/12 18:18:48 phajdan.jr Exp $
+
+  12 Oct 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org> v8-3.6.5.1.ebuild,
+  -files/v8-upstream-bug-773-r0.patch, -files/v8-upstream-bug-1016-r0.patch,
+  -files/v8-upstream-bug-1326-r0.patch, v8-9999.ebuild,
+  -files/v8-gentoo-bug-349794-r0.patch:
+  Update live ebuild to use gyp build. Fix minor problems: readline support,
+  soname, do not install shell (it's not intended to be installed; d8 is).
+  Remove unused files.
 
   12 Oct 2011; Mike Gilbert <floppym@gentoo.org> v8-3.6.5.1.ebuild:
   Migrate to EAPI 4. Add python deps. Re-add pax-mark.
index c64332ad754c0dbd96c692c6b92f917d601e5d67..6d164b2405c7955abca1e763485110c26883ffe9 100644 (file)
@@ -1,13 +1,9 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
+Hash: SHA512
 
-AUX v8-gentoo-bug-349794-r0.patch 495 RMD160 fdb50bfb6915d912d7dd1b4934dba060beb6cb7f SHA1 4b974ff42a00461e4fcf1673cda205320601aef0 SHA256 820807f0fe3aba7bc6034a33b0c61b506b112ea28787043bd07585c7f5ae6c9c
 AUX v8-gyp-cflags-r0.patch 504 RMD160 4175bee5ad837bc15c1ebff2394cf0b2f21ad83e SHA1 121813bc0786751ab6019cfe5e043d8f6834e1f6 SHA256 6d3982d8f60b47dce35c1b0e969104d08a1b7550454796f52158224fd130c908
 AUX v8-no-O3-r0.patch 422 RMD160 37467564f5ea6ff519cf86b7209a534424abbba3 SHA1 edbf6d9afc5ea6fdd0e9c0bf06d65caa488914c6 SHA256 c38a393a23adff83a799cb137f8a8e5092f87a62db109d7ce41becd6dec781f5
 AUX v8-no-werror-r0.patch 573 RMD160 17791cdee16894b37e937f23146aff52bc3d4775 SHA1 fa814bfc6c64570e0e69a184f1c36c359b63eb2d SHA256 8968e9b4f362d3e059675c6bb9b6be0d104ac478a62c50a8f7304f47d514e782
-AUX v8-upstream-bug-1016-r0.patch 1340 RMD160 3fccd4a6942a0821901be9fe73434be49e7188be SHA1 98b98d23d8b115eafb4a8e678a717de44f18ebf8 SHA256 76b82fd48ec9145b3ea6fce104224f757217636b863fcf2d98ef699e2cea2a58
-AUX v8-upstream-bug-1326-r0.patch 441 RMD160 38798813e5a9aefc264c1c828030df25941de3df SHA1 85c6388eb4044d767b6bb0287f10cf305e0f722d SHA256 46e9ace07c016eae51f9c8863c1dee9aa513eb3cf43fa2e854cc7290affd21e7
-AUX v8-upstream-bug-773-r0.patch 512 RMD160 407e6f3d557c8fbda2deb12698006a39c86bab60 SHA1 37b9f275b4dcd732a5f66b24a5b3dcab6f644142 SHA256 1be72e0ae271969ad67ce9226c89c9def78f3a9be9000be5a752f871b47178cc
 DIST gyp-1066.tar.xz 250424 RMD160 b50b4888e8cb871e6a1e5cda8ce86ff241250583 SHA1 455ea41221556ea49187876f6d4e0497a6f3062c SHA256 1ad2c52e27d7dac0cce3ce76b401d735ca9e0a1dbf12b91293420f3a233a4ad4
 DIST v8-3.3.10.22.tar.gz 10657177 RMD160 88bda9ce62db52a711b75dd5bedafd05883d3971 SHA1 58fe359b651d7282b998e0560178a5f58cf8f377 SHA256 c73c7282eaf774b6dee2bda6dd6d8b29ea34f32d2f13082a8acc22acb57911ae
 DIST v8-3.3.10.30.tar.gz 10660554 RMD160 accda334dfafec7a3f303a43b06c672d34529ff2 SHA1 68bbdafa87f7774212674499af07e8d3475ef692 SHA256 f13980e7fe45fb654ab8faa083e45fcb22a0f88e4f4190fc85a83504a701d9c0
@@ -18,14 +14,14 @@ EBUILD v8-3.3.10.22.ebuild 2773 RMD160 f98e6329c5f043aba33a74e227787ca7e9500dfd
 EBUILD v8-3.3.10.30.ebuild 2773 RMD160 3c22d11144ffc6851547ff8acca00ffec1053273 SHA1 485d57a2f2d5622ae9ae59fbe39214712edd5722 SHA256 c1bd3ec83b8a741e461c31af05b5580d6a06a422b37838b7143223ce55923779
 EBUILD v8-3.4.12.1.ebuild 2982 RMD160 1dfed6c4828d1d06a8e83dd9ad77550614f08008 SHA1 c93e2f14a2c9a1f5365698a6df05fc0c3da20737 SHA256 c5af24a86d8a2ea17cfe2cfabf4e00b1deae24614ce65fc5d491e35f94936a94
 EBUILD v8-3.4.14.28.ebuild 2071 RMD160 f22aeaebef6737040d487e621456ad3ce0dff05d SHA1 b4dd86e87df8d11d687067661d0a2fa8fef90043 SHA256 40631ce7a9a1e4cd1a668cfdf606340161e081b51e92d23799858a84adfb01d8
-EBUILD v8-3.6.5.1.ebuild 2133 RMD160 05a41cf752d57408516ec7765ff7fd24be16e9ef SHA1 2a14c0af7f768bbc40285f6cb671c3c12d1a0aef SHA256 c87cca11eb2c3f1bf2e9f3c4a16ee72259a52cc79a5fcf668232490b25e37c7a
-EBUILD v8-9999.ebuild 1940 RMD160 6c92c799981272aa45772068a3eb7172cebd49a2 SHA1 ad8e7d2617f7520df3744ff93be4aac87ea776ae SHA256 6aadf3ea4692d91592f143911d7443e354d0da227ec7c8993ae93f28890d22cb
-MISC ChangeLog 13787 RMD160 6261280a63911fc40725c7f949331b381364a2bb SHA1 4a08a63b255604cee0eec29fe035a14a9288ea86 SHA256 ff47d31e5ff6da62c13b67029e6b524374782064048cb512d5f8ab9e64841430
+EBUILD v8-3.6.5.1.ebuild 2433 RMD160 cd38d72c6a196c547ff2e65a7534897825bf5a33 SHA1 82fc160eee2e9a77a8cac40219a2a9fc555c0572 SHA256 9e6f48a83c929bd1cc529aea74e16ad633da87c423e7de4b66c8cafaa0768d69
+EBUILD v8-9999.ebuild 1957 RMD160 8eb0ee48c4161025bcb0507d909163f830f4e2c9 SHA1 d0c0c296466f77fab5ec04970c79be6cec4ff2fa SHA256 f0016e27bf0d8db28f457813ab3f47bfdf9fe61595948937a37b04b0cde534d1
+MISC ChangeLog 14213 RMD160 33bfaabb1e71d514b443306ef81c1a8bfa95f0ad SHA1 a10e54e08c270e2755ac81de7d12d0d1c5acf801 SHA256 ca388875546dd908adc21e961a0ac4584025da2b95cccd2ec78e675d8c56c62d
 MISC metadata.xml 162 RMD160 3485b95578a49782c3188a0f963f90c688287fe1 SHA1 46226eeaf4948209a093253f92010abea501daef SHA256 8a3ecdcf518f45ec4843398f9896c9b4d1c867ff2cf2851cf40b06f756f111e8
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iF4EAREIAAYFAk6VAngACgkQC77qH+pIQ6RXEAD5Ab/ffy6oMmHp2ZGHJ4k8CjDh
-hHqikqZU6eZvQZzPioAA/3yRuMFLGjGwet7UWcPQXZUsTle5LuEBrmWMP/e9hg96
-=yz6N
+iEYEAREKAAYFAk6V2hQACgkQuUQtlDBCeQKqwwCgg2WQj3qMf9Qc0BCkIF05H3q+
+/S0An0qEI3PTaUKyBRJlCOUbycVzrkJZ
+=HILg
 -----END PGP SIGNATURE-----
diff --git a/dev-lang/v8/files/v8-gentoo-bug-349794-r0.patch b/dev-lang/v8/files/v8-gentoo-bug-349794-r0.patch
deleted file mode 100644 (file)
index 4da1b5a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: SConstruct
-===================================================================
---- SConstruct (revision 6120)
-+++ SConstruct (working copy)
-@@ -32,7 +32,7 @@
- from os.path import join, dirname, abspath
- from types import DictType, StringTypes
- root_dir = dirname(File('SConstruct').rfile().abspath)
--sys.path.append(join(root_dir, 'tools'))
-+sys.path.insert(0, join(root_dir, 'tools'))
- import js2c, utils
- # ANDROID_TOP is the top of the Android checkout, fetched from the environment
diff --git a/dev-lang/v8/files/v8-upstream-bug-1016-r0.patch b/dev-lang/v8/files/v8-upstream-bug-1016-r0.patch
deleted file mode 100644 (file)
index 99a3a62..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- include/v8.h.orig  2011-01-06 10:31:51.000000000 +0100
-+++ include/v8.h       2011-01-06 10:33:16.000000000 +0100
-@@ -1631,9 +1631,9 @@
-    *       the backing store is preserved while V8 has a reference.
-    */
-   V8EXPORT void SetIndexedPropertiesToPixelData(uint8_t* data, int length);
--  bool HasIndexedPropertiesInPixelData();
--  uint8_t* GetIndexedPropertiesPixelData();
--  int GetIndexedPropertiesPixelDataLength();
-+  V8EXPORT bool HasIndexedPropertiesInPixelData();
-+  V8EXPORT uint8_t* GetIndexedPropertiesPixelData();
-+  V8EXPORT int GetIndexedPropertiesPixelDataLength();
-   /**
-    * Set the backing store of the indexed properties to be managed by the
-@@ -1646,10 +1646,10 @@
-       void* data,
-       ExternalArrayType array_type,
-       int number_of_elements);
--  bool HasIndexedPropertiesInExternalArrayData();
--  void* GetIndexedPropertiesExternalArrayData();
--  ExternalArrayType GetIndexedPropertiesExternalArrayDataType();
--  int GetIndexedPropertiesExternalArrayDataLength();
-+  V8EXPORT bool HasIndexedPropertiesInExternalArrayData();
-+  V8EXPORT void* GetIndexedPropertiesExternalArrayData();
-+  V8EXPORT ExternalArrayType GetIndexedPropertiesExternalArrayDataType();
-+  V8EXPORT int GetIndexedPropertiesExternalArrayDataLength();
-   V8EXPORT static Local<Object> New();
-   static inline Object* Cast(Value* obj);
diff --git a/dev-lang/v8/files/v8-upstream-bug-1326-r0.patch b/dev-lang/v8/files/v8-upstream-bug-1326-r0.patch
deleted file mode 100644 (file)
index 68cf539..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: src/d8-readline.cc
-diff --git a/src/d8-readline.cc b/src/d8-readline.cc
-index 67fc9eff7e528fd66dba1e724f2e42909dd76668..08395e53de103aa481aa2752bdf94db15bdbc0ad 100644
---- a/src/d8-readline.cc
-+++ b/src/d8-readline.cc
-@@ -30,6 +30,8 @@
- #include <readline/readline.h> // NOLINT
- #include <readline/history.h> // NOLINT
-+// The readline includes leaves RETURN defined which breaks V8 compilation.
-+#undef RETURN
- #include "d8.h"
diff --git a/dev-lang/v8/files/v8-upstream-bug-773-r0.patch b/dev-lang/v8/files/v8-upstream-bug-773-r0.patch
deleted file mode 100644 (file)
index 9175f91..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- tools/js2c.py.orig 2010-07-25 22:20:45.000000000 +0200
-+++ tools/js2c.py      2010-07-25 22:21:00.000000000 +0200
-@@ -112,7 +112,7 @@
- def ExpandMacros(lines, macros):
-   # We allow macros to depend on the previously declared macros, but
-   # we don't allow self-dependecies or recursion.
--  for name_pattern, macro in reversed(macros):
-+  for name_pattern, macro in reversed(list(macros)):
-     pattern_match = name_pattern.search(lines, 0)
-     while pattern_match is not None:
-       # Scan over the arguments
index 22e8161d49fbe05d353955581e2de41ba922b4da..65989e9a06d18df6b893c9a28a5642bb2029b94b 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.6.5.1.ebuild,v 1.2 2011/10/12 02:58:55 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.6.5.1.ebuild,v 1.3 2011/10/12 18:18:48 phajdan.jr Exp $
 
 EAPI="4"
 
@@ -16,10 +16,11 @@ LICENSE="BSD"
 
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~x86 ~x64-macos ~x86-macos"
-IUSE=""
+IUSE="readline"
 
 # Avoid using python eclass since we do not need python RDEPEND
 DEPEND="|| ( dev-lang/python:2.6 dev-lang/python:2.7 )"
+RDEPEND="readline? ( >=sys-libs/readline-6.1 )"
 
 src_unpack() {
        unpack ${A}
@@ -55,13 +56,21 @@ src_compile() {
        esac
        mytarget=${myarch}.release
 
-       emake V=1 library=shared soname_version=${PV} ${mytarget}
-
+       console=""
+       if use readline; then
+               console="readline";
+       fi
+       if [[ ${PV} == "9999" ]]; then
+               soname_version="${PV}-${ESVN_WC_REVISION}"
+       else
+               soname_version="${PV}"
+       fi
+       emake V=1 library=shared werror=no console=${console} soname_version=${soname_version} ${mytarget} || die
        pax-mark m out/${mytarget}/{cctest,d8,shell} || die
 }
 
 src_test() {
-       tools/test-wrapper-gypbuild.py -j16 \
+       tools/test-wrapper-gypbuild.py \
                --arch-and-mode=${mytarget} \
                --no-presubmit \
                --progress=dots || die
@@ -71,16 +80,16 @@ src_install() {
        insinto /usr
        doins -r include
 
-       dobin out/${mytarget}/d8 out/${mytarget}/shell
+       dobin out/${mytarget}/d8
 
        if [[ ${CHOST} == *-darwin* ]] ; then
                install_name_tool \
-                       -id "${EPREFIX}"/usr/$(get_libdir)/libv8-${PV}$(get_libname) \
-                       out/${mytarget}/lib.target/libv8-${PV}$(get_libname) || die
+                       -id "${EPREFIX}"/usr/$(get_libdir)/libv8-${soname_version}$(get_libname) \
+                       out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname) || die
        fi
 
-       dolib out/${mytarget}/lib.target/libv8-${PV}$(get_libname)
-       dosym libv8-${PV}$(get_libname) /usr/$(get_libdir)/libv8$(get_libname)
+       dolib out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname)
+       dosym libv8-${soname_version}$(get_libname) /usr/$(get_libdir)/libv8$(get_libname)
 
        dodoc AUTHORS ChangeLog
 }
index 0f640f76313585f7fb09575460630ea5244614d7..017ec013a85a9e43a0863a92897e68466e10c0c6 100644 (file)
@@ -1,10 +1,10 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-9999.ebuild,v 1.12 2011/10/04 21:02:29 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-9999.ebuild,v 1.13 2011/10/12 18:18:48 phajdan.jr Exp $
 
 EAPI="2"
 
-inherit eutils flag-o-matic multilib pax-utils scons-utils subversion toolchain-funcs
+inherit eutils multilib pax-utils subversion toolchain-funcs
 
 DESCRIPTION="Google's open source JavaScript engine"
 HOMEPAGE="http://code.google.com/p/v8"
@@ -18,66 +18,64 @@ IUSE="readline"
 RDEPEND="readline? ( >=sys-libs/readline-6.1 )"
 DEPEND="${RDEPEND}"
 
-pkg_setup() {
-       tc-export AR CC CXX RANLIB
-
-       # Make the build respect LDFLAGS.
-       export LINKFLAGS="${LDFLAGS}"
-}
-
-src_prepare() {
-       # Stop -Werror from breaking the build.
-       epatch "${FILESDIR}"/${PN}-no-werror-r0.patch
-
-       # Respect the user's CFLAGS, including the optimization level.
-       epatch "${FILESDIR}"/${PN}-no-O3-r0.patch
-}
-
-src_configure() {
-       # GCC issues multiple warnings about strict-aliasing issues in v8 code.
-       append-flags -fno-strict-aliasing
+src_unpack() {
+       subversion_src_unpack
+       cd "${S}"
+       make dependencies || die
 }
 
 src_compile() {
-       local myconf="library=shared importenv=LINKFLAGS,PATH"
+       tc-export AR CC CXX RANLIB
+       export LINK="${CXX}"
 
        # Use target arch detection logic from bug #354601.
        case ${CHOST} in
-               i?86-*) myarch=x86 ;;
+               i?86-*) myarch=ia32 ;;
                x86_64-*)
-                       if [[ $ABI = "" ]] ; then
-                               myarch=amd64
+                       if [[ $ABI = x86 ]] ; then
+                               myarch=ia32
                        else
-                               myarch="$ABI"
+                               myarch=x64
                        fi ;;
                arm*-*) myarch=arm ;;
                *) die "Unrecognized CHOST: ${CHOST}"
        esac
+       mytarget=${myarch}.release
 
-       if [[ $myarch = amd64 ]] ; then
-               myconf+=" arch=x64"
-       elif [[ $myarch = x86 ]] ; then
-               myconf+=" arch=ia32"
-       elif [[ $myarch = arm ]] ; then
-               myconf+=" arch=arm"
+       console=""
+       if use readline; then
+               console="readline";
+       fi
+       if [[ ${PV} == "9999" ]]; then
+               soname_version="${PV}-${ESVN_WC_REVISION}"
        else
-               die "Failed to determine target arch, got '$myarch'."
+               soname_version="${PV}"
        fi
+       emake V=1 library=shared werror=no console=${console} soname_version=${soname_version} ${mytarget} || die
+       pax-mark m out/${mytarget}/{cctest,d8,shell} || die
+}
 
-       escons $(use_scons readline console readline dumb) ${myconf} || die
+src_test() {
+       tools/test-wrapper-gypbuild.py \
+               --arch-and-mode=${mytarget} \
+               --no-presubmit \
+               --progress=dots || die
 }
 
 src_install() {
        insinto /usr
        doins -r include || die
 
-       dolib libv8.so || die
+       dobin out/${mytarget}/d8 || die
 
-       dodoc AUTHORS ChangeLog || die
-}
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               install_name_tool \
+                       -id "${EPREFIX}"/usr/$(get_libdir)/libv8-${soname_version}$(get_libname) \
+                       out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname) || die
+       fi
+
+       dolib out/${mytarget}/lib.target/libv8-${soname_version}$(get_libname) || die
+       dosym libv8-${soname_version}$(get_libname) /usr/$(get_libdir)/libv8$(get_libname) || die
 
-pkg_postinst() {
-       einfo "The live ebuild does not use SONAME."
-       einfo "You must rebuild all packages depending on ${PN}"
-       einfo "to avoid ABI breakages."
+       dodoc AUTHORS ChangeLog || die
 }