Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=97cf771b9101a55c562049623729966da533098d

commit 97cf771b9101a55c562049623729966da533098d
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Sun Jul 18 13:36:15 2010 +0200

ejabberd-2.1.4-2-i686

- backport two patches from git to build with erlang-14

diff --git 
a/source/network-extra/ejabberd/0001-Remove-workarounds-that-supported-R11-or-older-EJAB-.patch
 
b/source/network-extra/ejabberd/0001-Remove-workarounds-that-supported-R11-or-older-EJAB-.patch
new file mode 100644
index 0000000..53b50ab
--- /dev/null
+++ 
b/source/network-extra/ejabberd/0001-Remove-workarounds-that-supported-R11-or-older-EJAB-.patch
@@ -0,0 +1,174 @@
+From 6eb5b544b4665da56bb79100f22c4db97549b53b Mon Sep 17 00:00:00 2001
+From: Badlop <bad...@process-one.net>
+Date: Sat, 15 Aug 2009 20:10:49 +0000
+Subject: [PATCH] Remove workarounds that supported R11 or older 
(EJAB-446)(EJAB-628)(EJAB-997)
+
+SVN Revision: 2486
+---
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index dd728ce..a0d86fd 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -30,7 +30,7 @@ else
+   INIT_USER=$(INSTALLUSER)
+ endif
+
+-EFLAGS += @ERLANG_SSL39@ -pa .
++EFLAGS += -pa .
+
+ # make debug=true to compile Erlang module with debug informations.
+ ifdef debug
+diff --git a/src/aclocal.m4 b/src/aclocal.m4
+index 79b0e3e..cb8ffa1 100644
+--- a/src/aclocal.m4
++++ b/src/aclocal.m4
+@@ -121,21 +121,14 @@ AC_DEFUN(AM_WITH_ERLANG,
+ -author('ale...@sevcom.net').
+
+ -export([[start/0]]).
+--include_lib("ssl/include/ssl_pkix.hrl").
+
+ start() ->
+     EIDirS = code:lib_dir("erl_interface") ++ "\n",
+     EILibS =  libpath("erl_interface") ++ "\n",
+     RootDirS = code:root_dir() ++ "\n",
+-    file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ 
ssldef() ++ RootDirS)),
++    file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ 
RootDirS)),
+     halt().
+
+--[ifdef]('id-pkix').
+-ssldef() -> "-DSSL39\n".
+--else.
+-ssldef() -> "\n".
+--endif.
+-
+ %% return physical architecture based on OS/Processor
+ archname() ->
+     ArchStr = erlang:system_info(system_architecture),
+@@ -183,8 +176,6 @@ _EOF
+    ERLANG_EI_DIR=`cat conftest.out | head -n 1`
+    # Second line
+    ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
+-   # Third line
+-   ERLANG_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
+    # End line
+    ERLANG_DIR=`cat conftest.out | tail -n 1`
+
+@@ -193,7 +184,6 @@ _EOF
+
+    AC_SUBST(ERLANG_CFLAGS)
+    AC_SUBST(ERLANG_LIBS)
+-   AC_SUBST(ERLANG_SSL39)
+    AC_SUBST(ERLC)
+    AC_SUBST(ERL)
+ ])
+diff --git a/src/configure b/src/configure
+index a1a7cba..10dbe3d 100755
+--- a/src/configure
++++ b/src/configure
+@@ -644,7 +644,6 @@ EGREP
+ GREP
+ CPP
+ LIBICONV
+-ERLANG_SSL39
+ ERLANG_LIBS
+ ERLANG_CFLAGS
+ ERL
+@@ -3180,21 +3179,14 @@ fi
+ -author('ale...@sevcom.net').
+
+ -export([start/0]).
+--include_lib("ssl/include/ssl_pkix.hrl").
+
+ start() ->
+     EIDirS = code:lib_dir("erl_interface") ++ "\n",
+     EILibS =  libpath("erl_interface") ++ "\n",
+     RootDirS = code:root_dir() ++ "\n",
+-    file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ 
ssldef() ++ RootDirS)),
++    file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ 
RootDirS)),
+     halt().
+
+--ifdef('id-pkix').
+-ssldef() -> "-DSSL39\n".
+--else.
+-ssldef() -> "\n".
+--endif.
+-
+ %% return physical architecture based on OS/Processor
+ archname() ->
+     ArchStr = erlang:system_info(system_architecture),
+@@ -3242,8 +3234,6 @@ _EOF
+    ERLANG_EI_DIR=`cat conftest.out | head -n 1`
+    # Second line
+    ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
+-   # Third line
+-   ERLANG_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
+    # End line
+    ERLANG_DIR=`cat conftest.out | tail -n 1`
+
+diff --git a/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl
+index 9b37833..864b1e2 100644
+--- a/src/ejabberd_s2s_in.erl
++++ b/src/ejabberd_s2s_in.erl
+@@ -48,16 +48,9 @@
+
+ -include("ejabberd.hrl").
+ -include("jlib.hrl").
+--ifdef(SSL39).
+ -include_lib("ssl/include/ssl_pkix.hrl").
+ -define(PKIXEXPLICIT, 'OTP-PKIX').
+ -define(PKIXIMPLICIT, 'OTP-PKIX').
+--else.
+--include_lib("ssl/include/PKIX1Explicit88.hrl").
+--include_lib("ssl/include/PKIX1Implicit88.hrl").
+--define(PKIXEXPLICIT, 'PKIX1Explicit88').
+--define(PKIXIMPLICIT, 'PKIX1Implicit88').
+--endif.
+ -include("XmppAddr.hrl").
+
+ -define(DICT, dict).
+diff --git a/src/web/Makefile.in b/src/web/Makefile.in
+index 519314e..a5d019e 100644
+--- a/src/web/Makefile.in
++++ b/src/web/Makefile.in
+@@ -9,7 +9,6 @@ LIBS = @LIBS@
+ ERLANG_CFLAGS = @ERLANG_CFLAGS@
+ ERLANG_LIBS = @ERLANG_LIBS@
+
+-EFLAGS += @ERLANG_SSL39@
+ EFLAGS += -I ..
+ EFLAGS += -pz ..
+
+diff --git a/src/web/mod_http_fileserver.erl b/src/web/mod_http_fileserver.erl
+index 8399640..9e7c33c 100644
+--- a/src/web/mod_http_fileserver.erl
++++ b/src/web/mod_http_fileserver.erl
+@@ -66,12 +66,6 @@
+                 headers
+                }).
+
+--ifdef(SSL39).
+--define(STRING2LOWER, string).
+--else.
+--define(STRING2LOWER, httpd_util).
+--endif.
+-
+ -record(state, {host, docroot, accesslog, accesslogfd, directory_indices,
+                 custom_headers, default_content_type, content_types = []}).
+
+@@ -417,7 +411,7 @@ join([H | T], Separator) ->
+     lists:foldl(fun(E, Acc) -> lists:concat([Acc, Separator, E]) end, H, T).
+
+ content_type(Filename, DefaultContentType, ContentTypes) ->
+-    Extension = ?STRING2LOWER:to_lower(filename:extension(Filename)),
++    Extension = string:to_lower(filename:extension(Filename)),
+     case lists:keysearch(Extension, 1, ContentTypes) of
+         {value, {_, ContentType}} -> ContentType;
+         false                     -> DefaultContentType
+@@ -433,4 +427,4 @@ ip_to_string(Address) when size(Address) == 4 ->
+     join(tuple_to_list(Address), ".");
+ ip_to_string(Address) when size(Address) == 8 ->
+     Parts = lists:map(fun (Int) -> io_lib:format("~.16B", [Int]) end, 
tuple_to_list(Address)),
+-    ?STRING2LOWER:to_lower(lists:flatten(join(Parts, ":"))).
++    string:to_lower(lists:flatten(join(Parts, ":"))).
diff --git 
a/source/network-extra/ejabberd/0002-When-using-OTP-R14-use-public_key-library-instead-of.patch
 
