Fixes for bugs 106882 and 106412, stable bump, and new version
authorSteve Arnold <nerdboy@gentoo.org>
Wed, 28 Sep 2005 05:30:24 +0000 (05:30 +0000)
committerSteve Arnold <nerdboy@gentoo.org>
Wed, 28 Sep 2005 05:30:24 +0000 (05:30 +0000)
Package-Manager: portage-2.0.51.22-r2

net-misc/hylafax/ChangeLog
net-misc/hylafax/Manifest
net-misc/hylafax/files/digest-hylafax-4.1.8-r4 [deleted file]
net-misc/hylafax/files/digest-hylafax-4.2.2 [new file with mode: 0644]
net-misc/hylafax/files/hylafax-4.2-tmpdir.patch [new file with mode: 0644]
net-misc/hylafax/hylafax-4.1.8-r4.ebuild [deleted file]
net-misc/hylafax/hylafax-4.2.0-r2.ebuild
net-misc/hylafax/hylafax-4.2.1-r1.ebuild
net-misc/hylafax/hylafax-4.2.1.ebuild
net-misc/hylafax/hylafax-4.2.2.ebuild [new file with mode: 0644]

index d0d40cefea2e222c6348b45d37af57fc1d93fc76..187011dfaeaaa940b20d5fc2578360cfd7d39082 100644 (file)
@@ -1,6 +1,16 @@
 # ChangeLog for net-misc/hylafax
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/ChangeLog,v 1.51 2005/09/10 08:35:06 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/ChangeLog,v 1.52 2005/09/28 05:30:24 nerdboy Exp $
+
+*hylafax-4.2.2 (28 Sep 2005)
+
+  28 Sep 2005; Steve Arnold <nerdboy@gentoo.org>
+  +files/hylafax-4.2-tmpdir.patch, -hylafax-4.1.8-r4.ebuild,
+  hylafax-4.2.0-r2.ebuild, hylafax-4.2.1.ebuild, hylafax-4.2.1-r1.ebuild,
+  +hylafax-4.2.2.ebuild:
+  Fixes for bugs 106882 (tmpdir fix) and 106412 (put back missing fPIC
+  patch) and cleanup of older ebuild - scream if you need it back.
+  Stable bumps for x86 and sparc, and new ~arch version.
 
   10 Sep 2005; Steve Arnold <nerdboy@gentoo.org>
   +files/hylafax-4.2.0-faxmail-charset.patch, -hylafax-4.2.0-r1.ebuild,
index 7fc3b8ae1cdf1bb3c76ba0ee41dcde03dec1d019..1ff73b4f20d7030e9fc2d6a49cb67fa0d9272c2b 100644 (file)
@@ -1,9 +1,9 @@
-MD5 1491e70dfb13caf019f2cbf1e9e82a58 ChangeLog 10386
-MD5 0729fe5e5aca8d7a6c7201c1502893e8 hylafax-4.2.0-r2.ebuild 3459
-MD5 0cbf4d2990acb2f1d427c20ee46cc64e hylafax-4.2.1.ebuild 3213
-MD5 f965e3c041f4e5ceb970a761df2009a8 hylafax-4.2.1-r1.ebuild 3793
+MD5 ac6c49f8c13ac40eb6b6501c2bd27830 ChangeLog 10821
+MD5 76a2b495055d6d7b10a8aa58c210c911 hylafax-4.2.0-r2.ebuild 3540
+MD5 082910ce61445532140501e30c29763f hylafax-4.2.1.ebuild 3356
+MD5 4d522c91b8ac9975b544f0d65d2738a5 hylafax-4.2.1-r1.ebuild 3866
 MD5 d82acf1bcf0f7f9e181d6a2821292f2e metadata.xml 435
-MD5 d83f32c1c30e2a8804a0f5524ed411d2 hylafax-4.1.8-r4.ebuild 3189
+MD5 21516d5d24d3ba17d8f1540c8c7f876f hylafax-4.2.2.ebuild 3825
 MD5 46bbae3c77d5651a20e606eb6228c159 files/99hylafax 62
 MD5 eab749cee07de1984c9756e6eb886df0 files/configure-gcc-3.4.patch 696
 MD5 61b6d16148a84723c2996b519a57d498 files/digest-hylafax-4.2.0-r2 66
