commit:     10c8c6a83d9f6af3cef01eee26ef030d19ae7bb0
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed May 14 16:50:14 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed May 14 16:50:14 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=10c8c6a8

media-libs/nas: remove defines of abs/fabs

Package-Manager: portage-2.2.8-r1
RepoMan-Options: --force
Manifest-Sign-Key: 0xF52D4BBA

---
 media-libs/nas/files/nas-1.9.2-asneeded.patch   |  13 +++
 media-libs/nas/files/nas-1.9.4-remove-abs.patch |  16 ++++
 media-libs/nas/files/nas.conf.d                 |  11 +++
 media-libs/nas/files/nas.init.d                 |  19 +++++
 media-libs/nas/metadata.xml                     |   5 ++
 media-libs/nas/nas-1.9.4-r99.ebuild             | 100 ++++++++++++++++++++++++
 6 files changed, 164 insertions(+)

diff --git a/media-libs/nas/files/nas-1.9.2-asneeded.patch 
b/media-libs/nas/files/nas-1.9.2-asneeded.patch
new file mode 100644
index 0000000..2ac8948
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.2-asneeded.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/show_bug.cgi?id=247761
+
+--- config/NetAudio.tmpl
++++ config/NetAudio.tmpl
+@@ -162,7 +162,7 @@
+ 
+   AUDIODEPLIBS = $(DEPAULIB) $(DEPXTOOLLIB) $(DEPXLIB)
+ #ifndef WIN32
+-     AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XLIB) -lm
++     AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XAUTHLIB) $(XLIB) -lm
+ #else /* WIN32 */
+      AUDIOLIBS = $(AULIB)
+ #endif /* WIN32 */

diff --git a/media-libs/nas/files/nas-1.9.4-remove-abs.patch 
b/media-libs/nas/files/nas-1.9.4-remove-abs.patch
new file mode 100644
index 0000000..aa041e9
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.4-remove-abs.patch
@@ -0,0 +1,16 @@
+diff -Naur nas-1.9.4.orig/server/include/misc.h nas-1.9.4/server/include/misc.h
+--- nas-1.9.4.orig/server/include/misc.h       2013-04-26 20:41:06.000000000 
-0400
++++ nas-1.9.4/server/include/misc.h    2014-05-14 12:46:21.347595909 -0400
+@@ -71,12 +71,6 @@
+ 
+ #define min(a, b) (((a) < (b)) ? (a) : (b))
+ #define max(a, b) (((a) > (b)) ? (a) : (b))
+-#ifndef abs
+-#define abs(a) ((a) > 0 ? (a) : -(a))
+-#endif
+-#ifndef fabs
+-#define fabs(a) ((a) > 0.0 ? (a) : -(a))        /* floating absolute value */
+-#endif
+ #define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
+ /* this assumes b > 0 */
+ #define modulus(a, b, d)    if (((d) = (a) % (b)) < 0) (d) += (b)

diff --git a/media-libs/nas/files/nas.conf.d b/media-libs/nas/files/nas.conf.d
new file mode 100644
index 0000000..b8c32db
--- /dev/null
+++ b/media-libs/nas/files/nas.conf.d
@@ -0,0 +1,11 @@
+# Config file for /etc/init.d/nas
+
+# For information on options, see "/usr/bin/nasd -h".
+
+NAS_OPTIONS=""
+
+# Allow only clients on local network to connect:
+#NAS_OPTIONS="-local"
+
+# Allow any client to connect:
+#NAS_OPTIONS="-aa"

diff --git a/media-libs/nas/files/nas.init.d b/media-libs/nas/files/nas.init.d
new file mode 100644
index 0000000..6cfab54
--- /dev/null
+++ b/media-libs/nas/files/nas.init.d
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+
+depend() {
+       need net
+       after alsasound esd
+}
+
+start() {
+       ebegin "Starting nas"
+       start-stop-daemon --start --quiet --exec /usr/bin/nasd --background \
+               --pidfile /var/run/nasd.pid --make-pidfile -- $NAS_OPTIONS
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping nas"
+       start-stop-daemon --stop --quiet --pidfile /var/run/nasd.pid
+       eend $?
+}

