diff options
Diffstat (limited to 'net-im/bitlbee')
-rw-r--r-- | net-im/bitlbee/Manifest | 1 | ||||
-rw-r--r-- | net-im/bitlbee/bitlbee-3.5.1.ebuild | 168 | ||||
-rw-r--r-- | net-im/bitlbee/bitlbee-3.6-r3.ebuild (renamed from net-im/bitlbee/bitlbee-3.6.ebuild) | 60 | ||||
-rw-r--r-- | net-im/bitlbee/bitlbee-9999.ebuild | 56 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee-3.5-libcheck.patch | 645 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee-3.5-libevent.patch | 71 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee-3.5-verbose-build.patch | 200 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee-3.6-disabled-plugins-use.patch | 55 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch | 99 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee.confd-r1 | 8 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee.initd-r1 | 30 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee.initd-r2 | 2 | ||||
-rw-r--r-- | net-im/bitlbee/metadata.xml | 16 |
13 files changed, 941 insertions, 470 deletions
diff --git a/net-im/bitlbee/Manifest b/net-im/bitlbee/Manifest index 89d1716f8e66..062d56d7000d 100644 --- a/net-im/bitlbee/Manifest +++ b/net-im/bitlbee/Manifest @@ -1,2 +1 @@ -DIST bitlbee-3.5.1.tar.gz 680351 BLAKE2B 952a12975d4f95020a5b577603aea791fca754006dc96af3c500d3885b6f2c50cabe51ab698625acb717524a729ef03d18a29aa25bd4815bae2f18fa6298aeea SHA512 4eb3b0d3a92910c8dd789cd23338cc6296bf40212c5244fcb27a88ede10e86424ea59c78e719841863701a7fdd8c61819f2775f7b58833e287d9110e49d036f3 DIST bitlbee-3.6.tar.gz 534961 BLAKE2B 007681a384fcb2c0736b901dfdc213ba0829ca006ad3204aca1bc4520a3874760867df6165a9218a9deeabb13bc06f118c9e2f804a97e671a348734f6cb7e963 SHA512 ccbf0f23e228de2de147241f36f59744b2256cba958e2fabfba0cfa60935e55bbb7d7e20fffa54da9a345e55ffa9ca82cb62e9b99dc738ba35c6e268c6561a8d diff --git a/net-im/bitlbee/bitlbee-3.5.1.ebuild b/net-im/bitlbee/bitlbee-3.5.1.ebuild deleted file mode 100644 index e1536d6244b4..000000000000 --- a/net-im/bitlbee/bitlbee-3.5.1.ebuild +++ /dev/null @@ -1,168 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit user systemd toolchain-funcs - -if [[ ${PV} == "9999" ]]; then - EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git" - inherit git-r3 -else - SRC_URI="https://get.bitlbee.org/src/${P}.tar.gz" - KEYWORDS="amd64 ppc ~ppc64 x86 ~x86-fbsd" -fi - -DESCRIPTION="irc to IM gateway that support multiple IM protocols" -HOMEPAGE="https://www.bitlbee.org/" - -LICENSE="GPL-2" -SLOT="0" -IUSE_PROTOCOLS="msn oscar purple twitter +xmpp" -IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd - ${IUSE_PROTOCOLS}" - -REQUIRED_USE=" - || ( purple xmpp msn oscar ) - xmpp? ( !nss ) - test? ( plugins ) -" - -COMMON_DEPEND=" - >=dev-libs/glib-2.16 - purple? ( net-im/pidgin ) - libevent? ( dev-libs/libevent:= ) - otr? ( >=net-libs/libotr-4 ) - gnutls? ( net-libs/gnutls:= ) - !gnutls? ( - nss? ( dev-libs/nss ) - !nss? ( - libressl? ( dev-libs/libressl:= ) - !libressl? ( dev-libs/openssl:0= ) - ) - ) -" -DEPEND="${COMMON_DEPEND} - virtual/pkgconfig - selinux? ( sec-policy/selinux-bitlbee ) - test? ( dev-libs/check )" - -RDEPEND="${COMMON_DEPEND} - virtual/logger - xinetd? ( sys-apps/xinetd )" - -pkg_setup() { - enewgroup bitlbee - enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee -} - -src_prepare() { - if [[ ${PV} != "9999" ]]; then - eapply \ - "${FILESDIR}"/${PN}-3.5-systemd-user.patch \ - "${FILESDIR}"/${PN}-3.5-verbose-build.patch - fi - - eapply_user -} - -src_configure() { - local myconf - - # setup plugins, protocol, ipv6 and debug - myconf+=( --jabber=$(usex xmpp 1 0) ) - for flag in debug ipv6 plugins ${IUSE_PROTOCOLS/+xmpp/} ; do - myconf+=( --${flag}=$(usex ${flag} 1 0) ) - done - - # set otr - if use otr && use plugins ; then - myconf+=( --otr=plugin ) - else - if use otr ; then - ewarn "OTR support has been disabled automatically because it" - ewarn "requires the plugins USE flag." - fi - myconf+=( --otr=0 ) - fi - - # setup ssl use flags - if use gnutls ; then - myconf+=( --ssl=gnutls ) - einfo "Using gnutls for SSL support" - else - ewarn "Only gnutls is officially supported by upstream." - if use nss ; then - myconf+=( --ssl=nss ) - einfo "Using nss for SSL support" - else - myconf+=( --ssl=openssl ) - einfo "Using openssl for SSL support" - fi - fi - - # set event handler - if use libevent ; then - myconf+=( --events=libevent ) - else - myconf+=( --events=glib ) - fi - - # not autotools-based - ./configure \ - --prefix=/usr \ - --datadir=/usr/share/bitlbee \ - --etcdir=/etc/bitlbee \ - --plugindir=/usr/$(get_libdir)/bitlbee \ - --systemdsystemunitdir=$(systemd_get_systemunitdir) \ - --doc=1 \ - --strip=0 \ - --verbose=1 \ - "${myconf[@]}" || die - - sed -i \ - -e "/^EFLAGS/s:=:&${LDFLAGS} :" \ - Makefile.settings || die -} - -src_compile() { - emake CC="$(tc-getCC)" LD="$(tc-getLD)" -} - -src_install() { - emake DESTDIR="${D}" install install-etc install-doc install-dev install-systemd - - keepdir /var/lib/bitlbee - fperms 700 /var/lib/bitlbee - fowners bitlbee:bitlbee /var/lib/bitlbee - - dodoc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} - - if use xinetd ; then - insinto /etc/xinetd.d - newins doc/bitlbee.xinetd bitlbee - fi - - newinitd "${FILESDIR}"/bitlbee.initd-r1 bitlbee - newconfd "${FILESDIR}"/bitlbee.confd-r1 bitlbee - - exeinto /usr/share/bitlbee - doexe utils/{convert_purple.py,bitlbee-ctl.pl} -} - -pkg_postinst() { - chown -R bitlbee:bitlbee "${ROOT}"/var/lib/bitlbee - [[ -d "${ROOT}"/var/run/bitlbee ]] && - chown -R bitlbee:bitlbee "${ROOT}"/var/run/bitlbee - - if [[ -z ${REPLACING_VERSIONS} ]]; then - einfo - elog "The bitlbee init script will now attempt to stop all processes owned by the" - elog "bitlbee user, including per-client forks." - elog - elog "Tell the init script not to touch anything besides the main bitlbee process" - elog "by changing the BITLBEE_STOP_ALL variable in" - elog " /etc/conf.d/bitlbee" - einfo - fi -} diff --git a/net-im/bitlbee/bitlbee-3.6.ebuild b/net-im/bitlbee/bitlbee-3.6-r3.ebuild index 1108861dd629..5978987e6e22 100644 --- a/net-im/bitlbee/bitlbee-3.6.ebuild +++ b/net-im/bitlbee/bitlbee-3.6-r3.ebuild @@ -1,16 +1,18 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit user systemd toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-any-r1 systemd toolchain-funcs if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git" inherit git-r3 else SRC_URI="https://get.bitlbee.org/src/${P}.tar.gz" - KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" + KEYWORDS="amd64 ~arm64 ppc ~ppc64 x86" fi DESCRIPTION="irc to IM gateway that support multiple IM protocols" @@ -18,19 +20,22 @@ HOMEPAGE="https://www.bitlbee.org/" LICENSE="GPL-2" SLOT="0" -IUSE_PROTOCOLS="msn oscar purple twitter +xmpp" -IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd +IUSE_PROTOCOLS="purple twitter +xmpp" +IUSE="debug +gnutls ipv6 libevent nss otr +plugins selinux test xinetd ${IUSE_PROTOCOLS}" RESTRICT="!test? ( test )" REQUIRED_USE=" - || ( purple xmpp msn oscar ) - xmpp? ( !nss ) - test? ( plugins ) + || ( purple xmpp ) + purple? ( plugins ) + test? ( xmpp ) " COMMON_DEPEND=" - >=dev-libs/glib-2.16 + acct-group/bitlbee + acct-user/bitlbee + dev-libs/glib:2 + dev-libs/json-parser:= purple? ( net-im/pidgin ) libevent? ( dev-libs/libevent:= ) otr? ( >=net-libs/libotr-4 ) @@ -38,28 +43,30 @@ COMMON_DEPEND=" !gnutls? ( nss? ( dev-libs/nss ) !nss? ( - libressl? ( dev-libs/libressl:= ) - !libressl? ( dev-libs/openssl:0= ) + dev-libs/openssl:0= ) ) " DEPEND="${COMMON_DEPEND} - virtual/pkgconfig selinux? ( sec-policy/selinux-bitlbee ) - test? ( dev-libs/check )" + test? ( dev-libs/check ) +" RDEPEND="${COMMON_DEPEND} - xinetd? ( sys-apps/xinetd )" + xinetd? ( sys-apps/xinetd ) +" -pkg_setup() { - enewgroup bitlbee - enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee -} +BDEPEND="${PYTHON_DEPS} + virtual/pkgconfig +" -src_prepare() { - [[ ${PV} != "9999" ]] && eapply "${FILESDIR}"/${PN}-3.5-systemd-user.patch - eapply_user -} +PATCHES=( + "${FILESDIR}/${PN}-3.5-systemd-user.patch" + "${FILESDIR}/${PN}-3.5-libcheck.patch" + "${FILESDIR}/${PN}-3.5-libevent.patch" + "${FILESDIR}/${P}-disabled-plugins-use.patch" + "${FILESDIR}/${P}-system-json-parser.patch" +) src_configure() { local myconf @@ -108,7 +115,10 @@ src_configure() { --prefix=/usr \ --datadir=/usr/share/bitlbee \ --etcdir=/etc/bitlbee \ + --libdir=/usr/$(get_libdir) \ + --pcdir=/usr/$(get_libdir)/pkgconfig \ --plugindir=/usr/$(get_libdir)/bitlbee \ + --externaljsonparser=1 \ --systemdsystemunitdir=$(systemd_get_systemunitdir) \ --doc=1 \ --strip=0 \ @@ -144,7 +154,3 @@ src_install() { exeinto /usr/share/bitlbee doexe utils/{convert_purple.py,bitlbee-ctl.pl} } - -pkg_postinst() { - chown -R bitlbee:bitlbee "${ROOT}"/var/lib/bitlbee -} diff --git a/net-im/bitlbee/bitlbee-9999.ebuild b/net-im/bitlbee/bitlbee-9999.ebuild index 1108861dd629..8fe3918c4465 100644 --- a/net-im/bitlbee/bitlbee-9999.ebuild +++ b/net-im/bitlbee/bitlbee-9999.ebuild @@ -1,16 +1,18 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit user systemd toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-any-r1 systemd toolchain-funcs if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git" inherit git-r3 else SRC_URI="https://get.bitlbee.org/src/${P}.tar.gz" - KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" fi DESCRIPTION="irc to IM gateway that support multiple IM protocols" @@ -18,19 +20,22 @@ HOMEPAGE="https://www.bitlbee.org/" LICENSE="GPL-2" SLOT="0" -IUSE_PROTOCOLS="msn oscar purple twitter +xmpp" -IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd +IUSE_PROTOCOLS="purple twitter +xmpp" +IUSE="debug +gnutls ipv6 libevent nss otr +plugins selinux test xinetd ${IUSE_PROTOCOLS}" RESTRICT="!test? ( test )" REQUIRED_USE=" - || ( purple xmpp msn oscar ) - xmpp? ( !nss ) - test? ( plugins ) + || ( purple xmpp ) + purple? ( plugins ) + test? ( xmpp ) " COMMON_DEPEND=" - >=dev-libs/glib-2.16 + acct-group/bitlbee + acct-user/bitlbee + dev-libs/glib:2 + dev-libs/json-parser:= purple? ( net-im/pidgin ) libevent? ( dev-libs/libevent:= ) otr? ( >=net-libs/libotr-4 ) @@ -38,28 +43,26 @@ COMMON_DEPEND=" !gnutls? ( nss? ( dev-libs/nss ) !nss? ( - libressl? ( dev-libs/libressl:= ) - !libressl? ( dev-libs/openssl:0= ) + dev-libs/openssl:0= ) ) " DEPEND="${COMMON_DEPEND} - virtual/pkgconfig selinux? ( sec-policy/selinux-bitlbee ) - test? ( dev-libs/check )" + test? ( dev-libs/check ) +" RDEPEND="${COMMON_DEPEND} - xinetd? ( sys-apps/xinetd )" + xinetd? ( sys-apps/xinetd ) +" -pkg_setup() { - enewgroup bitlbee - enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee -} +BDEPEND="${PYTHON_DEPS} + virtual/pkgconfig +" -src_prepare() { - [[ ${PV} != "9999" ]] && eapply "${FILESDIR}"/${PN}-3.5-systemd-user.patch - eapply_user -} +PATCHES=( + "${FILESDIR}/${PN}-3.5-systemd-user.patch" +) src_configure() { local myconf @@ -108,7 +111,10 @@ src_configure() { --prefix=/usr \ --datadir=/usr/share/bitlbee \ --etcdir=/etc/bitlbee \ + --libdir=/usr/$(get_libdir) \ + --pcdir=/usr/$(get_libdir)/pkgconfig \ --plugindir=/usr/$(get_libdir)/bitlbee \ + --external_json_parser=1 \ --systemdsystemunitdir=$(systemd_get_systemunitdir) \ --doc=1 \ --strip=0 \ @@ -144,7 +150,3 @@ src_install() { exeinto /usr/share/bitlbee doexe utils/{convert_purple.py,bitlbee-ctl.pl} } - -pkg_postinst() { - chown -R bitlbee:bitlbee "${ROOT}"/var/lib/bitlbee -} diff --git a/net-im/bitlbee/files/bitlbee-3.5-libcheck.patch b/net-im/bitlbee/files/bitlbee-3.5-libcheck.patch new file mode 100644 index 000000000000..474789e5e1c9 --- /dev/null +++ b/net-im/bitlbee/files/bitlbee-3.5-libcheck.patch @@ -0,0 +1,645 @@ +diff --git a/tests/check_arc.c b/tests/check_arc.c +index 9fcd4b25..c7e1dfef 100644 +--- a/tests/check_arc.c ++++ b/tests/check_arc.c +@@ -17,7 +17,7 @@ char *clear_tests[] = + NULL + }; + +-static void check_codec(int l) ++START_TEST(check_codec) + { + int i; + +@@ -37,6 +37,7 @@ static void check_codec(int l) + g_free(decrypted); + } + } ++END_TEST + + struct { + unsigned char crypted[30]; +@@ -72,7 +73,7 @@ struct { + { "", 0, NULL } + }; + +-static void check_decod(int l) ++START_TEST(check_decod) + { + int i; + +@@ -92,6 +93,7 @@ static void check_decod(int l) + g_free(decrypted); + } + } ++END_TEST + + Suite *arc_suite(void) + { +diff --git a/tests/check_help.c b/tests/check_help.c +index 92d7c28f..ccf136a4 100644 +--- a/tests/check_help.c ++++ b/tests/check_help.c +@@ -7,20 +7,24 @@ + #include "help.h" + + START_TEST(test_help_initfree) +-help_t * h, *r; +-r = help_init(&h, "/dev/null"); +-fail_if(r == NULL); +-fail_if(r != h); ++{ ++ help_t * h, *r; ++ r = help_init(&h, "/dev/null"); ++ fail_if(r == NULL); ++ fail_if(r != h); + +-help_free(&h); +-fail_if(h != NULL); ++ help_free(&h); ++ fail_if(h != NULL); ++} + END_TEST + + START_TEST(test_help_nonexistent) +-help_t * h, *r; +-r = help_init(&h, "/dev/null"); +-fail_unless(help_get(&h, "nonexistent") == NULL); +-fail_if(r == NULL); ++{ ++ help_t * h, *r; ++ r = help_init(&h, "/dev/null"); ++ fail_unless(help_get(&h, "nonexistent") == NULL); ++ fail_if(r == NULL); ++} + END_TEST + + Suite *help_suite(void) +diff --git a/tests/check_irc.c b/tests/check_irc.c +index 5c940729..e2054106 100644 +--- a/tests/check_irc.c ++++ b/tests/check_irc.c +@@ -8,49 +8,53 @@ + #include "testsuite.h" + + START_TEST(test_connect) +-GIOChannel * ch1, *ch2; +-irc_t *irc; +-char *raw; +-fail_unless(g_io_channel_pair(&ch1, &ch2)); ++{ ++ GIOChannel * ch1, *ch2; ++ irc_t *irc; ++ char *raw; ++ fail_unless(g_io_channel_pair(&ch1, &ch2)); + +-irc = irc_new(g_io_channel_unix_get_fd(ch1)); ++ irc = irc_new(g_io_channel_unix_get_fd(ch1)); + +-irc_free(irc); ++ irc_free(irc); + +-fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL); ++ fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL); + +-fail_if(strcmp(raw, "") != 0); ++ fail_if(strcmp(raw, "") != 0); + +-g_free(raw); ++ g_free(raw); ++} + END_TEST + + START_TEST(test_login) +-GIOChannel * ch1, *ch2; +-irc_t *irc; +-char *raw; +-fail_unless(g_io_channel_pair(&ch1, &ch2)); ++{ ++ GIOChannel * ch1, *ch2; ++ irc_t *irc; ++ char *raw; ++ fail_unless(g_io_channel_pair(&ch1, &ch2)); + +-g_io_channel_set_flags(ch1, G_IO_FLAG_NONBLOCK, NULL); +-g_io_channel_set_flags(ch2, G_IO_FLAG_NONBLOCK, NULL); ++ g_io_channel_set_flags(ch1, G_IO_FLAG_NONBLOCK, NULL); ++ g_io_channel_set_flags(ch2, G_IO_FLAG_NONBLOCK, NULL); + +-irc = irc_new(g_io_channel_unix_get_fd(ch1)); ++ irc = irc_new(g_io_channel_unix_get_fd(ch1)); + +-fail_unless(g_io_channel_write_chars(ch2, "NICK bla\r\r\n" +- "USER a a a a\n", -1, NULL, NULL) == G_IO_STATUS_NORMAL); +-fail_unless(g_io_channel_flush(ch2, NULL) == G_IO_STATUS_NORMAL); ++ fail_unless(g_io_channel_write_chars(ch2, "NICK bla\r\r\n" ++ "USER a a a a\n", -1, NULL, NULL) == G_IO_STATUS_NORMAL); ++ fail_unless(g_io_channel_flush(ch2, NULL) == G_IO_STATUS_NORMAL); + +-g_main_iteration(FALSE); +-irc_free(irc); ++ g_main_iteration(FALSE); ++ irc_free(irc); + +-fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL); ++ fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL); + +-fail_unless(strstr(raw, "001") != NULL); +-fail_unless(strstr(raw, "002") != NULL); +-fail_unless(strstr(raw, "003") != NULL); +-fail_unless(strstr(raw, "004") != NULL); +-fail_unless(strstr(raw, "005") != NULL); ++ fail_unless(strstr(raw, "001") != NULL); ++ fail_unless(strstr(raw, "002") != NULL); ++ fail_unless(strstr(raw, "003") != NULL); ++ fail_unless(strstr(raw, "004") != NULL); ++ fail_unless(strstr(raw, "005") != NULL); + +-g_free(raw); ++ g_free(raw); ++} + END_TEST + + Suite *irc_suite(void) +diff --git a/tests/check_jabber_sasl.c b/tests/check_jabber_sasl.c +index e7ea8a75..b6c34bb8 100644 +--- a/tests/check_jabber_sasl.c ++++ b/tests/check_jabber_sasl.c +@@ -77,7 +77,7 @@ struct { + { NULL, NULL, NULL } + }; + +-static void check_get_part(int l) ++START_TEST(check_get_part) + { + int i; + +@@ -103,6 +103,7 @@ static void check_get_part(int l) + g_free(res); + } + } ++END_TEST + + Suite *jabber_sasl_suite(void) + { +diff --git a/tests/check_jabber_util.c b/tests/check_jabber_util.c +index e4d4533a..411f58b1 100644 +--- a/tests/check_jabber_util.c ++++ b/tests/check_jabber_util.c +@@ -8,7 +8,7 @@ + + static struct im_connection *ic; + +-static void check_buddy_add(int l) ++START_TEST(check_buddy_add) + { + struct jabber_buddy *budw1, *budw2, *budw3, *budn, *bud; + +@@ -93,8 +93,9 @@ static void check_buddy_add(int l) + fail_unless(jabber_buddy_remove(ic, "bugtest@google.com/B")); + fail_unless(jabber_buddy_remove(ic, "bugtest@google.com/C")); + } ++END_TEST + +-static void check_compareJID(int l) ++START_TEST(check_compareJID) + { + fail_unless(jabber_compare_jid("bugtest@google.com/B", "bugtest@google.com/A")); + fail_if(jabber_compare_jid("bugtest1@google.com/B", "bugtest@google.com/A")); +@@ -105,8 +106,9 @@ static void check_compareJID(int l) + fail_if(jabber_compare_jid(NULL, "")); + fail_if(jabber_compare_jid("", NULL)); + } ++END_TEST + +-static void check_hipchat_slug(int l) ++START_TEST(check_hipchat_slug) + { + int i; + +@@ -124,6 +126,7 @@ static void check_hipchat_slug(int l) + g_free(new); + } + } ++END_TEST + + Suite *jabber_util_suite(void) + { +diff --git a/tests/check_md5.c b/tests/check_md5.c +index a68df687..5ca52a5b 100644 +--- a/tests/check_md5.c ++++ b/tests/check_md5.c +@@ -29,7 +29,7 @@ struct md5_test { + { NULL }, + }; + +-static void check_sums(int l) ++START_TEST(check_sums) + { + int i; + +@@ -45,6 +45,7 @@ static void check_sums(int l) + fail_if(memcmp(tests[i].expected, sum, 16) != 0, "%s failed", tests[i].str); + } + } ++END_TEST + + Suite *md5_suite(void) + { +diff --git a/tests/check_set.c b/tests/check_set.c +index 6f8b39b5..cf9429e6 100644 +--- a/tests/check_set.c ++++ b/tests/check_set.c +@@ -7,97 +7,123 @@ + #include "testsuite.h" + + START_TEST(test_set_add) +-void *data = "data"; +-set_t *s = NULL, *t; +-t = set_add(&s, "name", "default", NULL, data); +-fail_unless(s == t); +-fail_unless(t->data == data); +-fail_unless(strcmp(t->def, "default") == 0); ++{ ++ void *data = "data"; ++ set_t *s = NULL, *t; ++ t = set_add(&s, "name", "default", NULL, data); ++ fail_unless(s == t); ++ fail_unless(t->data == data); ++ fail_unless(strcmp(t->def, "default") == 0); ++} + END_TEST + + START_TEST(test_set_add_existing) +-void *data = "data"; +-set_t *s = NULL, *t; +-t = set_add(&s, "name", "default", NULL, data); +-t = set_add(&s, "name", "newdefault", NULL, data); +-fail_unless(s == t); +-fail_unless(strcmp(t->def, "newdefault") == 0); ++{ ++ void *data = "data"; ++ set_t *s = NULL, *t; ++ t = set_add(&s, "name", "default", NULL, data); ++ t = set_add(&s, "name", "newdefault", NULL, data); ++ fail_unless(s == t); ++ fail_unless(strcmp(t->def, "newdefault") == 0); ++} + END_TEST + + START_TEST(test_set_find_unknown) +-set_t * s = NULL; +-fail_unless(set_find(&s, "foo") == NULL); ++{ ++ set_t * s = NULL; ++ fail_unless(set_find(&s, "foo") == NULL); ++} + END_TEST + + START_TEST(test_set_find) +-void *data = "data"; +-set_t *s = NULL, *t; +-t = set_add(&s, "name", "default", NULL, data); +-fail_unless(s == t); +-fail_unless(set_find(&s, "name") == t); ++{ ++ void *data = "data"; ++ set_t *s = NULL, *t; ++ t = set_add(&s, "name", "default", NULL, data); ++ fail_unless(s == t); ++ fail_unless(set_find(&s, "name") == t); ++} + END_TEST + + START_TEST(test_set_get_str_default) +-void *data = "data"; +-set_t *s = NULL, *t; +-t = set_add(&s, "name", "default", NULL, data); +-fail_unless(s == t); +-fail_unless(strcmp(set_getstr(&s, "name"), "default") == 0); ++{ ++ void *data = "data"; ++ set_t *s = NULL, *t; ++ t = set_add(&s, "name", "default", NULL, data); ++ fail_unless(s == t); ++ fail_unless(strcmp(set_getstr(&s, "name"), "default") == 0); ++} + END_TEST + + START_TEST(test_set_get_bool_default) +-void *data = "data"; +-set_t *s = NULL, *t; +-t = set_add(&s, "name", "true", NULL, data); +-fail_unless(s == t); +-fail_unless(set_getbool(&s, "name")); ++{ ++ void *data = "data"; ++ set_t *s = NULL, *t; ++ t = set_add(&s, "name", "true", NULL, data); ++ fail_unless(s == t); ++ fail_unless(set_getbool(&s, "name")); ++} + END_TEST + + START_TEST(test_set_get_bool_integer) +-void *data = "data"; +-set_t *s = NULL, *t; +-t = set_add(&s, "name", "3", NULL, data); +-fail_unless(s == t); +-fail_unless(set_getbool(&s, "name") == 3); ++{ ++ void *data = "data"; ++ set_t *s = NULL, *t; ++ t = set_add(&s, "name", "3", NULL, data); ++ fail_unless(s == t); ++ fail_unless(set_getbool(&s, "name") == 3); ++} + END_TEST + + START_TEST(test_set_get_bool_unknown) +-set_t * s = NULL; +-fail_unless(set_getbool(&s, "name") == 0); ++{ ++ set_t * s = NULL; ++ fail_unless(set_getbool(&s, "name") == 0); ++} + END_TEST + + START_TEST(test_set_get_str_value) +-void *data = "data"; +-set_t *s = NULL; +-set_add(&s, "name", "default", NULL, data); +-set_setstr(&s, "name", "foo"); +-fail_unless(strcmp(set_getstr(&s, "name"), "foo") == 0); ++{ ++ void *data = "data"; ++ set_t *s = NULL; ++ set_add(&s, "name", "default", NULL, data); ++ set_setstr(&s, "name", "foo"); ++ fail_unless(strcmp(set_getstr(&s, "name"), "foo") == 0); ++} + END_TEST + + START_TEST(test_set_get_str_unknown) +-set_t * s = NULL; +-fail_unless(set_getstr(&s, "name") == NULL); ++{ ++ set_t * s = NULL; ++ fail_unless(set_getstr(&s, "name") == NULL); ++} + END_TEST + + START_TEST(test_setint) +-void *data = "data"; +-set_t *s = NULL; +-set_add(&s, "name", "10", NULL, data); +-set_setint(&s, "name", 3); +-fail_unless(set_getint(&s, "name") == 3); ++{ ++ void *data = "data"; ++ set_t *s = NULL; ++ set_add(&s, "name", "10", NULL, data); ++ set_setint(&s, "name", 3); ++ fail_unless(set_getint(&s, "name") == 3); ++} + END_TEST + + START_TEST(test_setstr) +-void *data = "data"; +-set_t *s = NULL; +-set_add(&s, "name", "foo", NULL, data); +-set_setstr(&s, "name", "bloe"); +-fail_unless(strcmp(set_getstr(&s, "name"), "bloe") == 0); ++{ ++ void *data = "data"; ++ set_t *s = NULL; ++ set_add(&s, "name", "foo", NULL, data); ++ set_setstr(&s, "name", "bloe"); ++ fail_unless(strcmp(set_getstr(&s, "name"), "bloe") == 0); ++} + END_TEST + + START_TEST(test_set_get_int_unknown) +-set_t * s = NULL; +-fail_unless(set_getint(&s, "foo") == 0); ++{ ++ set_t * s = NULL; ++ fail_unless(set_getint(&s, "foo") == 0); ++} + END_TEST + + Suite *set_suite(void) +diff --git a/tests/check_util.c b/tests/check_util.c +index 44a223ae..2d79417e 100644 +--- a/tests/check_util.c ++++ b/tests/check_util.c +@@ -8,7 +8,8 @@ + #include "misc.h" + #include "url.h" + +-START_TEST(test_strip_linefeed){ ++START_TEST(test_strip_linefeed) ++{ + int i; + const char *get[] = { "Test", "Test\r", "Test\rX\r", NULL }; + const char *expected[] = { "Test", "Test", "TestX", NULL }; +@@ -43,63 +44,73 @@ START_TEST(test_strip_newlines) + END_TEST + + START_TEST(test_set_url_http) +-url_t url; +- +-fail_if(0 == url_set(&url, "http://host/")); +-fail_unless(!strcmp(url.host, "host")); +-fail_unless(!strcmp(url.file, "/")); +-fail_unless(!strcmp(url.user, "")); +-fail_unless(!strcmp(url.pass, "")); +-fail_unless(url.proto == PROTO_HTTP); +-fail_unless(url.port == 80); ++{ ++ url_t url; ++ ++ fail_if(0 == url_set(&url, "http://host/")); ++ fail_unless(!strcmp(url.host, "host")); ++ fail_unless(!strcmp(url.file, "/")); ++ fail_unless(!strcmp(url.user, "")); ++ fail_unless(!strcmp(url.pass, "")); ++ fail_unless(url.proto == PROTO_HTTP); ++ fail_unless(url.port == 80); ++} + END_TEST + + START_TEST(test_set_url_https) +-url_t url; +- +-fail_if(0 == url_set(&url, "https://ahost/AimeeMann")); +-fail_unless(!strcmp(url.host, "ahost")); +-fail_unless(!strcmp(url.file, "/AimeeMann")); +-fail_unless(!strcmp(url.user, "")); +-fail_unless(!strcmp(url.pass, "")); +-fail_unless(url.proto == PROTO_HTTPS); +-fail_unless(url.port == 443); ++{ ++ url_t url; ++ ++ fail_if(0 == url_set(&url, "https://ahost/AimeeMann")); ++ fail_unless(!strcmp(url.host, "ahost")); ++ fail_unless(!strcmp(url.file, "/AimeeMann")); ++ fail_unless(!strcmp(url.user, "")); ++ fail_unless(!strcmp(url.pass, "")); ++ fail_unless(url.proto == PROTO_HTTPS); ++ fail_unless(url.port == 443); ++} + END_TEST + + START_TEST(test_set_url_port) +-url_t url; +- +-fail_if(0 == url_set(&url, "https://ahost:200/Lost/In/Space")); +-fail_unless(!strcmp(url.host, "ahost")); +-fail_unless(!strcmp(url.file, "/Lost/In/Space")); +-fail_unless(!strcmp(url.user, "")); +-fail_unless(!strcmp(url.pass, "")); +-fail_unless(url.proto == PROTO_HTTPS); +-fail_unless(url.port == 200); ++{ ++ url_t url; ++ ++ fail_if(0 == url_set(&url, "https://ahost:200/Lost/In/Space")); ++ fail_unless(!strcmp(url.host, "ahost")); ++ fail_unless(!strcmp(url.file, "/Lost/In/Space")); ++ fail_unless(!strcmp(url.user, "")); ++ fail_unless(!strcmp(url.pass, "")); ++ fail_unless(url.proto == PROTO_HTTPS); ++ fail_unless(url.port == 200); ++} + END_TEST + + START_TEST(test_set_url_username) +-url_t url; +- +-fail_if(0 == url_set(&url, "socks4://user@ahost/Space")); +-fail_unless(!strcmp(url.host, "ahost")); +-fail_unless(!strcmp(url.file, "/Space")); +-fail_unless(!strcmp(url.user, "user")); +-fail_unless(!strcmp(url.pass, "")); +-fail_unless(url.proto == PROTO_SOCKS4); +-fail_unless(url.port == 1080); ++{ ++ url_t url; ++ ++ fail_if(0 == url_set(&url, "socks4://user@ahost/Space")); ++ fail_unless(!strcmp(url.host, "ahost")); ++ fail_unless(!strcmp(url.file, "/Space")); ++ fail_unless(!strcmp(url.user, "user")); ++ fail_unless(!strcmp(url.pass, "")); ++ fail_unless(url.proto == PROTO_SOCKS4); ++ fail_unless(url.port == 1080); ++} + END_TEST + + START_TEST(test_set_url_username_pwd) +-url_t url; +- +-fail_if(0 == url_set(&url, "socks5://user:pass@ahost/")); +-fail_unless(!strcmp(url.host, "ahost")); +-fail_unless(!strcmp(url.file, "/")); +-fail_unless(!strcmp(url.user, "user")); +-fail_unless(!strcmp(url.pass, "pass")); +-fail_unless(url.proto == PROTO_SOCKS5); +-fail_unless(url.port == 1080); ++{ ++ url_t url; ++ ++ fail_if(0 == url_set(&url, "socks5://user:pass@ahost/")); ++ fail_unless(!strcmp(url.host, "ahost")); ++ fail_unless(!strcmp(url.file, "/")); ++ fail_unless(!strcmp(url.user, "user")); ++ fail_unless(!strcmp(url.pass, "pass")); ++ fail_unless(url.proto == PROTO_SOCKS5); ++ fail_unless(url.port == 1080); ++} + END_TEST + + struct { +@@ -148,26 +159,30 @@ struct { + }; + + START_TEST(test_word_wrap) +-int i; ++{ ++ int i; + +-for (i = 0; word_wrap_tests[i].orig && *word_wrap_tests[i].orig; i++) { +- char *wrapped = word_wrap(word_wrap_tests[i].orig, word_wrap_tests[i].line_len); ++ for (i = 0; word_wrap_tests[i].orig && *word_wrap_tests[i].orig; i++) { ++ char *wrapped = word_wrap(word_wrap_tests[i].orig, word_wrap_tests[i].line_len); + +- fail_unless(strcmp(word_wrap_tests[i].wrapped, wrapped) == 0, +- "%s (line_len = %d) should wrap to `%s', not to `%s'", +- word_wrap_tests[i].orig, word_wrap_tests[i].line_len, +- word_wrap_tests[i].wrapped, wrapped); ++ fail_unless(strcmp(word_wrap_tests[i].wrapped, wrapped) == 0, ++ "%s (line_len = %d) should wrap to `%s', not to `%s'", ++ word_wrap_tests[i].orig, word_wrap_tests[i].line_len, ++ word_wrap_tests[i].wrapped, wrapped); + +- g_free(wrapped); ++ g_free(wrapped); ++ } + } + END_TEST + + START_TEST(test_http_encode) +-char s[80]; ++{ ++ char s[80]; + +-strcpy(s, "ee\xc3" "\xab" "ee!!..."); +-http_encode(s); +-fail_unless(strcmp(s, "ee%C3%ABee%21%21...") == 0); ++ strcpy(s, "ee\xc3" "\xab" "ee!!..."); ++ http_encode(s); ++ fail_unless(strcmp(s, "ee%C3%ABee%21%21...") == 0); ++} + END_TEST + + struct { +@@ -198,19 +213,21 @@ struct { + }; + + START_TEST(test_split_command_parts) +-int i; +-for (i = 0; split_tests[i].command; i++) { +- char *cmd = g_strdup(split_tests[i].command); +- char **split = split_command_parts(cmd, split_tests[i].limit); +- char **expected = split_tests[i].expected; +- +- int j; +- for (j = 0; split[j] && expected[j]; j++) { +- fail_unless(strcmp(split[j], expected[j]) == 0, +- "(%d) split_command_parts broken: split(\"%s\")[%d] -> %s (expected: %s)", +- i, split_tests[i].command, j, split[j], expected[j]); +- } +- g_free(cmd); ++{ ++ int i; ++ for (i = 0; split_tests[i].command; i++) { ++ char *cmd = g_strdup(split_tests[i].command); ++ char **split = split_command_parts(cmd, split_tests[i].limit); ++ char **expected = split_tests[i].expected; ++ ++ int j; ++ for (j = 0; split[j] && expected[j]; j++) { ++ fail_unless(strcmp(split[j], expected[j]) == 0, ++ "(%d) split_command_parts broken: split(\"%s\")[%d] -> %s (expected: %s)", ++ i, split_tests[i].command, j, split[j], expected[j]); ++ } ++ g_free(cmd); ++ } + } + END_TEST + +-- +2.26.2 + diff --git a/net-im/bitlbee/files/bitlbee-3.5-libevent.patch b/net-im/bitlbee/files/bitlbee-3.5-libevent.patch new file mode 100644 index 000000000000..5ceea2fc576a --- /dev/null +++ b/net-im/bitlbee/files/bitlbee-3.5-libevent.patch @@ -0,0 +1,71 @@ +diff --git a/lib/events.h b/lib/events.h +index 1b5b41b7..b4b6110e 100644 +--- a/lib/events.h ++++ b/lib/events.h +@@ -69,6 +69,8 @@ G_MODULE_EXPORT void b_main_init(); + G_MODULE_EXPORT void b_main_run(); + G_MODULE_EXPORT void b_main_quit(); + ++G_MODULE_EXPORT void b_main_iteration(); ++ + + /* Add event handlers (for I/O or a timeout). The event handler will be called + every time the event "happens", until your event handler returns FALSE (or +diff --git a/lib/events_glib.c b/lib/events_glib.c +index dca704e1..da73f3ae 100644 +--- a/lib/events_glib.c ++++ b/lib/events_glib.c +@@ -64,6 +64,12 @@ void b_main_quit() + g_main_quit(loop); + } + ++void b_main_iteration() ++{ ++ g_main_iteration(FALSE); ++ event_debug("b_main_iteration()\n"); ++} ++ + static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) + { + GaimIOClosure *closure = data; +diff --git a/lib/events_libevent.c b/lib/events_libevent.c +index 854af010..05391afa 100644 +--- a/lib/events_libevent.c ++++ b/lib/events_libevent.c +@@ -113,6 +113,12 @@ void b_main_quit() + b_main_restart(); + } + ++void b_main_iteration() ++{ ++ event_base_loop(leh, EVLOOP_NONBLOCK); ++ event_debug("b_main_iteration()\n"); ++} ++ + static void b_event_passthrough(int fd, short event, void *data) + { + struct b_event_data *b_ev = data; +diff --git a/tests/check_irc.c b/tests/check_irc.c +index e2054106..db3137f3 100644 +--- a/tests/check_irc.c ++++ b/tests/check_irc.c +@@ -5,6 +5,7 @@ + #include <string.h> + #include <stdio.h> + #include "irc.h" ++#include "events.h" + #include "testsuite.h" + + START_TEST(test_connect) +@@ -42,7 +43,7 @@ START_TEST(test_login) + "USER a a a a\n", -1, NULL, NULL) == G_IO_STATUS_NORMAL); + fail_unless(g_io_channel_flush(ch2, NULL) == G_IO_STATUS_NORMAL); + +- g_main_iteration(FALSE); ++ b_main_iteration(); + irc_free(irc); + + fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL); +-- +2.26.2 + diff --git a/net-im/bitlbee/files/bitlbee-3.5-verbose-build.patch b/net-im/bitlbee/files/bitlbee-3.5-verbose-build.patch deleted file mode 100644 index 7501963cb5de..000000000000 --- a/net-im/bitlbee/files/bitlbee-3.5-verbose-build.patch +++ /dev/null @@ -1,200 +0,0 @@ -Add a --verbose configure flag to enable verbose build output. - ---- bitlbee-3.5/configure -+++ bitlbee-3.5/configure -@@ -38,6 +38,7 @@ - twitter=1 - purple=0 - -+verbose=0 - doc=1 - debug=0 - strip=0 -@@ -125,6 +126,8 @@ - --pidfile=... $pidfile - --config=... $config - -+--verbose=0/1 Disable/enable verbose build $verbose -+ - --msn=0/1 Disable/enable MSN part $msn - --jabber=0/1 Disable/enable Jabber part $jabber - --oscar=0/1 Disable/enable Oscar part (ICQ, AIM) $oscar -@@ -282,6 +285,12 @@ - debug=1 - fi - -+if [ "$verbose" = "0" ]; then -+ echo 'VERBOSE=@' >> Makefile.settings -+else -+ echo 'VERBOSE=' >> Makefile.settings -+fi -+ - if [ "$debug" = "1" ]; then - echo 'DEBUG=1' >> Makefile.settings - CFLAGS="$CFLAGS -g3 -DDEBUG -O0" ---- bitlbee-3.5/lib/Makefile -+++ bitlbee-3.5/lib/Makefile -@@ -35,12 +35,12 @@ - - lib.o: $(objects) $(subdirs) - @echo '*' Linking lib.o -- @$(LD) $(LFLAGS) $(objects) -o lib.o -+ $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o lib.o - - $(objects): ../Makefile.settings Makefile - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - -include .depend/*.d ---- bitlbee-3.5/Makefile -+++ bitlbee-3.5/Makefile -@@ -162,28 +162,28 @@ - tar czf $$x.tar.gz --exclude=debian --exclude=.git* --exclude=.depend $$x - - $(subdirs): -- @$(MAKE) -C $@ $(MAKECMDGOALS) -+ $(MAKE) -C $@ $(MAKECMDGOALS) - - $(OTR_PI): %.so: $(_SRCDIR_)%.c - @echo '*' Building plugin $@ -- @$(CC) $(CFLAGS) -fPIC -shared $(LDFLAGS) $< -o $@ $(OTRFLAGS) -+ $(VERBOSE) $(CC) $(CFLAGS) -fPIC -shared $(LDFLAGS) $< -o $@ $(OTRFLAGS) - - $(SKYPE_PI): $(_SRCDIR_)protocols/skype/skype.c - @echo '*' Building plugin skype -- @$(CC) $(CFLAGS) $(LDFLAGS) $(SKYPEFLAGS) $< -o $@ -+ $(VERBOSE) $(CC) $(CFLAGS) $(LDFLAGS) $(SKYPEFLAGS) $< -o $@ - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - $(objects): Makefile Makefile.settings config.h - - $(OUTFILE): $(objects) $(subdirs) - @echo '*' Linking $(OUTFILE) -- @$(CC) $(objects) $(subdirobjs) -o $(OUTFILE) $(LDFLAGS_BITLBEE) $(LDFLAGS) $(EFLAGS) -+ $(VERBOSE) $(CC) $(objects) $(subdirobjs) -o $(OUTFILE) $(LDFLAGS_BITLBEE) $(LDFLAGS) $(EFLAGS) - ifneq ($(firstword $(STRIP)), \#) - @echo '*' Stripping $(OUTFILE) -- @-$(STRIP) $(OUTFILE) -+ $(VERBOSE) -$(STRIP) $(OUTFILE) - endif - - ctags: ---- bitlbee-3.5/protocols/jabber/Makefile -+++ bitlbee-3.5/protocols/jabber/Makefile -@@ -37,10 +37,10 @@ - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - jabber_mod.o: $(objects) - @echo '*' Linking jabber_mod.o -- @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o -+ $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o jabber_mod.o - - -include .depend/*.d ---- bitlbee-3.5/protocols/Makefile -+++ bitlbee-3.5/protocols/Makefile -@@ -42,18 +42,18 @@ - rm -rf .depend - - $(subdirs): -- @$(MAKE) -C $@ $(MAKECMDGOALS) -+ $(MAKE) -C $@ $(MAKECMDGOALS) - - ### MAIN PROGRAM - - protocols.o: $(objects) $(subdirs) - @echo '*' Linking protocols.o -- @$(LD) $(LFLAGS) $(objects) $(subdirobjs) -o protocols.o -+ $(VERBOSE) $(LD) $(LFLAGS) $(objects) $(subdirobjs) -o protocols.o - - $(objects): ../Makefile.settings Makefile - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - -include .depend/*.d ---- bitlbee-3.5/protocols/msn/Makefile -+++ bitlbee-3.5/protocols/msn/Makefile -@@ -37,10 +37,10 @@ - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - msn_mod.o: $(objects) - @echo '*' Linking msn_mod.o -- @$(LD) $(LFLAGS) $(objects) -o msn_mod.o -+ $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o msn_mod.o - - -include .depend/*.d ---- bitlbee-3.5/protocols/oscar/Makefile -+++ bitlbee-3.5/protocols/oscar/Makefile -@@ -38,10 +38,10 @@ - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - oscar_mod.o: $(objects) - @echo '*' Linking oscar_mod.o -- @$(LD) $(LFLAGS) $(objects) -o oscar_mod.o -+ $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o oscar_mod.o - - -include .depend/*.d ---- bitlbee-3.5/protocols/purple/Makefile -+++ bitlbee-3.5/protocols/purple/Makefile -@@ -38,10 +38,10 @@ - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - purple_mod.o: $(objects) - @echo '*' Linking purple_mod.o -- @$(LD) $(LFLAGS) $(objects) -o purple_mod.o -+ $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o purple_mod.o - - -include .depend/*.d ---- bitlbee-3.5/protocols/twitter/Makefile -+++ bitlbee-3.5/protocols/twitter/Makefile -@@ -37,10 +37,10 @@ - - $(objects): %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ - - twitter_mod.o: $(objects) - @echo '*' Linking twitter_mod.o -- @$(LD) $(LFLAGS) $(objects) -o twitter_mod.o -+ $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o twitter_mod.o - - -include .depend/*.d ---- bitlbee-3.5/tests/Makefile -+++ bitlbee-3.5/tests/Makefile -@@ -20,8 +20,8 @@ - - check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o - @echo '*' Linking $@ -- @$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS) -+ $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS) - - %.o: $(_SRCDIR_)%.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(VERBOSE) $(CC) -c $(CFLAGS) $< -o $@ diff --git a/net-im/bitlbee/files/bitlbee-3.6-disabled-plugins-use.patch b/net-im/bitlbee/files/bitlbee-3.6-disabled-plugins-use.patch new file mode 100644 index 000000000000..0973bd4bd5fa --- /dev/null +++ b/net-im/bitlbee/files/bitlbee-3.6-disabled-plugins-use.patch @@ -0,0 +1,55 @@ +This patch is taken from upstrem https://github.com/bitlbee/bitlbee/pull/156 +where it was already merged. + +From a8196d6f72b44be9c315b9ad7dc45276d2aaca0c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz> +Date: Tue, 23 Mar 2021 13:07:18 +0100 +Subject: [PATCH] root_commands: prevent linker error when plugins are disabled + +This commit fixes compilation issue with disabled plugin support +(./configure --plugins=0), where get_plugins function is unavailable. +The problem has been introduced with addition of new 'plugins info' +subcommand, where get_plugins is used in cmd_plugins_info function, +which should be conditionally available only if WITH_PLUGINS is defined. + +Bug: https://bugs.gentoo.org/739510 +Bug: https://bugs.gentoo.org/617604 +Fixes: 6908ab747d1e ("Add 'plugins info' subcommand, only show plugin details there") +Signed-off-by: Petr Vaněk <arkamar@atlas.cz> +--- + root_commands.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/root_commands.c b/root_commands.c +index 8358c030..a4e72f83 100644 +--- a/root_commands.c ++++ b/root_commands.c +@@ -1168,6 +1168,7 @@ static void prplstr(GList *prpls, GString *gstr) + g_list_free(prpls); + } + ++#ifdef WITH_PLUGINS + static void cmd_plugins_info(irc_t *irc, char **cmd) + { + GList *l; +@@ -1201,6 +1202,7 @@ static void cmd_plugins_info(irc_t *irc, char **cmd) + irc_rootmsg(irc, " URL: %s", info->url); + } + } ++#endif + + static void cmd_plugins(irc_t *irc, char **cmd) + { +@@ -1208,7 +1210,9 @@ static void cmd_plugins(irc_t *irc, char **cmd) + GString *gstr; + + if (cmd[1] && g_strcasecmp(cmd[1], "info") == 0) { ++#ifdef WITH_PLUGINS + cmd_plugins_info(irc, cmd); ++#endif + return; + } + +-- +2.26.3 + diff --git a/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch b/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch new file mode 100644 index 000000000000..0a9c197d763d --- /dev/null +++ b/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch @@ -0,0 +1,99 @@ +This is adapted patch from upstream PR 151. Original PR defines +--external-json-parser which breaks configuration, see [1]. It was changed to +--externaljsonparser and $external_json_parser to $externaljsonparser. +Additionally, LDFLAGS_CHECK variable was introduced in order to make +tests working, see [2] and #865667. + +[1] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1201181905 +[2] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1219254239 + +Upstream-PR: https://github.com/bitlbee/bitlbee/pull/151 + +diff --git a/configure b/configure +index fd8d363a..39495515 100755 +--- a/configure ++++ b/configure +@@ -47,6 +47,7 @@ plugins=1 + otr=0 + + events=glib ++externaljsonparser=auto + ssl=auto + + pam=0 +@@ -148,6 +149,7 @@ Option Description Default + --events=... Event handler (glib, libevent) $events + --ssl=... SSL library to use (gnutls, nss, openssl, auto) + $ssl ++--externaljsonparser=0/1/auto Use External JSON parser $externaljsonparser + + + --target=... Cross compilation target same as host +@@ -398,6 +400,21 @@ else + fi + echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings + ++if [ "$externaljsonparser" = "auto" ]; then ++ if pkg-config --exists json-parser; then ++ externaljsonparser=1 ++ else ++ externaljsonparser=0 ++ fi ++fi ++echo "EXTERNAL_JSON_PARSER=$externaljsonparser" >> Makefile.settings ++if [ "$externaljsonparser" = "1" ]; then ++ echo "CFLAGS+=$(pkg-config --cflags json-parser)" >> Makefile.settings ++ echo "LDFLAGS_BITLBEE+=$(pkg-config --libs json-parser)" >> Makefile.settings ++ echo "LDFLAGS_CHECK+=$(pkg-config --libs json-parser)" >> Makefile.settings ++fi ++ ++ + detect_gnutls() + { + if $PKG_CONFIG --exists gnutls; then +@@ -979,6 +996,12 @@ else + echo ' systemd disabled.' + fi + ++if [ "$externaljsonparser" = "1" ]; then ++ echo ' Using system JSON parser.' ++else ++ echo ' Using bundled JSON parser.' ++fi ++ + echo ' Using event handler: '$events + echo ' Using SSL library: '$ssl + #echo ' Building with these storage backends: '$STORAGES +diff --git a/lib/Makefile b/lib/Makefile +index fc46aedc..ad95d9cb 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -12,7 +12,11 @@ _SRCDIR_ := $(_SRCDIR_)lib/ + endif + + # [SH] Program variables +-objects = arc.o base64.o canohost.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o json.o json_util.o md5.o misc.o oauth.o oauth2.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o ns_parse.o ++objects = arc.o base64.o canohost.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o json_util.o md5.o misc.o oauth.o oauth2.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o ns_parse.o ++ ++ifneq ($(EXTERNAL_JSON_PARSER),1) ++objects += json.o ++endif + + LFLAGS += -r + +diff --git a/tests/Makefile b/tests/Makefile +index 76122a2f..2235bf1d 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -20,7 +20,7 @@ test_objs = check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc. + + check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o + @echo '*' Linking $@ +- $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS) ++ $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(LDFLAGS_CHECK) $(EFLAGS) + + %.o: $(_SRCDIR_)%.c + @echo '*' Compiling $< +-- +2.35.1 + diff --git a/net-im/bitlbee/files/bitlbee.confd-r1 b/net-im/bitlbee/files/bitlbee.confd-r1 deleted file mode 100644 index d581222f9fb9..000000000000 --- a/net-im/bitlbee/files/bitlbee.confd-r1 +++ /dev/null @@ -1,8 +0,0 @@ -# Bitlbee options (see /usr/sbin/bitlbee -h) -BITLBEE_OPTS="-F" - -# By default, the bitlbee init script will attempt to stop -# all bitlbee-owned processes, including per-client forks. -# Setting this to "no" tells the init script to only -# stop the main bitlbee process. -BITLBEE_STOP_ALL="yes" diff --git a/net-im/bitlbee/files/bitlbee.initd-r1 b/net-im/bitlbee/files/bitlbee.initd-r1 deleted file mode 100644 index 413bd45735ed..000000000000 --- a/net-im/bitlbee/files/bitlbee.initd-r1 +++ /dev/null @@ -1,30 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or -# later - -DAEMON=/usr/sbin/bitlbee -PIDFILE=/var/run/bitlbee/bitlbee.pid - -depend() { - need logger net -} - -start () { - ebegin "Starting bitlbee" - checkpath -d -m 0755 -o bitlbee:bitlbee $(dirname ${PIDFILE}) - start-stop-daemon --start --quiet \ - -u bitlbee:bitlbee --exec ${DAEMON} --pidfile ${PIDFILE} \ - -- -P ${PIDFILE} ${BITLBEE_OPTS} - eend $? -} - -stop() { - ebegin "Stopping bitlbee" - local pidfile= - yesno ${BITLBEE_STOP_ALL:-YES} || - pidfile="--pidfile ${PIDFILE}" - start-stop-daemon --stop --quiet ${pidfile} -u bitlbee:bitlbee - eend $? -} - diff --git a/net-im/bitlbee/files/bitlbee.initd-r2 b/net-im/bitlbee/files/bitlbee.initd-r2 index 0b3b1a4911bc..0107909aed6c 100644 --- a/net-im/bitlbee/files/bitlbee.initd-r2 +++ b/net-im/bitlbee/files/bitlbee.initd-r2 @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 command="/usr/sbin/bitlbee" diff --git a/net-im/bitlbee/metadata.xml b/net-im/bitlbee/metadata.xml index e28610b3c865..99fc3dd0270a 100644 --- a/net-im/bitlbee/metadata.xml +++ b/net-im/bitlbee/metadata.xml @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>radhermit@gentoo.org</email> - <name>Tim Harder</name> + <email>arkamar@gentoo.org</email> + <name>Petr Vaněk</name> </maintainer> <use> <flag name="libevent">Use libevent for event handling</flag> - <flag name="msn">Enable MSN Messenger IM protocol support.</flag> - <flag name="nss">Use NSS for SSL support in MSN and Jabber</flag> - <flag name="oscar">Enable Oscar (AIM/ICQ) IM protocol support</flag> + <flag name="nss">Prefer <pkg>dev-libs/nss</pkg> as SSL/TLS provider</flag> <flag name="otr">Enable support for encrypted conversations</flag> <flag name="plugins">Enable support for plugins</flag> <flag name="purple">Use libpurple instead of the built-in IM protocol support</flag> @@ -17,7 +15,9 @@ </use> <longdescription> Bitlbee as an IRC to IM gateway. It provides an irc server that allows - you to log on and then connect to various instant messaging protocols - (AIM, MSN, Yahoo, Jabber, etc). + you to log on and then connect to various instant messaging protocols. </longdescription> + <upstream> + <remote-id type="github">bitlbee/bitlbee</remote-id> + </upstream> </pkgmetadata> |