Make sure user-defined compiler, CXXFLAGS and useflags are respected (fixes bug ...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Mon, 17 Oct 2005 11:44:35 +0000 (11:44 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Mon, 17 Oct 2005 11:44:35 +0000 (11:44 +0000)
Package-Manager: portage-2.0.53_rc5

media-sound/daapd/ChangeLog
media-sound/daapd/Manifest
media-sound/daapd/daapd-0.2.3d-r1.ebuild [deleted file]
media-sound/daapd/daapd-0.2.4a-r1.ebuild [moved from media-sound/daapd/daapd-0.2.4a.ebuild with 54% similarity]
media-sound/daapd/files/daapd-0.2.3d-gentoo.patch [deleted file]
media-sound/daapd/files/daapd.init.d-2 [moved from media-sound/daapd/files/daapd.init.d with 63% similarity]
media-sound/daapd/files/digest-daapd-0.2.3d-r1 [deleted file]
media-sound/daapd/files/digest-daapd-0.2.4a-r1 [moved from media-sound/daapd/files/digest-daapd-0.2.4a with 100% similarity]

index a1e328d0af1c238d0b6beaabc93c3fb8242e64ce..a761bf5537d9e2e31f6447820ba7d385d55d4abd 100644 (file)
@@ -1,6 +1,17 @@
 # ChangeLog for media-sound/daapd
 # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/daapd/ChangeLog,v 1.16 2005/10/02 11:15:35 dsd Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/daapd/ChangeLog,v 1.17 2005/10/17 11:44:34 flameeyes Exp $
+
+*daapd-0.2.4a-r1 (17 Oct 2005)
+
+  17 Oct 2005; Diego Pettenò <flameeyes@gentoo.org>
+  -files/daapd-0.2.3d-gentoo.patch, +files/daapd.init.d-2,
+  -files/daapd.init.d, -daapd-0.2.3d-r1.ebuild, -daapd-0.2.4a.ebuild,
+  +daapd-0.2.4a-r1.ebuild:
+  Make sure user-defined compiler, CXXFLAGS and useflags are respected (fixes
+  bug #96818 in a different way). If howl is in useflag, make the service
+  depend on mDNSResponder, else it doesn't work. New init.d, style fixed and
+  make sure it does not fail on successful stop. Remove old versions.
 
 *daapd-0.2.4a (02 Oct 2005)
 
index 36916241162eb6d93f612963fdbb51c27d8d0f1a..38ddd3a72461d13c08a309ee887969483938b745 100644 (file)
@@ -1,20 +1,17 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 a158216fe286fbf71afe186c37ee6524 daapd-0.2.3d-r1.ebuild 1317
-MD5 c3f24151fd0d2b0a8c70d9277445baf0 daapd-0.2.4a.ebuild 1280
-MD5 71793e8a81b8dea7a1bfc51eff6a41be ChangeLog 3105
-MD5 5209c0057b32b7d92999700515bed3aa metadata.xml 440
-MD5 3beda326653c14c1fbd33c762af01e2e files/daapd.conf.d 673
-MD5 5a1dfee32f50af3462b68b3381a6aa8b files/daapd.init.d 1069
-MD5 c25c564a55bdc585c844929ca710971a files/digest-daapd-0.2.3d-r1 61
-MD5 f1be018e61557e7ca897f2f1078b13b4 files/daapd-0.2.3d-gentoo.patch 1569
-MD5 3bce8ff40d70534e3b94f58ea9043b07 files/digest-daapd-0.2.4a 61
+MD5 24134d107499a585552a174cbf79458c ChangeLog 3652
+MD5 671db4d6a437056ae62192a7799de75a daapd-0.2.4a-r1.ebuild 1835
 MD5 660b25ab66dc0cb5147d21b2db00b685 files/daapd-0.2.4-gentoo.patch 1564
+MD5 3beda326653c14c1fbd33c762af01e2e files/daapd.conf.d 673
+MD5 55d5a5f4ecb94a9b34a603fa95047c48 files/daapd.init.d-2 1053
+MD5 3bce8ff40d70534e3b94f58ea9043b07 files/digest-daapd-0.2.4a-r1 61
+MD5 5209c0057b32b7d92999700515bed3aa metadata.xml 440
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (GNU/Linux)
 
-iD8DBQFDP8G1TOXg++0VvJQRAsMIAKCSuOcsFa/1cABxYe0jXFTzaWTaFACePMfJ
-L/+JsH5+wg1e5YaKSNXMhO0=
-=wozA
+iD8DBQFDU47Jj5H05b2HAEkRAgYZAJ0bN51L6Rc0FwW0NN66SyhkHOmNlwCgiyqD
+YzlMsbON4yM7Z4g5sS/yapU=
+=/kxm
 -----END PGP SIGNATURE-----
diff --git a/media-sound/daapd/daapd-0.2.3d-r1.ebuild b/media-sound/daapd/daapd-0.2.3d-r1.ebuild
deleted file mode 100644 (file)
index 1a28d65..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/daapd/daapd-0.2.3d-r1.ebuild,v 1.1 2005/01/30 01:23:48 luckyduck Exp $
-
-IUSE="aac howl mpeg4"
-
-inherit flag-o-matic eutils
-
-DESCRIPTION="daapd scans a directory for mp3 files and makes them available via the Apple proprietary protocol DAAP"
-HOMEPAGE="http://www.deleet.de/projekte/daap/daapd/"
-SRC_URI="http://www.deleet.de/projekte/daap/daapd/${P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~ppc ~sparc"
-
-DEPEND="sys-libs/zlib
-       howl? ( >=net-misc/howl-0.9.6-r1 )
-       aac? ( media-libs/faad2 )
-       >=media-libs/libid3tag-0.15.0b
-       >=net-libs/libhttpd-persistent-1.3p-r8
-       >=media-libs/daaplib-0.1.1a"
-
-src_unpack() {
-       unpack ${A}
-       epatch ${FILESDIR}/${P}-gentoo.patch
-
-       cd ${S}
-       if ! use howl; then
-               sed -ie 's/HOWL_ENABLE = 1/HOWL_ENABLE = 0/g' makefile
-       fi
-
-       if ! use mpeg4; then
-               sed -ie 's/MPEG4_ENABLE = 1/MPEG4_ENABLE = 0/g' makefile
-       fi
-}
-
-src_compile() {
-       emake || die
-}
-
-src_install() {
-       dobin daapd
-
-       dodoc COPYING README* daapd-example.conf
-       doman ${PN}.8
-
-       insinto /etc
-       newins daapd-example.conf daapd.conf
-
-       insinto /etc/conf.d
-       newins ${FILESDIR}/daapd.conf.d daapd || die
-
-       exeinto /etc/init.d
-       newexe ${FILESDIR}/daapd.init.d daapd || die
-}
-
similarity index 54%
rename from media-sound/daapd/daapd-0.2.4a.ebuild
rename to media-sound/daapd/daapd-0.2.4a-r1.ebuild
index 27d83b7b97fb855c95d016a5a0014f16453bd455..ac6cb722b44e56f55bcf40698b21fa7be6ceb75a 100644 (file)
@@ -1,7 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/daapd/daapd-0.2.4a.ebuild,v 1.1 2005/10/02 11:15:35 dsd Exp $
-
+# $Header: /var/cvsroot/gentoo-x86/media-sound/daapd/daapd-0.2.4a-r1.ebuild,v 1.1 2005/10/17 11:44:34 flameeyes Exp $
 
 inherit flag-o-matic eutils
 
@@ -25,18 +24,29 @@ src_unpack() {
        unpack ${A}
        cd ${S}
        epatch ${FILESDIR}/${PN}-0.2.4-gentoo.patch
-
-       if use howl; then
-               sed -ie 's/HOWL_ENABLE = 0/HOWL_ENABLE = 1/g' makefile
-       fi
-
-       if ! use mpeg4; then
-               sed -ie 's/MPEG4_ENABLE = 1/MPEG4_ENABLE = 0/g' makefile
-       fi
 }
 
 src_compile() {
-       emake || die "make failed"
+       local want_howl want_mpeg4
+       use howl && want_howl="1" || want_howl="0"
+       use mpeg4 && want_mpeg4="1" || want_mpeg4="0"
+
+       # This warning outputs a lot of noise and it's disabled by the original
+       # makefile, as we rewrite CFLAGS, append this again.
+       append-flags -Wno-multichar
+
+       # The makefile is dump, uses $(CC) to compile .cc files
+       # pass it a C++ compiler and C++ flags
+       emake \
+               CC=$(tc-getCXX) CFLAGS="${CXXFLAGS}" \
+               HOWL_ENABLE="$want_howl" MPEG4_ENABLE="$want_mpeg4" \
+               || die "make failed"
+
+       # Make sure that it requires mDNSResponder while using howl
+       cp ${FILESDIR}/daapd.init.d-2 ${WORKDIR}/daapd.init.d
+       use howl && \
+               sed -i -e 's:#WITHHOWL::' ${WORKDIR}/daapd.init.d || \
+               sed -i -e '/#WITHHOWL/d' ${WORKDIR}/daapd.init.d
 }
 
 src_install() {
@@ -49,6 +59,6 @@ src_install() {
        newins daapd-example.conf daapd.conf
 
        newconfd ${FILESDIR}/daapd.conf.d daapd || die
-       newinitd ${FILESDIR}/daapd.init.d daapd || die
+       newinitd ${WORKDIR}/daapd.init.d daapd || die
 }
 
diff --git a/media-sound/daapd/files/daapd-0.2.3d-gentoo.patch b/media-sound/daapd/files/daapd-0.2.3d-gentoo.patch
deleted file mode 100644 (file)
index e264727..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -urN daapd-0.2.3d/makefile daapd-0.2.3d.patched/makefile
---- daapd-0.2.3d/makefile      2004-09-08 03:17:58.000000000 +0200
-+++ daapd-0.2.3d.patched/makefile      2004-10-05 00:33:44.729241904 +0200
-@@ -11,19 +11,19 @@
- CC = g++
- MAKE = $(MAKE_COMMAND)
- TARGET = daapd
--DEPS = daaplib_ libhttpd_
-+DEPS = 
- OBJS = daapd.o db.o dboutput.o songcache.o parsemp3.o
- LIBS = -ldaaplib -lhttpd-persistent -lid3tag -lz -lpthread 
--LIBPATH = -L. -L./daaplib/src -L./libhttpd/src  -L/usr/local/lib
--INCPATH = -I. -I./daaplib/include -I./libhttpd/src  -I/usr/local/include
--DEPLOY = /usr/local
-+LIBPATH = -L. -L/usr/lib
-+INCPATH = -I. -I/usr/include
-+DEPLOY = /usr
- CFLAGS = -Wall -Wno-multichar
- 
- # HOWL
- ifeq ($(HOWL_ENABLE),1)
--      HOWLDIRS := $(sort $(wildcard /usr/local/include/howl*) )
-+      HOWLDIRS := $(sort $(wildcard /usr/include/howl*) )
- ifeq ($(words $(HOWLDIRS) ), 0)
--$(error howl not found in /usr/local/include. Install howl or disable it in the makefile)
-+$(error howl not found in /usr/include. Install howl or disable it in the makefile)
- endif
-       HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )
-       INCPATH := $(INCPATH) -I$(HOWLRECENT)
-diff -urN daapd-0.2.3d/types.h daapd-0.2.3d.patched/types.h
---- daapd-0.2.3d/types.h       2004-09-08 03:17:59.000000000 +0200
-+++ daapd-0.2.3d.patched/types.h       2004-10-05 00:48:31.871375800 +0200
-@@ -20,6 +20,10 @@
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
- 
-+#ifndef UINT64_TO_DOUBLE
-+#define UINT64_TO_DOUBLE(a) ((double)((int64_t)(a)))
-+#endif
-+
- #ifndef DAAP_TYPES_H
- #define DAAP_TYPES_H
- 
similarity index 63%
rename from media-sound/daapd/files/daapd.init.d
rename to media-sound/daapd/files/daapd.init.d-2
index 37c41ab252765ad8a0d25ab8d97be1e306f80040..b55454cdda5cb94fa0227aa56044571f272cedb6 100644 (file)
@@ -1,17 +1,18 @@
 #!/sbin/runscript
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2         
-# $Header: /var/cvsroot/gentoo-x86/media-sound/daapd/files/daapd.init.d,v 1.4 2005/01/30 01:19:05 luckyduck Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/daapd/files/daapd.init.d-2,v 1.1 2005/10/17 11:44:35 flameeyes Exp $
 
 depend() {
        need net
-       use mDNSResponder
+       #WITHHOWL need mDNSResponder
 }
 
 checkconfig() {
-       grep '^Root             \.$' /etc/daapd.conf &>/dev/null && \
-               ewarn "The Root in /etc/daapd.conf has not been updated. You probably" && \
-               ewarn "want to point this to your music archive instead of" `pwd`
+       if grep -E '^Root\w+\.$' /etc/daapd.conf &>/dev/null; then
+               ewarn "The Root in /etc/daapd.conf has not been updated. You probably"
+               ewarn "want to point this to your music archive instead of $(pwd)"
+       fi
 }
 
 start() {
@@ -20,11 +21,11 @@ start() {
 
        local SSD_OPTS
        SSD_OPTS=""
-       [ "${DAAPD_RUNAS}"x != ""x ] && SSD_OPTS="${SSD_OPTS} --chuid '${DAAPD_RUNAS}'"
+       [[ -n ${DAAPD_RUNAS} ]] && SSD_OPTS="${SSD_OPTS} --chuid '${DAAPD_RUNAS}'"
 
        start-stop-daemon --start --quiet --pidfile /var/run/daapd.pid \
                --background --make-pidfile \
-               ${SSD_OPTS} --startas /usr/bin/daapd -- ${DAAPD_OPTS}
+               ${SSD_OPTS} --exec /usr/bin/daapd -- ${DAAPD_OPTS}
        eend $? "Failed to start daapd"
 }
 
@@ -34,5 +35,5 @@ stop() {
        eend $? "Failed to stop daapd"
 
        # clean stale pidfile
-       [ -f /var/run/daapd.pid ] && rm -f /var/run/daapd.pid
+       rm -f /var/run/daapd.pid
 }
diff --git a/media-sound/daapd/files/digest-daapd-0.2.3d-r1 b/media-sound/daapd/files/digest-daapd-0.2.3d-r1
deleted file mode 100644 (file)
index f658a53..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MD5 9cdf2e94b93001610f9f211866d94901 daapd-0.2.3d.tgz 202317