summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Vanek <jvanek@jvanek.redhat>2013-05-07 15:58:51 (GMT)
committerJiri Vanek <jvanek@jvanek.redhat>2013-05-07 15:58:51 (GMT)
commit4b2ee957df6866ce6c919448ce9d0e19ed21d1b2 (patch)
tree0b84488392635e3a0a4c72bcc121b7760fd77fe0
parent127c60755e51dad4654eaac861719528f80a55a9 (diff)
downloadjava-1.7.0-openjdk-4b2ee957df6866ce6c919448ce9d0e19ed21d1b2.zip
java-1.7.0-openjdk-4b2ee957df6866ce6c919448ce9d0e19ed21d1b2.tar.gz
java-1.7.0-openjdk-4b2ee957df6866ce6c919448ce9d0e19ed21d1b2.tar.xz
Fixed icons, openoffice and fonts layoout sizes
- added patch 401 657854-openjdk7.patch (see 947731) - fixed icons (see https://bugzilla.redhat.com/show_bug.cgi?id=820619) - added patch 402 gstackbounds.patch - see (RH902004)
-rw-r--r--657854-openjdk7.patch29
-rw-r--r--README.src4
-rw-r--r--gstackbounds.patch139
-rw-r--r--java-1.7.0-openjdk.spec17
-rw-r--r--sources4
5 files changed, 188 insertions, 5 deletions
diff --git a/657854-openjdk7.patch b/657854-openjdk7.patch
new file mode 100644
index 0000000..2f6b2f8
--- /dev/null
+++ b/657854-openjdk7.patch
@@ -0,0 +1,29 @@
+--- openjdk/jdk/src/share/native/sun/font/freetypeScaler.c
++++ openjdk/jdk/src/share/native/sun/font/freetypeScaler.c
+@@ -488,14 +488,15 @@
+
+ /**** Note: only some metrics are affected by styling ***/
+
++#define FT_MulFixFloatShift6(a, b) (((float) (a)) * ((float) (b)) / 65536.0 / 64.0)
+ /* ascent */
+ ax = 0;
+- ay = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
++ ay = -(jfloat) (FT_MulFixFloatShift6(
+ ((jlong) scalerInfo->face->ascender + bmodifier/2),
+ (jlong) scalerInfo->face->size->metrics.y_scale));
+ /* descent */
+ dx = 0;
+- dy = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
++ dy = -(jfloat) (FT_MulFixFloatShift6(
+ ((jlong) scalerInfo->face->descender + bmodifier/2),
+ (jlong) scalerInfo->face->size->metrics.y_scale));
+ /* baseline */
+@@ -503,7 +504,7 @@
+
+ /* leading */
+ lx = 0;
+- ly = (jfloat) FT26Dot6ToFloat(FT_MulFix(
++ ly = (jfloat) (FT_MulFixFloatShift6(
+ (jlong) scalerInfo->face->height + bmodifier,
+ (jlong) scalerInfo->face->size->metrics.y_scale))
+ + ay - dy;
diff --git a/README.src b/README.src
index eef0423..7a54b1b 100644
--- a/README.src
+++ b/README.src
@@ -1,2 +1,2 @@
-The java-1.6.0-openjdk-src subpackage contains the complete IcedTea
-class library source code for use by IDE indexers and debuggers.
+The java-1.7.0-openjdk-src subpackage contains the complete class library
+source code for use by IDE indexers and debuggers.
diff --git a/gstackbounds.patch b/gstackbounds.patch
new file mode 100644
index 0000000..a579dcd
--- /dev/null
+++ b/gstackbounds.patch
@@ -0,0 +1,139 @@
+diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -2763,39 +2763,47 @@
+ // writing thread stacks don't use growable mappings (i.e. those
+ // creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this
+ // only applies to the main thread.
+-
+-static
+-bool get_stack_bounds(uintptr_t *bottom, uintptr_t *top) {
+-
+- char buf[128];
+- int fd, sz;
+-
+- if ((fd = ::open("/proc/self/maps", O_RDONLY)) < 0) {
++static bool
++get_stack_bounds(uintptr_t *bottom, uintptr_t *top)
++{
++ FILE *f = fopen("/proc/self/maps", "r");
++ if (f == NULL)
+ return false;
+- }
+-
+- const char kw[] = "[stack]";
+- const int kwlen = sizeof(kw)-1;
+-
+- // Address part of /proc/self/maps couldn't be more than 128 bytes
+- while ((sz = os::get_line_chars(fd, buf, sizeof(buf))) > 0) {
+- if (sz > kwlen && ::memcmp(buf+sz-kwlen, kw, kwlen) == 0) {
+- // Extract addresses
+- if (sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) {
+- uintptr_t sp = (uintptr_t) __builtin_frame_address(0);
+- if (sp >= *bottom && sp <= *top) {
+- ::close(fd);
+- return true;
+- }
++
++ while (!feof(f)) {
++ size_t dummy;
++ char *str = NULL;
++ ssize_t len = getline(&str, &dummy, f);
++ if (len == -1) {
++ fclose(f);
++ if (str != NULL)
++ free(str);
++ return false;
++ }
++
++ if (len > 0 && str[len-1] == '\n') {
++ str[len-1] = 0;
++ len--;
++ }
++
++ static const char *stack_str = "[stack]";
++ if (len > (ssize_t)strlen(stack_str)
++ && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) {
++ if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) {
++ uintptr_t sp = (uintptr_t)__builtin_frame_address(0);
++ if (sp >= *bottom && sp <= *top) {
++ free(str);
++ fclose(f);
++ return true;
+ }
+- }
+- }
+-
+- ::close(fd);
++ }
++ }
++ free(str);
++ }
++ fclose(f);
+ return false;
+ }
+
+-
+ // If the (growable) stack mapping already extends beyond the point
+ // where we're going to put our guard pages, truncate the mapping at
+ // that point by munmap()ping it. This ensures that when we later
+diff --git a/src/share/vm/runtime/os.cpp b/src/share/vm/runtime/os.cpp
+--- openjdk/hotspot/src/share/vm/runtime/os.cpp
++++ openjdk/hotspot/src/share/vm/runtime/os.cpp
+@@ -1331,41 +1331,3 @@
+ }
+ return result;
+ }
+-
+-// Read file line by line, if line is longer than bsize,
+-// skip rest of line.
+-int os::get_line_chars(int fd, char* buf, const size_t bsize){
+- size_t sz, i = 0;
+-
+- // read until EOF, EOL or buf is full
+- while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-2) && buf[i] != '\n') {
+- ++i;
+- }
+-
+- if (buf[i] == '\n') {
+- // EOL reached so ignore EOL character and return
+-
+- buf[i] = 0;
+- return (int) i;
+- }
+-
+- buf[i+1] = 0;
+-
+- if (sz != 1) {
+- // EOF reached. if we read chars before EOF return them and
+- // return EOF on next call otherwise return EOF
+-
+- return (i == 0) ? -1 : (int) i;
+- }
+-
+- // line is longer than size of buf, skip to EOL
+- char ch;
+- while (read(fd, &ch, 1) == 1 && ch != '\n') {
+- // Do nothing
+- }
+-
+- // return initial part of line that fits in buf.
+- // If we reached EOF, it will be returned on next call.
+-
+- return (int) i;
+-}
+diff --git a/src/share/vm/runtime/os.hpp b/src/share/vm/runtime/os.hpp
+--- openjdk/hotspot/src/share/vm/runtime/os.hpp
++++ openjdk/hotspot/src/share/vm/runtime/os.hpp
+@@ -672,10 +672,6 @@
+ // Hook for os specific jvm options that we don't want to abort on seeing
+ static bool obsolete_option(const JavaVMOption *option);
+
+- // Read file line by line. If line is longer than bsize,
+- // rest of line is skipped. Returns number of bytes read or -1 on EOF
+- static int get_line_chars(int fd, char *buf, const size_t bsize);
+-
+ // Extensions
+ #include "runtime/os_ext.hpp"
+
+
diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index c917e9e..c6722be 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -149,7 +149,7 @@
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{buildver}
-Release: %{icedtea_version}.3%{?dist}
+Release: %{icedtea_version}.4%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@@ -404,6 +404,12 @@ Patch302: systemtap.patch
# Rhino support
Patch400: rhino-icedtea-2.1.1.patch
+#Workaround RH947731
+Patch401: 657854-openjdk7.patch
+#Workaround RH902004
+Patch402: gstackbounds.patch
+# End of tmp patches
+
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
@@ -728,6 +734,9 @@ patch -l -p0 < %{PATCH104}
patch -l -p0 < %{PATCH105}
%endif
+patch -l -p0 < %{PATCH401}
+patch -l -p0 < %{PATCH402}
+
# Build the re-written rhino jar
mkdir -p rhino/{old,new}
@@ -1060,6 +1069,7 @@ done
# Install desktop files.
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
for e in jconsole policytool ; do
+ sed -i "s/#ARCH#/%{_arch}/g" $e.desktop
desktop-file-install --vendor=%{name} --mode=644 \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
done
@@ -1414,6 +1424,11 @@ exit 0
%doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
%changelog
+* Tue May 07 2013 Jiri Vanek <jvanek@redhat.com> - 1.7.0.19-2.3.9.4.fc19
+- added patch 401 657854-openjdk7.patch (see 947731)
+- fixed icons (see https://bugzilla.redhat.com/show_bug.cgi?id=820619)
+- added patch 402 gstackbounds.patch - see (RH902004)
+
* Fri Apr 19 2013 Deepak Bhole <dbhole@redhat.com> - 1.7.0.19-2.3.9.3.fc18
- Updated 2.1.8 tarball
- Forcibly remove bfc file
diff --git a/sources b/sources
index c025a32..c59b641 100644
--- a/sources
+++ b/sources
@@ -1,8 +1,8 @@
ea344cc5b53b73f375558ba41760ff64 class-rewriter.tar.gz
-7df0a19525f26643d4cea3228fbbc6cc desktop-files.tar.gz
+200676ae97998b6f5bc18ff77e35d222 desktop-files.tar.gz
868ff2d4457d1a2dccfa465fb8220e1c generated-files.tar.gz
c12f124672a97c7491530fed2c0facdc java-access-bridge-1.23.0.tar.bz2
1cb61996cf5dbe80827abbe7d009bf28 pulseaudio.tar.gz
8eb5ad93dbf2f4fe86e52631969cfb09 systemtap-tapset.tar.gz
-c18d097a0c8b7c8884a0ac521f8a646e openjdk-icedtea-2.3.9.tar.gz
a6099b53d46caac65faa14342d1c0772 openjdk-icedtea-2.1.8.tar.gz
+c18d097a0c8b7c8884a0ac521f8a646e openjdk-icedtea-2.3.9.tar.gz