parity-9999.ebuild 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. if [[ ${PV} == 9999 ]]; then
  5. inherit git-r3
  6. EGIT_REPO_URI="git@github.com:haubi/parity.git https://github.com/haubi/parity.git"
  7. DEPEND="dev-util/confix"
  8. else
  9. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  10. KEYWORDS=""
  11. fi
  12. DESCRIPTION="A POSIX to native Win32 Cross-Compiler Tool (requires Visual Studio)"
  13. HOMEPAGE="https://github.com/haubi/parity"
  14. LICENSE="LGPL-3"
  15. SLOT="0"
  16. IUSE=""
  17. pkg_setup() {
  18. if [ -z "${MSSDK}" ]; then
  19. einfo "NOTE: When using Visual Studio 2008, the Platform SDK is no longer"
  20. einfo "installed alongside with the other components, but has it's own"
  21. einfo "root directory, most likely something like this:"
  22. einfo ""
  23. einfo " C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A"
  24. einfo ""
  25. einfo "To make parity find it's paths correctly, please set MSSDK to the"
  26. einfo "value correspoding to the above example for your system."
  27. fi
  28. }
  29. if [[ ${PV} == 9999 ]]; then
  30. src_prepare() {
  31. confix --bootstrap || die
  32. default
  33. }
  34. fi
  35. src_install() {
  36. emake DESTDIR="${D}" install || die "emake install failed"
  37. # create i586-pc-winnt-g[++|cc|..] links..
  38. local exeext=
  39. [[ -f ${ED}usr/bin/parity.gnu.gcc.exe ]] && exeext=.exe
  40. # create cross compiler syms, also for former versioned winnt profiles
  41. local v
  42. for v in "" 5.2 6.1; do
  43. dosym /usr/bin/parity.gnu.gcc${exeext} /usr/bin/i586-pc-winnt${v}-gcc
  44. dosym /usr/bin/parity.gnu.gcc${exeext} /usr/bin/i586-pc-winnt${v}-c++
  45. dosym /usr/bin/parity.gnu.gcc${exeext} /usr/bin/i586-pc-winnt${v}-g++
  46. dosym /usr/bin/parity.gnu.ld${exeext} /usr/bin/i586-pc-winnt${v}-ld
  47. dosym /usr/bin/parity.gnu.windres${exeext} /usr/bin/i586-pc-winnt${v}-windres
  48. dosym /usr/bin/parity.gnu.ar /usr/bin/i586-pc-winnt${v}-ar
  49. dosym /usr/bin/parity.gnu.ranlib /usr/bin/i586-pc-winnt${v}-ranlib
  50. dosym /usr/bin/parity.gnu.strip /usr/bin/i586-pc-winnt${v}-strip
  51. done
  52. # we don't need the header files installed by parity... private
  53. # header files are supported with a patch from 2.1.0-r1 onwards,
  54. # so they won't be there anymore, but -f does the job in any case.
  55. rm -f "${ED}"/usr/include/*.h
  56. }