b/source/network-extra/ejabberd/0002-When-using-OTP-R14-use-public_key-library-instead-of.patch
new file mode 100644
index 0000000..0f9ed52
--- /dev/null
+++ 
b/source/network-extra/ejabberd/0002-When-using-OTP-R14-use-public_key-library-instead-of.patch
@@ -0,0 +1,34 @@
+From f8412d7c5d62bde3c03b7a40734d74fbcebc8beb Mon Sep 17 00:00:00 2001
+From: Badlop <bad...@process-one.net>
+Date: Fri, 9 Jul 2010 20:18:59 +0200
+Subject: [PATCH] When using OTP R14, use public_key library instead of old ssl 
(EJAB-953)
+
+---
+
+diff -u b/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl
+--- b/src/ejabberd_s2s_in.erl
++++ b/src/ejabberd_s2s_in.erl
+@@ -48,9 +48,9 @@
+
+ -include("ejabberd.hrl").
+ -include("jlib.hrl").
+--include_lib("ssl/include/ssl_pkix.hrl").
+--define(PKIXEXPLICIT, 'OTP-PKIX').
+--define(PKIXIMPLICIT, 'OTP-PKIX').
++-include_lib("public_key/include/public_key.hrl").
++-define(PKIXEXPLICIT, 'OTP-PUB-KEY').
++-define(PKIXIMPLICIT, 'OTP-PUB-KEY').
+ -include("XmppAddr.hrl").
+
+ -define(DICT, dict).
+--- a/src/tls/tls.erl
++++ b/src/tls/tls.erl
+@@ -232,7 +232,7 @@ close(#tlssock{tcpsock = TCPSocket, tlsport = Port}) ->
+ get_peer_certificate(#tlssock{tlsport = Port}) ->
+     case port_control(Port, ?GET_PEER_CERTIFICATE, []) of
+       <<0, BCert/binary>> ->
+-          case catch ssl_pkix:decode_cert(BCert, [pkix]) of
++              case catch public_key:pkix_decode_cert(BCert, [pkix]) of
+               {ok, Cert} ->
+                   {ok, Cert};
+               _ ->
diff --git a/source/network-extra/ejabberd/FrugalBuild 
b/source/network-extra/ejabberd/FrugalBuild
index f756d96..7947960 100644
--- a/source/network-extra/ejabberd/FrugalBuild
+++ b/source/network-extra/ejabberd/FrugalBuild
@@ -3,26 +3,33 @@

pkgname=ejabberd
pkgver=2.1.4
-pkgrel=1
+pkgrel=2
pkgdesc="A free and open source instant messaging server written in Erlang."
url="http://ejabberd.jabber.ru/";
-depends=('erlang')
+depends=('erlang>=14A-2')
backup=(etc/ejabberd/ejabberd.cfg)
groups=('network-extra')
archs=('i686' 'x86_64')
_F_archive_grepv="beta\|rc"
up2date="Flasttar http://www.process-one.net/en/ejabberd/archive/";
source=(http://www.process-one.net/downloads/ejabberd/${pkgver%%_*}/ejabberd-$pkgver.tar.gz
 \
-       rc.ejabberd README.Frugalware)
+       rc.ejabberd README.Frugalware \
+       0001-Remove-workarounds-that-supported-R11-or-older-EJAB-.patch \
+       0002-When-using-OTP-R14-use-public_key-library-instead-of.patch)
sha1sums=('00b1b121f687ba8284dbeb40ff97915d9e1be355' \
'ac41a05fd1a21dcb6a4f1e104c185e82b5262d43' \
-          '016da166aa7527f148cb29d87eeca108424f1d2a')
+          '016da166aa7527f148cb29d87eeca108424f1d2a' \
+          '19bcb8458c99b27d0e878d0d2a6831b7ab23bb9e' \
+          'ea084f335cef3c0e16e418f3c10243fba9862297')

build()
{
unset MAKEFLAGS
-       Fcd $pkgname-${pkgver%%_*}/src
-       Fbuild --prefix=/
+       Fcd $pkgname-${pkgver%%_*}
+       Fpatchall
+       cd src
+       Fmake --prefix=/
+       Fmakeinstall
Fmkdir /var/spool/ejabberd /usr/
Fmv /var/lib /usr/
Fmv /sbin /usr
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to