diff --git a/app-portage/autodep/autodep-0.1.ebuild b/app-portage/autodep/autodep-0.1.ebuild index 62b4290..e4f494b 100644 --- a/app-portage/autodep/autodep-0.1.ebuild +++ b/app-portage/autodep/autodep-0.1.ebuild @@ -7,7 +7,7 @@ EAPI=3 PYTHON_DEPEND="2:2.6" RESTRICT_PYTHON_ABIS='2.4 2.5 3.*' -inherit python +inherit autotools eutils flag-o-matic multilib python DESCRIPTION="Auto dependency analyser for Gentoo" HOMEPAGE="http://soc.dev.gentoo.org/~bay/autodep/" @@ -18,15 +18,31 @@ SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" -DEPEND="sys-fs/fuse +RDEPEND=" + app-portage/portage-utils + sys-fs/fuse" +DEPEND="${RDEPEND} dev-util/pkgconfig" -RDEPEND="sys-fs/fuse - app-portage/portage-utils" -src_compile() { - emake || die +pkg_setup() { + python_set_active_version 2 +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-build.patch + sed "s:usr/lib:/usr/$(get_libdir):g" -i Makefile || die + tc-export CC + export raw_LDFLAGS="$(raw-ldflags)" } src_install() { emake DESTDIR="${D}" install || die } + +pkg_postinst() { + python_mod_optimize /usr/$(get_libdir)/portage_with_autodep +} + +pkg_postrm() { + python_mod_cleanup /usr/$(get_libdir)/portage_with_autodep +} diff --git a/app-portage/autodep/files/autodep-0.1-build.patch b/app-portage/autodep/files/autodep-0.1-build.patch new file mode 100644 index 0000000..e49bd54 --- /dev/null +++ b/app-portage/autodep/files/autodep-0.1-build.patch @@ -0,0 +1,26 @@ + Makefile | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 01c92f1..1a26d16 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,14 +1,14 @@ + all: hookfs file_hook.so + + hookfs: src/hook_fusefs/hookfs.c +- $(CC) -std=c99 -Wall `pkg-config fuse --cflags --libs` -lulockmgr \ +- $(CFLAGS) $(LDFLAGS) src/hook_fusefs/hookfs.c -o hookfs ++ $(CC) -std=c99 -Wall $(CFLAGS) $(LDFLAGS) \ ++ src/hook_fusefs/hookfs.c -o hookfs `pkg-config fuse --cflags --libs` -lulockmgr + + file_hook.so: file_hook.o +- ld -shared -o file_hook.so -ldl -lc file_hook.o ++ ld $(raw_LDFLAGS) -shared -o file_hook.so file_hook.o -ldl -lc + + file_hook.o: src/hook_lib/file_hook.c +- cc -Wall -fPIC -o file_hook.o -c src/hook_lib/file_hook.c ++ $(CC) -Wall -fPIC -o file_hook.o -c src/hook_lib/file_hook.c + + install: + mkdir -p "${DESTDIR}/usr/lib/"