commit:     20e05ef8ae5973042bd0f6eb184a3f7f884e5675
Author:     Denis Pronin <dannftk <AT> yandex <DOT> ru>
AuthorDate: Mon Jun 10 05:57:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 07:32:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20e05ef8

dev-lang/lazarus: add 3.4

Closes: https://bugs.gentoo.org/933988
Signed-off-by: Denis Pronin <dannftk <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/37136
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/lazarus/Manifest           |   1 +
 dev-lang/lazarus/lazarus-3.4.ebuild | 114 ++++++++++++++++++++++++++++++++++++
 2 files changed, 115 insertions(+)

diff --git a/dev-lang/lazarus/Manifest b/dev-lang/lazarus/Manifest
index a9b734789153..ff5cf5671243 100644
--- a/dev-lang/lazarus/Manifest
+++ b/dev-lang/lazarus/Manifest
@@ -4,3 +4,4 @@ DIST lazarus-2.2.4-0.tar.gz 77272959 BLAKE2B 
2d7b2872a7399eb1a3a7d9fb20fed209900
 DIST lazarus-2.2.4-makefile.patch.bz2 3650 BLAKE2B 
4a86e0dee7759183e3311cfa9f250995dbf2bb39d1de4c0fbc0191767b5f16029285ab92c76466d261708a88ed600929e777798560161e9942a64e44f956ff89
 SHA512 
560ffd3d43b75a804dfdb756323cecc7f2039215ab176ca0149cfee11dfe31d7943ad4aa212e9194c2bd2acbd0835e635501ef157888daf3715be7f760b3d51b
 DIST lazarus-3.0-0.tar.gz 87513233 BLAKE2B 
26e8492194541453230832591445b97827e65b61531078cb4bd1c9f549bcd0aa531fef036f701de885e96f9e56476b0dd1c9465e2388ea43080ba418acbd097e
 SHA512 
85cb3548fab017f2fd97f5fb141d59a0d0ec1412a161f98fea726ad5d6ed32ee2eb6ef6573e058d4df7dfcc067256e842acf994b73c9a50ebfb064657db33881
 DIST lazarus-3.0-makefile.patch.xz 3968 BLAKE2B 
f61d535cab6b1b04be5805fe2a321bd644b3f47092d9d76ca624e33fbfce6bd89dba7bf00adebbbe5635b898567a8b62bfd0e44142f1dc3d8640b5276014888a
 SHA512 
c91bee56a41f31ff8b5cfb4a7149cf0856e8c7b47fe502ba9828854ba4589ab19ddfecba182e5fc89cf8b7d71bda01d67a534ecab3f09437a0d7064c2b0f1fe8
+DIST lazarus-3.4-0.tar.gz 87535234 BLAKE2B 
f7da0b4edacf1e93b53bcdc4093e8c6ef3487985a5054db4368a56237ac8e39dbb088dea5e0146923554cf498ef969f86f6480235cc725f7c8d0f4e3fc9345de
 SHA512 
ab4096345d72028e89da4a284479bbe5d4ed89a6bd0463f62b7d04a23c0491dc3f7934c75b4a4a916f81db8c0b252bf382e5ab41a16ef42efc1c08efcce68aef

