fritzing-0.9.2b-r2.ebuild 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PARTS_P="${PN}-parts-${PV}"
  5. inherit qmake-utils
  6. DESCRIPTION="Electronic Design Automation"
  7. HOMEPAGE="http://fritzing.org/"
  8. SRC_URI="https://github.com/fritzing/fritzing-app/archive/${PV}.tar.gz -> ${P}.tar.gz
  9. https://github.com/fritzing/fritzing-parts/archive/${PV}.tar.gz -> ${PARTS_P}.tar.gz"
  10. LICENSE="CC-BY-SA-3.0 GPL-3+"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE=""
  14. RDEPEND="dev-qt/qtconcurrent:5
  15. dev-qt/qtcore:5
  16. dev-qt/qtgui:5
  17. dev-qt/qtnetwork:5
  18. dev-qt/qtprintsupport:5
  19. dev-qt/qtserialport:5
  20. dev-qt/qtsql:5[sqlite]
  21. dev-qt/qtsvg:5
  22. dev-qt/qtwidgets:5
  23. dev-qt/qtxml:5
  24. >=dev-libs/quazip-0.7.2[qt5]"
  25. DEPEND="${RDEPEND}
  26. >=dev-libs/boost-1.40"
  27. S="${WORKDIR}/${PN}-app-${PV}"
  28. DOCS="readme.md"
  29. src_prepare() {
  30. local lang translations=
  31. # fix build with newer quazip - bug #597988
  32. sed -i -e "s/#include <quazip/&5/" src/utils/folderutils.cpp || die
  33. sed -i -e "s|/usr/include/quazip|&5|" -e "s/-lquazip/&5/" phoenix.pro || die
  34. # Get a rid of the bundled libs
  35. # Bug 412555 and
  36. # https://code.google.com/p/fritzing/issues/detail?id=1898
  37. rm -rf src/lib/quazip/ pri/quazip.pri src/lib/boost* || die
  38. # Fritzing doesn't need zlib
  39. sed -i -e 's:LIBS += -lz::' -e 's:-lminizip::' phoenix.pro || die
  40. # Somewhat evil but IMHO the best solution
  41. for lang in $L10N; do
  42. lang=${lang/linguas_}
  43. [[ -f "translations/${PN}_${lang}.qm" ]] && translations+=" translations/${PN}_${lang}.qm"
  44. done
  45. if [[ -n "${translations}" ]]; then
  46. sed -i -e "s:\(translations.extra =\) .*:\1 cp -p ${translations} \$(INSTALL_ROOT)\$\$PKGDATADIR/translations\r:" phoenix.pro || die
  47. else
  48. sed -i -e "s:translations.extra = .*:\r:" phoenix.pro || die
  49. fi
  50. # Fix missing Intel bin icon
  51. # https://github.com/fritzing/fritzing-parts/commit/716560e9
  52. sed -i -e 's:Intel.png:intel.png:' bins/more/intel.fzb || die
  53. default
  54. }
  55. src_configure() {
  56. eqmake5 DEFINES=QUAZIP_INSTALLED phoenix.pro
  57. }
  58. src_install() {
  59. INSTALL_ROOT="${D}" default
  60. insinto /usr/share/fritzing/parts
  61. doins -r "${WORKDIR}/${PARTS_P}"/*
  62. }