libsmbios-2.3.2.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit autotools flag-o-matic python-single-r1 versionator
  6. DESCRIPTION="Provide access to (SM)BIOS information"
  7. HOMEPAGE="http://linux.dell.com/files/libsmbios/"
  8. SRC_URI="https://github.com/dell/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="GPL-2 OSL-2.0"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~ia64 ~x86"
  12. IUSE="doc graphviz nls python static-libs test"
  13. RDEPEND="dev-libs/libxml2
  14. sys-libs/zlib
  15. nls? ( virtual/libintl )
  16. python? ( ${PYTHON_DEPS} )"
  17. DEPEND="${RDEPEND}
  18. virtual/pkgconfig
  19. doc? ( app-doc/doxygen )
  20. graphviz? ( media-gfx/graphviz )
  21. nls? ( sys-devel/gettext )
  22. test? ( >=dev-util/cppunit-1.9.6 )"
  23. PATCHES=(
  24. "${FILESDIR}/${PN}-fix-pie.patch"
  25. "${FILESDIR}/${PN}-2.2.28-cppunit-tests.patch"
  26. "${FILESDIR}/${PN}-2.3.0-doxygen_target.patch"
  27. )
  28. pkg_setup() {
  29. use python && python-single-r1_pkg_setup
  30. }
  31. src_prepare() {
  32. default
  33. >pkg/py-compile
  34. # Don't build yum-plugin - we don't need it
  35. sed '/yum-plugin/d' -i Makefile.am || die
  36. # Fix version string in build system
  37. sed "/release_micro_version/s@\[1\]@[$(get_version_component_range 3)]@" \
  38. -i configure.ac || die
  39. eautoreconf
  40. }
  41. src_configure() {
  42. #Remove -O3 for bug #290097
  43. replace-flags -O3 -O2
  44. econf \
  45. $(use_enable doc doxygen) \
  46. $(use_enable graphviz) \
  47. $(use_enable nls) \
  48. $(use_enable python) \
  49. $(use_enable static-libs static)
  50. }
  51. src_install() {
  52. emake install DESTDIR="${D}"
  53. if use python ; then
  54. python_scriptinto /usr/sbin
  55. python_doscript "${ED%/}"/usr/sbin/smbios-{{keyboard,thermal,token,wakeup,wireless}-ctl,lcd-brightness,passwd,sys-info}
  56. fi
  57. insinto /usr/include/
  58. doins -r src/include/smbios/
  59. einstalldocs
  60. if ! use static-libs ; then
  61. find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
  62. fi
  63. }