summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-02-01 14:08:54 +0100
committerJeroen Roovers <jer@gentoo.org>2020-02-01 14:43:33 +0100
commitb1a6f1a0dfd27b0136ae980fd00942160f6eba00 (patch)
treeffa78df19d0759dfdc5daf053e90eebdfbf7ba43 /x11-misc/efax-gtk
parenttoolchain.eclass: make toolchain_src_unpack() a default_src_unpack() (diff)
downloadgentoo-b1a6f1a0dfd27b0136ae980fd00942160f6eba00.tar.gz
gentoo-b1a6f1a0dfd27b0136ae980fd00942160f6eba00.tar.bz2
gentoo-b1a6f1a0dfd27b0136ae980fd00942160f6eba00.zip
x11-misc/efax-gtk: Fix CFLAGS=-fno-common
Package-Manager: Portage-2.3.86, Repoman-2.3.20 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'x11-misc/efax-gtk')
-rw-r--r--x11-misc/efax-gtk/efax-gtk-3.2.13-r1.ebuild55
-rw-r--r--x11-misc/efax-gtk/files/efax-gtk-3.2.13-fno-common.patch35
2 files changed, 90 insertions, 0 deletions
diff --git a/x11-misc/efax-gtk/efax-gtk-3.2.13-r1.ebuild b/x11-misc/efax-gtk/efax-gtk-3.2.13-r1.ebuild
new file mode 100644
index 000000000000..3a4ae41be487
--- /dev/null
+++ b/x11-misc/efax-gtk/efax-gtk-3.2.13-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="A graphical frontend for the 'efax' application"
+HOMEPAGE="http://efax-gtk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.src.tgz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="nls"
+
+RDEPEND=">=dev-libs/glib-2.10
+ media-libs/tiff:0=
+ x11-libs/libX11
+ x11-libs/c++-gtk-utils:0[gtk]
+ x11-libs/gtk+:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+DOCS="AUTHORS BUGS ChangeLog README"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.13-fno-common.patch
+)
+
+src_prepare() {
+ default
+ # Prevent sandbox violation with chown/chgrp and existing spooldir
+ sed -i -e '/ch.*lp.*spooldir/d' efax-gtk-faxfilter/Makefile.in || die
+
+ sed -i \
+ -e '/^Categories/s:Office;::' \
+ ${PN}.desktop || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --with-gtk-version=gtk3
+}
+
+src_install() {
+ default
+ # File collision with net-misc/efax wrt #401221
+ mv "${ED}"/usr/share/man/man1/efax{,-0.9a}.1 || die
+ mv "${ED}"/usr/share/man/man1/efix{,-0.9a}.1 || die
+}
+
+pkg_postinst() {
+ local spooldir="${EROOT}"/var/spool/fax
+ [[ -d ${spooldir} ]] && chown lp:lp "${spooldir}"
+}
diff --git a/x11-misc/efax-gtk/files/efax-gtk-3.2.13-fno-common.patch b/x11-misc/efax-gtk/files/efax-gtk-3.2.13-fno-common.patch
new file mode 100644
index 000000000000..4cfd79afd164
--- /dev/null
+++ b/x11-misc/efax-gtk/files/efax-gtk-3.2.13-fno-common.patch
@@ -0,0 +1,35 @@
+--- a/efax/efaxos.h
++++ b/efax/efaxos.h
+@@ -11,10 +11,6 @@
+ #define UNIXSIGS SIGHUP, SIGQUIT, SIGIOT, SIGALRM
+ #define CATCHSIGS ANSISIGS, UNIXSIGS
+
+-/* Bit order reversal table. */
+-
+-extern unsigned char normalbits [ ] ;
+-
+ typedef enum ttymodes /* serial port modes: */
+ {
+ COMMAND, /* 19200 8N1, no f/c, DTR high */
+--- a/efax/efaxlib.h
++++ b/efax/efaxlib.h
+@@ -208,7 +208,7 @@
+ /* Bit reversal lookup tables (note that the `normalbits' array
+ is the one actually used for the bit reversal. */
+
+-uchar reversebits [ 256 ], normalbits [ 256 ] ;
++extern uchar reversebits [ 256 ], normalbits [ 256 ] ;
+
+ void initbittab(void) ;
+
+--- a/efax/efaxlib.c
++++ b/efax/efaxlib.c
+@@ -48,6 +48,8 @@
+ return n < 0 ;
+ }
+
++uchar reversebits [ 256 ], normalbits [ 256 ] ;
++
+ /* Provide dummy gettext() function if there is no internationalisation support */
+
+ #ifndef ENABLE_NLS