public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-im/bitlbee/files/, net-im/bitlbee/
@ 2016-09-05  3:22 Tim Harder
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Harder @ 2016-09-05  3:22 UTC (permalink / raw
  To: gentoo-commits

commit:     130dc998a483dad52f3bb6de991cb900de1c40db
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  5 03:15:05 2016 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Mon Sep  5 03:21:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=130dc998

net-im/bitlbee: revision bump for various updates

* update to EAPI 6
* fix systemd unit to use bitlbee user (bug #472406)
* update SSL handling, make it non-optional (bug #582658 by Alex Xu)
* drop skype support, use libpurple and x11-plugins/pidgin-skypeweb
  instead (https://wiki.bitlbee.org/HowtoSkypeWeb)

 net-im/bitlbee/bitlbee-3.4.2-r1.ebuild             | 158 +++++++++++++++++++++
 net-im/bitlbee/bitlbee-9999.ebuild                 | 121 ++++++----------
 .../bitlbee/files/bitlbee-3.4.2-systemd-user.patch |  10 ++
 3 files changed, 213 insertions(+), 76 deletions(-)

diff --git a/net-im/bitlbee/bitlbee-3.4.2-r1.ebuild b/net-im/bitlbee/bitlbee-3.4.2-r1.ebuild
new file mode 100644
index 00000000..8e5f4f7
--- /dev/null
+++ b/net-im/bitlbee/bitlbee-3.4.2-r1.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit user systemd
+
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git"
+	inherit git-r3
+else
+	SRC_URI="http://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="http://www.bitlbee.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE_PROTOCOLS="msn oscar purple twitter +xmpp yahoo"
+IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd
+	${IUSE_PROTOCOLS}"
+
+REQUIRED_USE="
+	|| ( purple xmpp msn oscar yahoo )
+	xmpp? ( !nss )
+"
+
+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() {
+	[[ ${PV} != "9999" ]] && eapply "${FILESDIR}"/${P}-systemd-user.patch
+	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 \
+		"${myconf[@]}" || die
+
+	sed -i \
+		-e "/^EFLAGS/s:=:&${LDFLAGS} :" \
+		Makefile.settings || die
+}
+
+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-9999.ebuild b/net-im/bitlbee/bitlbee-9999.ebuild
index 8a75327..ae09048 100644
--- a/net-im/bitlbee/bitlbee-9999.ebuild
+++ b/net-im/bitlbee/bitlbee-9999.ebuild
@@ -2,10 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
+EAPI=6
 
-inherit eutils multilib user python-single-r1 systemd
+inherit user systemd
 
 if [[ ${PV} == "9999" ]]; then
 	EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git"
@@ -20,8 +19,14 @@ HOMEPAGE="http://www.bitlbee.org/"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="debug gnutls ipv6 +xmpp libevent msn nss +oscar otr +plugins purple selinux
-	skype ssl test twitter +yahoo xinetd libressl"
+IUSE_PROTOCOLS="msn oscar purple twitter +xmpp yahoo"
+IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd
+	${IUSE_PROTOCOLS}"
+
+REQUIRED_USE="
+	|| ( purple xmpp msn oscar yahoo )
+	xmpp? ( !nss )
+"
 
 COMMON_DEPEND="
 	>=dev-libs/glib-2.16
@@ -31,122 +36,91 @@ COMMON_DEPEND="
 	gnutls? ( net-libs/gnutls:= )
 	!gnutls? (
 		nss? ( dev-libs/nss )
-		!nss? ( ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:= ) ) )
+		!nss? (
+			libressl? ( dev-libs/libressl:= )
+			!libressl? ( dev-libs/openssl:0= )
+		)
 	)
 	"
 DEPEND="${COMMON_DEPEND}
-	dev-lang/python
 	virtual/pkgconfig
 	selinux? ( sec-policy/selinux-bitlbee )
 	test? ( dev-libs/check )"
 
 RDEPEND="${COMMON_DEPEND}
 	virtual/logger
-	skype? (
-		dev-python/skype4py[${PYTHON_USEDEP}]
-		net-im/skype
-	)
 	xinetd? ( sys-apps/xinetd )"
 
-REQUIRED_USE="|| ( purple xmpp msn oscar yahoo )
-	msn? ( || ( gnutls nss ssl ) )
-	xmpp? ( !nss )"
-
 pkg_setup() {
-	if use xmpp && ! use gnutls && ! use ssl ; then
-		einfo
-		elog "You have enabled support for Jabber but do not have SSL"
-		elog "support enabled.  This *will* prevent bitlbee from being"
-		elog "able to connect to SSL enabled Jabber servers.  If you need to"
-		elog "connect to Jabber over SSL, enable ONE of the following use"
-		elog "flags: gnutls or ssl"
-		einfo
-	fi
-
-	use skype && python-single-r1_pkg_setup
-
 	enewgroup bitlbee
 	enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee
 }
 
 src_prepare() {
-	sed -i \
-		-e "s@/usr/local/sbin/bitlbee@/usr/sbin/bitlbee@" \
-		-e "s/nobody/bitlbee/" \
-		-e "s/}/	disable         = yes\n}/" \
-		doc/bitlbee.xinetd || die "sed failed in xinetd"
-
-	sed -i \
-		-e "s@mozilla-nss@nss@g" \
-		configure || die "sed failed in configure"
-
-	use skype && python_fix_shebang protocols/skype/skyped.py
-
-	[[ ${PV} != "9999" ]] && epatch "${FILESDIR}"/${PN}-3.2.1-configure.patch
-	epatch_user
+	[[ ${PV} != "9999" ]] && eapply "${FILESDIR}"/${P}-systemd-user.patch
+	eapply_user
 }
 
 src_configure() {
+	local myconf
+
 	# setup plugins, protocol, ipv6 and debug
-	use xmpp && myconf="${myconf} --jabber=1"
-	for flag in debug ipv6 msn oscar plugins purple skype twitter yahoo ; do
-		if use ${flag} ; then
-			myconf="${myconf} --${flag}=1"
-		else
-			myconf="${myconf} --${flag}=0"
-		fi
+	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="${myconf} --otr=plugin"
+		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="${myconf} --otr=0"
+		myconf+=( --otr=0 )
 	fi
 
 	# setup ssl use flags
 	if use gnutls ; then
-		myconf="${myconf} --ssl=gnutls"
+		myconf+=( --ssl=gnutls )
 		einfo "Using gnutls for SSL support"
-	elif use ssl ; then
-		myconf="${myconf} --ssl=openssl"
-		einfo "Using openssl for SSL support"
-	elif use nss ; then
-		myconf="${myconf} --ssl=nss"
-		einfo "Using nss for SSL support"
 	else
-		myconf="${myconf} --ssl=bogus"
-		einfo "You will not have any encryption support enabled."
+		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="${myconf} --events=libevent"
+		myconf+=( --events=libevent )
 	else
-		myconf="${myconf} --events=glib"
+		myconf+=( --events=glib )
 	fi
 
-	# NOTE: bitlbee's configure script is not an autotool creation,
-	# so that is why we don't use econf.
+	# not autotools-based
 	./configure \
-		--prefix="${EPREFIX}/usr" \
-		--datadir="${EPREFIX}/usr/share/bitlbee" \
-		--etcdir="${EPREFIX}/etc/bitlbee" \
-		--plugindir="${EPREFIX}/usr/$(get_libdir)/bitlbee" \
-		--systemdsystemunitdir=$(systemd_get_unitdir) \
-		--doc=1 --strip=0 ${myconf} || die "econf failed"
+		--prefix=/usr \
+		--datadir=/usr/share/bitlbee \
+		--etcdir=/etc/bitlbee \
+		--plugindir=/usr/$(get_libdir)/bitlbee \
+		--systemdsystemunitdir=$(systemd_get_systemunitdir) \
+		--doc=1 \
+		--strip=0 \
+		"${myconf[@]}" || die
 
 	sed -i \
 		-e "/^EFLAGS/s:=:&${LDFLAGS} :" \
-		Makefile.settings || die "sed failed"
+		Makefile.settings || die
 }
 
 src_install() {
-	emake install install-etc install-doc install-dev install-systemd DESTDIR="${D}"
+	emake DESTDIR="${D}" install install-etc install-doc install-dev install-systemd
 
 	keepdir /var/lib/bitlbee
 	fperms 700 /var/lib/bitlbee
@@ -154,11 +128,6 @@ src_install() {
 
 	dodoc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README}
 
-	if use skype ; then
-		newdoc protocols/skype/NEWS NEWS-skype
-		newdoc protocols/skype/README README-skype
-	fi
-
 	if use xinetd ; then
 		insinto /etc/xinetd.d
 		newins doc/bitlbee.xinetd bitlbee

diff --git a/net-im/bitlbee/files/bitlbee-3.4.2-systemd-user.patch b/net-im/bitlbee/files/bitlbee-3.4.2-systemd-user.patch
new file mode 100644
index 00000000..07d58f4
--- /dev/null
+++ b/net-im/bitlbee/files/bitlbee-3.4.2-systemd-user.patch
@@ -0,0 +1,10 @@
+--- a/init/bitlbee.service.in
++++ b/init/bitlbee.service.in
+@@ -4,6 +4,7 @@
+ 
+ [Service]
+ ExecStart=@sbindir@bitlbee -F -n
++User=bitlbee
+ 
+ [Install]
+ WantedBy=multi-user.target


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/bitlbee/files/, net-im/bitlbee/
@ 2022-08-18  7:06 Joonas Niilola
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2022-08-18  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     90a3d5fff1c032b3b2de6133c6eb9c7711daccb9
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Aug  1 14:10:01 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 07:06:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90a3d5ff

net-im/bitlbee: Use system json-parser

- Applied patch allows us to use system json-parser, it is based on
  upstream PR, see the link below
- Dropped arm64, ppc, ppc64 and x86 keywords because newly introduced
  dev-libs/json-parser dependency has currently only ~amd64 keyword
- EAPI 7 -> 8

Upstream-PR: https://github.com/bitlbee/bitlbee/pull/151
Bug: https://bugs.gentoo.org/861371
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-im/bitlbee/bitlbee-3.6-r3.ebuild               | 157 +++++++++++++++++++++
 .../files/bitlbee-3.6-system-json-parser.patch     |  82 +++++++++++
 2 files changed, 239 insertions(+)

diff --git a/net-im/bitlbee/bitlbee-3.6-r3.ebuild b/net-im/bitlbee/bitlbee-3.6-r3.ebuild
new file mode 100644
index 000000000000..72d2a7207ba2
--- /dev/null
+++ b/net-im/bitlbee/bitlbee-3.6-r3.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+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"
+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 nss otr +plugins selinux test xinetd
+	${IUSE_PROTOCOLS}"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	|| ( purple xmpp msn oscar )
+	purple? ( plugins )
+	test? ( plugins )
+	xmpp? ( !nss )
+"
+
+COMMON_DEPEND="
+	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 )
+	gnutls? ( net-libs/gnutls:= )
+	!gnutls? (
+		nss? ( dev-libs/nss )
+		!nss? (
+			dev-libs/openssl:0=
+		)
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	selinux? ( sec-policy/selinux-bitlbee )
+	test? ( dev-libs/check )
+"
+
+RDEPEND="${COMMON_DEPEND}
+	xinetd? ( sys-apps/xinetd )
+"
+
+BDEPEND="${PYTHON_DEPS}
+	virtual/pkgconfig
+"
+
+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
+
+	# 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 \
+		--libdir=/usr/$(get_libdir) \
+		--pcdir=/usr/$(get_libdir)/pkgconfig \
+		--plugindir=/usr/$(get_libdir)/bitlbee \
+		--externaljsonparser=1 \
+		--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-r2 bitlbee
+	newconfd "${FILESDIR}"/bitlbee.confd-r2 bitlbee
+
+	exeinto /usr/share/bitlbee
+	doexe utils/{convert_purple.py,bitlbee-ctl.pl}
+}

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..02d57e02d6d2
--- /dev/null
+++ b/net-im/bitlbee/files/bitlbee-3.6-system-json-parser.patch
@@ -0,0 +1,82 @@
+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.
+
+[1] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1201181905
+
+Upstream-PR: https://github.com/bitlbee/bitlbee/pull/151
+
+diff --git a/configure b/configure
+index 4640c806..77b1213b 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,20 @@ 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
++fi
++
++
+ detect_gnutls()
+ {
+ 	if $PKG_CONFIG --exists gnutls; then
+@@ -979,6 +995,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
+ 
+-- 
+2.35.1
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/bitlbee/files/, net-im/bitlbee/
@ 2022-08-18  7:06 Joonas Niilola
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2022-08-18  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     2f4aeedeec9c18047dbda18f31325ac3aeb6a617
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Aug  1 20:35:08 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 07:06:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f4aeede

net-im/bitlbee: sync live

Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/26703
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-im/bitlbee/bitlbee-9999.ebuild                 |  9 ++-
 .../files/bitlbee-9999-system-json-parser.patch    | 83 ++++++++++++++++++++++
 2 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/net-im/bitlbee/bitlbee-9999.ebuild b/net-im/bitlbee/bitlbee-9999.ebuild
index d811ebc6f0c2..0a8cc973ae18 100644
--- a/net-im/bitlbee/bitlbee-9999.ebuild
+++ b/net-im/bitlbee/bitlbee-9999.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} == "9999" ]]; then
 	inherit git-r3
 else
 	SRC_URI="https://get.bitlbee.org/src/${P}.tar.gz"
