public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-im/toxic/files/, net-im/toxic/
@ 2017-11-12  1:00 Daniel Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Campbell @ 2017-11-12  1:00 UTC (permalink / raw
  To: gentoo-commits

commit:     5673560641c9f35807091c452e19ae67965eca53
Author:     Daniel Campbell <zlg <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 12 00:57:02 2017 +0000
Commit:     Daniel Campbell <zlg <AT> gentoo <DOT> org>
CommitDate: Sun Nov 12 00:57:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56735606

net-im/toxic: Correct deps, {C,LD}FLAGS, build log

Thanks to Felix Janda for reporting the bug and confirming fixes.

Closes: https://bugs.gentoo.org/634350
Package-Manager: Portage-2.3.13, Repoman-2.3.4

 .../files/toxic-0.8.0-verbose-build-log.patch      | 230 +++++++++++++++++++++
 net-im/toxic/metadata.xml                          |   8 +-
 net-im/toxic/toxic-0.8.0-r1.ebuild                 |  92 +++++++++
 3 files changed, 327 insertions(+), 3 deletions(-)

diff --git a/net-im/toxic/files/toxic-0.8.0-verbose-build-log.patch b/net-im/toxic/files/toxic-0.8.0-verbose-build-log.patch
new file mode 100644
index 00000000000..ee1c1d90d07
--- /dev/null
+++ b/net-im/toxic/files/toxic-0.8.0-verbose-build-log.patch
@@ -0,0 +1,230 @@
+This patch creates a 'verbosity' flag to satisfy Gentoo packaging
+standards.
+
+Thanks to Felix Janda for reporting both this issue and other issues
+with the ebuild. Gentoo bug #634350
+
+Most of this patch was generated using:
+
+	sed -e 's:^\(\s\+\)@:\1\$(AT):' $(find -name *.mk)
+
+Verbosity can be activated by using `make V=1`.
+
+Patch authored by zlg, released under GPL3.
+--- a/Makefile
++++ b/Makefile
+@@ -3,6 +3,14 @@ CFG_DIR = $(BASE_DIR)/cfg
+ 
+ -include $(CFG_DIR)/global_vars.mk
+ 
++# Create V for verbosity. Defaults to 0.
++ifndef V
++	V := 0
++endif
++AT_0 := @
++AT_1 :=
++AT = $(AT_$(V))
++
+ LIBS = libtoxcore ncursesw libconfig libqrencode
+ 
+ CFLAGS = -std=gnu99 -pthread -Wall -g -fstack-protector-all
+@@ -59,20 +67,20 @@ OBJ := $(addprefix $(BUILD_DIR)/, $(OBJ))
+ all: $(BUILD_DIR)/toxic
+ 
+ $(BUILD_DIR)/toxic: $(OBJ)
+-	@echo "  LD    $(@:$(BUILD_DIR)/%=%)"
+-	@$(CC) $(CFLAGS) -o $(BUILD_DIR)/toxic $(OBJ) $(LDFLAGS)
++	$(AT)echo "  LD    $(@:$(BUILD_DIR)/%=%)"
++	$(AT)$(CC) $(CFLAGS) -o $(BUILD_DIR)/toxic $(OBJ) $(LDFLAGS)
+ 
+ $(BUILD_DIR)/osx_video.o: $(SRC_DIR)/$(OSX_VIDEO)
+-	@echo "  CC    $(@:$(BUILD_DIR)/)osx_video.o"
+-	@$(CC) $(CFLAGS) -o $(BUILD_DIR)/osx_video.o -c $(SRC_DIR)/$(OSX_VIDEO)
++	$(AT)echo "  CC    $(@:$(BUILD_DIR)/)osx_video.o"
++	$(AT)$(CC) $(CFLAGS) -o $(BUILD_DIR)/osx_video.o -c $(SRC_DIR)/$(OSX_VIDEO)
+ 
+ $(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
+-	@if [ ! -e $(BUILD_DIR) ]; then \
++	$(AT)if [ ! -e $(BUILD_DIR) ]; then \
+ 		mkdir -p $(BUILD_DIR) ;\
+ 	fi
+-	@echo "  CC    $(@:$(BUILD_DIR)/%=%)"
+-	@$(CC) $(CFLAGS) -o $(BUILD_DIR)/$*.o -c $(SRC_DIR)/$*.c
+-	@$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $(BUILD_DIR)/$*.d
++	$(AT)echo "  CC    $(@:$(BUILD_DIR)/%=%)"
++	$(AT)$(CC) $(CFLAGS) -o $(BUILD_DIR)/$*.o -c $(SRC_DIR)/$*.c
++	$(AT)$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $(BUILD_DIR)/$*.d
+ 
+ clean:
+ 	rm -f $(BUILD_DIR)/*.d $(BUILD_DIR)/*.o $(BUILD_DIR)/toxic
+--- a/apidoc/python/Makefile
++++ b/apidoc/python/Makefile
+@@ -1,6 +1,14 @@
+ # Minimal makefile for Sphinx documentation
+ #
+ 
++# Create V for verbosity. Defaults to 0.
++ifndef V
++	V := 0
++endif
++AT_0 := @
++AT_1 :=
++AT = $(AT_$(V))
++
+ # You can set these variables from the command line.
+ SPHINXOPTS    =
+ SPHINXBUILD   = sphinx-build
+@@ -10,11 +18,11 @@ BUILDDIR      = build
+ 
+ # Put it first so that "make" without argument is like "make help".
+ help:
+-	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
++	$(AT)$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+ 
+ .PHONY: help Makefile
+ 
+ # Catch-all target: route all unknown targets to Sphinx using the new
+ # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
+ %: Makefile
+-	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+\ No newline at end of file
++	$(AT)$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+--- a/cfg/targets/doc.mk
++++ b/cfg/targets/doc.mk
+@@ -2,8 +2,8 @@
+ doc: $(MANFILES:%=$(DOC_DIR)/%)
+ 	
+ $(DOC_DIR)/%: $(DOC_DIR)/%.asc
+-	@echo "  MAN   $(@F)"
+-	@a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \
++	$(AT)echo "  MAN   $(@F)"
++	$(AT)a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \
+ 		-a manmanual="Toxic Manual" -a mansource=toxic \
+ 		-a manversion=__VERSION__ -a datadir=__DATADIR__ $<
+ 	
+--- a/cfg/targets/help.mk
++++ b/cfg/targets/help.mk
+@@ -1,24 +1,24 @@
+ # Help target
+ help:
+-	@echo "-- Targets --"
+-	@echo "  all:       Build toxic and documentation [DEFAULT]"
+-	@echo "  toxic:     Build toxic"
+-	@echo "  doc:       Build documentation"
+-	@echo "  install:   Build toxic and install it in PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")"
+-	@echo "  uninstall: Remove toxic from PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")"
+-	@echo "  clean:     Remove built files"
+-	@echo "  help:      This help"
+-	@echo
+-	@echo "-- Variables --"
+-	@echo "  DISABLE_X11:            Set to \"1\" to force building without X11 support"
+-	@echo "  DISABLE_AV:             Set to \"1\" to force building without audio call support"
+-	@echo "  DISABLE_SOUND_NOTIFY:   Set to \"1\" to force building without sound notification support"
+-	@echo "  DISABLE_DESKTOP_NOTIFY: Set to \"1\" to force building without desktop notifications support"
+-	@echo "  DISABLE_QRPNG:          Set to \"1\" to force building without QR exported as PNG support"
+-	@echo "  ENABLE_PYTHON:          Set to \"1\" to enable building with Python scripting support"
+-	@echo "  USER_CFLAGS:            Add custom flags to default CFLAGS"
+-	@echo "  USER_LDFLAGS:           Add custom flags to default LDFLAGS"
+-	@echo "  PREFIX:                 Specify a prefix directory for binaries, data files,... (default is \"$(abspath $(PREFIX))\")"
+-	@echo "  DESTDIR:                Specify a directory where to store installed files (mainly for packaging purpose)"
++	$(AT)echo "-- Targets --"
++	$(AT)echo "  all:       Build toxic and documentation [DEFAULT]"
++	$(AT)echo "  toxic:     Build toxic"
++	$(AT)echo "  doc:       Build documentation"
++	$(AT)echo "  install:   Build toxic and install it in PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")"
++	$(AT)echo "  uninstall: Remove toxic from PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")"
++	$(AT)echo "  clean:     Remove built files"
++	$(AT)echo "  help:      This help"
++	$(AT)echo
++	$(AT)echo "-- Variables --"
++	$(AT)echo "  DISABLE_X11:            Set to \"1\" to force building without X11 support"
++	$(AT)echo "  DISABLE_AV:             Set to \"1\" to force building without audio call support"
++	$(AT)echo "  DISABLE_SOUND_NOTIFY:   Set to \"1\" to force building without sound notification support"
++	$(AT)echo "  DISABLE_DESKTOP_NOTIFY: Set to \"1\" to force building without desktop notifications support"
++	$(AT)echo "  DISABLE_QRPNG:          Set to \"1\" to force building without QR exported as PNG support"
++	$(AT)echo "  ENABLE_PYTHON:          Set to \"1\" to enable building with Python scripting support"
++	$(AT)echo "  USER_CFLAGS:            Add custom flags to default CFLAGS"
++	$(AT)echo "  USER_LDFLAGS:           Add custom flags to default LDFLAGS"
++	$(AT)echo "  PREFIX:                 Specify a prefix directory for binaries, data files,... (default is \"$(abspath $(PREFIX))\")"
++	$(AT)echo "  DESTDIR:                Specify a directory where to store installed files (mainly for packaging purpose)"
+ 
+ .PHONY: help
+--- a/cfg/targets/install.mk
++++ b/cfg/targets/install.mk
+@@ -1,29 +1,29 @@
+ # Install target
+ install: $(BUILD_DIR)/toxic
+-	@echo "Installing toxic executable"
+-	@mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
+-	@install -m 0755 $(BUILD_DIR)/toxic $(abspath $(DESTDIR)/$(BINDIR)/toxic)
++	$(AT)echo "Installing toxic executable"
++	$(AT)mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
++	$(AT)install -m 0755 $(BUILD_DIR)/toxic $(abspath $(DESTDIR)/$(BINDIR)/toxic)
+ 	
+-	@echo "Installing desktop file"
+-	@mkdir -p $(abspath $(DESTDIR)/$(APPDIR))
+-	@install -m 0644 $(MISC_DIR)/$(DESKFILE) $(abspath $(DESTDIR)/$(APPDIR)/$(DESKFILE))
++	$(AT)echo "Installing desktop file"
++	$(AT)mkdir -p $(abspath $(DESTDIR)/$(APPDIR))
++	$(AT)install -m 0644 $(MISC_DIR)/$(DESKFILE) $(abspath $(DESTDIR)/$(APPDIR)/$(DESKFILE))
+ 	
+-	@echo "Installing data files"
+-	@mkdir -p $(abspath $(DESTDIR)/$(DATADIR))
+-	@for f in $(DATAFILES) ; do \
++	$(AT)echo "Installing data files"
++	$(AT)mkdir -p $(abspath $(DESTDIR)/$(DATADIR))
++	$(AT)for f in $(DATAFILES) ; do \
+ 		install -m 0644 $(MISC_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
+ 		file=$(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
+ 		sed -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file > temp_file && \
+ 		mv temp_file $$file ;\
+ 	done
+-	@mkdir -p $(abspath $(DESTDIR)/$(DATADIR))/sounds
+-	@for f in $(SNDFILES) ; do \
++	$(AT)mkdir -p $(abspath $(DESTDIR)/$(DATADIR))/sounds
++	$(AT)for f in $(SNDFILES) ; do \
+ 		install -m 0644 $(SND_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)/sounds/$$f) ;\
+ 	done
+ 	
+-	@echo "Installing man pages"
+-	@mkdir -p $(abspath $(DESTDIR)/$(MANDIR))
+-	@for f in $(MANFILES) ; do \
++	$(AT)echo "Installing man pages"
++	$(AT)mkdir -p $(abspath $(DESTDIR)/$(MANDIR))
++	$(AT)for f in $(MANFILES) ; do \
+ 		if [ ! -e "$(DOC_DIR)/$$f" ]; then \
+ 			continue ;\
+ 		fi ;\
+--- a/cfg/targets/uninstall.mk
++++ b/cfg/targets/uninstall.mk
+@@ -1,21 +1,21 @@
+ # Uninstall target
+ uninstall:
+-	@echo "Removing toxic executable"
+-	@rm -f $(abspath $(DESTDIR)/$(BINDIR)/toxic)
++	$(AT)echo "Removing toxic executable"
++	$(AT)rm -f $(abspath $(DESTDIR)/$(BINDIR)/toxic)
+ 	
+-	@echo "Removing desktop file"
+-	@rm -f $(abspath $(DESTDIR)/$(APPDIR)/$(DESKFILE))
++	$(AT)echo "Removing desktop file"
++	$(AT)rm -f $(abspath $(DESTDIR)/$(APPDIR)/$(DESKFILE))
+ 	
+-	@echo "Removing data files"
+-	@for f in $(DATAFILES) ; do \
++	$(AT)echo "Removing data files"
++	$(AT)for f in $(DATAFILES) ; do \
+ 		rm -f $(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
+ 	done
+-	@for f in $(SNDFILES) ; do \
++	$(AT)for f in $(SNDFILES) ; do \
+ 		rm -f $(abspath $(DESTDIR)/$(DATADIR)/sounds/$$f) ;\
+ 	done
+ 	
+-	@echo "Removing man pages"
+-	@for f in $(MANFILES) ; do \
++	$(AT)echo "Removing man pages"
++	$(AT)for f in $(MANFILES) ; do \
+ 		section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\
+ 		file=$$section/$$f ;\
+ 		rm -f $$file $$file.gz ;\

diff --git a/net-im/toxic/metadata.xml b/net-im/toxic/metadata.xml
index 4a6dc2b6463..4581d36bbd5 100644
--- a/net-im/toxic/metadata.xml
+++ b/net-im/toxic/metadata.xml
@@ -13,11 +13,13 @@
 		<remote-id type="github">jfreegman/toxic</remote-id>
 	</upstream>
 	<longdescription lang="en">
-		An ncurses-based Tox client written in C. Supports audio calling, file sharing, and desktop notifications.
+		An ncurses-based Tox client written in C. Supports audio and video calling, file sharing, and desktop notifications.
 	</longdescription>
 	<use>
-		<flag name="notifications">Enables desktop notifications with libnotify</flag>
-		<flag name="av">Enables audio calling and/or audio notifications</flag>
+		<flag name="audio">Enables audio calling</flag>
+		<flag name="av">Enables audio/video functionality (deprecated)</flag>
+		<flag name="notifications">Enables desktop notifications with libnotify, with sound support.</flag>
 		<flag name="qrcode">Enables QR code support</flag>
+		<flag name="video">Enables video calling</flag>
 	</use>
 </pkgmetadata>

diff --git a/net-im/toxic/toxic-0.8.0-r1.ebuild b/net-im/toxic/toxic-0.8.0-r1.ebuild
new file mode 100644
index 00000000000..e9a1018aa90
--- /dev/null
+++ b/net-im/toxic/toxic-0.8.0-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_4 python3_5 python3_6 )
+
+inherit python-single-r1 xdg
+
+DESCRIPTION="A curses-based client for Tox."
+HOMEPAGE="https://github.com/JFreegman/toxic"
+SRC_URI="https://github.com/JFreegman/toxic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+X +audio notifications +python +qrcode +video"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Not a typo; net-libs/tox only has a 'both or neither' option
+RDEPEND="
+	|| (
+	audio? ( net-libs/tox:0/0.1[av] )
+	video? ( net-libs/tox:0/0.1[av] )
+	net-libs/tox:0/0.1
+	)
+	dev-libs/libconfig
+	net-misc/curl:0=
+	sys-libs/ncurses:0=
+	audio? ( media-libs/openal media-libs/freealut )
+	video? ( media-libs/libvpx:= x11-libs/libX11 )
+	notifications? ( x11-libs/libnotify )
+	python? ( ${PYTHON_DEPS} )
+	qrcode? ( media-gfx/qrencode )
+"
+DEPEND="
+	virtual/pkgconfig
+	${RDEPEND}
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-verbose-build-log.patch"
+	)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+	# bug 630370: version string correction 0.7.2 -> 0.8.0
+	# REMOVE THIS FOR toxic != 0.8.0
+	sed -i \
+		-e 's/^\(TOXIC_VERSION =\).*$/\1 0.8.0/' \
+		cfg/global_vars.mk || die "Version string correction failed."
+}
+
+src_configure() {
+	export USER_CFLAGS="${CFLAGS}"
+	export USER_LDFLAGS="${LDFLAGS}"
+	if ! use video && ! use audio; then
+		export DISABLE_AV=1
+	fi
+	if ! use audio; then
+		export DISABLE_SOUND_NOTIFY=1
+	fi
+	if ! use X; then
+		export DISABLE_X11=1
+	fi
+	if ! use notifications; then
+		export DISABLE_DESKTOP_NOTIFY=1
+	fi
+	if ! use qrcode; then
+		export DISABLE_QRPNG=1
+	fi
+	if use python; then
+		export ENABLE_PYTHON=1
+	fi
+	sed -i \
+		-e "s,/usr/local,${EPREFIX}/usr,g" \
+		cfg/global_vars.mk || die "PREFIX sed failed"
+}
+
+src_compile() {
+	emake V=1 || die "emake failed"
+}
+
+src_install() {
+	default
+	if ! use audio; then
+		rm -r "${ED%/}"/usr/share/${PN}/sounds || die "Could not remove sounds directory"
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: net-im/toxic/files/, net-im/toxic/
@ 2021-08-24  8:50 Joonas Niilola
  0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2021-08-24  8:50 UTC (permalink / raw
  To: gentoo-commits

commit:     ad66309ae5c1a1a68cf7f3f89157a100bc00709e
Author:     Josiah Mullins <JoMull01 <AT> protonmail <DOT> com>
AuthorDate: Wed Aug 11 22:44:01 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Aug 24 08:50:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad66309a

net-im/toxic: Bump to 0.11.1

Signed-off-by: Josiah Mullins <JoMull01 <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/21964
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-im/toxic/Manifest                              |   1 +
 .../files/toxic-0.11.1-NAME_MAX-and-PATH_MAX.patch |  48 +++++++++
 net-im/toxic/metadata.xml                          |   1 +
 net-im/toxic/toxic-0.11.1.ebuild                   | 114 +++++++++++++++++++++
 4 files changed, 164 insertions(+)

diff --git a/net-im/toxic/Manifest b/net-im/toxic/Manifest
index b1c440bd83e..5f20858fcd7 100644
--- a/net-im/toxic/Manifest
+++ b/net-im/toxic/Manifest
@@ -1,2 +1,3 @@
 DIST toxic-0.10.1.tar.gz 1165118 BLAKE2B d367039bef9c97c23c8e5453b607cf72f70776e8c86c41da0480eb04725a901bf33bb89727aee3010ad97d33ef2aa653ff09ea49b597cdf2008ff976c395065c SHA512 aec2e6612d639e0210ae68db3368b656647575e3d927444d0726422ff2cf9718dd5a8b3f37a8253cdc3714f09f9f96828dfccf7a7ae12f8a41ce3207f92a684d
+DIST toxic-0.11.1.tar.gz 1204163 BLAKE2B 1e388982236badf1a27cb1cfd9e84ec635be6a576a0719a7394f32ac82f23796f94236ab807180620cbfa8c0c42f43ff244d2d99d27cd5ab3258c1ce69acc545 SHA512 53fba05271020547e779d63bea777f90f56b61e3eb2775afabe92e047a8347b4a9166628bb59d2eaab2e36a1121d791206ac68ff6604cb06fac6aaddbb05e787
 DIST toxic-0.8.3.tar.gz 1147100 BLAKE2B d73a861112aca65e54773c98473c2858bb81e63fef11212633e34dac9e87101956e3ab0d9d56757767bc5d48d1d5a406e550f8fc55ae34860dbc4977c94ee347 SHA512 c8d746efcc055592dd990dfa57415cc1eacaaa3b66303d7583d9f9e7e98b8829c8f1ae849f36a243c8896e99787dd2e493c92367de719b20a4a160bc7daea76e

diff --git a/net-im/toxic/files/toxic-0.11.1-NAME_MAX-and-PATH_MAX.patch b/net-im/toxic/files/toxic-0.11.1-NAME_MAX-and-PATH_MAX.patch
new file mode 100644
index 00000000000..09845d294a2
--- /dev/null
+++ b/net-im/toxic/files/toxic-0.11.1-NAME_MAX-and-PATH_MAX.patch
@@ -0,0 +1,48 @@
+diff -ruN src/autocomplete.c src/autocomplete.c
+--- src/autocomplete.c	2021-08-09 18:52:27.090248882 -0400
++++ src/autocomplete.c	2021-08-11 14:57:39.029828530 -0400
+@@ -25,10 +25,12 @@
+ #include <string.h>
+ 
+ #ifdef __APPLE__
+-#include <sys/types.h>
+ #include <sys/dir.h>
++#include <sys/types.h>
++#include <sys/sysinfo.h>//This should contain PATH_MAX and NAME_MAX
+ #else
+ #include <dirent.h>
++#include <linux/limits.h>
+ #endif /* __APPLE__ */
+ 
+ #include "configdir.h"
+diff -ruN src/file_transfers.h src/file_transfers.h
+--- src/file_transfers.h	2021-07-26 15:39:36.765990567 -0400
++++ src/file_transfers.h	2021-08-11 14:59:41.223159195 -0400
+@@ -24,6 +24,12 @@
+ #define FILE_TRANSFERS_H
+ 
+ #include <limits.h>
++//This should include NAME_MAX and PATH_MAX
++#ifdef __APPLE__
++#include <sys/sysinfo.h>
++#elif __linux__
++#include <linux/limits.h>
++#endif
+ 
+ #include "notify.h"
+ #include "toxic.h"
+diff -ruN src/settings.h src/settings.h
+--- src/settings.h	2021-08-09 18:52:27.093582216 -0400
++++ src/settings.h	2021-08-11 15:00:46.889824433 -0400
+@@ -24,6 +24,12 @@
+ #define SETTINGS_H
+ 
+ #include <limits.h>
++//This should include NAME_MAX and PATH_MAX
++#ifdef __APPLE__
++#include <sys/sysinfo.h>
++#elif __linux__
++#include <linux/limits.h>
++#endif
+ 
+ #include <tox/tox.h>

diff --git a/net-im/toxic/metadata.xml b/net-im/toxic/metadata.xml
index 799dd08bb74..a2f38a60d5b 100644
--- a/net-im/toxic/metadata.xml
+++ b/net-im/toxic/metadata.xml
@@ -21,6 +21,7 @@
 	</longdescription>
 	<use>
 		<flag name="audio-notify">Enables native sound notifications</flag>
+		<flag name="games">Enables some small mini-games</flag>
 		<flag name="llvm">Enables support for LLVM Address Sanitizer</flag>
 		<flag name="notification">Enables desktop notifications with libnotify, with sound support.</flag>
 		<flag name="qrcode">Enables QR code support</flag>

diff --git a/net-im/toxic/toxic-0.11.1.ebuild b/net-im/toxic/toxic-0.11.1.ebuild
new file mode 100644
index 00000000000..f0ddb6556dd
--- /dev/null
+++ b/net-im/toxic/toxic-0.11.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit python-single-r1 xdg
+
+DESCRIPTION="A curses-based client for Tox"
+HOMEPAGE="https://github.com/JFreegman/toxic"
+SRC_URI="https://github.com/JFreegman/toxic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+audio-notify debug games llvm notification png python qrcode +sound +video +X"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+	video? ( sound X ) "
+
+BDEPEND="dev-libs/libconfig:="
+
+RDEPEND="net-libs/tox:=
+	net-misc/curl
+	sys-kernel/linux-headers
+	sys-libs/ncurses:=
+	audio-notify? (
+		media-libs/freealut
+		media-libs/openal
+	)
+	notification? ( x11-libs/libnotify )
+	debug? ( llvm? ( sys-devel/llvm:* ) )
+	python? ( ${PYTHON_DEPS} )
+	qrcode? (
+		media-gfx/qrencode:=
+		png? ( media-libs/libpng )
+	)
+	sound? (
+		media-libs/openal
+		net-libs/tox:=[av]
+	)
+	X? (
+		x11-base/xorg-proto
+		x11-libs/libX11
+	)"
+
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+	#prevent man files from being compressed.
+	sed -i -e "/gzip/d" cfg/targets/install.mk || die "Unable to prevent compression of man pages."
+	#Fix incorrect linkage of pthread (may be optional)
+	sed -i -e 's/pthread/lpthread/g' Makefile || die "Unable to fix linking of pthread."
+	#Makefile sets some required CFLAGS only if CFLAGS variable is undefined,
+	#This line changes the "lazy set if absent" assignment to a "lazy set" assignment.
+	#look below in src_configure to see how CFLAGS are passed to the makefile in USER_CFLAGS
+	sed -i -e 's/?=/=/g' Makefile || die "Unable to change assignment of CFLAGS and LDFLAGS"
+	#Fix incomplete invocation of python-config
+	sed -i -e "s/--ldflags/--ldflags --embed/" cfg/checks/python.mk || die "Unable to fix python linking"
+	#This is to fix incorrect include statements of NAME_MAX and PATH_MAX macros
+	eapply -p0 "${FILESDIR}/${P}-NAME_MAX-and-PATH_MAX.patch" || die "Unable to fix include statements"
+}
+
+src_configure() {
+	if ! use audio-notify; then
+		export DISABLE_SOUND_NOTIFY=1
+	fi
+	if use debug; then
+		export ENABLE_RELEASE=0
+		if use llvm; then
+			export ENABLE_ASAN=1
+		fi
+	fi
+	if ! use games; then
+		export DISABLE_GAMES=1
+	fi
+	if ! use notification; then
+		export DISABLE_DESKTOP_NOTIFY=1
+	fi
+	if ! use png; then
+		export DISABLE_QRPNG=1
+	fi
+	if use python; then
+		export ENABLE_PYTHON=1
+	fi
+	if ! use qrcode; then
+		export DISABLE_QRCODE=1
+	fi
+	if ! use sound; then
+		export DISABLE_AV=1
+	fi
+	if ! use video; then
+		export DISABLE_VI=1
+	fi
+	if ! use X; then
+		export DISABLE_X11=1
+	fi
+	export USER_CFLAGS="${CFLAGS}"
+	export USER_LDFLAGS="${LDFLAGS}"
+	#set install directory to /usr.
+	sed -i -e "s,/usr/local,${EPREFIX}/usr,g" cfg/global_vars.mk || die "Failed to set install directory!"
+}
+
+src_install() {
+	default
+	if ! use audio-notify; then
+		rm -r "${ED}"/usr/share/${PN}/sounds || die "Could not remove sounds directory"
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: net-im/toxic/files/, net-im/toxic/
@ 2021-08-24  8:50 Joonas Niilola
  0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2021-08-24  8:50 UTC (permalink / raw
  To: gentoo-commits

commit:     4ca7fb9be00c1d64e8d963012bca7fb0e64fb575
Author:     Josiah Mullins <JoMull01 <AT> protonmail <DOT> com>
AuthorDate: Wed Aug 11 22:10:35 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Aug 24 08:50:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ca7fb9b

net-im/toxic: Fix incorrect header file inclusion

It seems that the upstream developer believes that
the macros NAME_MAX and PATH_MAX are defined in
<limits.h> when they are really defined in
<linux/limits.h>. More interestingly, it seems
that GCC automatically corrects for this while
clang does not. This commit adds patches necessary
to fix this as well as some minor fixes.

Signed-off-by: Josiah Mullins <JoMull01 <AT> protonmail.com>
Closes: https://bugs.gentoo.org/803404
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/toxic-0.10.1-NAME_MAX-and-PATH_MAX.patch | 49 ++++++++++++++++++++++
 .../files/toxic-0.8.3-NAME_MAX-and-PATH_MAX.patch  | 49 ++++++++++++++++++++++
 ...{toxic-0.10.1.ebuild => toxic-0.10.1-r1.ebuild} | 14 +++++--
 ...toxic-0.8.3-r2.ebuild => toxic-0.8.3-r3.ebuild} | 11 +++--
 4 files changed, 115 insertions(+), 8 deletions(-)

diff --git a/net-im/toxic/files/toxic-0.10.1-NAME_MAX-and-PATH_MAX.patch b/net-im/toxic/files/toxic-0.10.1-NAME_MAX-and-PATH_MAX.patch
new file mode 100644
index 00000000000..68cb0bb59cc
--- /dev/null
+++ b/net-im/toxic/files/toxic-0.10.1-NAME_MAX-and-PATH_MAX.patch
@@ -0,0 +1,49 @@
+diff -ruN src/autocomplete.c src/autocomplete.c
+--- src/autocomplete.c	2021-07-26 15:04:59.172715491 -0400
++++ src/autocomplete.c	2021-07-26 15:22:06.652686609 -0400
+@@ -25,10 +25,12 @@
+ #include <string.h>
+ 
+ #ifdef __APPLE__
+-#include <sys/types.h>
+ #include <sys/dir.h>
++#include <sys/types.h>
++#include <sys/sysinfo.h>
+ #else
+ #include <dirent.h>
++#include <linux/limits.h>
+ #endif /* __APPLE__ */
+ 
+ #include "configdir.h"
+diff -ruN src/file_transfers.h src/file_transfers.h
+--- src/file_transfers.h	2021-07-26 15:39:36.765990567 -0400
++++ src/file_transfers.h	2021-07-26 15:39:41.899323757 -0400
+@@ -24,6 +24,12 @@
+ #define FILE_TRANSFERS_H
+ 
+ #include <limits.h>
++//This includes NAME_MAX and PATH_MAX
++#ifdef __APPLE__
++#include <sys/sysinfo.h>
++#elif __linux__
++#include <linux/limits.h>
++#endif
+ 
+ #include "notify.h"
+ #include "toxic.h"
+diff -ruN src/settings.h src/settings.h
+--- src/settings.h	2021-07-26 15:04:59.176048823 -0400
++++ src/settings.h	2021-07-26 15:12:01.772703590 -0400
+@@ -24,6 +24,12 @@
+ #define SETTINGS_H
+ 
+ #include <limits.h>
++//This includes NAME_MAX and PATH_MAX
++#ifdef __APPLE__
++#include <sys/sysinfo.h>
++#elif __linux__
++#include <linux/limits.h>
++#endif
+ 
+ #include <tox/tox.h>
+ 

diff --git a/net-im/toxic/files/toxic-0.8.3-NAME_MAX-and-PATH_MAX.patch b/net-im/toxic/files/toxic-0.8.3-NAME_MAX-and-PATH_MAX.patch
new file mode 100644
index 00000000000..11dc43c6b77
--- /dev/null
+++ b/net-im/toxic/files/toxic-0.8.3-NAME_MAX-and-PATH_MAX.patch
@@ -0,0 +1,49 @@
+diff -ruN src/autocomplete.c src/autocomplete.c
+--- src/autocomplete.c	2021-07-26 10:43:37.453154392 -0400
++++ src/autocomplete.c	2021-07-26 10:59:29.856460938 -0400
+@@ -27,8 +27,11 @@
+ #ifdef __APPLE__
+ #include <sys/types.h>
+ #include <sys/dir.h>
+-#else
++//This include NAME_MAX
++#include <sys/sysinfo.h>
++#elif __linux__
+ #include <dirent.h>
++#include <linux/limits.h>//This includes NAME_MAX
+ #endif /* __APPLE__ */
+ 
+ #include "windows.h"
+diff -ruN src/file_transfers.h src/file_transfers.h
+--- src/file_transfers.h	2021-07-26 10:43:37.456487724 -0400
++++ src/file_transfers.h	2021-07-26 11:41:30.513057111 -0400
+@@ -24,6 +24,12 @@
+ #define FILE_TRANSFERS_H
+ 
+ #include <limits.h>
++//This includes PATH_MAX
++#ifdef __APPLE__
++#include <sys/sysinfo.h>
++#elif __linux__
++#include <linux/limits.h>
++#endif
+ 
+ #include "toxic.h"
+ #include "windows.h"
+diff -ruN src/settings.h src/settings.h
+--- src/settings.h	2021-07-26 10:43:37.459821058 -0400
++++ src/settings.h	2021-07-26 11:45:46.709716594 -0400
+@@ -25,6 +25,13 @@
+ 
+ #include <limits.h>
+ 
++//This includes PATH_MAX
++#ifdef __APPLE__
++#include <sys/sysinfo.h>
++#elif __linux__
++#include <linux/limits.h>
++#endif
++
+ #include <tox/tox.h>
+ 
+ /* Represents line_* hints max strlen */

diff --git a/net-im/toxic/toxic-0.10.1.ebuild b/net-im/toxic/toxic-0.10.1-r1.ebuild
similarity index 83%
rename from net-im/toxic/toxic-0.10.1.ebuild
rename to net-im/toxic/toxic-0.10.1-r1.ebuild
index 4f0639961dc..931dd62fc29 100644
--- a/net-im/toxic/toxic-0.10.1.ebuild
+++ b/net-im/toxic/toxic-0.10.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{7,8,9,10} )
 
 inherit python-single-r1 xdg
 
@@ -18,10 +18,12 @@ IUSE="+audio-notify debug doc llvm notification png python qrcode +sound +video
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
 	video? ( sound X ) "
 
-RDEPEND="dev-libs/libconfig:=
-	net-libs/tox:=
+BDEPEND="dev-libs/libconfig"
+
+RDEPEND="net-libs/tox:=
 	net-misc/curl
 	sys-libs/ncurses:=
+	sys-kernel/linux-headers
 	audio-notify? (
 		media-libs/freealut
 		media-libs/openal
@@ -58,6 +60,10 @@ src_prepare() {
 	#This line changes the "lazy set if absent" assignment to a "lazy set" assignment.
 	#look below in src_configure to see how CFLAGS are passed to the makefile in USER_CFLAGS
 	sed -i -e 's/?=/=/g' Makefile || die "Unable to force CFLAGS and LDFLAGS"
+	#Fix incomplete invocation of python-config
+	sed -i -e "s/--ldflags/--ldflags --embed/" cfg/checks/python.mk || die "Unable to fix python linking"
+	#Fix incorrect include statements for NAME_MAX and PATH_MAX macros
+	eapply -p0 "${FILESDIR}/${P}-NAME_MAX-and-PATH_MAX.patch" || die "Unable to fix header inclusion"
 }
 
 src_configure() {
@@ -101,6 +107,6 @@ src_configure() {
 src_install() {
 	default
 	if ! use audio-notify; then
-		rm -r "${ED}"/usr/share/${PN}/sounds || die "Could not remove sounds directory"
+		rm -r "${ED}"/usr/share/"${PN}"/sounds || die "Could not remove sounds directory"
 	fi
 }

diff --git a/net-im/toxic/toxic-0.8.3-r2.ebuild b/net-im/toxic/toxic-0.8.3-r3.ebuild
similarity index 85%
rename from net-im/toxic/toxic-0.8.3-r2.ebuild
rename to net-im/toxic/toxic-0.8.3-r3.ebuild
index fb4792fc89e..97ed2aa0ae3 100644
--- a/net-im/toxic/toxic-0.8.3-r2.ebuild
+++ b/net-im/toxic/toxic-0.8.3-r3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{7,8,9,10} )
 
 inherit python-single-r1 xdg
 
@@ -17,11 +17,12 @@ KEYWORDS="amd64 x86"
 IUSE="notification python qrcode +sound +video +X"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
-RDEPEND="
-	dev-libs/libconfig:=
-	>=net-libs/tox-0.2.8:=
+BDEPEND="dev-libs/libconfig"
+
+RDEPEND="net-libs/tox:=
 	net-misc/curl
 	sys-libs/ncurses:=
+	sys-kernel/linux-headers
 	notification? ( x11-libs/libnotify )
 	python? ( ${PYTHON_DEPS} )
 	qrcode? ( media-gfx/qrencode:= )
@@ -45,6 +46,8 @@ src_prepare() {
 	default
 	#prevent man files from being compressed.
 	sed -i -e "/gzip/d" cfg/targets/install.mk || die "Unable to prevent compression of man pages."
+	#Fix incorrect include declarations for NAME_MAX and PATH_MAX.
+	eapply -p0 "${FILESDIR}/${P}-NAME_MAX-and-PATH_MAX.patch" || die "Unable to fix include statements"
 }
 
 src_configure() {


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

end of thread, other threads:[~2021-08-24  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-24  8:50 [gentoo-commits] repo/gentoo:master commit in: net-im/toxic/files/, net-im/toxic/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2021-08-24  8:50 Joonas Niilola
2017-11-12  1:00 Daniel Campbell

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