diff --git a/dev-lang/lazarus/lazarus-3.4.ebuild 
b/dev-lang/lazarus/lazarus-3.4.ebuild
new file mode 100644
index 000000000000..cd47f1f30556
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-3.4.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop
+
+# See https://wiki.freepascal.org/Lazarus_3.0_fixes_branch for notes and
+# changes in FPCVER. It *does* change between minor versions of lazarus.
+FPCVER="3.2.2"
+
+DESCRIPTION="feature rich visual programming environment emulating Delphi"
+HOMEPAGE="https://www.lazarus-ide.org/";
+SRC_URI="https://downloads.sourceforge.net/lazarus/${P}-0.tar.gz";
+SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-3.0-makefile.patch.xz";
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+SLOT="0/3.0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+KEYWORDS="~amd64 ~x86"
+IUSE="+gui gtk2 gtk qt6 extras"
+REQUIRED_USE="extras? ( gui )"
+
+# Pascal ignores CFLAGS and does its own stripping. Nothing else can be done 
about it.
+QA_FLAGS_IGNORED="
+/usr/share/lazarus/startlazarus \
+/usr/share/lazarus/lazarus \
+/usr/share/lazarus/tools/lazres \
+/usr/share/lazarus/tools/lrstolfm \
+/usr/share/lazarus/tools/updatepofiles \
+/usr/share/lazarus/tools/svn2revisioninc \
+/usr/share/lazarus/lazbuild \
+/usr/share/lazarus/components/chmhelp/lhelp/lhelp"
+
+QA_PRESTRIPPED=${QA_FLAGS_IGNORED}
+
+DEPEND="
+       >=dev-lang/fpc-${FPCVER}[source]
+       >=sys-devel/binutils-2.19.1-r1:=
+       gui? (
+               gtk2? ( x11-libs/gtk+:2 )
+               gtk? ( x11-libs/gtk+:3 )
+               qt6? ( dev-libs/libqt6pas:0/3.0 )
+       )
+"
+BDEPEND="net-misc/rsync"
+RDEPEND="${DEPEND}"
+
+RESTRICT="strip" #269221
+
+PATCHES=(
+       "${WORKDIR}"/${PN}-3.0-makefile.patch
+)
+
+src_prepare() {
+       default
+       # Use default configuration (minus stripping) unless specifically 
requested otherwise
+       if ! test ${PPC_CONFIG_PATH+set} ; then
+               local FPCVER=$(fpc -iV)
+               export PPC_CONFIG_PATH="${WORKDIR}"
+               sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg |
+                       sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die
+       fi
+}
+
+src_compile() {
+       # bug #732758
+       if ( use gui ) ; then
+               if ( use gtk2 ) ; then
+                       export LCL_PLATFORM=gtk2
+               elif ( use gtk ) ; then
+                       export LCL_PLATFORM=gtk3
+               else
+                       export LCL_PLATFORM=qt6
+               fi
+       else
+               export LCL_PLATFORM=nogui
+       fi
+       if ( use gui ) ; then
+               emake all $(usex extras "bigide lhelp" "") -j1 || die "make 
failed!"
+       else
+               emake lazbuild -j1 || die "make failed!"
+       fi
+}
+
+src_install() {
+       diropts -m0755
+       dodir /usr/share
+       # Using rsync to avoid unnecessary copies and cleaning...
+       # Note: *.o and *.ppu are needed
+       rsync -a \
+               --exclude="CVS"     --exclude=".cvsignore" \
+               --exclude="*.ppw"   --exclude="*.ppl" \
+               --exclude="*.ow"    --exclude="*.a"\
+               --exclude="*.rst"   --exclude=".#*" \
+               --exclude="*.~*"    --exclude="*.bak" \
+               --exclude="*.orig"  --exclude="*.rej" \
+               --exclude=".xvpics" --exclude="*.compiled" \
+               --exclude="killme*" --exclude=".gdb_hist*" \
+               --exclude="debian"  --exclude="COPYING*" \
+               --exclude="*.app" \
+               "${S}" "${ED}"/usr/share \
+               || die "Unable to copy files!"
+
+       if ( use gui ) ; then
+               dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
+               dosym ../share/lazarus/startlazarus /usr/bin/lazarus
+       fi
+       dosym ../share/lazarus/lazbuild /usr/bin/lazbuild
+       use extras && dosym ../share/lazarus/components/chmhelp/lhelp/lhelp 
/usr/bin/lhelp
+       dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png
+
+       use gui && make_desktop_entry startlazarus "Lazarus IDE" "lazarus"
+}

Reply via email to