@@ -11,13 +11,14 @@ MD5 c4edcc178e6eeca8ec4680be0790e6da files/hylafax-4.2.0-fPIC.patch 1627
 MD5 bc084d075b601d42fbd417b97a45f1b2 files/hylafax 3757
 MD5 5f2f2e3fe04414f953d4010d32261318 files/hylafax-4.1.8-fPIC.patch 2086
 MD5 ad3b0e7082e6e71ee6ba940ce1b6b071 files/hylafax-4.1.8-gcc-version.patch 520
-MD5 5243f5e3321151d074643f652133fdfd files/digest-hylafax-4.1.8-r4 66
+MD5 393322f25c85e29fe90c0d2cbe503833 files/digest-hylafax-4.2.2 66
 MD5 fa83948864d83f34f54ce35f26b38ed6 files/99hylafax-4.2 75
 MD5 491e78765b433d7c11146120cf7e40f8 files/hylafax-4.2 3759
 MD5 363ea0f56887928eb876bbe25223de85 files/hylafax-hostvuln.patch 2098
 MD5 e1c4b78af20d5e332db1aef29080caf7 files/digest-hylafax-4.2.1 66
 MD5 cfcafeadd916b8a9103b9b9110887916 files/hylafax-4.2.0-faxcron_uid.patch 527
 MD5 6fd09a3cd0a1657591fc6c5c076cd462 files/hylafax-4.2.0-tiff_version.patch 1011
+MD5 6c0efb14f66d112c7e11255ce1835079 files/hylafax-4.2-tmpdir.patch 3433
 MD5 e1c4b78af20d5e332db1aef29080caf7 files/digest-hylafax-4.2.1-r1 66
 MD5 0bf655709c9fc6c62ffc7d2a63340c90 files/hylafax-4.2.1-openpam.patch 1571
 MD5 9cf5cada0895231b3d403f8791431102 files/hylafax-4.2.0-faxmail-charset.patch 473
