diff options
author | Maxim Koltsov <maksbotan@gentoo.org> | 2011-12-11 19:34:22 +0000 |
---|---|---|
committer | Maxim Koltsov <maksbotan@gentoo.org> | 2011-12-11 19:34:22 +0000 |
commit | a0f0708d0df0a51102be6f8f01b34d3f6f651916 (patch) | |
tree | 5e82c80dc593dc1cb2b54be25944c43a566f3dc6 /app-emulation/libguestfs | |
parent | New version that requires Audacious 3.1 final, not alpha. (diff) | |
download | gentoo-2-a0f0708d0df0a51102be6f8f01b34d3f6f651916.tar.gz gentoo-2-a0f0708d0df0a51102be6f8f01b34d3f6f651916.tar.bz2 gentoo-2-a0f0708d0df0a51102be6f8f01b34d3f6f651916.zip |
Add app-emulation/libguestfs, bug 302614. Thanks to slepnoga
(Portage version: 2.1.10.39/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/libguestfs')
-rw-r--r-- | app-emulation/libguestfs/ChangeLog | 11 | ||||
-rw-r--r-- | app-emulation/libguestfs/Manifest | 7 | ||||
-rw-r--r-- | app-emulation/libguestfs/files/1.8/1.8.15/configure_ac_automagic.patch | 96 | ||||
-rw-r--r-- | app-emulation/libguestfs/files/1.8/1.8.15/disable_php_in_makefile.patch | 19 | ||||
-rw-r--r-- | app-emulation/libguestfs/libguestfs-1.8.15.ebuild | 213 | ||||
-rw-r--r-- | app-emulation/libguestfs/metadata.xml | 20 |
6 files changed, 366 insertions, 0 deletions
diff --git a/app-emulation/libguestfs/ChangeLog b/app-emulation/libguestfs/ChangeLog new file mode 100644 index 000000000000..5241dd113a97 --- /dev/null +++ b/app-emulation/libguestfs/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for app-emulation/libguestfs +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libguestfs/ChangeLog,v 1.1 2011/12/11 19:34:22 maksbotan Exp $ + +*libguestfs-1.8.15 (11 Dec 2011) + + 11 Dec 2011; Maxim Koltsov <maksbotan@gentoo.org> + +files/1.8/1.8.15/configure_ac_automagic.patch, +libguestfs-1.8.15.ebuild, + +files/1.8/1.8.15/disable_php_in_makefile.patch, +metadata.xml: + Add app-emulation/libguestfs, bug 302614. Thanks to slepnoga + diff --git a/app-emulation/libguestfs/Manifest b/app-emulation/libguestfs/Manifest new file mode 100644 index 000000000000..52b85923a4de --- /dev/null +++ b/app-emulation/libguestfs/Manifest @@ -0,0 +1,7 @@ +AUX 1.8/1.8.15/configure_ac_automagic.patch 3491 RMD160 fc09fe6d9c5b2866e881011e9683d1cd3dd31342 SHA1 8845b22b8050388a485ebbe11ebf61c7a2a13a20 SHA256 6d114f453596e20788c493d8a7799cb946b2dec9bca677fda15a0e20855c2392 +AUX 1.8/1.8.15/disable_php_in_makefile.patch 354 RMD160 ee8b88a845af4bcc31492aaecab71931a2a3fe9e SHA1 f6cacc0990b88770c503ac884d57da82cb4115b9 SHA256 e674249ff1345339e8c0e996c0ed7aeb981c5cfcb28fa9919885d2474ce69205 +DIST libguestfs-1.7.18-x86_64.tar.gz 62332840 RMD160 202ac5883d1453d6225b76029290ccebd44c7e84 SHA1 661786c088fad8d2354e8121a2fafb1d598587fc SHA256 07c4f0b4b50df7407327333d9e9b09c310265d056868531c69659659a9f5218d +DIST libguestfs-1.8.15.tar.gz 5161269 RMD160 09b3f3d22032c3bdaedb813a367676d812c35450 SHA1 4ad8a8875105754834a2c887db39e49800b755bb SHA256 b57dd3d31a6ed78a1aee7b4eaf64a9c476c49ac46602aee7daa6b642cb23fad3 +EBUILD libguestfs-1.8.15.ebuild 4927 RMD160 ec43574e39c60504da2f72dd11cd71cdef671961 SHA1 4c8dfa7f032e0602d5cf0c0b7c16939403f15928 SHA256 7ca5ed9be5ebde6e0258f4ee8b17e42b04e565fecc93e8291fdafc84876a4a21 +MISC ChangeLog 418 RMD160 be90522b566a6a03acb8a42aa362a0f8d0d17f8c SHA1 bd645a51c911b40206edfdd7fceef1ca81102b98 SHA256 a400e930ee9d4172cda2acea970d9a2fc5608ef3f27a01c766789b5e6f5c0449 +MISC metadata.xml 666 RMD160 09b1620a738cf598810208d28bccce585fb26a88 SHA1 803c30c770918624b9222b9d34fd7e10eb3e4fcd SHA256 ecd9d02ee84fa3befc7685c597cecde1b9eeacadcb54bde7790d0789aad85923 diff --git a/app-emulation/libguestfs/files/1.8/1.8.15/configure_ac_automagic.patch b/app-emulation/libguestfs/files/1.8/1.8.15/configure_ac_automagic.patch new file mode 100644 index 000000000000..285a8a99efa6 --- /dev/null +++ b/app-emulation/libguestfs/files/1.8/1.8.15/configure_ac_automagic.patch @@ -0,0 +1,96 @@ +diff --git a/configure.ac b/configure.ac +index d072e81..cf7228e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -217,6 +217,10 @@ if test "x$enable_appliance" = "xyes"; then + if test -f /etc/arch-release; then + DISTRO=ARCHLINUX + fi ++ dnl Slepnoga for Gentoo ++ if test -f /etc/gentoo-release; then ++ DISTRO=GENTOO ++ fi + AC_MSG_RESULT([$DISTRO]) + AC_SUBST([DISTRO]) + fi +@@ -416,7 +420,7 @@ AC_CHECK_LIB([magic],[magic_file], + AC_DEFINE([HAVE_LIBMAGIC],[1],[libmagic found at compile time.]) + ], []) + ], +- [AC_MSG_WARN([libmagic not found, some core features will be disabled])]) ++ [AC_MSG_FAILURE([libmagic not found, some core features will be disabled])]) + + dnl Check for PCRE (highly recommended) + PKG_CHECK_MODULES([PCRE], [libpcre], +@@ -424,7 +428,7 @@ PKG_CHECK_MODULES([PCRE], [libpcre], + AC_SUBST([PCRE_LIBS]) + AC_DEFINE([HAVE_PCRE],[1],[PCRE found at compile time.]) + ], +- [AC_MSG_WARN([PCRE not found, some core features will be disabled])]) ++ [AC_MSG_FAILURE([PCRE not found, some core features will be disabled])]) + + dnl libvirt (highly recommended) + PKG_CHECK_MODULES([LIBVIRT], [libvirt], +@@ -441,7 +445,7 @@ PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], + AC_SUBST([LIBXML2_LIBS]) + AC_DEFINE([HAVE_LIBXML2],[1],[libxml2 found at compile time.]) + ], +- [AC_MSG_WARN([libxml2 not found, some core features will be disabled])]) ++ [AC_MSG_FAILURE([libxml2 not found, some core features will be disabled])]) + AM_CONDITIONAL([HAVE_LIBXML2],[test "x$LIBXML2_LIBS" != "x"]) + + dnl hivex library (highly recommended) +@@ -609,13 +613,13 @@ AS_IF([test "x$enable_ruby" != "xno"], + AM_CONDITIONAL([HAVE_RUBY], + [test "x$RAKE" != "xno" && test -n "$HAVE_LIBRUBY"]) + +-dnl Check for Java. +-AC_ARG_WITH(java_home, +- [AS_HELP_STRING([--with-java-home], +- [specify path to JDK directory @<:@default=check@:>@])], +- [], +- [with_java_home=check]) ++AC_ARG_ENABLE([java], ++ AS_HELP_STRING([--enable-java], [Disable Java language bindings]), ++ [enable_java=no], ++ [enable_java=yes]) + ++AS_IF([test "x$enable_java" = "xyes"], ++ [ + if test "x$with_java_home" != "xno"; then + if test "x$with_java_home" != "xyes" && test "x$with_java_home" != "xcheck" + then +@@ -711,7 +715,6 @@ if test "x$with_java_home" != "xno"; then + fi + fi + AC_MSG_RESULT([$JNI_CFLAGS]) +- + dnl Need extra version flag? + AC_MSG_CHECKING([extra javac flags]) + JAVAC_FLAGS= +@@ -746,8 +749,8 @@ AC_SUBST(JAVAC_FLAGS) + AC_SUBST(JAR_INSTALL_DIR) + AC_SUBST(JNI_INSTALL_DIR) + AC_SUBST(JNI_VERSION_INFO) +- +-AM_CONDITIONAL([HAVE_JAVA],[test -n "$JAVAC"]) ++]) ++AM_CONDITIONAL([HAVE_JAVA],[test -n "$JAVAC" && test "x$enable_java" != "xno"]) + + dnl Check for Haskell (GHC). + GHC=no +@@ -804,8 +807,12 @@ AC_SUBST(MAX_PROC_NR) + + dnl Replace libtool with a wrapper that clobbers dependency_libs in *.la files + dnl http://lists.fedoraproject.org/pipermail/devel/2010-November/146343.html +-LIBTOOL='bash $(top_srcdir)/libtool-kill-dependency_libs.sh $(top_builddir)/libtool' +-AC_SUBST([LIBTOOL]) ++dnl ha-ha, criocamera :) - gentoo kill la files in other way's ++dnlLIBTOOL='$(SHELL) $(top_srcdir)/libtool-kill-dependency_libs.sh $(top_builddir)/libtool' ++dnl haha, are stub ++dnl AC_PROG_LIBTOOL ++dnl AC_SUBST([LIBTOOL]) ++LT_INIT + + dnl Run in subdirs. + if test "x$enable_daemon" = "xyes"; then diff --git a/app-emulation/libguestfs/files/1.8/1.8.15/disable_php_in_makefile.patch b/app-emulation/libguestfs/files/1.8/1.8.15/disable_php_in_makefile.patch new file mode 100644 index 000000000000..189cefc12877 --- /dev/null +++ b/app-emulation/libguestfs/files/1.8/1.8.15/disable_php_in_makefile.patch @@ -0,0 +1,19 @@ +diff --git a/Makefile.am b/Makefile.am +--- a/Makefile.am ++++ b/Makefile.am +@@ -57,9 +57,12 @@ + if HAVE_HASKELL + SUBDIRS += haskell + endif +-if HAVE_PHP +-SUBDIRS += php +-endif ++ ++# use Gentoo way to compile/install php extension ++# due slot system ++#if HAVE_PHP ++#SUBDIRS += php ++#endif + + # Unconditional because nothing is built yet. + SUBDIRS += csharp diff --git a/app-emulation/libguestfs/libguestfs-1.8.15.ebuild b/app-emulation/libguestfs/libguestfs-1.8.15.ebuild new file mode 100644 index 000000000000..398404c4a308 --- /dev/null +++ b/app-emulation/libguestfs/libguestfs-1.8.15.ebuild @@ -0,0 +1,213 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libguestfs/libguestfs-1.8.15.ebuild,v 1.1 2011/12/11 19:34:22 maksbotan Exp $ + +EAPI="3" + +WANT_AUTOMAKE="1.11" + +JAVA_PKG_OPT_USE="java" +JAVA_PKG_ALLOW_VM_CHANGE="yes" +APLANCE_PV="1.7.18" +PYTHON_DEPEND="python? 2:2.6" +USE_RUBY="ruby18" +RUBY_OPTIONAL="yes" +PHP_EXT_NAME="guestfs_php" +USE_PHP="php5-3" +PHP_EXT_OPTIONAL_USE="php" + +inherit autotools bash-completion-r1 confutils versionator java-pkg-opt-2 perl-module python ruby-ng php-ext-source-r2 ghc-package + +MY_PV_1="$(get_version_component_range 1-2)" +MY_PV_2="$(get_version_component_range 2)" + +[[ $(( $(get_version_component_range 2) % 2 )) -eq 0 ]] && SD="stable" || SD="development" + +DESCRIPTION="Library for accessing and modifying virtual machine (VM) disk images" +HOMEPAGE="http://libguestfs.org/" +SRC_URI="http://libguestfs.org/download/${MY_PV_1}-${SD}/${P}.tar.gz + http://rion-overlay.googlecode.com/files/${PN}-${APLANCE_PV}-x86_64.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +# Upstream NOT supported 32-bit version, keyword in own risk +KEYWORDS="~amd64" +IUSE="fuse +ocaml perl python ruby haskell +readline nls php debug doc nls source javadoc" + +COMMON_DEPEND=" + virtual/perl-Getopt-Long + >=dev-perl/Sys-Virt-0.2.4 + >=app-misc/hivex-1.2.1[perl] + dev-perl/libintl-perl + dev-perl/String-ShellQuote + dev-libs/libpcre + app-arch/cpio + dev-lang/perl + app-cdr/cdrkit + >=app-emulation/qemu-kvm-0.13[qemu_user_targets_x86_64,qemu_softmmu_targets_x86_64] + sys-apps/fakeroot + sys-apps/file + app-emulation/libvirt + dev-libs/libxml2:2 + =dev-util/febootstrap-3* + >=sys-apps/fakechroot-2.8 + >=app-admin/augeas-0.7.1 + sys-fs/squashfs-tools + perl? ( virtual/perl-ExtUtils-MakeMaker ) + fuse? ( sys-fs/fuse ) + readline? ( sys-libs/readline ) + doc? ( dev-libs/libxml2 ) + ocaml? ( dev-lang/ocaml + dev-ml/findlib + dev-ml/xml-light ) + ruby? ( dev-lang/ruby + dev-ruby/rake ) + java? ( virtual/jre ) + haskell? ( dev-lang/ghc )" + +DEPEND="${COMMON_DEPEND} + java? ( >=virtual/jdk-1.6 + source? ( app-arch/zip ) ) + doc? ( app-text/po4a )" +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.6 )" + +PHP_EXT_S="${S}/php/extension" + +pkg_setup() { + use java && java-pkg-opt-2_pkg_setup + + if use python; then + python_set_active_version 2 + python_pkg_setup + python_need_rebuild + fi + + confutils_use_depend_all source java + confutils_use_depend_all javadoc java + + use ruby && ruby-ng_pkg_setup + use haskell && ghc-package_pkg_setup +} + +src_unpack() { + unpack ${P}.tar.gz + + cd "${WORKDIR}" + mkdir image || die + cd image || die + unpack libguestfs-${APLANCE_PV}-x86_64.tar.gz + cp "${WORKDIR}"/image/usr/local/lib/guestfs/* "${S}"/appliance/ || die + + # part of php-ext-source-r2_src_unpack + # whole version cannot be called here as it will attempt to unpack ${A} + if use php; then + local slot orig_s="${PHP_EXT_S}" + for slot in $(php_get_slots); do + cp -r "${orig_s}" "${WORKDIR}/${slot}" || die + done + fi +} + +src_prepare() { + epatch "${FILESDIR}/1.8/${PV}"/configure_ac_automagic.patch + epatch "${FILESDIR}/1.8/${PV}"/disable_php_in_makefile.patch + + use java && java-pkg-opt-2_src_prepare + eautoreconf + + if use php; then + php-ext-source-r2_src_prepare + fi +} + +src_configure() { + + # Disable feature test for kvm for more reason + # i.e: not loaded module in __build__ time, + # build server not supported kvm, etc. ... + # + # In fact, this feature is virtio support and requires + # configured kernel. + export vmchannel_test=no + + econf \ + --with-repo=fedora-12 \ + --disable-appliance \ + --disable-daemon \ + --with-drive-if=virtio \ + --with-net-if=virtio-net-pci \ + --disable-rpath \ + $(use_enable java) \ + $(use_enable nls) \ + $(use_with readline) \ + $(use_enable ocaml ocaml-viewer) \ + $(use_enable perl) \ + $(use_enable fuse) \ + $(use_enable ocaml) \ + $(use_enable python) \ + $(use_enable ruby) \ + $(use_enable haskell) \ + $(use_with doc po4a) + + if use php; then + php-ext-source-r2_src_configure + fi +} + +src_compile() { + emake || die + + if use php; then + php-ext-source-r2_src_compile + fi +} + +src_test() { + emake -j1 check || die +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die + + dodoc BUGS HACKING README RELEASE-NOTES TODO + + dobashcomp "${D}/etc"/bash_completion.d/guestfish-bash-completion.sh + + rm -fr "${D}/etc"/bash* || die + + insinto /usr/$(get_libdir)/guestfs/ + doins "${WORKDIR}/image/usr/local/lib/"guestfs/* + + find "${D}" -name '*.la' -exec rm -f '{}' + + if use java; then + java-pkg_newjar java/${P}.jar ${PN},jar + rm -fr "${D}/usr"/share/java + rm -fr "${D}/usr"/share/javadoc + if use source;then + java-pkg_dosrc java/com/redhat/et/libguestfs/* + fi + if use javadoc;then + java-pkg_dojavadoc java/api + fi + fi + + use perl && fixlocalpod + python_clean_installation_image -q + + if use php; then + php-ext-source-r2_src_install + fi +} + +pkg_preinst() { + use java && java-pkg-opt-2_pkg_preinst +} + +pkg_postinst() { + use haskell && ghc-package_pkg_postinst +} + +pkg_prerm() { + use haskell && ghc-package_pkg_prerm +} diff --git a/app-emulation/libguestfs/metadata.xml b/app-emulation/libguestfs/metadata.xml new file mode 100644 index 000000000000..2421701d0fd7 --- /dev/null +++ b/app-emulation/libguestfs/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>proxy-maintainers</herd> +<maintainer> + <email>spamslepnoga@inbox.ru</email> + <name>Andreis Vinogradovs</name> +</maintainer> +<maintainer> + <email>maksbotan@gentoo.org</email> + <name>Maxim Koltsov</name> +</maintainer> +<longdescription>Libguestfs is a library and tool set for accessing and +modifying virtual machine (VM) disk images</longdescription> +<use> + <flag name="fuse">Enable image mount support via fuse</flag> + <flag name="javadoc">Install java docs</flag> + <flag name="haskell">Install GHC binding</flag> +</use> +</pkgmetadata> |