diff options
-rw-r--r-- | development/openjdk7/openjdk7.SlackBuild | 71 |
1 files changed, 34 insertions, 37 deletions
diff --git a/development/openjdk7/openjdk7.SlackBuild b/development/openjdk7/openjdk7.SlackBuild index 44c1f4a75d..b4775b46d8 100644 --- a/development/openjdk7/openjdk7.SlackBuild +++ b/development/openjdk7/openjdk7.SlackBuild @@ -23,40 +23,6 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -function createPatchedJdkArchive() { - - mkdir -p ${SBO_PATCH_DIR} && cd ${SBO_PATCH_DIR} - tar xvf "${CWD}/jdk.tar.bz2" - cd jdk-* - - cat << EOF | patch -d ./src/share/classes/sun/security/util Optional.java -diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/util/Optional.java openjdk-boot/jdk/src/share/classes/sun/security/util/Optional.java ---- openjdk-boot.orig/jdk/src/share/classes/sun/security/util/Optional.java 2019-10-20 11:57:14.258731932 +0300 -+++ openjdk-boot/jdk/src/share/classes/sun/security/util/Optional.java 2019-10-20 11:59:48.600721516 +0300 -@@ -193,7 +193,7 @@ - if (!isPresent()) - return empty(); - else { -- return Optional.ofNullable(mapper.apply(value)); -+ return (Optional<U>) Optional.ofNullable(mapper.apply(value)); - } - } - -EOF - -# Remove the sys/sysctl.h includes (they weren't being used anyway) - sed -i '/sys\/sysctl.h/d' src/solaris/native/java/net/PlainDatagramSocketImpl.c - sed -i '/sys\/sysctl.h/d' src/solaris/native/java/net/PlainSocketImpl.c - cd .. - tar -cvjSf jdk.tar.bz2 jdk-* -} - -function fixJdkArchiveChecksum() { - local newChecksum=$(sha256sum "${SBO_PATCH_DIR}/jdk.tar.bz2" | awk '{print $1}') - - sed -r -i "s/^(\s*JDK_SHA256SUM\s*=\s*).*$/\1${newChecksum}/" Makefile -} - cd $(dirname $0) ; CWD=$(pwd) PRGNAM=openjdk7 @@ -75,9 +41,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -108,6 +71,40 @@ fi BOOT_JAVA=/usr/lib${LIBDIRSUFFIX}/jvm +function createPatchedJdkArchive() { + + mkdir -p ${SBO_PATCH_DIR} && cd ${SBO_PATCH_DIR} + tar xvf "${CWD}/jdk.tar.bz2" + cd jdk-* + + cat << EOF | patch -d ./src/share/classes/sun/security/util Optional.java +diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/util/Optional.java openjdk-boot/jdk/src/share/classes/sun/security/util/Optional.java +--- openjdk-boot.orig/jdk/src/share/classes/sun/security/util/Optional.java 2019-10-20 11:57:14.258731932 +0300 ++++ openjdk-boot/jdk/src/share/classes/sun/security/util/Optional.java 2019-10-20 11:59:48.600721516 +0300 +@@ -193,7 +193,7 @@ + if (!isPresent()) + return empty(); + else { +- return Optional.ofNullable(mapper.apply(value)); ++ return (Optional<U>) Optional.ofNullable(mapper.apply(value)); + } + } + +EOF + +# Remove the sys/sysctl.h includes (they weren't being used anyway) + sed -i '/sys\/sysctl.h/d' src/solaris/native/java/net/PlainDatagramSocketImpl.c + sed -i '/sys\/sysctl.h/d' src/solaris/native/java/net/PlainSocketImpl.c + cd .. + tar -cvjSf jdk.tar.bz2 jdk-* +} + +function fixJdkArchiveChecksum() { + local newChecksum=$(sha256sum "${SBO_PATCH_DIR}/jdk.tar.bz2" | awk '{print $1}') + + sed -r -i "s/^(\s*JDK_SHA256SUM\s*=\s*).*$/\1${newChecksum}/" Makefile +} + set -e rm -rf $BUILD_DIR $PKG |