/hg/icedtea6: PR3142: Don't assume system mime.types supports te...

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Mon Aug 15 19:10:39 UTC 2016


changeset 2b2efb516e5a in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=2b2efb516e5a
author: Andrew John Hughes <gnu.andrew at redhat.com>
date: Mon Aug 15 20:13:54 2016 +0100

	PR3142: Don't assume system mime.types supports text/x-java-source

	2016-07-27  Andrew John Hughes  <gnu.andrew at member.fsf.org>

		PR3142: Don't assume system mime.types
		supports text/x-java-source
		* Makefile.am:
		(check-mimetype): Make second test depend
		on JAVA_SOURCE_SUPPORTED conditional,
		not MIME_TYPES_FILE_FOUND.
		* NEWS: Updated.
		* acinclude.m4:
		(IT_CHECK_FOR_MIME_TYPES): Check if the
		system mime types file supports text/x-java-source.


diffstat:

 ChangeLog    |  13 +++++++++++++
 Makefile.am  |   2 +-
 NEWS         |   1 +
 acinclude.m4 |  11 ++++++++++-
 4 files changed, 25 insertions(+), 2 deletions(-)

diffs (66 lines):

diff -r 6ea26782250d -r 2b2efb516e5a ChangeLog
--- a/ChangeLog	Mon Aug 15 16:52:53 2016 +0100
+++ b/ChangeLog	Mon Aug 15 20:13:54 2016 +0100
@@ -1,3 +1,16 @@
+2016-07-27  Andrew John Hughes  <gnu.andrew at member.fsf.org>
+
+	PR3142: Don't assume system mime.types
+	supports text/x-java-source
+	* Makefile.am:
+	(check-mimetype): Make second test depend
+	on JAVA_SOURCE_SUPPORTED conditional,
+	not MIME_TYPES_FILE_FOUND.
+	* NEWS: Updated.
+	* acinclude.m4:
+	(IT_CHECK_FOR_MIME_TYPES): Check if the
+	system mime types file supports text/x-java-source.
+
 2016-08-14  Andrew John Hughes  <gnu.andrew at member.fsf.org>
 
 	PR3140: Pass $(CC) and $(CXX) to OpenJDK build
diff -r 6ea26782250d -r 2b2efb516e5a Makefile.am
--- a/Makefile.am	Mon Aug 15 16:52:53 2016 +0100
+++ b/Makefile.am	Mon Aug 15 20:13:54 2016 +0100
@@ -2934,7 +2934,7 @@
 	    exit -1; \
 	  fi ; \
 	fi
-if MIME_TYPES_FILE_FOUND
+if JAVA_SOURCE_SUPPORTED
 	if [ -e $(BUILD_SDK_DIR)/bin/java ] ; then \
 	  expected="text/x-java-source" ; \
 	  java=$$($(BUILD_SDK_DIR)/bin/java -cp $(MIME_TYPE_CHECK_BUILD_DIR) RH1195203 \
diff -r 6ea26782250d -r 2b2efb516e5a NEWS
--- a/NEWS	Mon Aug 15 16:52:53 2016 +0100
+++ b/NEWS	Mon Aug 15 20:13:54 2016 +0100
@@ -48,6 +48,7 @@
   - PR3137: GTKLookAndFeel does not honor gtk-alternative-button-order
   - PR3139: Update documentation
   - PR3140: Pass $(CC) and $(CXX) to OpenJDK build
+  - PR3142: Don't assume system mime.types supports text/x-java-source
 
 New in release 1.13.11 (2016-05-05):
 
diff -r 6ea26782250d -r 2b2efb516e5a acinclude.m4
--- a/acinclude.m4	Mon Aug 15 16:52:53 2016 +0100
+++ b/acinclude.m4	Mon Aug 15 20:13:54 2016 +0100
@@ -2489,9 +2489,18 @@
      mime_types_file_found=no
   fi
   AC_MSG_RESULT([$mime_types_file_found])
-  if test "x${mime_types_file_found}" = "xno"; then
+  if test "x${mime_types_file_found}" = "xyes"; then
+    AC_MSG_CHECKING([if ${MIME_TYPES_FILE} has text/x-java-source])
+    if grep '^text/x-java-source' ${MIME_TYPES_FILE} >&AS_MESSAGE_LOG_FD ; then
+      java_source_supported=yes
+    else
+      java_source_supported=no
+    fi
+    AC_MSG_RESULT([$java_source_supported])
+  else
     AC_MSG_WARN([No system MIME types file found.])
   fi
   AC_SUBST([MIME_TYPES_FILE])
   AM_CONDITIONAL(MIME_TYPES_FILE_FOUND, test "x${mime_types_file_found}" = "xyes")
+  AM_CONDITIONAL(JAVA_SOURCE_SUPPORTED, test "x${java_source_supported}" = "xyes")    
 ])


More information about the distro-pkg-dev mailing list