-	KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+	KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
 fi
 
 DESCRIPTION="irc to IM gateway that support multiple IM protocols"
@@ -36,6 +36,7 @@ COMMON_DEPEND="
 	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 )
@@ -61,7 +62,8 @@ BDEPEND="${PYTHON_DEPS}
 "
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-3.5-systemd-user.patch
+	"${FILESDIR}/${PN}-3.5-systemd-user.patch"
+	"${FILESDIR}/${P}-system-json-parser.patch"
 )
 
 src_configure() {
@@ -112,8 +114,9 @@ src_configure() {
 		--datadir=/usr/share/bitlbee \
 		--etcdir=/etc/bitlbee \
 		--libdir=/usr/$(get_libdir) \
-		--plugindir=/usr/$(get_libdir)/bitlbee \
 		--pcdir=/usr/$(get_libdir)/pkgconfig \
+		--plugindir=/usr/$(get_libdir)/bitlbee \
+		--externaljsonparser=1 \
 		--systemdsystemunitdir=$(systemd_get_systemunitdir) \
 		--doc=1 \
 		--strip=0 \

diff --git a/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch b/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch
new file mode 100644
index 000000000000..07f2878525ec
--- /dev/null
+++ b/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch
@@ -0,0 +1,83 @@
+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.
+
+[1] https://github.com/bitlbee/bitlbee/pull/151#issuecomment-1201181905
+
+Upstream-PR: https://github.com/bitlbee/bitlbee/pull/151
+
+diff --git a/configure b/configure
+index 4640c806..77b1213b 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,20 @@ 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
++fi
++
++
+ detect_gnutls()
+ {
+ 	if $PKG_CONFIG --exists gnutls; then
+@@ -979,6 +995,12 @@ else
+ 	echo '  systemd disabled.'
+ fi
+ 
++if [ "$externaljsonparser" = "1" ]; then
++    echo '  Using system JSON parser.'
++else
++    echo '  Using bundled JSON parser.'
++fi
++
+ echo '  Using python: '$PYTHON
+ 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
+ 
+-- 
+2.35.1
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/bitlbee/files/, net-im/bitlbee/
@ 2022-08-18  7:06 Joonas Niilola
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2022-08-18  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     ad699292711447f8983a44382c61c0dd00967145
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Fri Jul 29 12:42:10 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 07:06:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad699292

net-im/bitlbee: fix strict-aliasing issue in bundled library

The patch is based on fixes from upstream. LICENSE is extended with
BSD-2, the license of bundled library.

Upstream-PR: https://github.com/bitlbee/bitlbee/pull/162
Closes: https://bugs.gentoo.org/861371
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-im/bitlbee/bitlbee-3.6-r1.ebuild               |  3 ++-
 .../files/bitlbee-3.6-strict-aliasing.patch        | 31 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/net-im/bitlbee/bitlbee-3.6-r1.ebuild b/net-im/bitlbee/bitlbee-3.6-r1.ebuild
index c54da3fb2392..73fbb3f13b6c 100644
--- a/net-im/bitlbee/bitlbee-3.6-r1.ebuild
+++ b/net-im/bitlbee/bitlbee-3.6-r1.ebuild
@@ -18,7 +18,7 @@ fi
 DESCRIPTION="irc to IM gateway that support multiple IM protocols"
 HOMEPAGE="https://www.bitlbee.org/"
 
-LICENSE="GPL-2"
+LICENSE="GPL-2 BSD-2"
 SLOT="0"
 IUSE_PROTOCOLS="msn oscar purple twitter +xmpp"
 IUSE="debug +gnutls ipv6 libevent nss otr +plugins selinux test xinetd
@@ -65,6 +65,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.5-libcheck.patch
 	"${FILESDIR}"/${PN}-3.5-libevent.patch
 	"${FILESDIR}"/${P}-disabled-plugins-use.patch
+	"${FILESDIR}"/${P}-strict-aliasing.patch
 )
 
 src_configure() {

diff --git a/net-im/bitlbee/files/bitlbee-3.6-strict-aliasing.patch b/net-im/bitlbee/files/bitlbee-3.6-strict-aliasing.patch
new file mode 100644
index 000000000000..30ecff9747ee
--- /dev/null
+++ b/net-im/bitlbee/files/bitlbee-3.6-strict-aliasing.patch
@@ -0,0 +1,31 @@
+Based on upstream [1] commits:
+- 161dff8321df ("Fix error type-punned pointer warning")
+- d7b67db02aaa ("Fix error type-punned pointer warning")
+
+[1] https://github.com/json-parser/json-parser
+
+Upstream-PR: https://github.com/bitlbee/bitlbee/pull/162
+
+diff --git a/lib/json.c b/lib/json.c
+index 24288f94..2150cbaf 100644
+--- a/lib/json.c
++++ b/lib/json.c
+@@ -139,7 +139,7 @@ static int new_value
+ 				return 0;
+ 			}
+ 
+-			value->_reserved.object_mem = (*(char **) &value->u.object.values) + values_size;
++			value->_reserved.object_mem = (void *) (((char *) value->u.object.values) + values_size);
+ 
+ 			value->u.object.length = 0;
+ 			break;
+@@ -406,7 +406,8 @@ json_value * json_parse_ex(json_settings * settings,
+ 					case json_object:
+ 
+ 						if (state.first_pass) {
+-							(*(json_char **) &top->u.object.values) += string_length + 1;
++							json_char **chars = (json_char **) &top->u.object.values;
++							chars[0] += string_length + 1;
+ 						} else {
+ 							top->u.object.values [top->u.object.length].name
+ 							        = (json_char *) top->_reserved.object_mem;


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/bitlbee/files/, net-im/bitlbee/
@ 2022-08-23  5:11 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-08-23  5:11 UTC (permalink / raw
  To: gentoo-commits

commit:     54bb9f516d5608cbf3bb445af98fa8876ce938e9
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Aug 22 14:52:33 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 23 04:51:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54bb9f51

net-im/bitlbee: remove system-json-parser patch from live

This feature is now integrated in upstream.

Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/26925
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-im/bitlbee/bitlbee-9999.ebuild                 |  3 +-
 .../files/bitlbee-9999-system-json-parser.patch    | 99 ----------------------
 2 files changed, 1 insertion(+), 101 deletions(-)

diff --git a/net-im/bitlbee/bitlbee-9999.ebuild b/net-im/bitlbee/bitlbee-9999.ebuild
index 8d4f88ddc3d1..079feaea767b 100644
--- a/net-im/bitlbee/bitlbee-9999.ebuild
+++ b/net-im/bitlbee/bitlbee-9999.ebuild
@@ -62,7 +62,6 @@ BDEPEND="${PYTHON_DEPS}
 
 PATCHES=(
 	"${FILESDIR}/${PN}-3.5-systemd-user.patch"
-	"${FILESDIR}/${P}-system-json-parser.patch"
 )
 
 src_configure() {
@@ -115,7 +114,7 @@ src_configure() {
 		--libdir=/usr/$(get_libdir) \
 		--pcdir=/usr/$(get_libdir)/pkgconfig \
 		--plugindir=/usr/$(get_libdir)/bitlbee \
-		--externaljsonparser=1 \
+		--external_json_parser=1 \
 		--systemdsystemunitdir=$(systemd_get_systemunitdir) \
 		--doc=1 \
 		--strip=0 \

diff --git a/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch b/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch
deleted file mode 100644
index d0020307cfa3..000000000000
--- a/net-im/bitlbee/files/bitlbee-9999-system-json-parser.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-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 2291e9a4..3ba40933 100755
---- a/configure
-+++ b/configure
-@@ -47,6 +47,7 @@ plugins=1
- otr=0
- 
- events=glib
-+externaljsonparser=auto
- ssl=auto
- 
- pam=0
-@@ -154,6 +155,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
-@@ -404,6 +406,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
-@@ -993,6 +1010,12 @@ else
- 	echo '  systemd disabled.'
- fi
- 
-+if [ "$externaljsonparser" = "1" ]; then
-+    echo '  Using system JSON parser.'
-+else
-+    echo '  Using bundled JSON parser.'
-+fi
-+
- echo '  Using python: '$PYTHON
- echo '  Using event handler: '$events
- echo '  Using SSL library: '$ssl
-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
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-23  5:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-18  7:06 [gentoo-commits] repo/gentoo:master commit in: net-im/bitlbee/files/, net-im/bitlbee/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2022-08-23  5:11 Sam James
2022-08-18  7:06 Joonas Niilola
2022-08-18  7:06 Joonas Niilola
2016-09-05  3:22 Tim Harder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox