diff options
author | Christian Faulhammer <opfer@gentoo.org> | 2008-01-11 11:43:34 +0000 |
---|---|---|
committer | Christian Faulhammer <opfer@gentoo.org> | 2008-01-11 11:43:34 +0000 |
commit | 007403f426fcd1ba8d58a149c9d3d4e5d6b622cd (patch) | |
tree | 3c947a04efddd753eeb1facc5e43f9ff2e14183a /net-im/ejabberd | |
parent | Fixed the patch when building with USE=-ssl, dropped ppc (bug #199206) (diff) | |
download | gentoo-2-007403f426fcd1ba8d58a149c9d3d4e5d6b622cd.tar.gz gentoo-2-007403f426fcd1ba8d58a149c9d3d4e5d6b622cd.tar.bz2 gentoo-2-007403f426fcd1ba8d58a149c9d3d4e5d6b622cd.zip |
make ejabberd compile with Erlang 12B, patch take from Debian, reported in bug 202114 by Conrad Kostecki <ConiKost AT gmx DOT de>, thanks to Anton Romanov <theli AT ukr DOT net>
(Portage version: 2.1.3.19)
Diffstat (limited to 'net-im/ejabberd')
-rw-r--r-- | net-im/ejabberd/ChangeLog | 12 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-1.1.4-r1.ebuild | 136 | ||||
-rw-r--r-- | net-im/ejabberd/files/digest-ejabberd-1.1.4-r1 | 3 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-1.1.4-erlang-12.patch | 131 |
4 files changed, 280 insertions, 2 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog index 9772557e8050..966905de6565 100644 --- a/net-im/ejabberd/ChangeLog +++ b/net-im/ejabberd/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-im/ejabberd -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.26 2007/12/08 16:49:47 ulm Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.27 2008/01/11 11:43:33 opfer Exp $ + +*ejabberd-1.1.4-r1 (11 Jan 2008) + + 11 Jan 2008; Christian Faulhammer <opfer@gentoo.org> + +files/ejabberd-1.1.4-erlang-12.patch, +ejabberd-1.1.4-r1.ebuild: + make ejabberd compile with Erlang 12B, patch take from Debian, reported in + bug 202114 by Conrad Kostecki <ConiKost AT gmx DOT de>, thanks to Anton + Romanov <theli AT ukr DOT net> 08 Dec 2007; Ulrich Mueller <ulm@gentoo.org> +files/ejabberd-1.1.1-r1.initd, +files/ejabberd-1.1.1.confd: diff --git a/net-im/ejabberd/ejabberd-1.1.4-r1.ebuild b/net-im/ejabberd/ejabberd-1.1.4-r1.ebuild new file mode 100644 index 000000000000..9ba1d568ee9e --- /dev/null +++ b/net-im/ejabberd/ejabberd-1.1.4-r1.ebuild @@ -0,0 +1,136 @@ +x# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-1.1.4-r1.ebuild,v 1.1 2008/01/11 11:43:33 opfer Exp $ + +inherit eutils multilib + +JABBER_ETC="/etc/jabber" +JABBER_RUN="/var/run/jabber" +JABBER_SPOOL="/var/spool/jabber" +JABBER_LOG="/var/log/jabber" + +DESCRIPTION="The Erlang Jabber Daemon" +HOMEPAGE="http://ejabberd.jabber.ru/" +SRC_URI="http://process-one.net/en/projects/${PN}/download/${PV}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc ssl web zlib" + +DEPEND=">=net-im/jabber-base-0.01 + >=dev-libs/expat-1.95 + >=dev-lang/erlang-10.2.0 + odbc? ( dev-db/unixODBC ) + ldap? ( =net-nds/openldap-2* ) + ssl? ( >=dev-libs/openssl-0.9.8e ) + zlib? ( sys-libs/zlib )" + +PROVIDE="virtual/jabber-server" +S=${WORKDIR}/${P}/src + +src_unpack() { + unpack ${A} + cd "${S}" + + # Bug #171427 + epatch "${FILESDIR}/${PV}-missing-declaration.patch" + # Bug 202114 + epatch "${FILESDIR}/${P}-erlang-12.patch" +} + +src_compile() { + econf \ + $(use_enable mod_irc) \ + $(use_enable ldap eldap) \ + $(use_enable mod_muc) \ + $(use_enable mod_pubsub) \ + $(use_enable ssl tls) \ + $(use_enable web) \ + $(use_enable odbc) \ + $(use_enable zlib ejabberd_zlib) \ + || die "econf failed" + + if useq debug; then + emake ejabberd_debug=true || die "compiling ejabberd core failed" + else + emake || die "compiling ejabberd core failed" + fi +} + +src_install() { + make \ + DESTDIR="${D}" \ + EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \ + ETCDIR="${D}${JABBER_ETC}" \ + LOGDIR="${D}${JABBER_LOG}" \ + install \ + || die "install failed" + + chown -R jabber:jabber "${D}${JABBER_ETC}" + chown -R jabber:jabber "${D}${JABBER_LOG}" + chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}" + + insinto /usr/share/doc/${PF} + dohtml doc/*.{html,png} + + # + # Create /usr/bin/ejabberd + # + cat <<EOF > "${T}/ejabberd" +#!/bin/bash + +erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\ + ${pa} \\ + -sname ejabberd \\ + -s ejabberd \\ + -ejabberd config \"${JABBER_ETC}/ejabberd.cfg\" \\ + log_path \"${JABBER_LOG}/ejabberd.log\" \\ + -kernel inetrc \"${JABBER_ETC}/inetrc\" \\ + -sasl sasl_error_logger \{file,\"${JABBER_LOG}/sasl.log\"\} \\ + -mnesia dir \"${JABBER_SPOOL}\" \\ + \$@ +EOF + + # + # Create /usr/bin/ejabberdctl + # + cat <<EOF > "${T}/ejabberdctl" +#!/bin/sh + +exec env HOME=${JABBER_RUN} \\ + erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\ + ${pa} \\ + -noinput \\ + -sname ejabberdctl \\ + -s ejabberd_ctl \\ + -extra \$@ +EOF + + dobin "${T}/ejabberdctl" + dobin "${T}/ejabberd" + + newinitd "${FILESDIR}/${P}.initd" ${PN} + newconfd "${FILESDIR}/ejabberd-1.1.3.confd" ${PN} + + insinto ${JABBER_ETC} + doins "${FILESDIR}/inetrc" + if useq ssl ; then + doins "${FILESDIR}/ssl.cnf" + newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh + fi +} + +pkg_postinst() { + elog "For configuration instructions, please see /usr/share/doc/${PF}/html/guide.html" + elog "or the online version at http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html" + echo + if useq ssl ; then + if [ ! -e /etc/jabber/ssl.pem ]; then + elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh" + elog "Ejabberd may refuse to start without an SSL certificate" + fi + fi + if ! useq web ; then + elog "The web USE flag is off, this has disabled the web admin interface." + fi +} diff --git a/net-im/ejabberd/files/digest-ejabberd-1.1.4-r1 b/net-im/ejabberd/files/digest-ejabberd-1.1.4-r1 new file mode 100644 index 000000000000..630fbfdaaade --- /dev/null +++ b/net-im/ejabberd/files/digest-ejabberd-1.1.4-r1 @@ -0,0 +1,3 @@ +MD5 65e9cd346f11a28afbacfe1d7be3a33b ejabberd-1.1.4.tar.gz 846059 +RMD160 4c72548129b0196ff0096bd85936e0750fc4d7be ejabberd-1.1.4.tar.gz 846059 +SHA256 dcd61b72c522eee77ab56227b16d75fd5741efe2b9b9a8a1d3ed7eefc2a7e4f6 ejabberd-1.1.4.tar.gz 846059 diff --git a/net-im/ejabberd/files/ejabberd-1.1.4-erlang-12.patch b/net-im/ejabberd/files/ejabberd-1.1.4-erlang-12.patch new file mode 100644 index 000000000000..b6976c370c69 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd-1.1.4-erlang-12.patch @@ -0,0 +1,131 @@ +Patch by Sergei Golovan fixes building ejabberd with erlang R12B-0. + +Index: ejabberd-1.1.4/src/ejabberd_s2s_in.erl +=================================================================== +--- ejabberd-1.1.4.orig/src/ejabberd_s2s_in.erl ++++ ejabberd-1.1.4/src/ejabberd_s2s_in.erl +@@ -30,8 +30,12 @@ + + -include("ejabberd.hrl"). + -include("jlib.hrl"). ++-ifdef(SSL39). ++-include_lib("ssl/include/ssl_pkix.hrl"). ++-else. + -include_lib("ssl/include/PKIX1Explicit88.hrl"). + -include_lib("ssl/include/PKIX1Implicit88.hrl"). ++-endif. + -include("XmppAddr.hrl"). + + -define(DICT, dict). +--- ejabberd-1.1.4.orig/src/configure ++++ ejabberd-1.1.4/src/configure +@@ -648,6 +648,7 @@ + ERLC + ERL + ERLANG_CFLAGS ++ERLANG_SSL39 + ERLANG_LIBS + LIBICONV + CPP +@@ -2865,14 +2866,21 @@ + -author('alexey@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 ++ RootDirS)), ++ file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ 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), +@@ -2927,6 +2935,8 @@ + # 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` + + ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include" +@@ -6205,6 +6215,7 @@ + ERL!$ERL$ac_delim + ERLANG_CFLAGS!$ERLANG_CFLAGS$ac_delim + ERLANG_LIBS!$ERLANG_LIBS$ac_delim ++ERLANG_SSL39!$ERLANG_SSL39$ac_delim + LIBICONV!$LIBICONV$ac_delim + CPP!$CPP$ac_delim + GREP!$GREP$ac_delim +@@ -6238,7 +6248,7 @@ + LTLIBOBJS!$LTLIBOBJS$ac_delim + _ACEOF + +- if test `grep -c "$ac_delim\$" conf$$subs.sed` = 79; then ++ if test `grep -c "$ac_delim\$" conf$$subs.sed` = 80; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +--- ejabberd-1.1.4.orig/src/Makefile.in ++++ ejabberd-1.1.4/src/Makefile.in +@@ -12,6 +12,8 @@ + EXPAT_LIBS = @EXPAT_LIBS@ + ERLANG_LIBS = @ERLANG_LIBS@ + ++ERLC_FLAGS += @ERLANG_SSL39@ ++ + # make debug=true to compile Erlang module with debug informations. + ifdef debug + ERLC_FLAGS+=+debug_info +--- ejabberd-1.1.4.orig/src/aclocal.m4 ++++ ejabberd-1.1.4/src/aclocal.m4 +@@ -79,14 +79,21 @@ + -author('alexey@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 ++ RootDirS)), ++ file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ 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), +@@ -135,6 +142,8 @@ + # 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` + + ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include" +@@ -142,6 +151,7 @@ + + AC_SUBST(ERLANG_CFLAGS) + AC_SUBST(ERLANG_LIBS) ++ AC_SUBST(ERLANG_SSL39) + AC_SUBST(ERLC) + AC_SUBST(ERL) + ]) |