From b0c13af36174a8ed751b578819f64ca9b512a08f Mon Sep 17 00:00:00 2001
From: Jacco Ligthart <jacco@redsleeve.org>
Date: Fri, 20 May 2016 16:13:17 +0200
Subject: [PATCH] redsleeve

---
 SOURCES/java-1.6.0-gnueabi.patch | 48 ++++++++++++++++++++++++++++++++++++++++
 SPECS/java-1.6.0-openjdk.spec    |  7 +++++-
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 SOURCES/java-1.6.0-gnueabi.patch

diff --git a/SOURCES/java-1.6.0-gnueabi.patch b/SOURCES/java-1.6.0-gnueabi.patch
new file mode 100644
index 0000000..c352cf6
--- /dev/null
+++ b/SOURCES/java-1.6.0-gnueabi.patch
@@ -0,0 +1,48 @@
+diff -ruN icedtea6-1.13.7-orig/acinclude.m4 icedtea6-1.13.7/acinclude.m4
+--- icedtea6-1.13.7-orig/acinclude.m4	2015-04-10 18:53:41.339878270 +0200
++++ icedtea6-1.13.7/acinclude.m4	2015-05-24 12:59:56.820694842 +0200
+@@ -1545,7 +1545,7 @@
+     ENABLE_SYSTEM_LCMS="${enableval}"
+   ],
+   [
+-    if test x"${ENABLE_LCMS2}" = "xyes" -a x"${target_os}" = "xlinux-gnu" ; then
++    if test x"${ENABLE_LCMS2}" = "xyes" -a x"${target_os}" = "xlinux-gnueabi" ; then
+       ENABLE_SYSTEM_LCMS="yes" ;
+     else
+       ENABLE_SYSTEM_LCMS="no" ;
+@@ -1575,7 +1575,7 @@
+     ENABLE_SYSTEM_ZLIB="${enableval}"
+   ],
+   [
+-    if test x"${target_os}" = "xlinux-gnu"; then
++    if test x"${target_os}" = "xlinux-gnueabi"; then
+       ENABLE_SYSTEM_ZLIB="yes" ;
+     else
+       ENABLE_SYSTEM_ZLIB="no" ;
+@@ -1606,7 +1606,7 @@
+     ENABLE_SYSTEM_JPEG="${enableval}"
+   ],
+   [
+-    if test x"${target_os}" = "xlinux-gnu"; then
++    if test x"${target_os}" = "xlinux-gnueabi"; then
+       ENABLE_SYSTEM_JPEG="yes" ;
+     else
+       ENABLE_SYSTEM_JPEG="no" ;
+@@ -1635,7 +1635,7 @@
+     ENABLE_SYSTEM_PNG="${enableval}"
+   ],
+   [
+-    if test x"${target_os}" = "xlinux-gnu"; then
++    if test x"${target_os}" = "xlinux-gnueabi"; then
+       ENABLE_SYSTEM_PNG="yes" ;
+     else
+       ENABLE_SYSTEM_PNG="no" ;
+@@ -1665,7 +1665,7 @@
+     ENABLE_SYSTEM_GIF="${enableval}"
+   ],
+   [
+-    if test x"${target_os}" = "xlinux-gnu"; then
++    if test x"${target_os}" = "xlinux-gnueabi"; then
+       ENABLE_SYSTEM_GIF="yes" ;
+     else
+       ENABLE_SYSTEM_GIF="no" ;
diff --git a/SPECS/java-1.6.0-openjdk.spec b/SPECS/java-1.6.0-openjdk.spec
index 477fcc4..d6fc77d 100644
--- a/SPECS/java-1.6.0-openjdk.spec
+++ b/SPECS/java-1.6.0-openjdk.spec
@@ -162,7 +162,7 @@
 
 Name:    java-%{javaver}-%{origin}
 Version: %{javaver}.%{buildver}
-Release: %{icedteaver}.0%{?dist}
+Release: %{icedteaver}.0%{?dist}.redsleeve
 # 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
@@ -204,6 +204,7 @@ Patch6:   %{name}-debuginfo.patch
 Patch7:  no_pr2125.patch
 # This is a RHEL-specific patch to embed RHEL-specific paths
 Patch10:  add-final-location-rpaths.patch
+Patch10001: java-1.6.0-gnueabi.patch
 
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -364,6 +365,7 @@ The OpenJDK API documentation.
 %patch0
 %patch7 -p1
 %patch10 -p1
+%patch10001 -p1
 
 cp %{SOURCE4} .
 
@@ -885,6 +887,9 @@ exit 0
 %doc %{_javadocdir}/%{name}
 
 %changelog
+* Fri May 20 2016 Jacco Ligthart <jacco@redsleeve.org> - 1:1.6.0.39-1.13.11.0.redsleeve
+- changed target_os checks from linux-gnu to linux-gnueabi for arm build
+
 * Wed May 04 2016 Andrew Hughes <gnu.andrew@redhat.com> - 1:1.6.0.39-1.13.11.0
 - Update to IcedTea 1.13.11 & OpenJDK 6 b39.
 - Resolves: rhbz#1325432
-- 
1.8.3.1

