summaryrefslogtreecommitdiffstats
path: root/development/openjdk7
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2022-03-12 12:50:43 -0500
committer B. Watson <yalhcru@gmail.com>2022-03-12 12:50:43 -0500
commit8d48f8269c4612bb955341884145554be618f828 (patch)
tree77d7e7278d67f85f5eaec21e1ac3e802cb23716e /development/openjdk7
parentada647d46c382633242f30f6931013c63647c03c (diff)
downloadslackbuilds-8d48f8269c4612bb955341884145554be618f828.tar.gz
slackbuilds-8d48f8269c4612bb955341884145554be618f828.tar.xz
development/openjdk7: Move template preamble to top of script.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'development/openjdk7')
-rw-r--r--development/openjdk7/openjdk7.SlackBuild71
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