Fix for building on EL6 for PPC64

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
Peter Lemenkov 2010-11-21 09:58:21 +03:00
commit f6c950e537
15 changed files with 105 additions and 35 deletions

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
otp_src_R14A.tar.gz
/otp_src_R14B.tar.gz
/otp_doc_html_R14B.tar.gz
/otp_doc_man_R14B.tar.gz

View file

@ -15,10 +15,10 @@ Group: Development/Languages
License: ERPL
URL: http://www.erlang.org
Source0: http://www.erlang.org/download/otp_src_%{upstream_ver}.tar.gz
#%if 0%{?el5}%{?el6}
Source1: http://erlang.org/download/otp_doc_html_R14B.tar.gz
Source2: http://erlang.org/download/otp_doc_man_R14B.tar.gz
#%endif
%if 0%{?el4}%{?el5}%{?el6}
Source1: http://erlang.org/download/otp_doc_html_%{upstream_ver}.tar.gz
Source2: http://erlang.org/download/otp_doc_man_%{upstream_ver}.tar.gz
%endif
# Fedora-specific
Patch1: otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
# Fedora-specific
@ -39,8 +39,10 @@ Patch9: otp-0009-Do-not-install-.bat-files-on-non-win32-machines.patch
Patch10: otp-0010-Do-not-install-VxWorks-specific-docs.patch
# Fedora-specific
Patch11: otp-0011-Do-not-install-erlang-sources.patch
# Will be proposed for inclusion into upstream
# Backported from upstream
Patch12: otp-0012-Fix-installation-of-example-file.patch
# Required for RHEL 5,6 for PowerPC only
Patch13: otp-0013-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel
@ -492,19 +494,15 @@ Summary: A library for accessing Java from Erlang
Group: Development/Languages
Requires: %{name}-erts = %{version}-%{release}
Obsoletes: %{name} < R13B-04.5
%if 0%{?el5}%{?el6}
%if 0%{?fedora}
BuildRequires: java-1.6.0-openjdk-devel
%else
%ifarch %{ix86} x86_64
BuildRequires: java-1.6.0-openjdk-devel
%else
%if 0%{?el5}
BuildRequires: java-1.4.2-gcj-compat-devel
%else
BuildRequires: java-1.5.0-gcj-devel
%endif
%endif
%else
BuildRequires: java-1.6.0-openjdk-devel
%endif
%description jinterface
Low level interface to Java.
@ -937,6 +935,11 @@ Erlang mode for XEmacs (source lisp files).
%patch10 -p1 -b .no_vxworks_specific
%patch11 -p1 -b .no_erlang_sources
%patch12 -p1 -b .install_example_file_properly
%if 0%{?el4}%{?el5}%{?el6}
%ifnarch %{ix86} x86_64
%patch13 -p1 -b .no_unicode_in_java-150-gcj_for_ppc
%endif
%endif
# remove shipped zlib sources
rm -f erts/emulator/zlib/*.[ch]
@ -1034,7 +1037,7 @@ install -m 0644 xemacs-erlang/*.elc "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlan
make DESTDIR=$RPM_BUILD_ROOT install
%if %{with doc}
%if 0%{?el5}%{?el6}
%if 0%{?el4}%{?el5}%{?el6}
# extract prebuilt docs and man-pages
tar xf %{SOURCE1} -C $RPM_BUILD_ROOT%{_libdir}/erlang
tar xf %{SOURCE2} -C $RPM_BUILD_ROOT%{_libdir}/erlang

View file

@ -1,7 +1,7 @@
From 21cd120e8c44f65a53b9aa1ba676df53592c5ec7 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 25 Feb 2010 16:45:28 +0300
Subject: [PATCH 01/12] Do not format man-pages and do not install miscellaneous
Subject: [PATCH 01/13] Do not format man-pages and do not install miscellaneous
utilities for dealing with man-pages.
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
@ -45,5 +45,5 @@ index 7dead62..e522365 100644
-
exit 0
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From a2e70caa1cf05c1dd8038cda557de60f935d4d6b Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 25 Feb 2010 16:57:43 +0300
Subject: [PATCH 02/12] Remove rpath
Subject: [PATCH 02/13] Remove rpath
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -68,5 +68,5 @@ index 49a209f..5e6c74e 100644
SSL_CC_RUNTIME_LIBRARY_PATH=@SSL_CC_RUNTIME_LIBRARY_PATH@
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From 49170da856728f50c5e5eea9a062ee6cf9718cc3 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 16 Apr 2010 21:13:47 +0400
Subject: [PATCH 04/12] Fix for dlopening libGL and libGLU
Subject: [PATCH 04/13] Fix for dlopening libGL and libGLU
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -31,5 +31,5 @@ index 63dd68f..36bf15f 100644
#endif
// fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName);
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From 307ed0abc8e61a3b7b6af2e979b3a83d8ff81cce Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 18 Jun 2010 23:41:33 +0400
Subject: [PATCH 05/12] Do not install C sources
Subject: [PATCH 05/13] Do not install C sources
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -168,5 +168,5 @@ index 65a7f5f..144c1ba 100644
$(INSTALL_DIR) $(RELSYSDIR)/bin
$(INSTALL_PROGRAM) $(PROGS) $(RELSYSDIR)/bin
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From b893fff74eef26267652f2e58136ce31c508d1ad Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 19 Jun 2010 09:25:18 +0400
Subject: [PATCH 06/12] Do not install Java sources
Subject: [PATCH 06/13] Do not install Java sources
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -36,5 +36,5 @@ index d0ff9cd..9990d2b 100644
$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) $(RELSYSDIR)/priv
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From 71b4e3a73fff283fcf97bfd2f570a5b071a7ae40 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 19 Jun 2010 09:29:12 +0400
Subject: [PATCH 07/12] Do not install info files - they are almost empty and useless
Subject: [PATCH 07/13] Do not install info files - they are almost empty and useless
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -1955,5 +1955,5 @@ index 81d16ab..0000000
-group: comm
-short: Provides support for XML 1.0
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From 552623edb7fd3124d0a0e82304b744d77eddc69b Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 19 Jun 2010 09:59:39 +0400
Subject: [PATCH 08/12] Do not install nteventlog and related doc-files on non-win32 systems
Subject: [PATCH 08/13] Do not install nteventlog and related doc-files on non-win32 systems
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -64,5 +64,5 @@ index 9a75446..a492a63 100644
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
sed -e 's;%VSN%;$(VSN);' $< > $@
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From 5d52142fcfa2b4a776f80592ae0033e17628adb7 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 19 Jun 2010 10:25:29 +0400
Subject: [PATCH 09/12] Do not install *.bat files on non-win32 machines
Subject: [PATCH 09/13] Do not install *.bat files on non-win32 machines
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -51,5 +51,5 @@ index 56ab772..c29e912 100644
# ----------------------------------------------------
# FLAGS
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From 659867f485cea9959b7641bd0f83d290759a7170 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 19 Jun 2010 11:26:04 +0400
Subject: [PATCH 10/12] Do not install VxWorks-specific docs
Subject: [PATCH 10/13] Do not install VxWorks-specific docs
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -21,5 +21,5 @@ index be99288..4bb07c4 100644
erl_prim_loader.xml \
erlang.xml \
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From dcf186ea937a12d3aa28adc2431774bc56b43335 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 19 Jun 2010 13:21:10 +0400
Subject: [PATCH 11/12] Do not install erlang sources
Subject: [PATCH 11/13] Do not install erlang sources
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -1068,5 +1068,5 @@ index 7009b50..c9c7303 100644
$(INSTALL_DATA) $(HRL_FILES) $(RELSYSDIR)/include
--
1.7.2.3
1.7.3.2

View file

@ -1,7 +1,7 @@
From ef692abf68c739722e499f9a564eaa510306fdeb Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 16 Sep 2010 14:43:19 +0400
Subject: [PATCH 12/12] Fix installation of example file
Subject: [PATCH 12/13] Fix installation of example file
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@ -23,5 +23,5 @@ index fa5f2d0..c61d157 100644
$(INSTALL_DATA) $(HRL_FILES) $(RELSYSDIR)/include
$(INSTALL_DIR) $(RELSYSDIR)/ebin
--
1.7.2.3
1.7.3.2

View file

@ -0,0 +1,63 @@
From d3ad001ea7a026eb07528fe8bf27f605297f5555 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 21 Nov 2010 00:17:49 +0300
Subject: [PATCH 13/13] Ugly workaround for java-1.5.0-gcj which doesn't support UNICODE fully
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
.../com/ericsson/otp/erlang/OtpErlangList.java | 14 +-------------
.../com/ericsson/otp/erlang/OtpInputStream.java | 13 ++-----------
2 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
index 3456fd7..86cd411 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
@@ -389,19 +389,7 @@ public class OtpErlangList extends OtpErlangObject implements
*/
public String stringValue() throws OtpErlangException {
- if (! isProper()) {
- throw new OtpErlangException("Non-proper list: " + this);
- }
- final int[] values = new int[arity()];
- for (int i = 0; i < values.length; ++i) {
- final OtpErlangObject o = elementAt(i);
- if (! (o instanceof OtpErlangLong)) {
- throw new OtpErlangException("Non-integer term: " + o);
- }
- final OtpErlangLong l = (OtpErlangLong) o;
- values[i] = l.intValue();
- }
- return new String(values, 0, values.length);
+ throw new OtpErlangException("No UNICODE support in java-1.5.0-gcj");
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
index b9b4348..c11702c 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
@@ -1074,17 +1074,8 @@ public class OtpInputStream extends ByteArrayInputStream {
case OtpExternal.nilTag:
return "";
case OtpExternal.listTag: // List when unicode +
- len = read4BE();
- intbuf = new int[len];
- for (int i = 0; i < len; i++) {
- intbuf[i] = read_int();
- if (! OtpErlangString.isValidCodePoint(intbuf[i])) {
- throw new OtpErlangDecodeException
- ("Invalid CodePoint: " + intbuf[i]);
- }
- }
- read_nil();
- return new String(intbuf, 0, intbuf.length);
+ throw new OtpErlangDecodeException(
+ "No UNICODE support in java-1.5.0-gcj");
default:
throw new OtpErlangDecodeException(
"Wrong tag encountered, expected " + OtpExternal.stringTag
--
1.7.3.2

View file

@ -1 +1,3 @@
2294757773a0cf4c036f602fbb9fc4fb otp_doc_html_R14B.tar.gz
011530a24fbcc194be9bd01f779325a2 otp_doc_man_R14B.tar.gz
5292a04556d17ad528d570e02357dfbb otp_src_R14B.tar.gz