diff --git a/media-libs/nas/metadata.xml b/media-libs/nas/metadata.xml
new file mode 100644
index 0000000..ae573a6
--- /dev/null
+++ b/media-libs/nas/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <herd>sound</herd>
+</pkgmetadata>

diff --git a/media-libs/nas/nas-1.9.4-r99.ebuild 
b/media-libs/nas/nas-1.9.4-r99.ebuild
new file mode 100644
index 0000000..491cf09
--- /dev/null
+++ b/media-libs/nas/nas-1.9.4-r99.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/nas/nas-1.9.4.ebuild,v 1.10 
2014/02/22 07:40:39 ago Exp $
+
+EAPI=5
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="Network Audio System"
+HOMEPAGE="http://radscan.com/nas.html";
+SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz"
+
+LICENSE="HPND MIT"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips x86"
+IUSE="doc static-libs"
+
+RDEPEND="x11-libs/libICE
+       x11-libs/libSM
+       x11-libs/libX11
+       x11-libs/libXau[${MULTILIB_USEDEP}]
+       x11-libs/libXaw
+       x11-libs/libXext
+       x11-libs/libXmu
+       x11-libs/libXpm
+       x11-libs/libXt[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+       app-text/rman
+       sys-devel/bison
+       sys-devel/flex
+       x11-misc/gccmakedep
+       x11-misc/imake
+       x11-proto/xproto[${MULTILIB_USEDEP}]"
+
+DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
+
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-1.9.2-asneeded.patch
+       epatch "${FILESDIR}"/${PN}-1.9.4-remove-abs.patch
+
+       multilib_copy_sources
+}
+
+multilib_src_configure() {
+       xmkmf -a || die
+}
+
+multilib_src_compile() {
+       # EXTRA_LDOPTIONS, SHLIBGLOBALSFLAGS #336564#c2
+       local emakeopts=(
+               AR="$(tc-getAR) clq"
+               AS="$(tc-getAS)"
+               CC="$(tc-getCC)"
+               CDEBUGFLAGS="${CFLAGS}"
+               CXX="$(tc-getCXX)"
+               CXXDEBUFLAGS="${CXXFLAGS}"
+               EXTRA_LDOPTIONS="${LDFLAGS}"
+               LD="$(tc-getLD)"
+               MAKE="${MAKE:-gmake}"
+               RANLIB="$(tc-getRANLIB)"
+               SHLIBGLOBALSFLAGS="${LDFLAGS}"
+               WORLDOPTS=
+       )
+
+       if multilib_is_native_abi ; then
+               # dumb fix for parallel make issue wrt #446598, Imake sux
+               emake "${emakeopts[@]}" -C server/dia all
+               emake "${emakeopts[@]}" -C server/dda/voxware all
+               emake "${emakeopts[@]}" -C server/os all
+       else
+               sed -i \
+                       -e 's/SUBDIRS =.*/SUBDIRS = include lib config/' \
+                       Makefile || die
+       fi
+
+       emake "${emakeopts[@]}" World
+}
+
+multilib_src_install() {
+       # ranlib is used at install phase too wrt #446600
+       emake RANLIB="$(tc-getRANLIB)" \
+               DESTDIR="${D}" USRLIBDIR=/usr/$(get_libdir) \
+               install install.man
+}
+
+multilib_src_install_all() {
+       einstalldocs
+       if use doc; then
+               docinto doc
+               dodoc doc/{actions,protocol.txt,README}
+               docinto pdf
+               dodoc doc/pdf/*.pdf
+       fi
+
+       mv -vf "${D}"/etc/nas/nasd.conf{.eg,} || die
+
+       newconfd "${FILESDIR}"/nas.conf.d nas
+       newinitd "${FILESDIR}"/nas.init.d nas
+
+       use static-libs || rm -f "${D}"/usr/lib*/libaudio.a
+}

Reply via email to