changeset 2813:2d4857a0d343

PR2499: Update remove-intree-libraries.sh script 2015-07-13 Andrew John Hughes <gnu_andrew@member.fsf.org> PR2499: Update remove-intree-libraries.sh script * NEWS: Updated. * acinclude.m4: (IT_ENABLE_SUNEC): Rename enable_sunec to ENABLE_SUNEC and substitute into autoconf generated files. * remove-intree-libraries.sh.in: Bump zlib version to 1.2.8. Update enablement tests following PR1661. Check that system library code exists first before deleting and fail if not.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Tue, 14 Jul 2015 01:56:21 +0100
parents 6f9dc8a83dd4
children 219bd49d5d66
files ChangeLog NEWS acinclude.m4 remove-intree-libraries.sh.in
diffstat 4 files changed, 52 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jul 14 00:51:24 2015 +0100
+++ b/ChangeLog	Tue Jul 14 01:56:21 2015 +0100
@@ -1,3 +1,16 @@
+2015-07-13  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	PR2499: Update remove-intree-libraries.sh script
+	* NEWS: Updated.
+	* acinclude.m4:
+	(IT_ENABLE_SUNEC): Rename enable_sunec to
+	ENABLE_SUNEC and substitute into autoconf
+	generated files.
+	* remove-intree-libraries.sh.in:
+	Bump zlib version to 1.2.8. Update enablement
+	tests following PR1661. Check that system library
+	code exists first before deleting and fail if not.
+
 2015-07-13  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	* NEWS: Add IcedTea issue to 8065238
--- a/NEWS	Tue Jul 14 00:51:24 2015 +0100
+++ b/NEWS	Tue Jul 14 01:56:21 2015 +0100
@@ -322,6 +322,7 @@
   - PR2458: Policy JAR files should be timestamped with the date of the policy file they hold
   - PR2482, RH489586, RH1236619: OpenJDK can't handle spaces in zone names in /etc/sysconfig/clock
   - PR2496: Enable system PCSC support by default
+  - PR2499: Update remove-intree-libraries.sh script
 * AArch64 port
   - Add copyright to aarch64_ad.m4
   - S8069593: Changes to JavaThread::_thread_state must use acquire and release
--- a/acinclude.m4	Tue Jul 14 00:51:24 2015 +0100
+++ b/acinclude.m4	Tue Jul 14 01:56:21 2015 +0100
@@ -2692,19 +2692,18 @@
   [
     case "${enableval}" in
       yes)
-        enable_sunec=yes
+        ENABLE_SUNEC=yes
         ;;
       *)
-        enable_sunec=no
+        ENABLE_SUNEC=no
         ;;
     esac
   ],
   [
-    enable_sunec=no
+    ENABLE_SUNEC=no
   ])
-  AC_MSG_RESULT([$enable_sunec])
-  AM_CONDITIONAL([ENABLE_SUNEC], test x"${enable_sunec}" = "xyes")
-  if test x"${enable_sunec}" = "xyes"; then
+  AC_MSG_RESULT([$ENABLE_SUNEC])
+  if test x"${ENABLE_SUNEC}" = "xyes"; then
     PKG_CHECK_MODULES(NSS_SOFTOKN, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes], [NSS_SOFTOKN_FOUND=no])
     PKG_CHECK_MODULES(NSS_JAVA, nss-java, [NSS_JAVA_FOUND=yes], [NSS_JAVA_FOUND=no])
     if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then
@@ -2719,6 +2718,8 @@
     AC_SUBST(SUNEC_CFLAGS)
     AC_SUBST(SUNEC_LIBS)
   fi
+  AM_CONDITIONAL([ENABLE_SUNEC], test x"${ENABLE_SUNEC}" = "xyes")
+  AC_SUBST(ENABLE_SUNEC)
 ])
 
 AC_DEFUN_ONCE([IT_CHECK_TOOLS_JAR_EXISTS],
--- a/remove-intree-libraries.sh.in	Tue Jul 14 00:51:24 2015 +0100
+++ b/remove-intree-libraries.sh.in	Tue Jul 14 01:56:21 2015 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-ZLIB_VERSION=1.2.3
+ZLIB_VERSION=1.2.8
 ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib-${ZLIB_VERSION}
 JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpeg-6b
 GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib
@@ -8,27 +8,47 @@
 LCMS_SRC=openjdk/jdk/src/share/native/sun/java2d/cmm/lcms
 PCSC_SRC=openjdk/jdk/src/solaris/native/sun/security/smartcardio/MUSCLE
 
-if test "x@ENABLE_SYSTEM_ZLIB@" = "xyes"; then
+if test "x@ENABLE_SYSTEM_ZLIB@" = "xtrue"; then
+  if [ ! -d ${ZIP_SRC} ]; then
+      echo "${ZIP_SRC} does not exist. Refusing to proceed."
+      exit -1;
+  fi
   echo "Removing zlib"
   rm -rvf ${ZIP_SRC}
 fi
 
-if test "x@ENABLE_SYSTEM_JPEG@" = "xyes"; then
+if test "x@ENABLE_SYSTEM_JPEG@" = "xtrue"; then
+  if [ ! -d ${JPEG_SRC} ]; then
+      echo "${JPEG_SRC} does not exist. Refusing to proceed."
+      exit -2;
+  fi
   echo "Removing libjpeg"
   rm -rvf ${JPEG_SRC}
 fi
 
-if test "x@ENABLE_SYSTEM_GIF@" = "xyes"; then
+if test "x@ENABLE_SYSTEM_GIF@" = "xtrue"; then
+  if [ ! -d ${GIF_SRC} ]; then
+      echo "${GIF_SRC} does not exist. Refusing to proceed."
+      exit -3;
+  fi
   echo "Removing giflib"
   rm -rvf ${GIF_SRC}
 fi
 
-if test "x@ENABLE_SYSTEM_PNG@" = "xyes"; then
+if test "x@ENABLE_SYSTEM_PNG@" = "xtrue"; then
+  if [ ! -d ${PNG_SRC} ]; then
+      echo "${PNG_SRC} does not exist. Refusing to proceed."
+      exit -4;
+  fi
   echo "Removing libpng"
   rm -rvf ${PNG_SRC}
 fi
 
-if test "x@ENABLE_SYSTEM_LCMS@" = "xyes"; then
+if test "x@ENABLE_SYSTEM_LCMS@" = "xtrue"; then
+  if [ ! -f ${LCMS_SRC}/cmscam02.c ]; then
+      echo "${LCMS_SRC}/cmscam02.c does not exist. Refusing to proceed."
+      exit -5;
+  fi
   echo "Removing lcms"
   rm -vf ${LCMS_SRC}/cmscam02.c
   rm -vf ${LCMS_SRC}/cmscgats.c
@@ -59,7 +79,11 @@
   rm -vf ${LCMS_SRC}/lcms2_plugin.h
 fi
 
-if test "x@ENABLE_SYSTEM_PCSC@" = "xyes"; then
+if test "x@ENABLE_SYSTEM_PCSC@" = "xtrue"; then
+  if [ ! -d ${PCSC_SRC} ]; then
+      echo "${PCSC_SRC} does not exist. Refusing to proceed."
+      exit -6;
+  fi
   echo "Removing libpcsc headers"
   rm -rvf ${PCSC_SRC}
 fi