diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-05-20 16:31:37 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-05-20 16:31:37 +0000 |
commit | b6d522e2e9fff6ecb2ab114c8f95acff2e2e5b03 (patch) | |
tree | 98b1e0644bdeeb35d666b5375721133373bac0fe | |
parent | add back geant-4.9.5-r1.ebuild because geant-python cannot function correctly... (diff) | |
download | gentoo-2-b6d522e2e9fff6ecb2ab114c8f95acff2e2e5b03.tar.gz gentoo-2-b6d522e2e9fff6ecb2ab114c8f95acff2e2e5b03.tar.bz2 gentoo-2-b6d522e2e9fff6ecb2ab114c8f95acff2e2e5b03.zip |
Install perl modules into vendor dir, bug 295113. Acked by tove.
(Portage version: 2.2.0_alpha103/cvs/Linux x86_64)
-rw-r--r-- | sys-fs/owfs/ChangeLog | 8 | ||||
-rw-r--r-- | sys-fs/owfs/files/owfs-vendordir.patch | 30 | ||||
-rw-r--r-- | sys-fs/owfs/owfs-2.7_p21-r1.ebuild | 176 |
3 files changed, 213 insertions, 1 deletions
diff --git a/sys-fs/owfs/ChangeLog b/sys-fs/owfs/ChangeLog index bea38f4d3f27..c5567a3a9292 100644 --- a/sys-fs/owfs/ChangeLog +++ b/sys-fs/owfs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-fs/owfs # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/ChangeLog,v 1.17 2012/04/02 22:21:41 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/ChangeLog,v 1.18 2012/05/20 16:31:35 dilfridge Exp $ + +*owfs-2.7_p21-r1 (20 May 2012) + + 20 May 2012; Andreas K. Huettel <dilfridge@gentoo.org> + +owfs-2.7_p21-r1.ebuild, +files/owfs-vendordir.patch: + Install perl modules into vendor dir, bug 295113. Acked by tove. 02 Apr 2012; Pacho Ramos <pacho@gentoo.org> owfs-2.7_p21.ebuild: Drop net-misc/mDNSResponder dependency, bug #405399. diff --git a/sys-fs/owfs/files/owfs-vendordir.patch b/sys-fs/owfs/files/owfs-vendordir.patch new file mode 100644 index 000000000000..ac09e4f2fc79 --- /dev/null +++ b/sys-fs/owfs/files/owfs-vendordir.patch @@ -0,0 +1,30 @@ +diff -ruN owfs-2.7p21.orig/module/ownet/perl5/Makefile.am owfs-2.7p21/module/ownet/perl5/Makefile.am +--- owfs-2.7p21.orig/module/ownet/perl5/Makefile.am 2008-06-12 16:24:30.000000000 +0200 ++++ owfs-2.7p21/module/ownet/perl5/Makefile.am 2012-05-20 15:45:07.340529762 +0200 +@@ -7,9 +7,9 @@ + # Can't really install the perl-modules under prefix-directory.. it should be site-global. + OWNet/Makefile: OWNet/Makefile.PL + if HAVE_DEBIAN +- ( cd OWNet; $(PERL) Makefile.PL PREFIX=@prefix@ ) ++ ( cd OWNet; $(PERL) Makefile.PL PREFIX=@prefix@ INSTALLDIRS=vendor ) + else +- ( cd OWNet; $(PERL) Makefile.PL ) ++ ( cd OWNet; $(PERL) Makefile.PL INSTALLDIRS=vendor ) + endif + + install-data-local: OWNet/Makefile +diff -ruN owfs-2.7p21.orig/module/swig/perl5/Makefile.am owfs-2.7p21/module/swig/perl5/Makefile.am +--- owfs-2.7p21.orig/module/swig/perl5/Makefile.am 2008-06-12 16:24:30.000000000 +0200 ++++ owfs-2.7p21/module/swig/perl5/Makefile.am 2012-05-20 15:44:04.519526274 +0200 +@@ -17,9 +17,9 @@ + ( cd OW; $(PERL) Makefile.PL ) + else + if HAVE_DEBIAN +- ( cd OW; $(PERL) Makefile.PL PREFIX=@prefix@ ) ++ ( cd OW; $(PERL) Makefile.PL PREFIX=@prefix@ INSTALLDIRS=vendor ) + else +- ( cd OW; $(PERL) Makefile.PL ) ++ ( cd OW; $(PERL) Makefile.PL INSTALLDIRS=vendor ) + endif + endif + diff --git a/sys-fs/owfs/owfs-2.7_p21-r1.ebuild b/sys-fs/owfs/owfs-2.7_p21-r1.ebuild new file mode 100644 index 000000000000..5397a9d7076d --- /dev/null +++ b/sys-fs/owfs/owfs-2.7_p21-r1.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/owfs-2.7_p21-r1.ebuild,v 1.1 2012/05/20 16:31:35 dilfridge Exp $ + +EAPI="2" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" + +inherit depend.php distutils eutils perl-module autotools + +MY_P=${P/_/} + +DESCRIPTION="Access 1-Wire devices like a filesystem" +SRC_URI="mirror://sourceforge/owfs/${MY_P}.tar.gz" +HOMEPAGE="http://www.owfs.org/ http://owfs.sourceforge.net/" +LICENSE="GPL-2" +RDEPEND="fuse? ( sys-fs/fuse ) + perl? ( dev-lang/perl ) + php? ( dev-lang/php ) + tcl? ( dev-lang/tcl ) + usb? ( dev-libs/libusb ) + zeroconf? ( net-dns/avahi[mdnsresponder-compat] )" +DEPEND="${RDEPEND} + perl? ( dev-lang/swig ) + php? ( dev-lang/swig ) + python? ( dev-lang/swig )" +KEYWORDS="~amd64 ~arm ~x86" +SLOT="0" +IUSE="debug fuse ftpd httpd parport perl php python server tcl usb zeroconf" + +S=${WORKDIR}/${MY_P} + +OWUID=${OWUID:-owfs} +OWGID=${OWGID:-owfs} + +PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") +PYTHON_MODNAME="ow ownet" + +pkg_setup() { + if use php; then + require_php_cli + fi + if use python; then + python_pkg_setup + fi + enewgroup ${OWGID} 150 + enewuser ${OWUID} 150 -1 -1 ${OWGID} +} + +src_unpack() { + base_src_unpack +} + +src_prepare() { + base_src_prepare + + sed -e 's/ \$(OWNET_SUBDIRPYTHON)//' -i module/ownet/Makefile.{am,in} || die "sed failed" + sed -e 's/ \$(SWIG_SUBDIRPYTHON)//' -i module/swig/Makefile.{am,in} || die "sed failed" + sed \ + -e "s/@PYCFLAGS@//" \ + -e "s/@PYLDFLAGS@//" \ + -i module/swig/python/setup.py.in || die "sed failed" + + epatch "${FILESDIR}/${PN}-vendordir.patch" + eautoreconf +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable fuse owfs) \ + $(use_enable ftpd owftpd) \ + $(use_enable httpd owhttpd) \ + $(use_enable parport) \ + $(use_enable perl owperl) \ + $(use_enable php owphp) \ + $(use_enable python owpython) \ + $(use_enable server owserver) \ + $(use_enable tcl owtcl) \ + $(use_enable zeroconf zero) \ + $(use_enable usb) +} + +src_compile() { + base_src_compile + + if use python; then + pushd module/ownet/python > /dev/null + distutils_src_compile + popd > /dev/null + + pushd module/swig/python > /dev/null + emake ow_wrap.c || die "emake ow_wrap.c failed" + distutils_src_compile + popd > /dev/null + fi +} + +src_test() { :; } + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc README NEWS ChangeLog AUTHORS || die + if use server || use httpd || use ftpd || use fuse; then + diropts -m 0750 -o ${OWUID} -g ${OWGID} + dodir /var/run/owfs + for i in server httpd ftpd; do + if use ${i}; then + newinitd "${FILESDIR}"/ow${i}.initd ow${i} + newconfd "${FILESDIR}"/ow${i}.confd ow${i} + fi + done + if use fuse; then + dodir /var/lib/owfs + dodir /var/lib/owfs/mnt + newinitd "${FILESDIR}"/owfs.initd owfs + newconfd "${FILESDIR}"/owfs.confd owfs + fi + fi + use perl && fixlocalpod + + if use python; then + pushd module/ownet/python > /dev/null + distutils_src_install + popd > /dev/null + + pushd module/swig/python > /dev/null + distutils_src_install + popd > /dev/null + fi +} + +pkg_postinst() { + if use server || use httpd || use ftpd || use fuse; then + echo + einfo + einfo "Be sure to check/edit the following files," + einfo "e.g. to fit your 1 wire bus controller" + einfo "device or daemon network settings:" + for i in server httpd ftpd; do + if use ${i}; then + einfo "- ${ROOT%/}/etc/conf.d/ow${i}" + fi + done + if use fuse; then + einfo "- ${ROOT%/}/etc/conf.d/owfs" + fi + einfo + echo + if [[ ${OWUID} != root ]]; then + ewarn + ewarn "In order to allow the OWFS daemon user '${OWUID}' to read" + ewarn "from and/or write to a 1 wire bus controller device, make" + ewarn "sure the user has appropriate permission to access the" + ewarn "corresponding device node/path (e.g. /dev/ttyS0), for example" + ewarn "by adding the user to the group 'uucp' (for serial devices)" + ewarn "or 'usb' (for USB devices accessed via usbfs on /proc/bus/usb)." + ewarn + if use fuse; then + ewarn "In order to allow regular users to read from and/or write to" + ewarn "1 wire bus devices accessible via the owfs FUSE filesystem" + ewarn "client and its filesystem mountpoint, make sure the user is" + ewarn "a member of the group '${OWGID}'." + ewarn + fi + echo + fi + fi + + use python && distutils_pkg_postinst +} + +pkg_postrm() { + use python && distutils_pkg_postrm +} |