libgamin-0.1.10-r5.ebuild 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. PYTHON_COMPAT=( python2_7 )
  5. GNOME_ORG_MODULE="gamin"
  6. GNOME_TARBALL_SUFFIX="bz2"
  7. inherit autotools eutils flag-o-matic libtool python-r1 gnome.org multilib-minimal
  8. DESCRIPTION="Library providing the FAM File Alteration Monitor API"
  9. HOMEPAGE="https://www.gnome.org/~veillard/gamin/"
  10. SRC_URI="${SRC_URI}
  11. mirror://gentoo/gamin-0.1.9-freebsd.patch.bz2
  12. https://dev.gentoo.org/~grobian/patches/libgamin-0.1.10-opensolaris.patch.bz2
  13. https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
  14. LICENSE="LGPL-2"
  15. SLOT="0"
  16. KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
  17. IUSE="debug kernel_linux python static-libs"
  18. RESTRICT="test" # needs gam-server
  19. RDEPEND="!app-admin/fam
  20. !<app-admin/gamin-0.1.10"
  21. DEPEND="${RDEPEND}"
  22. src_prepare() {
  23. mv "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
  24. # Fix QA warnings, bug #257281, upstream #466791
  25. epatch "${FILESDIR}"/${PN}-0.1.10-compilewarnings.patch
  26. if [[ ${CHOST} != *-solaris* ]] ; then
  27. # Fix compile warnings; bug #188923
  28. epatch "${DISTDIR}"/gamin-0.1.9-freebsd.patch.bz2
  29. else
  30. # (Open)Solaris necessary patches (changes configure.in), unfortunately
  31. # conflicts with freebsd patch and breaks some linux installs so it must
  32. # only be applied if on solaris.
  33. epatch "${DISTDIR}"/${P}-opensolaris.patch.bz2
  34. fi
  35. # Fix collision problem due to intermediate library, upstream bug #530635
  36. epatch "${FILESDIR}"/${PN}-0.1.10-noinst-lib.patch
  37. # Fix compilation with latest glib, bug #382783
  38. epatch "${FILESDIR}/${PN}-0.1.10-G_CONST_RETURN-removal.patch"
  39. # Fix crosscompilation issues, bug #267604
  40. epatch "${FILESDIR}/${PN}-0.1.10-crosscompile-fix.patch"
  41. # Enable linux specific features on armel, upstream bug #588338
  42. epatch "${FILESDIR}/${P}-armel-features.patch"
  43. # Fix possible server deadlock in ih_sub_cancel, upstream bug #667230
  44. epatch "${FILESDIR}/${PN}-0.1.10-deadlock.patch"
  45. # Drop DEPRECATED flags
  46. sed -i -e 's:-DG_DISABLE_DEPRECATED:$(NULL):g' server/Makefile.am || die
  47. # Build only shared version of Python module.
  48. epatch "${FILESDIR}"/${PN}-0.1.10-disable_python_static_library.patch
  49. sed -i \
  50. -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
  51. -e 's:AM_PROG_CC_STDC:AC_PROG_CC:' \
  52. configure.in || die #466962
  53. # autoconf is required as the user-cflags patch modifies configure.in
  54. # however, elibtoolize is also required, so when the above patch is
  55. # removed, replace the following call with a call to elibtoolize
  56. AT_M4DIR="${WORKDIR}" eautoreconf
  57. }
  58. multilib_src_configure() {
  59. local myconf=(
  60. $(use_enable static-libs static)
  61. --disable-debug
  62. --disable-server
  63. $(use_enable kernel_linux inotify)
  64. $(use_enable debug debug-api)
  65. --without-python
  66. )
  67. local ECONF_SOURCE=${S}
  68. econf "${myconf[@]}"
  69. if multilib_is_native_abi && use python; then
  70. python_configure() {
  71. mkdir -p "${BUILD_DIR}" || die
  72. cd "${BUILD_DIR}" || die
  73. econf "${myconf[@]}" --with-python
  74. }
  75. python_foreach_impl python_configure
  76. fi
  77. }
  78. multilib_src_compile() {
  79. default
  80. if multilib_is_native_abi && use python; then
  81. local native_builddir=${BUILD_DIR}
  82. python_compile() {
  83. emake -C "${BUILD_DIR}"/python \
  84. VPATH="${native_builddir}/python:${S}/python" \
  85. _gamin_la_LIBADD="${native_builddir}/libgamin/libgamin-1.la"
  86. }
  87. python_foreach_impl python_compile
  88. fi
  89. }
  90. multilib_src_install() {
  91. emake DESTDIR="${D}" install
  92. if multilib_is_native_abi && use python; then
  93. local native_builddir=${BUILD_DIR}
  94. python_install() {
  95. emake -C "${BUILD_DIR}"/python \
  96. DESTDIR="${D}" install \
  97. VPATH="${native_builddir}/python:${S}/python"
  98. }
  99. python_foreach_impl python_install
  100. fi
  101. }
  102. multilib_src_install_all() {
  103. dodoc AUTHORS ChangeLog README TODO NEWS doc/*txt
  104. dohtml doc/*
  105. prune_libtool_files --all
  106. }