summaryrefslogtreecommitdiff
blob: e3318d053f8eef0909e9afa472759f372640bddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="3"

inherit flag-o-matic

DESCRIPTION="Uses LD_PRELOAD to hide .svn directories from readdir() and readdir_r()"
HOMEPAGE="http://80386.nl/projects/hidesvn/"
SRC_URI="http://80386.nl/projects/${PN}/distfiles/${P}.tar.xz"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="app-arch/xz-utils"
RDEPEND=""

pkg_setup() {
	append-cflags -fPIC || die
	append-ldflags -Wl,-soname=0:0:0 || die
}

src_install() {
	cat <<-EOF > hidesvn
		#!/bin/sh
		LD_PRELOAD=/usr/$(get_libdir)/libhidesvn.so exec "\$@"
	EOF
	dobin hidesvn || die

	dolib libhidesvn.so || die
}