[gentoo-commits] repo/gentoo:master commit in: net-misc/hylafaxplus/, net-misc/hylafaxplus/files/

2023-01-06 Thread Sam James
commit: febc4111d1cf81f843e20bb2118b6c1a642fbaec
Author: Sam James  gentoo  org>
AuthorDate: Fri Jan  6 08:15:07 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jan  6 08:15:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=febc4111

net-misc/hylafaxplus: fix build w/ tiff-4.5.0

Closes: https://bugs.gentoo.org/886303
Signed-off-by: Sam James  gentoo.org>

 net-misc/hylafaxplus/Manifest|  1 +
 .../hylafaxplus/files/hylafaxplus-7.0.6-allow-tiff-4.5.patch | 12 
 net-misc/hylafaxplus/hylafaxplus-7.0.6-r3.ebuild |  4 
 3 files changed, 17 insertions(+)

diff --git a/net-misc/hylafaxplus/Manifest b/net-misc/hylafaxplus/Manifest
index bd5b6c79d310..879f2476cabe 100644
--- a/net-misc/hylafaxplus/Manifest
+++ b/net-misc/hylafaxplus/Manifest
@@ -1 +1,2 @@
 DIST hylafax-7.0.6.tar.gz 1418749 BLAKE2B 
83fff43dbc5c51f542aa847f61ae1617514a4260695d5c79a036416578ac632a778d0b5263a80fa7ccea9e9923a783759295a39199bdd32a2cb0ecac47ac91b4
 SHA512 
d1f69e13017f5d013ff39cf050c3a7ac6cef19a9ee5910ebe774a7ae06d7d22fd21e31de9734847764caea995539f578c3c458ecec7b9523b5823a841337d9cb
+DIST hylafaxplus-7.0.6-tiff-4.5.0.patch.xz 5880 BLAKE2B 
866de4d8f6159dcf8e27061c49a94e7e9b91f7ae74fad59cb35b99fb2f15bc8f45b4961bd616036bb494b06039658e3f9ec286ebc5de41ab6b6338051bddbc48
 SHA512 
44fc3460a5bd239e039a13b931ef795afa3767c749d6eee09efa8264f0c5288739ffbe1f0011ee156f7d44db455e07c1d3fd72722fb9994bab51fbbbfd25ab82

diff --git a/net-misc/hylafaxplus/files/hylafaxplus-7.0.6-allow-tiff-4.5.patch 
b/net-misc/hylafaxplus/files/hylafaxplus-7.0.6-allow-tiff-4.5.patch
new file mode 100644
index ..dc48efa212bb
--- /dev/null
+++ b/net-misc/hylafaxplus/files/hylafaxplus-7.0.6-allow-tiff-4.5.patch
@@ -0,0 +1,12 @@
+--- a/configure
 b/configure
+@@ -2583,7 +2583,7 @@ EOF
+   echo '#define TIFFSTRIPBYTECOUNTS uint32_t'
+   echo '#define TIFFVERSION TIFF_VERSION'
+   echo '#define TIFFHEADER TIFFHeader';;
+-  4.[01234])  tiff_runlen_t="uint32_t"
++  4.[012345]) tiff_runlen_t="uint32_t"
+   tiff_offset_t="uint64_t"
+   echo '#define TIFFSTRIPBYTECOUNTS uint64_t'
+   echo '#define TIFFVERSION TIFF_VERSION_CLASSIC'
+

diff --git a/net-misc/hylafaxplus/hylafaxplus-7.0.6-r3.ebuild 
b/net-misc/hylafaxplus/hylafaxplus-7.0.6-r3.ebuild
index 35ed4a8e31d9..41b92caf95e1 100644
--- a/net-misc/hylafaxplus/hylafaxplus-7.0.6-r3.ebuild
+++ b/net-misc/hylafaxplus/hylafaxplus-7.0.6-r3.ebuild
@@ -11,6 +11,8 @@ MY_P="${MY_PN}-${PV}"
 DESCRIPTION="Enterprise client-server fax package for class 1 and 2 fax modems"
 HOMEPAGE="https://hylafax.sourceforge.io/";
 SRC_URI="mirror://sourceforge/hylafax/${MY_P}.tar.gz"
+# bug #886303
+SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-tiff-4.5.0.patch.xz";
 S="${WORKDIR}"/${MY_P}
 
 LICENSE="hylafaxplus"
