Simplify unpacking.
authorVlastimil Babka <caster@gentoo.org>
Sat, 22 Oct 2011 23:52:37 +0000 (23:52 +0000)
committerVlastimil Babka <caster@gentoo.org>
Sat, 22 Oct 2011 23:52:37 +0000 (23:52 +0000)
Package-Manager: portage-2.2.0_alpha68/cvs/Linux x86_64

dev-java/sun-jdk/ChangeLog
dev-java/sun-jdk/sun-jdk-1.6.0.29.ebuild
dev-java/sun-jre-bin/ChangeLog
dev-java/sun-jre-bin/sun-jre-bin-1.6.0.29.ebuild

index 877292f76cdf5c426315adc5a5b318430e687d11..3b549a14f90cfbe828f5ece9b9c0e8a49b3187fa 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for dev-java/sun-jdk
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/ChangeLog,v 1.306 2011/10/22 22:59:59 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/ChangeLog,v 1.307 2011/10/22 23:50:32 caster Exp $
+
+  22 Oct 2011; Vlastimil Babka <caster@gentoo.org> sun-jdk-1.6.0.29.ebuild:
+  Simplify unpacking.
 
 *sun-jdk-1.6.0.29 (22 Oct 2011)
 
index fca540e68914b57a0ff7a774262a370279e23cbb..dfd9a30044b2be5136179acb62393beafa775dfd 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-java/sun-jdk/sun-jdk-1.6.0.29.ebuild,v 1.1 2011/10/22 22:59:59 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.6.0.29.ebuild,v 1.2 2011/10/22 23:50:32 caster Exp $
 
 EAPI="4"
 
@@ -62,42 +62,7 @@ pkg_nofetch() {
 }
 
 src_unpack() {
-       # Do a little voodoo to extract the distfile
-       # Find the ELF in the script
-       testExp=$(echo -e '\0105\0114\0106')
-       startAt=$(grep -aonm 1 ${testExp}  ${DISTDIR}/${A} | cut -d: -f1)
-       # Extract and run it
-       tail -n +${startAt} "${DISTDIR}"/${A} > install.sfx
-       chmod +x install.sfx
-       ./install.sfx >/dev/null || die
-       rm install.sfx
-
-       local packed_jars=(
-               jre/lib/deploy.jar
-               jre/lib/charsets.jar
-               jre/lib/javaws.jar
-               jre/lib/jsse.jar
-               jre/lib/ext/localedata.jar
-               jre/lib/plugin.jar
-               jre/lib/rt.jar
-               lib/tools.jar)
-
-       if [ -f "${S}"/bin/unpack200 ]; then
-                       UNPACK_CMD="${S}"/bin/unpack200
-                       chmod +x $UNPACK_CMD
-                       sed -i 's#/tmp/unpack.log#/dev/null\x00\x00\x00\x00\x00\x00#g' $UNPACK_CMD
-                       for i in "${packed_jars[@]}"; do
-                                       PACK_FILE=${S}/$(dirname $i)/$(basename $i .jar).pack
-                                       if [ -f ${PACK_FILE} ]; then
-                                                       echo "  unpacking: $i"
-                                                       $UNPACK_CMD ${PACK_FILE} "${S}"/$i || die "unpack failed"
-                                                       rm -f ${PACK_FILE} || die "rm ${PACK_FILE} failed"
-                                       fi
-                       done
-                       rm -f ${UNPACK_CMD} || die "rm ${UNPACK_CMD} failed"
-       else
-                       die "unpack not found"
-       fi
+       sh "${DISTDIR}"/${A} -noregister || die "Failed to unpack"
 }
 
 src_compile() {
@@ -111,11 +76,6 @@ src_compile() {
                "${S}"/bin/java -client -Xshare:dump || die
        fi
        "${S}"/bin/java -server -Xshare:dump || die
-
-       # Create files used as storage for system preferences.
-       mkdir jre/.systemPrefs || die
-       touch jre/.systemPrefs/.system.lock || die
-       touch jre/.systemPrefs/.systemRootModFile || die
 }
 
 src_install() {
index 985dd73e3ab392b5c6641b2162a3ef8eed1fe199..be2273049e3eecac67bfdf87e4727fd0f6643635 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for dev-java/sun-jre-bin
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jre-bin/ChangeLog,v 1.197 2011/10/22 23:26:08 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jre-bin/ChangeLog,v 1.198 2011/10/22 23:52:37 caster Exp $
+
+  22 Oct 2011; Vlastimil Babka <caster@gentoo.org> sun-jre-bin-1.6.0.29.ebuild:
+  Simplify unpacking.
 
 *sun-jre-bin-1.6.0.29 (22 Oct 2011)
 
index 0e118fe19b1bb0252f46fcda4f4d7c059fc85fb6..004ad754ed29c9e9e0072db0d8ffb5582a622f64 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-java/sun-jre-bin/sun-jre-bin-1.6.0.29.ebuild,v 1.1 2011/10/22 23:26:08 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jre-bin/sun-jre-bin-1.6.0.29.ebuild,v 1.2 2011/10/22 23:52:37 caster Exp $
 
 EAPI="4"
 
@@ -61,41 +61,7 @@ pkg_nofetch() {
 }
 
 src_unpack() {
-       # Do a little voodoo to extract the distfile
-       # Find the ELF in the script
-       testExp=$(echo -e '\0105\0114\0106')
-       startAt=$(grep -aonm 1 ${testExp}  ${DISTDIR}/${A} | cut -d: -f1)
-       # Extract and run it
-       tail -n +${startAt} "${DISTDIR}"/${A} > install.sfx
-       chmod +x install.sfx
-       ./install.sfx >/dev/null || die
-       rm install.sfx
-
-       local packed_jars=(
-               lib/deploy.jar
-               lib/charsets.jar
-               lib/javaws.jar
-               lib/jsse.jar
-               lib/ext/localedata.jar
-               lib/plugin.jar
-               lib/rt.jar)
-
-       if [ -f "${S}"/bin/unpack200 ]; then
-                       UNPACK_CMD="${S}"/bin/unpack200
-                       chmod +x $UNPACK_CMD
-                       sed -i 's#/tmp/unpack.log#/dev/null\x00\x00\x00\x00\x00\x00#g' $UNPACK_CMD
-                       for i in "${packed_jars[@]}"; do
-                                       PACK_FILE=${S}/$(dirname $i)/$(basename $i .jar).pack
-                                       if [ -f ${PACK_FILE} ]; then
-                                                       echo "  unpacking: $i"
-                                                       $UNPACK_CMD ${PACK_FILE} "${S}"/$i || die "unpack failed"
-                                                       rm -f ${PACK_FILE} || die "rm ${PACK_FILE} failed"
-                                       fi
-                       done
-                       rm -f ${UNPACK_CMD} || die "rm ${UNPACK_CMD} failed"
-       else
-                       die "unpack not found"
-       fi
+       sh "${DISTDIR}"/${A} -noregister || die "Failed to unpack"
 }
 
 src_compile() {
@@ -109,11 +75,6 @@ src_compile() {
                "${S}"/bin/java -client -Xshare:dump || die
        fi
        "${S}"/bin/java -server -Xshare:dump || die
-
-       # Create files used as storage for system preferences.
-       mkdir .systemPrefs || die
-       touch .systemPrefs/.system.lock || die
-       touch .systemPrefs/.systemRootModFile || die
 }
 
 src_install() {