Advertisement
abw

lazarus-1.2.6.ebuild

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