development/lazarus: Updated for version 3.0.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Antonio Leal 2024-01-15 07:57:00 +07:00 committed by Willy Sudiarto Raharjo
parent 05fee380d9
commit 24cbc604ef
3 changed files with 41 additions and 21 deletions

View file

@ -6,3 +6,17 @@ independent visual components like buttons, windows, checkbox, treeview
and many, many more. The LCL is platform independent, so you can write
an application once and then compile for various platforms without
changing code.
By default this script builds lazarus with "gtk2" but it can instead
use "qt5" by following these steps:
1. build and install libqtpas from SlackBuilds.org
2. build lazarus with the command:
LCL=qt5 ./lazarus.SlackBuild
3. install lazarus
Note: before installing lazarus 3.0 make sure first to remove any
previous lazarus installation, then upgrading fpc to version 3.2.2
build 3.

View file

@ -2,9 +2,9 @@
# Slackware build script for Lazarus IDE
# Written by Andre Barboza <email removed>
# Maintained by Antonio Leal <antonioleal@yahoo.com>
# Previously maintained by B. Watson <urchlay@slackware.uk>
# Now maintained by Antonio Leal <antonioleal@yahoo.com>
# Originally written by Andre Barboza <email removed>
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@ -23,6 +23,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20231229 ALe: Upgrade to Lazarus 3.0
# - moved fpc-source to fpc package (with new option for the user to exclude it).
# - added option to build lazarus with qt5 instead of gtk2.
# - commented lhelp link correction as sbopkglint does not complain anymore.
# 20220414 bkw: BUILD=2
# - fix PRINT_PACKAGE_NAME when ARCH not set in environment.
# - add gtk-update-icon-cache to doinst.sh.
@ -37,12 +42,11 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lazarus
VERSION=${VERSION:-2.2.6}
VERSION=${VERSION:-3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
FPCVER=${FPCVER:-3.2.2}
LCL=${LCL:-gtk2}
OPT=${OPT:--v000}
@ -76,13 +80,18 @@ fixperms() {
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
}
# extract source tarball
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION-0.tar.gz
cd $PRGNAM
# fix permssions
fixperms
# patch things up
sed -i -e 's:share/man:man:' install/man/Makefile
# Compilation doesn't need ./configure
@ -101,7 +110,12 @@ make install \
ln -sf ../share/lazarus/lazbuild
ln -sf ../share/lazarus/startlazarus
)
# add link to lazarus-ide man page
( cd $PKG/usr/man/man1
ln -sf lazarus-ide.1.gz lazarus.1.gz
)
# strip binaries and libraries
find $PKG -print0 -type f -a -perm /111 | \
xargs -0 file -m /etc/file/magic/elf | \
grep -e "executable" -e "shared object" | \
@ -109,21 +123,13 @@ find $PKG -print0 -type f -a -perm /111 | \
cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
# 20210905 bkw: Nothing used fpc-source but lazarus, so just include
# the source here.
mkdir -p $PKG/usr/src
( cd $PKG/usr/src
tar xvf $CWD/fpc-$FPCVER.source.tar.gz
fixperms
ln -s fpc-$FPCVER fpc
)
# Install desktop file, icon, and mime entry
# install desktop file, icon, and mime entry
mkdir -p $PKG/usr/share/{applications,pixmaps,mime/packages}
cat install/lazarus.desktop > $PKG/usr/share/applications/lazarus.desktop
cat images/ide_icon48x48.png > $PKG/usr/share/pixmaps/lazarus.png
cat install/lazarus-mime.xml > $PKG/usr/share/mime/packages/lazarus-mime.xml
# copy documentation and examples
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -ra COPYING* README.md docs/* examples/ $PKGDOC
@ -134,9 +140,11 @@ find $PKGDOC -depth -type d -empty -delete
# 20220414 bkw: this symlink is mistargeted... fixed, and don't freak out
# if sbopkglint complains about a filesystem loop (there really is one).
rm -f $PKG/usr/share/lazarus/components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp
ln -s ../../../../lhelp $PKG/usr/share/lazarus/components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp
# 20231229 ALe: sbopkglint does not complain anymore
#rm -f $PKG/usr/share/lazarus/components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp
#ln -s ../../../../lhelp $PKG/usr/share/lazarus/components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp
# build package
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

View file

@ -1,10 +1,8 @@
PRGNAM="lazarus"
VERSION="2.2.6"
VERSION="3.0"
HOMEPAGE="http://www.lazarus.freepascal.org/"
DOWNLOAD="http://downloads.sourceforge.net/lazarus/lazarus-2.2.6-0.tar.gz \
https://downloads.sourceforge.net/freepascal/fpc-3.2.2.source.tar.gz"
MD5SUM="51ca9d8351c368d8c3f7e89734fc17f1 \
e7649ad0fc9230fdd9493a7fcabbd426"
DOWNLOAD="http://downloads.sourceforge.net/lazarus/lazarus-3.0-0.tar.gz"
MD5SUM="d4130b835451e3a61df3a9d9603e8063"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="fpc"