Mercurial > hg > release > icedtea6-1.9
changeset 2341:e2551d3f64fd
Patch which ensures, that only one fontconfig file will be needed on particular RHEL version.
author | ptisnovs |
---|---|
date | Fri, 10 Jun 2011 12:39:55 +0200 |
parents | 1a6e87733ff1 |
children | 814d75534db9 |
files | ChangeLog Makefile.am patches/fonts-rhel-version.patch |
diffstat | 3 files changed, 43 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jun 08 18:15:14 2011 +0100 +++ b/ChangeLog Fri Jun 10 12:39:55 2011 +0200 @@ -1,3 +1,11 @@ +2011-06-10 Pavel Tisnovsky <ptisnovs@redhat.com> + + * Makefile.am: Added new patch + * patches/fonts-rhel-version.patch: + Patch which ensures, that only one fontconfig file + will be needed on particular RHEL version + (ie. only one file for RHEL 6.0, RHEL 6.1 and RHEL 6.2) + 2011-06-08 Andrew John Hughes <ahughes@redhat.com> * NEWS: Add 1.9.9 section.
--- a/Makefile.am Wed Jun 08 18:15:14 2011 +0100 +++ b/Makefile.am Fri Jun 10 12:39:55 2011 +0200 @@ -351,7 +351,8 @@ patches/openjdk/6691503-malicious-applet-always-on-top.patch \ patches/jtreg-LastErrorString.patch \ patches/shark-llvm-2.9.patch \ - patches/mark_sun_toolkit_privileged_code.patch + patches/mark_sun_toolkit_privileged_code.patch \ + patches/fonts-rhel-version.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/fonts-rhel-version.patch Fri Jun 10 12:39:55 2011 +0200 @@ -0,0 +1,33 @@ +--- openjdk-orig/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java 2011-06-09 16:04:24.000000000 +0200 ++++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java 2011-06-09 16:04:24.000000000 +0200 +@@ -169,7 +169,9 @@ + osVersion = getVersionString(f); + } else if ((f = new File("/etc/redhat-release")).canRead()) { + osName = "RedHat"; +- osVersion = getVersionString(f); ++ // At this time we don't need to distinguish ++ // between RHEL 6.0 and RHEL 6.1 for example. ++ osVersion = getMajorVersionString(f); + } else if ((f = new File("/etc/turbolinux-release")).canRead()) { + osName = "Turbo"; + osVersion = getVersionString(f); +@@ -208,6 +210,19 @@ + return null; + } + ++ /** ++ * Gets the OS major version string from a Linux release-specific file. ++ */ ++ private String getMajorVersionString(File f){ ++ try { ++ Scanner sc = new Scanner(f); ++ return sc.findInLine("(\\d)+"); ++ } ++ catch (Exception e){ ++ } ++ return null; ++ } ++ + private static final String fontsDirPrefix = "$JRE_LIB_FONTS"; + + protected String mapFileName(String fileName) {