lazarus-1.6.0-r1.ebuild 2.3 KB

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