@@ -44,6 +46,8 @@ CONFIG_PROTECT_MASK="${CONFIG_PROTECT_MASK} 
/var/spool/fax/etc/xferfaxlog"
 # See bug #706154, bug #810658 if need to patch for newer libtiff.
 PATCHES=(
"${FILESDIR}"/ldconfig-patch
+   "${FILESDIR}"/${P}-allow-tiff-4.5.patch
+   "${WORKDIR}"/${P}-tiff-4.5.0.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: net-misc/hylafaxplus/, net-misc/hylafaxplus/files/

2022-08-27 Thread Sam James
commit: a94e38544f0927e94325ad851a55c26763cae33a
Author: Sam James  gentoo  org>
AuthorDate: Sat Aug 27 12:59:06 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Aug 27 12:59:54 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a94e3854

net-misc/hylafaxplus: drop use of eval; misc QA fixes

- Drop use of eval
- Use edo
- Avoid bashisms in init script
- Fix docdir
- Add missing libcrypt dep

Closes: https://bugs.gentoo.org/849269
Closes: https://bugs.gentoo.org/821286
Closes: https://bugs.gentoo.org/835835
Signed-off-by: Sam James  gentoo.org>

 net-misc/hylafaxplus/files/hylafaxplus-init-r1   | 176 +++
 net-misc/hylafaxplus/hylafaxplus-7.0.3-r2.ebuild | 159 
 2 files changed, 335 insertions(+)

diff --git a/net-misc/hylafaxplus/files/hylafaxplus-init-r1 
b/net-misc/hylafaxplus/files/hylafaxplus-init-r1
new file mode 100644
index ..37e459f79c99
--- /dev/null
+++ b/net-misc/hylafaxplus/files/hylafaxplus-init-r1
@@ -0,0 +1,176 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Author Geaaru
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="zap"
+
+depend() {
+   use lo
+}
+
+checkconfig() {
+   ebegin "Check hylafax server configuration..."
+
+   if [ x$spooldir = x ] ; then
+   eerror "No spooldir directory defined"
+   return 1
+   else
+   SPOOL=$spooldir
+   einfo "Use spool directory $SPOOL"
+   fi
+
+   if [ x$mode = x ] ; then
+   eerror "No mode defined"
+   return 1
+   fi
+
+   if [ ! -f $SPOOL/etc/setup.cache ] ; then
+   eerror "No $SPOOL/etc/setup.cache file founded. Use faxsetup 
command"
+   return 1
+   fi
+
+   if [ x$hfaxd = x -o ! -f $hfaxd ] ; then
+   eerror "No hfaxd daemon founded"
+   return 1
+   fi
+
+   if [ x$faxq = x -o ! -f $faxq ] ; then
+   eerror "No faxq program founded"
+   return 1
+   fi
+
+   if [ x$faxgetty = x -o ! -f $faxgetty ] ; then
+   eerror "No faxgetty program founded"
+   return 1
+   fi
+
+   if [ x$faxbind = x ] ; then
+   eerror "No binding address supply"
+   return 1
+   fi
+
+   if [ x$piddir = x ] ; then
+   PIDDIR=$SPOOL
+   else
+   PIDDIR=$piddir
+   fi
+
+
+   hfaxd_args="-l $faxbind -q $SPOOL"
+
+   case $mode in
+   newproto)
+   if [ x$faxport = x ] ; then
+   eerror "No faxport defined"
+   return 1
+   fi
+   hfaxd_args="$hfaxd_args -i $faxport"
+   ;;
+   oldproto)
+   if [ x$oldprotoport = x ] ; then
+   eerror "No oldprotoport defined"
+   return 1
+   fi
+   hfaxd_args="$hfaxd_args -o $oldprotoport"
+   ;;
+   snpp)
+   if [ x$snppport = x ] ; then
+   eerror "No snppport defined"
+   return 1
+   fi
+   hfaxd_args="$hfaxd_args -s $snppport"
+   ;;
+   any)
+   if [ x$faxport = x -o x$snppport = x -o x$oldprotoport 
= x ] ; then
+   eerror "No port data founded for old services"
+   return 1
+   fi
+   hfaxd_args="$hfaxd_args -i $faxport -s $snppport -o 
$oldprotoport"
+   ;;
+   *)
+   eerror "Invalid mode"
+   return 1
+   ;;
+
+   esac
+
+   faxq_args="-q $SPOOL"
+
+   # workaround for manage save of pidfile with start-stop-daemon
+   hfaxd_args="$hfaxd_args -d"
+   faxq_args="$faxq_args -D"
+   
+   return 0
+}
+
+start() {
+   local result
+
+   checkconfig || return 1
+
+   ebegin "Starting HylaFAX server daemons"
+
+   start_faxq
+   result=$?
+
+   if [ $result -ne 0 ]  ; then
+   eerror "Error on start $faxq daemon"
+   return 1
+   fi
+
+   start_hfaxd
+   result=$?
+
+   eend $result
+}
+
+start_hfaxd() {
+   local arguments="--start \
+--make-pidfile --pidfile $PIDDIR/hfaxd.pid"
+   
+   einfo "Starting $hfaxd with args $hfaxd_args"
+
+   start-stop-daemon -b ${arguments} --exec $hfaxd -- $hfaxd_args > 
/dev/null 2>&1
+
+   return $?;
+}
+
+start_faxq() {
+   local arguments="--start \
+--make-pidfile --pidfile $PIDDIR/faxq.pid"
+   einfo "Starting $faxq ..

[gentoo-commits] repo/gentoo:master commit in: net-misc/hylafaxplus/, net-misc/hylafaxplus/files/

2022-08-27 Thread Sam James
commit: 1409c9fde13239de5e8713359988b4839ce2ae22
Author: Sam James  gentoo  org>
AuthorDate: Sat Aug 27 13:20:59 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Aug 27 13:20:59 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1409c9fd

net-misc/hylafaxplus: tidy up init script a bit further deux

Bug: https://bugs.gentoo.org/849269
See: a94e38544f0927e94325ad851a55c26763cae33a
Signed-off-by: Sam James  gentoo.org>

 net-misc/hylafaxplus/files/hylafaxplus-init-r1 | 10 +-
 ...hylafaxplus-7.0.3-r3.ebuild => hylafaxplus-7.0.3-r4.ebuild} |  0
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net-misc/hylafaxplus/files/hylafaxplus-init-r1 
b/net-misc/hylafaxplus/files/hylafaxplus-init-r1
index fd70fe02d657..9a602b44aa70 100644
--- a/net-misc/hylafaxplus/files/hylafaxplus-init-r1
+++ b/net-misc/hylafaxplus/files/hylafaxplus-init-r1
@@ -52,7 +52,7 @@ checkconfig() {
if [ x${PIDDIR} = x ] ; then
PIDDIR=${SPOOL}
else
-   PIDDIR=${PIDDIR}
+   PIDDIR=${piddir}
fi
 
 
@@ -159,12 +159,12 @@ zap() {
 
ebegin "Zap HylaFAX server daemon files"
 
-   if [ -f ${PIDFILE}/hfaxd.pid ] ; then
-   rm -f ${PIDFILE}/hfaxd.pid
+   if [ -f ${PIDDIR}/hfaxd.pid ] ; then
+   rm -f ${PIDDIR}/hfaxd.pid
fi
 
-   if [ -f ${PIDFILE}/faxq.pid ] ; then
-   rm -f ${PIDFILE}/faxq.pid
+   if [ -f ${PIDDIR}/faxq.pid ] ; then
+   rm -f ${PIDDIR}/faxq.pid
fi
 }
 

diff --git a/net-misc/hylafaxplus/hylafaxplus-7.0.3-r3.ebuild 
b/net-misc/hylafaxplus/hylafaxplus-7.0.3-r4.ebuild
similarity index 100%
rename from net-misc/hylafaxplus/hylafaxplus-7.0.3-r3.ebuild
rename to net-misc/hylafaxplus/hylafaxplus-7.0.3-r4.ebuild



[gentoo-commits] repo/gentoo:master commit in: net-misc/hylafaxplus/, net-misc/hylafaxplus/files/

2020-07-07 Thread Joonas Niilola
commit: 40bc6b7f79069264f3cbc918ffae4af4feab2bb5
Author: John Helmert III  posteo  net>
AuthorDate: Wed Jul  1 04:33:35 2020 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Tue Jul  7 13:56:31 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40bc6b7f

net-misc/hylafaxplus: Add 7.0.2 (security bump)

Bug: https://bugs.gentoo.org/730290
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: John Helmert III  posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/16541
Signed-off-by: Joonas Niilola  gentoo.org>

 net-misc/hylafaxplus/Manifest  |   1 +
 .../files/hylafaxplus-CVE-2020-1539x.patch | 110 ++
 net-misc/hylafaxplus/hylafaxplus-7.0.2.ebuild  | 160 +
 3 files changed, 271 insertions(+)

diff --git a/net-misc/hylafaxplus/Manifest b/net-misc/hylafaxplus/Manifest
index 3e0b1d426ce..51882b7cd3d 100644
--- a/net-misc/hylafaxplus/Manifest
+++ b/net-misc/hylafaxplus/Manifest
@@ -1,2 +1,3 @@
 DIST hylafax-5.5.5.tar.gz 1353495 BLAKE2B 
e1b41a5cf5502ad28467625495171c085f43f4352b73bfd633da851a1366502aca04a157790ad4a7f3d634a6adbb5dab4c1eeb294283352e9eedaf03c565cb42
 SHA512 
ee6225ae044c567093103f35c30d848db757636c1d8db78e8f7cb43eb01ea34ab229a81ca4175e2bf30d3c87b598d5b5797b7d92b0dc852bf4b69c697baca8cf
 DIST hylafax-5.6.1.tar.gz 1370677 BLAKE2B 
bd93d54f2c3e2c5c4c33617a0d95569c82bcbd32f669fb2ea513b86e112a5743ae6b4ddc8d43f3bd4af6006517e8787392c84bf60e715c104ddb0d819b22985a
 SHA512 
c86c33dc9e8feec4e265156fa3bbda18cf187feeef5c812ff3d3c7857de048a688bb979fcd3494ee8fe58a004a384a2a161d05245c86d0c304311d63f62a9eb1
+DIST hylafax-7.0.2.tar.gz 1393586 BLAKE2B 
cbf99f91a0aa07783dd30e76ce8416b2933240d4bf829220909000519f9c9e14a324163707c14504848ba71e7c1ee7d98455f06bb040c2c50c1493d0138122aa
 SHA512 
ea68404ad79e798b29450683eaa927e73033e0fa8160b803a3e2c9000df487c81193cc8fc0c1187477f5e1b2e26eec1c065ebc17e0be82e9a3e3758b1b5b5e4e

diff --git a/net-misc/hylafaxplus/files/hylafaxplus-CVE-2020-1539x.patch 
b/net-misc/hylafaxplus/files/hylafaxplus-CVE-2020-1539x.patch
new file mode 100644
index 000..6c484590c46
--- /dev/null
+++ b/net-misc/hylafaxplus/files/hylafaxplus-CVE-2020-1539x.patch
@@ -0,0 +1,110 @@
+commit e8f8196230ae15f6f7d7104ded3e2633002506e4
+Author: faxguy 
+Date:   Sat Jun 13 23:46:33 2020 +
+
+Johannes Segitz reported two issues:
+
+1) faxaddmodem, faxsetup, and probemodem create temporary directories in a 
way that is not secure due to a race condition.
+
+2) The HylaFAX spool directory bin and etc subdirectories are not secure 
against uucp deleting and recreating scripts that root runs.
+
+These changes address these two issues.
+
+
+
+git-svn-id: https://svn.code.sf.net/p/hylafax/HylaFAX+@2534 
5505949e-d877-4686-9e03-c53b7a51b376
+
+diff --git a/CONTRIBUTORS b/CONTRIBUTORS
+index 057739f..a9d4f21 100644
+--- a/CONTRIBUTORS
 b/CONTRIBUTORS
