lazarus-1.0.12.ebuild 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. RESTRICT="strip" #269221
  6. FPCVER="2.6.0"
  7. SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
  8. LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
  9. KEYWORDS="amd64 ppc x86"
  10. DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
  11. HOMEPAGE="http://www.lazarus.freepascal.org/"
  12. IUSE="minimal"
  13. SRC_URI="http://downloads.sourceforge.net/project/${PN}/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${PN}-${PV}-0.tar.gz"
  14. DEPEND=">=dev-lang/fpc-${FPCVER}[source]
  15. net-misc/rsync
  16. x11-libs/gtk+:2"
  17. RDEPEND="${DEPEND}
  18. !=gnome-base/librsvg-2.16.1"
  19. DEPEND="${DEPEND}
  20. >=sys-devel/binutils-2.19.1-r1"
  21. S=${WORKDIR}/${PN}
  22. src_prepare() {
  23. epatch "${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch
  24. # Use default configuration (minus stripping) unless specifically requested otherwise
  25. if ! test ${PPC_CONFIG_PATH+set} ; then
  26. local FPCVER=$(fpc -iV)
  27. export PPC_CONFIG_PATH="${WORKDIR}"
  28. sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg |
  29. sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die
  30. #sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die
  31. fi
  32. }
  33. src_compile() {
  34. LCL_PLATFORM=gtk2 emake \
  35. $(usex minimal "" "bigide") \
  36. -j1
  37. }
  38. src_install() {
  39. diropts -m0755
  40. dodir /usr/share
  41. # Using rsync to avoid unnecessary copies and cleaning...
  42. # Note: *.o and *.ppu are needed
  43. rsync -a \
  44. --exclude="CVS" --exclude=".cvsignore" \
  45. --exclude="*.ppw" --exclude="*.ppl" \
  46. --exclude="*.ow" --exclude="*.a"\
  47. --exclude="*.rst" --exclude=".#*" \
  48. --exclude="*.~*" --exclude="*.bak" \
  49. --exclude="*.orig" --exclude="*.rej" \
  50. --exclude=".xvpics" --exclude="*.compiled" \
  51. --exclude="killme*" --exclude=".gdb_hist*" \
  52. --exclude="debian" --exclude="COPYING*" \
  53. --exclude="*.app" \
  54. "${S}" "${ED%/}"/usr/share \
  55. || die "Unable to copy files!"
  56. dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
  57. dosym ../share/lazarus/startlazarus /usr/bin/lazarus
  58. dosym ../share/lazarus/lazbuild /usr/bin/lazbuild
  59. use minimal || dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp
  60. dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png
  61. make_desktop_entry startlazarus "Lazarus IDE" "lazarus" || die "Failed making desktop entry!"
  62. }