ufconfig-3.6.1.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit multilib toolchain-funcs
  5. MY_PN=UFconfig
  6. DESCRIPTION="Common configuration scripts for the SuiteSparse libraries"
  7. HOMEPAGE="http://www.cise.ufl.edu/research/sparse/UFconfig"
  8. SRC_URI="http://www.cise.ufl.edu/research/sparse/${MY_PN}/${MY_PN}-${PV}.tar.gz"
  9. LICENSE="LGPL-2.1"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
  12. IUSE="static-libs"
  13. DEPEND=""
  14. S="${WORKDIR}/${MY_PN}"
  15. src_compile() {
  16. echo "$(tc-getCC) ${CFLAGS} -fPIC -c UFconfig.c -o UFconfig.lo"
  17. $(tc-getCC) ${CFLAGS} -fPIC -c UFconfig.c -o UFconfig.lo || die
  18. echo "$(tc-getCC) ${LDFLAGS} -shared -Wl,-soname,libufconfig.so.${PV} -o libufconfig.so.${PV} UFconfig.lo"
  19. $(tc-getCC) ${LDFLAGS} -shared -Wl,-soname,libufconfig.so.${PV} -o libufconfig.so.${PV} UFconfig.lo || die
  20. if use static-libs; then
  21. echo "$(tc-getCC) ${CFLAGS} -c UFconfig.c -o UFconfig.o"
  22. $(tc-getCC) ${CFLAGS} -c UFconfig.c -o UFconfig.o || die
  23. echo "$(tc-getAR) libufconfig.a UFconfig.o"
  24. $(tc-getAR) cr libufconfig.a UFconfig.o
  25. fi
  26. }
  27. src_install() {
  28. dolib.so libufconfig.so.${PV}
  29. dosym libufconfig.so.${PV} /usr/$(get_libdir)/libufconfig.so
  30. use static-libs && dolib.a libufconfig.a
  31. insinto /usr/include
  32. doins UFconfig.h
  33. dodoc README.txt
  34. }