+@@ -203,6 +203,7 @@ following for their contributions:
+   Travis Schafer  LogSend and LogRecv modem config 
options, documentation fixes
+   Sven Schmidt
+   Steven Schoch   faxrcvd faxinfo text parsing
++  Johannes Segitz code security audit
+   John Sellens
+   Chris Severance documentation fixes, scripting 
improvements
+   Simon 
+diff --git a/Makefile.in b/Makefile.in
+index 1ee4d76..ec0cda7 100644
+--- a/Makefile.in
 b/Makefile.in
+@@ -208,7 +208,10 @@ makeServerDirs::
+   -idb hylafax.sw.server -root ${INSTALLROOT} -dir ${SPOOL}
+   -${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m ${DIRMODE} \
+   -idb hylafax.sw.server -dir \
+-  -root ${INSTALLROOT} -F ${SPOOL} bin client config dev etc info log 
recvq status
++  -root ${INSTALLROOT} -F ${SPOOL} client config dev info log recvq 
status
++  -${INSTALL} -u root -g root -m ${DIRMODE} \
++  -idb hylafax.sw.server -dir \
++  -root ${INSTALLROOT} -F ${SPOOL} bin etc
+   -${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 700 \
+   -idb hylafax.sw.server -dir \
+   -root ${INSTALLROOT} -F ${SPOOL} sendq doneq docq tmp pollq archive
+diff --git a/etc/faxaddmodem.sh.in b/etc/faxaddmodem.sh.in
+index dc39917..c4d3ff1 100644
+--- a/etc/faxaddmodem.sh.in
 b/etc/faxaddmodem.sh.in
+@@ -113,12 +113,14 @@ if [ "$euid" != "root" ]; then
+ fi
+ 
+ # security
++o="`umask`"
++umask 077
+ TMPDIR=`(mktemp -d /tmp/.faxaddmodem.XX) 2>/dev/null`
++umask "$o"
+ if test X$TMPDIR = X; then
+-TMPDIR=/tmp/.faxaddmodem$$
++echo "Failed to create temporary directory.  Cannot continue."
++exit 1
+ fi
+-@RM@ -rf $TMPDIR
+-(umask 077 ; mkdir $TMPDIR) || exit 1
+ 
+ SH=$SCRIPT_SH # shell for use below
+ CPATH=$SPOOL/etc/config   # prefix of configuration file
+diff --git a/etc/faxsetup.sh.in b/etc/faxsetup.sh.in
+index 556eef5..b4aae40 100644
+--- a/etc/faxsetup.sh.in
 b/et

[gentoo-commits] repo/gentoo:master commit in: net-misc/hylafaxplus/, net-misc/hylafaxplus/files/

2018-06-20 Thread Pacho Ramos
commit: e12135287fb8c291e96bb5bca3ecd1df5065c6a1
Author: Pacho Ramos  gentoo  org>
AuthorDate: Wed Jun 20 18:21:09 2018 +
Commit: Pacho Ramos  gentoo  org>
CommitDate: Wed Jun 20 18:31:54 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1213528

net-misc/hylafaxplus: Version bump (#547968)

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-misc/hylafaxplus/Manifest |   1 +
 net-misc/hylafaxplus/files/hylafaxplus-init   |   4 +-
 net-misc/hylafaxplus/files/ldconfig-patch |   4 +-
 net-misc/hylafaxplus/hylafaxplus-5.5.9.ebuild | 162 ++
 4 files changed, 167 insertions(+), 4 deletions(-)

diff --git a/net-misc/hylafaxplus/Manifest b/net-misc/hylafaxplus/Manifest
index f7fcc435011..fe42c6252f6 100644
--- a/net-misc/hylafaxplus/Manifest
+++ b/net-misc/hylafaxplus/Manifest
@@ -1 +1,2 @@
 DIST hylafax-5.5.5.tar.gz 1353495 BLAKE2B 
e1b41a5cf5502ad28467625495171c085f43f4352b73bfd633da851a1366502aca04a157790ad4a7f3d634a6adbb5dab4c1eeb294283352e9eedaf03c565cb42
 SHA512 
ee6225ae044c567093103f35c30d848db757636c1d8db78e8f7cb43eb01ea34ab229a81ca4175e2bf30d3c87b598d5b5797b7d92b0dc852bf4b69c697baca8cf
+DIST hylafax-5.5.9.tar.gz 1364807 BLAKE2B 
1e63d28dbe42170af65369ceab6b76b30fb264515992bb7f3561722eccae21e2d790e50eab3f1f9bdbb8c48e369166c90271aa8cf37c1905fda44c3b31b18b71
 SHA512 
67ac84df2619db7fb88cd7ad3af4beff9918b2481fc8edf7cc7574941161dd7aa6186cfc49c6cdb2a1f073f6cbf2f2a4ed084ca70ebe288bf7cd8e752cd56b2d

diff --git a/net-misc/hylafaxplus/files/hylafaxplus-init 
b/net-misc/hylafaxplus/files/hylafaxplus-init
index 851cd3b0977..c15f26774a8 100644
--- a/net-misc/hylafaxplus/files/hylafaxplus-init
+++ b/net-misc/hylafaxplus/files/hylafaxplus-init
@@ -1,9 +1,9 @@
 #!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Author Geaaru
 # Distributed under the terms of the GNU General Public License v2
 
-opts="zap"
+extra_commands="zap"
 
 depend() {
use lo

diff --git a/net-misc/hylafaxplus/files/ldconfig-patch 
b/net-misc/hylafaxplus/files/ldconfig-patch
index 8b0f4352d51..78a42cf562f 100644
--- a/net-misc/hylafaxplus/files/ldconfig-patch
+++ b/net-misc/hylafaxplus/files/ldconfig-patch
@@ -1,5 +1,5 @@
 faxd/Makefile.LINUXdso.original2011-12-30 18:17:59.0 +0100
-+++ faxd/Makefile.LINUXdso 2011-12-30 18:18:51.0 +0100
+--- a/faxd/Makefile.LINUXdso.original  2011-12-30 18:17:59.0 +0100
 b/faxd/Makefile.LINUXdso   2011-12-30 18:18:51.0 +0100
 @@ -37,7 +37,6 @@
  
  installDSO: libfaxserver.${DSO}

diff --git a/net-misc/hylafaxplus/hylafaxplus-5.5.9.ebuild 
b/net-misc/hylafaxplus/hylafaxplus-5.5.9.ebuild
new file mode 100644
index 000..18d1e65d47a
--- /dev/null
+++ b/net-misc/hylafaxplus/hylafaxplus-5.5.9.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit pam toolchain-funcs
+
+MY_PN="${PN/plus/}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Enterprise client-server fax package for class 1 and 2 fax modems"
+HOMEPAGE="http://hylafax.sourceforge.net";
+SRC_URI="mirror://sourceforge/hylafax/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="hylafaxplus"
+KEYWORDS="~amd64 ~x86"
+IUSE="jbig html lcms ldap mgetty pam"
+
+DEPEND="
+   >=sys-libs/zlib-1.1.4
+   app-text/ghostscript-gpl
+   virtual/mta
+   media-libs/tiff:0[jbig?]
+   virtual/jpeg:0
+   jbig? ( media-libs/jbigkit )
+   virtual/awk
+   lcms? ( media-libs/lcms )
+   ldap? (  net-nds/openldap )
+   pam? ( virtual/pam )
+   mgetty? ( net-dialup/mgetty[-fax] )
+   !net-dialup/mgetty[fax]
+"
+RDEPEND="${DEPEND}
+   net-mail/metamail
+   !net-dialup/sendpage
+"
+
+S="${WORKDIR}/${MY_P}"
+
+export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc /usr/lib/fax"
+export CONFIG_PROTECT_MASK="${CONFIG_PROTECT_MASK} 
/var/spool/fax/etc/xferfaxlog"
+
+PATCHES=( "${FILESDIR}/ldconfig-patch" )
+
+src_prepare() {
+   default
+
+   # force it not to strip binaries
+   for dir in etc util faxalter faxcover faxd faxmail faxrm faxstat \
+   hfaxd sendfax sendpage ; do
+   sed -i -e "s:-idb:-idb \"nostrip\" -idb:g" \
+   "${dir}"/Makefile.in || die "sed failed"
+   done
+
+   sed -i -e "s:hostname:hostname -f:g" util/{faxrcvd,pollrcvd}.sh.in || 
die "sed on hostname failed"
+
+   # Respect LDFLAGS(at least partially)
+   sed -i -e "/^LDFLAGS/s/LDOPTS}/LDOPTS} ${LDFLAGS}/" defs.in || die "sed 
on defs.in failed"
+
+   sed -i -e "s|-fpic|-fPIC|g" \
+   configure || die
+}
+
+src_configure() {
+   do_configure() {
+   echo ./configure --nointeractive ${1}
+   # eval required for quoting in ${my_conf} to work properly, 
better way?
+   eval ./configure --nointeractive ${1} || die "./configure 
failed"
+   }
+