diff --git a/net-misc/hylafax/files/digest-hylafax-4.1.8-r4 b/net-misc/hylafax/files/digest-hylafax-4.1.8-r4
deleted file mode 100644 (file)
index 6a11a8f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MD5 beaf55ad7935e3bcaa53a5ac093f61a8 hylafax-4.1.8.tar.gz 1285536
diff --git a/net-misc/hylafax/files/digest-hylafax-4.2.2 b/net-misc/hylafax/files/digest-hylafax-4.2.2
new file mode 100644 (file)
index 0000000..cbb86d0
--- /dev/null
@@ -0,0 +1 @@
+MD5 356328a6289d0a26775f33d6bfb75368 hylafax-4.2.2.tar.gz 1438894
diff --git a/net-misc/hylafax/files/hylafax-4.2-tmpdir.patch b/net-misc/hylafax/files/hylafax-4.2-tmpdir.patch
new file mode 100644 (file)
index 0000000..a7d77e1
--- /dev/null
@@ -0,0 +1,106 @@
+diff -ru hylafax-4.2.1/util/faxcron.sh.in hylafax-4.2.1.new/util/faxcron.sh.in
+--- hylafax-4.2.1/util/faxcron.sh.in   2004-12-22 14:44:06.000000000 +0100
++++ hylafax-4.2.1.new/util/faxcron.sh.in       2005-08-06 12:24:16.000000000 +0200
+@@ -69,12 +69,18 @@
+ UPDATE="date +'%D %H:%M' >$LAST"
+ 
+ # security
+-TMPDIR=/tmp/.faxcron.sh$$
+-rm -rf $TMPDIR
+-mkdir $TMPDIR || exit 1
++if test -n "`type -p mktemp`" ; then
++        TMPFDIR=`mktemp -d -t xferfax.XXXXXX`  || { echo "$0: Cannot create temporary dir!" >&2 ; exit 1; }
++else
++      TMPFDIR=${TMPDIR-/tmp}/.faxcron.sh$$
++      rm -rf $TMPFDIR
++      mkdir $TMPFDIR || { echo "$0: Cannot create temporary dir! Aborting." ; exit 1; }
++fi
++
++JUNK=$TMPFDIR/faxjunk$$         # temp file used multiple times
++AWKTMP=$TMPFDIR/faxawk$$                # temp file for awk program
+ 
+-JUNK=$TMPDIR/faxjunk$$         # temp file used multiple times
+-AWKTMP=$TMPDIR/faxawk$$                # temp file for awk program
++trap "$RM \$AWKTMP \$JUNK; [ -d $TMPFDIR ] && $RM -rf $TMPFDIR" 0 1 2 15
+ 
+ while [ x"$1" != x"" ] ; do
+     case $1 in
+@@ -90,7 +96,6 @@
+     shift
+ done
+ 
+-trap "$RM \$AWKTMP \$JUNK; $RM -rf $TMPDIR; exit 1" 0 1 2 15
+ 
+ 
+ test -z "$LASTRUN" && LASTRUN=`$CAT $LAST 2>/dev/null`
+@@ -285,7 +290,7 @@
+ EOF
+ $AWK -f $AWKTMP -v LASTRUN="$LASTRUN" TRANSCRIPT="\
+     LOGFILE=log/%s;\
+-    TMP=$TMPDIR/faxlog\$\$;\
++    TMP=$TMPFDIR/faxlog\$\$;\
+     if [ -f \$LOGFILE ]; then\
+       $SED -n -e '/%s %s %s.*SESSION BEGIN/,/SESSION END/p' \$LOGFILE |\
+       $SED -e '/start.*timer/d'\
+diff -ru hylafax-4.2.1/util/recvstats.sh.in hylafax-4.2.1.new/util/recvstats.sh.in
+--- hylafax-4.2.1/util/recvstats.sh.in 2004-06-18 06:10:29.000000000 +0200
++++ hylafax-4.2.1.new/util/recvstats.sh.in     2005-08-06 12:25:17.000000000 +0200
+@@ -153,15 +153,16 @@
+ 
+ #
+ # Generate an awk program to process the statistics file.
+-#
+-tmpAwk=/tmp/xferfax$$
+-trap "rm -f $tmpAwk; exit 1" 0 1 2 15
+-
+-# security
+-rm -rf $tmpAwk
+-${NOCLOBBER_ON}
+-> $tmpAwk || exit 1
+-${NOCLOBBER_OFF}
++if test -n "`type -p mktemp`" ; then
++        tmpAwk=`mktemp -t xferfax.XXXXXX`  || { echo "$0: Cannot create temporary file!" >&2 ; exit 1; }
++else
++        tmpAwk=${TMPDIR-/tmp}/xferfax$$
++        rm -f $tmpAwk
++        ${NOCLOBBER_ON}
++        > $tmpAwk || { echo "$0: Cannot create temporary file! Aborting." ; exit 1; }
++        ${NOCLOBBER_OFF}
++fi
++trap "[ -f $tmpAwk ] && rm -f $tmpAwk" 0 1 2 15
+ 
+ ($CAT<<'EOF'
+ #
+diff -ru hylafax-4.2.1/util/xferfaxstats.sh.in hylafax-4.2.1.new/util/xferfaxstats.sh.in
+--- hylafax-4.2.1/util/xferfaxstats.sh.in      2004-06-18 06:10:29.000000000 +0200
++++ hylafax-4.2.1.new/util/xferfaxstats.sh.in  2005-08-06 12:25:28.000000000 +0200
+@@ -26,6 +26,9 @@
+ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+ # OF THIS SOFTWARE.
+ #
++# security
++NOCLOBBER_ON=@NOCLOBBER_ON@
++NOCLOBBER_OFF=@NOCLOBBER_OFF@
+ 
+ #
+ # Print Statistics about Transmitted Facsimile.
+@@ -169,8 +172,17 @@
+ #
+ # Generate an awk program to process the statistics file.
+ #
+-tmpAwk=/tmp/xferfax$$
+-trap "rm -f $tmpAwk; exit 1" 0 1 2 15
++if test -n "`type -p mktemp`" ; then
++        tmpAwk=`mktemp -t xferfax.XXXXXX`  || { echo "$0: Cannot create temporary file!" >&2 ; exit 1; }
++else
++      tmpAwk=${TMPDIR-/tmp}/xferfax$$
++      rm -f $tmpAwk
++      ${NOCLOBBER_ON}
++      > $tmpAwk || { echo "$0: Cannot create temporary file! Aborting." ; exit 1; }
++      ${NOCLOBBER_OFF}
++fi
++trap "[ -f $tmpAwk ] && rm -f $tmpAwk" 0 1 2 15
++
+ 
+ ($CAT<<'EOF'
+ #
diff --git a/net-misc/hylafax/hylafax-4.1.8-r4.ebuild b/net-misc/hylafax/hylafax-4.1.8-r4.ebuild
deleted file mode 100644 (file)
index 087feb2..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.1.8-r4.ebuild,v 1.6 2005/01/11 15:34:23 kingtaco Exp $
-
-# This was originally contributed by Stephane Loeuillet, via
-# Gentoo bug: http://bugs.gentoo.org/show_bug.cgi?id=28574
-# Nice job, and thanks :)
-# Now with autoreconf for new gcc, and a new gentoo init script.
-
-inherit eutils
-
-IUSE="jpeg"
-
-DESCRIPTION="Client-server fax package for class 1 and 2 fax modems."
-HOMEPAGE="http://www.hylafax.org"
-SRC_URI="ftp://ftp.hylafax.org/source/${P}.tar.gz"
-
-SLOT="0"
-LICENSE="hylafax"
-KEYWORDS="x86 sparc hppa ~alpha ~amd64 ~ppc"
-
-DEPEND="net-dialup/mgetty
-       >=sys-libs/zlib-1.1.4
-       virtual/ghostscript
-       >=media-libs/tiff-3.5.5
-       jpeg? ( media-libs/jpeg )
-       sys-apps/gawk"
-
-RDEPEND="${DEPEND}
-       net-mail/metamail"
-
-export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc"
-
-src_compile() {
-       epatch ${FILESDIR}/${P}-gcc-version.patch
-       epatch ${FILESDIR}/${P}-fPIC.patch
-       # no 'econf' here because does not support standard --prefix option (prehistoric autoconf v1.92 used !!!)
-       autoreconf -f
-       ./configure \
-               --with-DIR_BIN=/usr/bin \
-               --with-DIR_SBIN=/usr/sbin \
-               --with-DIR_LIB=/usr/lib \
-               --with-DIR_LIBEXEC=/usr/sbin \
-               --with-DIR_LIBDATA=/usr/lib/fax \
-               --with-DIR_LOCKS=/var/lock \
-               --with-DIR_MAN=/usr/share/man \
-               --with-DIR_SPOOL=/var/spool/fax \
-               --with-AFM=no \
-               --with-AWK=/usr/bin/gawk \
-               --with-PATH_VGETTY=/sbin/vgetty \
-               --with-PATH_GETTY=/sbin/agetty \
-               --with-HTML=no \
-               --with-PS=auto \
-               --with-PATH_GSRIP=/usr/bin/gs \
-               --with-PATH_DPSRIP=/var/spool/fax/bin/ps2fax \
-               --with-PATH_IMPRIP=/usr/share/fax/psrip \
-               --with-SYSVINIT=/etc/init.d \
-               --with-INTERACTIVE=no \
-               --with-LIBTIFF="-ltiff -ljpeg -lz" \
-               --with-OPTIMIZER="${CFLAGS}" || die
-       # no 'emake' for the same reason (might use an old automake version)
-       make || die
-}
-
-src_install() {
-
-       dodir /usr/{bin,sbin} /usr/lib/fax /usr/share/man \
-               /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
-       chown -R uucp:uucp ${D}/var/spool/fax
-
-       make \
-               BIN=${D}/usr/bin \
-               SBIN=${D}/usr/sbin \
-               LIBDIR=${D}/usr/lib \
-               LIB=${D}/usr/lib \
-               LIBEXEC=${D}/usr/sbin \
-               LIBDATA=${D}/usr/lib/fax \
-               MAN=${D}/usr/share/man \
-               SPOOL=${D}/var/spool/fax \
-               install || die
-
-       einfo "Adding env.d entry for Hylafax"
-       dodir /etc/env.d
-       insinto /etc/env.d
-       doins ${FILESDIR}/99hylafax
-
-       keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
-       keepdir /var/spool/fax/{status,sendq,recvq,log,info,doneq,docq,dev}
-
-       einfo "Adding init.d entry for Hylafax"
-       insinto /etc/init.d
-       insopts -m 755
-       doins ${FILESDIR}/hylafax
-
-       dodoc COPYRIGHT README TODO VERSION
-
-       dohtml -r html/
-       keepdir /usr/share/doc/${P}
-}
-
-pkg_postinst() {
-       ewarn "Proper fax2tiff support now requires libtiff 3.5.5 until there"
-       ewarn "is an upstream fix for bug #48077.  You must use this version"
-       ewarn "of fax2tiff if you need conversion of G3 files, however, you"
-       ewarn "you must still build hylafax against tiff-3.5.7-r1 or better."
-       ewarn "I repeat: do not try to build hylafax or anything else against"
-       ewarn "tiff-3.5.5 because it won't work.  You've been warned."
-}
index 299ac77f12fc2b0613c1bee24c94819e53c63941..31b0a3236df56b0f6055c5b695fb3eac6ff2a78f 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.2.0-r2.ebuild,v 1.3 2005/09/10 08:35:06 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.2.0-r2.ebuild,v 1.4 2005/09/28 05:30:24 nerdboy Exp $
 
 inherit eutils
 
@@ -35,6 +35,8 @@ src_unpack() {
        epatch ${FILESDIR}/configure-gcc-3.4.patch
        epatch ${FILESDIR}/hylafax-hostvuln.patch
        epatch ${FILESDIR}/${P}-faxmail-charset.patch
+       epatch ${FILESDIR}/${P}-fPIC.patch
+       epatch ${FILESDIR}/hylafax-4.2-tmpdir.patch
 }
 
 src_compile() {
index cdbba4c0fe22634473663a6317eb643d12949dfc..2ae1e5d11bd7a708d9b89df5c229ea1fc2e17101 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.2.1-r1.ebuild,v 1.3 2005/08/12 07:39:45 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.2.1-r1.ebuild,v 1.4 2005/09/28 05:30:24 nerdboy Exp $
 
 inherit eutils multilib pam
 
@@ -12,7 +12,7 @@ SRC_URI="ftp://ftp.hylafax.org/source/${P}.tar.gz"
 
 SLOT="0"
 LICENSE="hylafax"
-KEYWORDS="~x86 ~sparc ~hppa ~alpha ~amd64 ~ppc"
+KEYWORDS="x86 sparc ~hppa ~alpha ~amd64 ~ppc"
 
 DEPEND="!faxonly? ( net-dialup/mgetty )
        >=sys-libs/zlib-1.1.4
@@ -33,6 +33,7 @@ src_unpack() {
        cd ${S}
 
        epatch ${FILESDIR}/${P}-openpam.patch
+       epatch ${FILESDIR}/hylafax-4.2-tmpdir.patch
 }
 
 src_compile() {
@@ -46,7 +47,7 @@ src_compile() {
                --with-DIR_SBIN=/usr/sbin
                --with-DIR_LIB=/usr/$(get_libdir)
                --with-DIR_LIBEXEC=/usr/sbin
-               --with-DIR_LIBDATA=/usr/lib/fax
+               --with-DIR_LIBDATA=/usr/$(get_libdir)/fax
                --with-DIR_LOCKS=/var/lock
                --with-DIR_MAN=/usr/share/man
                --with-DIR_SPOOL=/var/spool/fax
@@ -89,7 +90,7 @@ src_compile() {
 }
 
 src_install() {
-       dodir /usr/{bin,sbin} /usr/lib/fax /usr/share/man /var/spool /var/spool/recvq
+       dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man /var/spool /var/spool/recvq
        fowners uucp:uucp /var/spool/fax
        fperms 0600 /var/spool/fax
        dodir /usr/share/doc/${P}/html /usr/$(get_libdir)
@@ -100,7 +101,7 @@ src_install() {
                LIBDIR=${D}/usr/$(get_libdir) \
                LIB=${D}/usr/$(get_libdir) \
                LIBEXEC=${D}/usr/sbin \
-               LIBDATA=${D}/usr/lib/fax \
+               LIBDATA=${D}/usr/$(get_libdir)/fax \
                MAN=${D}/usr/share/man \
                SPOOL=${D}/var/spool/fax \
                HTMLDIR=${D}/usr/share/doc/${P}/html \
index 94399558b5a8dcc4b926961423035c23596836eb..3050c137a0a14daa2ffd65423c36d20f9d94d859 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.2.1.ebuild,v 1.2 2005/08/12 07:39:45 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.2.1.ebuild,v 1.3 2005/09/28 05:30:24 nerdboy Exp $
 
 inherit eutils
 
@@ -12,7 +12,7 @@ SRC_URI="ftp://ftp.hylafax.org/source/${P}.tar.gz"
 
 SLOT="0"
 LICENSE="hylafax"
-KEYWORDS="~x86 ~sparc ~hppa ~alpha ~amd64 ~ppc"
+KEYWORDS="x86 sparc ~hppa ~alpha ~amd64 ~ppc"
 
 DEPEND="!faxonly? ( net-dialup/mgetty )
        >=sys-libs/zlib-1.1.4
@@ -27,13 +27,19 @@ RDEPEND="${DEPEND}
 
 export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc"
 
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/hylafax-4.2-tmpdir.patch
+}
+
 src_compile() {
        local my_conf="
                --with-DIR_BIN=/usr/bin
                --with-DIR_SBIN=/usr/sbin
-               --with-DIR_LIB=/usr/lib
+               --with-DIR_LIB=/usr/$(get_libdir)
                --with-DIR_LIBEXEC=/usr/sbin
-               --with-DIR_LIBDATA=/usr/lib/fax
+               --with-DIR_LIBDATA=/usr/$(get_libdir)/fax
                --with-DIR_LOCKS=/var/lock
                --with-DIR_MAN=/usr/share/man
                --with-DIR_SPOOL=/var/spool/fax
@@ -67,7 +73,7 @@ src_compile() {
 }
 
 src_install() {
-       dodir /usr/{bin,sbin} /usr/lib/fax /usr/share/man /var/spool /var/spool/recvq
+       dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man /var/spool /var/spool/recvq
        fowners uucp:uucp /var/spool/fax
        fperms 0600 /var/spool/fax
        dodir /usr/share/doc/${P}/html
@@ -75,10 +81,10 @@ src_install() {
        make \
                BIN=${D}/usr/bin \
                SBIN=${D}/usr/sbin \
-               LIBDIR=${D}/usr/lib \
-               LIB=${D}/usr/lib \
+               LIBDIR=${D}/usr/$(get_libdir) \
+               LIB=${D}/usr/$(get_libdir) \
                LIBEXEC=${D}/usr/sbin \
-               LIBDATA=${D}/usr/lib/fax \
+               LIBDATA=${D}/usr/$(get_libdir)/fax \
                MAN=${D}/usr/share/man \
                SPOOL=${D}/var/spool/fax \
                HTMLDIR=${D}/usr/share/doc/${P}/html \
diff --git a/net-misc/hylafax/hylafax-4.2.2.ebuild b/net-misc/hylafax/hylafax-4.2.2.ebuild
new file mode 100644 (file)
index 0000000..0c9e299
--- /dev/null
@@ -0,0 +1,135 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafax/hylafax-4.2.2.ebuild,v 1.1 2005/09/28 05:30:24 nerdboy Exp $
+
+inherit eutils multilib pam
+
+IUSE="faxonly jpeg pam mgetty"
+
+DESCRIPTION="Client-server fax package for class 1 and 2 fax modems."
+HOMEPAGE="http://www.hylafax.org"
+SRC_URI="ftp://ftp.hylafax.org/source/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="hylafax"
+KEYWORDS="~x86 ~sparc ~hppa ~alpha ~amd64 ~ppc"
+
+DEPEND="!faxonly? ( net-dialup/mgetty )
+       >=sys-libs/zlib-1.1.4
+       virtual/ghostscript
+       >=media-libs/tiff-3.7.0
+       jpeg? ( media-libs/jpeg )
+       sys-apps/gawk
+       pam? ( virtual/pam )
+       mgetty? ( net-dialup/mgetty )"
+
+RDEPEND="${DEPEND}
+       net-mail/metamail"
+
+export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/hylafax-4.2-tmpdir.patch
+}
+
+src_compile() {
+       if use faxonly; then
+               if use mgetty; then
+                       eerror "You cannot set both faxonly and mgetty, please remove one." && die "invalid use flags"
+               fi
+       fi
+       local my_conf="
+               --with-DIR_BIN=/usr/bin
+               --with-DIR_SBIN=/usr/sbin
+               --with-DIR_LIB=/usr/$(get_libdir)
+               --with-DIR_LIBEXEC=/usr/sbin
+               --with-DIR_LIBDATA=/usr/$(get_libdir)/fax
+               --with-DIR_LOCKS=/var/lock
+               --with-DIR_MAN=/usr/share/man
+               --with-DIR_SPOOL=/var/spool/fax
+               --with-DIR_HTML=/usr/share/doc/${P}/html
+               --with-DIR_CGI=${WORKDIR}
+               --with-HTML=yes
+               --with-PATH_DPSRIP=/var/spool/fax/bin/ps2fax
+               --with-PATH_IMPRIP=\"\"
+               --with-SYSVINIT=no
+               --with-LIBTIFF=\"-ltiff -ljpeg -lz\"
+               --with-OPTIMIZER=\"${CFLAGS}\"
+               --with-DSO=auto"
+
+       if use mgetty; then
+               my_conf="${my_conf} \
+                       --with-PATH_EGETTY=/usr/sbin/mgetty \
+                       --with-PATH_VGETTY=/usr/sbin/vgetty"
+       else
+               my_conf="${my_conf} \
+                       --with-PATH_EGETTY=/bin/false \
+                       --with-PATH_VGETTY=/bin/false"
+       fi
+
+       if [ -h /etc/localtime ]; then
+               local continent=$(readlink /etc/localtime | cut -d / -f 5)
+               if [ "${continent}" == "Europe" ]; then
+                       my_conf="${my_conf} --with-PAGESIZE=A4"
+               fi
+       fi
+
+       use faxonly && my_conf="${my_conf} --with-PATH_GETTY=/bin/false
+                                         --with-PATH_VGETTY=/bin/false"
+       #--enable-pam isn't valid
+       use pam || my_conf="${my_conf} $(use_enable pam)"
+
+       # eval required for quoting in ${my_conf} to work properly, better way?
+       eval ./configure --nointeractive ${my_conf} || die "./configure failed"
+
+       emake -j1 || die "emake failed"
+}
+
+src_install() {
+       dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man /var/spool /var/spool/recvq
+       fowners uucp:uucp /var/spool/fax
+       fperms 0600 /var/spool/fax
+       dodir /usr/share/doc/${P}/html /usr/$(get_libdir)
+
+       make \
+               BIN=${D}/usr/bin \
+               SBIN=${D}/usr/sbin \
+               LIBDIR=${D}/usr/$(get_libdir) \
+               LIB=${D}/usr/$(get_libdir) \
+               LIBEXEC=${D}/usr/sbin \
+               LIBDATA=${D}/usr/$(get_libdir)/fax \
+               MAN=${D}/usr/share/man \
+               SPOOL=${D}/var/spool/fax \
+               HTMLDIR=${D}/usr/share/doc/${P}/html \
+               install || die "make install failed"
+
+       keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
+       keepdir /var/spool/fax/{status,sendq,log,info,doneq,docq,dev}
+
+       einfo "Adding env.d entry for Hylafax"
+       insinto /etc/env.d
+       newins ${FILESDIR}/99hylafax-4.2 99hylafax
+
+       einfo "Adding init.d entry for Hylafax"
+       insinto /etc/init.d
+       insopts -m 755
+       newins ${FILESDIR}/hylafax-4.2 hylafax
+
+       pamd_mimic_system hylafax auth account session
+
+       dodoc COPYRIGHT README TODO VERSION
+}
+
+pkg_postinst() {
+       ewarn "New Hylafax tiff support requires at least tiff-3.7.0 now,"
+       ewarn "but hopefully this libtiff silliness is now fixed."
+       ewarn "If you have trouble building this brittle C++ code,"
+       ewarn "try disabling distcc and setting MAKEOPTS to -j1."
+       echo
+       einfo "Hylafax is back to depending on metamail for mime handling."
+       echo
+       einfo "Now run faxsetup and (if necessary) faxaddmodem."
+       echo
+}