diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2010-08-11 10:07:32 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2010-08-11 10:07:32 +0000 |
commit | 4a239168b6f24abafd7cd001131c4e6560b94e72 (patch) | |
tree | ffc0ebe17d070febe3aa6b0309d9bdf1750b63f8 /net-misc/mDNSResponder | |
parent | Version bump to address 2.6.35 compatibility issue, bug #331125, thank Oschta... (diff) | |
download | gentoo-2-4a239168b6f24abafd7cd001131c4e6560b94e72.tar.gz gentoo-2-4a239168b6f24abafd7cd001131c4e6560b94e72.tar.bz2 gentoo-2-4a239168b6f24abafd7cd001131c4e6560b94e72.zip |
Respect CC,CFLAGS,LDFLAGS. Bug #331829. Thanks to Diego E. 'Flameeyes' Pettenò <flameeyes@gentoo.org> for reporting
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/mDNSResponder')
-rw-r--r-- | net-misc/mDNSResponder/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/mDNSResponder/mDNSResponder-212.1-r1.ebuild | 132 |
2 files changed, 140 insertions, 1 deletions
diff --git a/net-misc/mDNSResponder/ChangeLog b/net-misc/mDNSResponder/ChangeLog index befd9268ee48..5fb2f756e2c1 100644 --- a/net-misc/mDNSResponder/ChangeLog +++ b/net-misc/mDNSResponder/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/mDNSResponder # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/mDNSResponder/ChangeLog,v 1.54 2010/07/20 18:18:25 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/mDNSResponder/ChangeLog,v 1.55 2010/08/11 10:07:32 hwoarang Exp $ + +*mDNSResponder-212.1-r1 (11 Aug 2010) + + 11 Aug 2010; Markos Chandras <hwoarang@gentoo.org> + +mDNSResponder-212.1-r1.ebuild: + Respect CC,CFLAGS,LDFLAGS. Bug #331829. Thanks to Diego E. 'Flameeyes' + Pettenò <flameeyes@gentoo.org> for reporting 20 Jul 2010; Michael Sterrett <mr_bones_@gentoo.org> -mDNSResponder-98.ebuild, -files/mDNSResponder-98-Makefiles.patch, diff --git a/net-misc/mDNSResponder/mDNSResponder-212.1-r1.ebuild b/net-misc/mDNSResponder/mDNSResponder-212.1-r1.ebuild new file mode 100644 index 000000000000..8dcf8ded2c13 --- /dev/null +++ b/net-misc/mDNSResponder/mDNSResponder-212.1-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/mDNSResponder/mDNSResponder-212.1-r1.ebuild,v 1.1 2010/08/11 10:07:32 hwoarang Exp $ + +EAPI="2" + +inherit eutils base toolchain-funcs flag-o-matic java-pkg-opt-2 + +DESCRIPTION="A component of Bonjour, Apple's initiative for zero-configuration networking." +HOMEPAGE="http://developer.apple.com/networking/bonjour/index.html" +#SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/${P}.tar.gz" +SRC_URI="http://www.opensource.apple.com/tarballs/${PN}/${P}.tar.gz" +LICENSE="Apache-2.0 BSD" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux" +IUSE="debug doc" + +DEPEND="!net-dns/avahi + java? ( >=virtual/jdk-1.4 )" +RDEPEND="!net-dns/avahi + java? ( >=virtual/jre-1.4 )" + +#PATCHES=( "${FILESDIR}/mDNSResponder-107.6-Makefiles.diff" +PATCHES=( "${FILESDIR}/mDNSResponder-107.6-java.patch" ) + +pkg_setup() { + if use elibc_FreeBSD; then + os=freebsd + else + os=linux + fi + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + # Respect CFLAGS,LDFLAGS everywhere + sed -i "/\$(CFLAGS_DEBUG)$/s: = : & ${CFLAGS} ${LDFLAGS} :" "${S}"/mDNSPosix/Makefile + sed -i "s:cc:$(tc-getCC) ${CFLAGS} ${LDFLAGS} :" "${S}"/Clients/Makefile + java-pkg-opt-2_src_prepare +} + +mdnsmake() { + local debug jdk + use java && jdk="JDK=$(java-config -O)" + if use debug; then + debug='DEBUG=1' + sed -e 's|LIBS = -L../mDNSPosix/build/prod/ -ldns_sd|LIBS = -L../mDNSPosix/build/debug/ -ldns_sd|g' ../Clients/Makefile || die "sed failed" + fi + + einfo "Running emake " os="${os}" CC="$(tc-getCC)" LD="$(tc-getCC) -shared" \ + ${jdk} ${debug} LINKOPTS="${LDFLAGS}" \ + LOCALBASE="/usr" JAVACFLAGS="${JAVACFLAGS}" "$@" + emake -j1 os="${os}" CC="$(tc-getCC)" LD="$(tc-getCC) -shared" \ + ${jdk} ${debug} LINKOPTS="${LDFLAGS}" \ + LOCALBASE="/usr" JAVACFLAGS="${JAVACFLAGS}" "$@" +} + +src_compile() { + cd "${S}"/mDNSPosix + mdnsmake || die "make failed" + + if use java; then + mdnsmake Java || die "make mDNSPosix java failed" + if use doc ; then + mdnsmake JavaDoc || die "make mDNSPosix java doc failed" + fi + fi +} + +src_install() { + cd "${S}"/mDNSPosix + + dodir /usr/sbin + dodir /usr/lib + dodir /usr/include + dodir /lib + dodir /etc + dodir /usr/share/man/man5 + dodir /usr/share/man/man8 + + local debug + local objdir="prod" + if use debug; then + debug="DEBUG=1" + objdir=debug + fi + + dosbin "${S}"/mDNSPosix/build/${objdir}/dnsextd + dosbin "${S}"/mDNSPosix/build/${objdir}/mDNSResponderPosix + dosbin "${S}"/mDNSPosix/build/${objdir}/mDNSNetMonitor + dosbin "${S}"/mDNSPosix/build/${objdir}/mdnsd + + dobin "${S}"/Clients/build/dns-sd + dobin "${S}"/mDNSPosix/build/${objdir}/mDNSProxyResponderPosix + dobin "${S}"/mDNSPosix/build/${objdir}/mDNSIdentify + dobin "${S}"/mDNSPosix/build/${objdir}/mDNSClientPosix + + dolib "${S}"/mDNSPosix/build/${objdir}/libdns_sd.so + dolib "${S}"/mDNSPosix/build/${objdir}/libnss_mdns-0.2.so + dosym libdns_sd.so /usr/$(get_libdir)/libdns_sd.so.1 + dosym libnss_mdns-0.2.so /usr/$(get_libdir)/libnss_mdns.so.2 + + newinitd "${FILESDIR}"/mdnsd.init.d mdnsd + newinitd "${FILESDIR}"/mDNSResponderPosix.init.d mDNSResponderPosix + newconfd "${FILESDIR}"/mDNSResponderPosix.conf.d mDNSResponderPosix + newinitd "${FILESDIR}"/dnsextd.init.d dnsextd + newconfd "${FILESDIR}"/dnsextd.conf.d dnsextd + + insinto /etc + doins "${FILESDIR}"/mDNSResponderPosix.conf + + insinto /usr/include + doins "${S}"/mDNSShared/dns_sd.h + + dodoc "${S}"/README.txt + + if use java; then + java-pkg_dojar "${S}"/mDNSPosix/build/${objdir}/dns_sd.jar + java-pkg_doso "${S}"/mDNSPosix/build/${objdir}/libjdns_sd.so + use doc && java-pkg_dojavadoc "${S}"/mDNSPosix/build/${objdir} + fi +} + +pkg_postinst() { + echo + elog "To enable multicast dns lookups for applications" + elog "that are not multicast dns aware, edit the 'hosts:'" + elog "line in /etc/nsswitch.conf to include 'mdns', e.g.:" + elog "hosts: files mdns dns" + echo +} |