git: 561d7cf968d5 - main - editors/lazarus-devel: editors/lazarus-qt5-devel: New port

Jose Alonso Cardenas Marquez acm at FreeBSD.org
Thu Aug 26 23:09:11 UTC 2021


The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=561d7cf968d5284f70caa9a8bcae80a2e6f6a601

commit 561d7cf968d5284f70caa9a8bcae80a2e6f6a601
Author:     Jose Alonso Cardenas Marquez <acm at FreeBSD.org>
AuthorDate: 2021-08-26 23:06:54 +0000
Commit:     Jose Alonso Cardenas Marquez <acm at FreeBSD.org>
CommitDate: 2021-08-26 23:08:58 +0000

    editors/lazarus-devel: editors/lazarus-qt5-devel: New port
    
    Lazarus is the class libraries for Free Pascal that emulate Delphi.
    Free Pascal is a GPL'ed compiler that runs on Linux, Win32, OS/2, 68K
    and more. Free Pascal is designed to be able to understand and compile
    Delphi syntax, which is of course OOP.
    
    Lazarus is the part of the missing puzzle that will allow you to
    develop Delphi-like programs in all of the above platforms. Unlike Java
    which strives to be a write once run anywhere, Lazarus and Free Pascal
    strives for write once compile anywhere. (devel version)
    
    WWW: https://www.lazarus-ide.org/
---
 editors/Makefile                           |   2 +
 editors/lazarus-devel/Makefile             | 180 +++++++++++++++++++++++++++++
 editors/lazarus-devel/distinfo             |   3 +
 editors/lazarus-devel/files/pkg-message.in |  47 ++++++++
 editors/lazarus-devel/pkg-descr            |  11 ++
 editors/lazarus-qt5-devel/Makefile         |  13 +++
 6 files changed, 256 insertions(+)

diff --git a/editors/Makefile b/editors/Makefile
index d20a15a04b25..071288f27a88 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -75,7 +75,9 @@
     SUBDIR += kile
     SUBDIR += komodo-edit
     SUBDIR += lazarus
+    SUBDIR += lazarus-devel
     SUBDIR += lazarus-qt5
+    SUBDIR += lazarus-qt5-devel
     SUBDIR += le
     SUBDIR += leafpad
     SUBDIR += led
diff --git a/editors/lazarus-devel/Makefile b/editors/lazarus-devel/Makefile
new file mode 100644
index 000000000000..66990822b91c
--- /dev/null
+++ b/editors/lazarus-devel/Makefile
@@ -0,0 +1,180 @@
+PORTNAME=	lazarus
+PORTVERSION=	2.3.0
+PKGNAMESUFFIX?=  -gtk2-devel
+PORTREVISION?=	0
+CATEGORIES=	editors devel
+DIST_SUBDIR=	freepascal
+
+MAINTAINER?=	acm at FreeBSD.org
+COMMENT?=	Portable Delphi-like IDE for the FreePascal compiler (GTK2 devel)
+
+CONFLICTS?=	${PORTNAME}-qt5-* ${PORTNAME}-gtk2-2*
+
+BUILD_DEPENDS?=	${LOCALBASE}/bin/as:devel/binutils \
+		fpcres:lang/fpc-utils
+RUN_DEPENDS?=	${LOCALBASE}/bin/as:devel/binutils \
+		gmake:devel/gmake \
+		fpcres:lang/fpc-utils \
+		${LOCALBASE}/share/fpc-source-${FPC_DEFAULT}/Makefile.fpc:lang/fpc-source
+
+ONLY_FOR_ARCHS=	i386 amd64
+
+USE_GITLAB=	yes
+GL_ACCOUNT=	freepascal.org/lazarus
+GL_PROJECT=	${PORTNAME}
+GL_COMMIT=	6df7e8756882f7d7f28f662011ee72f21746c580
+
+USES=		desktop-file-utils fpc:run gettext gmake iconv shared-mime-info xorg
+USE_FPC?=	chm cairo dblib fcl-base fcl-db fcl-fpcunit fcl-image fcl-json fcl-net \
+		fcl-registry fcl-res fcl-web fcl-xml fppkg gtk2 ibase iconvenc mysql \
+		numlib odbc opengl openssl oracle pasjpeg postgres regexpr rtl-extra \
+		rtl-generics sqlite x11
+USE_XORG=	x11
+OPT?=		"-Sgic "
+
+MAKE_ENV=	OPT=${OPT}
+PLIST=		${WRKDIR}/pkg-plist
+#WRKSRC?=	${WRKDIR}/${PORTNAME}
+DATADIR?=	${PREFIX}/share/${PORTNAME}-${PORTVERSION}
+
+OPTIONS_DEFINE=		GDB
+GDB_DESC=		Install a newest version  of gdb
+OPTIONS_DEFAULT=	GDB
+
+.include <bsd.port.options.mk>
+
+LAZARUS_ARCH=	${ARCH:S,amd64,x86_64,}
+
+BUILDNAME=	${LAZARUS_ARCH}-${OPSYS:tl}
+LCL_PLATFORM?=	gtk2
+
+MAN1S=		lazarus-ide.1 lazbuild.1 startlazarus.1
+SUB_FILES=	pkg-message
+SUB_LIST+=	PORTSDIR="${PORTSDIR}"
+
+.if ${PORT_OPTIONS:MGDB}
+RUN_DEPENDS+=	${LOCALBASE}/bin/gdb:devel/gdb
+.endif
+
+.if ${PKGNAMESUFFIX} == "-gtk2"
+USES+=		gnome
+USE_GNOME=	cairo gtk20 gdkpixbuf2
+.endif
+
+post-extract:
+	@${MKDIR} ${WRKDIR}/man1
+	@${MV} ${WRKSRC}/install/man/man1/lazarus-ide.1 ${WRKDIR}/man1/
+	@${MV} ${WRKSRC}/install/man/man1/lazbuild.1 ${WRKDIR}/man1/
+	@${MV} ${WRKSRC}/install/man/man1/startlazarus.1 ${WRKDIR}/man1/
+	@${MV} ${WRKSRC}/examples ${WRKDIR}/examples
+	@${MV} ${WRKSRC}/docs ${WRKDIR}/docs
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/${MAKEFILE}
+	@${REINPLACE_CMD} -e 's|startlazarus|${PORTNAME}|g' ${WRKSRC}/install/${PORTNAME}.desktop
+
+do-build:
+	@cd ${WRKSRC} && \
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} bigide LCL_PLATFORM=${LCL_PLATFORM}
+	@cd ${WRKSRC} && \
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} tools LCL_PLATFORM=${LCL_PLATFORM}
+
+post-build:
+	@cd ${WRKSRC} && \
+		${RM} -R COPYING* README* debian localize.bat test *.orig *.bak startlazarus.app \
+			ide/Makefile*.orig ide/Makefile*.bak lcl/interfaces/qt5/qtobjects.pas.orig
+
+pre-install:
+	@${ECHO} "#!/bin/sh" > ${WRKDIR}/lazarus-wrapper
+	@${ECHO} "cd ${DATADIR} || exit 1 " >> ${WRKDIR}/lazarus-wrapper
+	@${ECHO} "exec ./startlazarus" >> ${WRKDIR}/lazarus-wrapper
+
+	@${RM} ${PLIST}
+	@${RM} -r ${WRKSRC}/components/chmhelp/lhelp/lhelp.app/Contents/MacOS \
+		${WRKSRC}/lazarus.app/Contents/MacOS \
+		${WRKSRC}/lazarus.app/Contents/Resources/startlazarus.app/Contents/MacOS
+
+.	for FILE in bin/lazarus bin/lazbuild
+		@${ECHO_CMD} ${FILE} >> ${PLIST}
+.	endfor
+.	for m in ${MAN1S}
+		@${ECHO_CMD} man/man1/${m}.gz >> ${PLIST}
+.	endfor
+
+	@${ECHO_CMD} "%%DATADIR%%/docs" >> ${PLIST}
+	@cd ${WRKDIR}/docs && \
+		${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DOCSDIR%%/|' >> ${PLIST}
+
+	@${ECHO_CMD} "%%DATADIR%%/examples" >> ${PLIST}
+	@cd ${WRKDIR}/examples && \
+		${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%EXAMPLESDIR%%/|' >> ${PLIST} && \
+		${FIND} * -type d -empty | ${SORT} | ${SED} -e 's|^|@dir %%EXAMPLESDIR%%/|' >> ${PLIST}
+
+	@cd ${WRKSRC} && \
+		${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
+		${FIND} * -type d -empty | ${SORT} | ${SED} -e 's|^|@dir %%DATADIR%%/|' >> ${PLIST}
+
+	@${ECHO_CMD} "share/applications/lazarus.desktop" >> ${PLIST}
+
+.	for RESO in 128 16 256 32 48 64
+		@${ECHO_CMD} share/icons/hicolor/${RESO}x${RESO}/apps/lazarus.png >> ${PLIST}
+.	endfor
+
+	@cd ${WRKSRC}/images/mimetypes && \
+		${FIND} * -type f -name "*.png" | ${SORT} | ${SED} -e 's|^|share/icons/hicolor/48x48/mimetypes/|' >> ${PLIST}
+
+	@${ECHO_CMD} "share/icons/hicolor/scalable/apps/lazarus.svg" >> ${PLIST}
+	@${ECHO_CMD} "share/mime/packages/lazarus.xml" >> ${PLIST}
+
+do-install:
+.for DIRE in components converter debugger designer doceditor ide images install languages lazarus.app lcl \
+	packager tools units
+		@${MKDIR} ${STAGEDIR}${DATADIR}/${DIRE}
+		@cd ${WRKSRC}/${DIRE} && \
+			${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${DATADIR}/${DIRE}/{}" \; && \
+				${FIND} * -type f -exec ${INSTALL_DATA} {} "${STAGEDIR}${DATADIR}/${DIRE}/{}" \;
+.endfor
+	@${CHMOD} +x ${STAGEDIR}${DATADIR}/tools/svn2revisioninc ${STAGEDIR}${DATADIR}/tools/lazres ${STAGEDIR}${DATADIR}/tools/lrstolfm \
+		${STAGEDIR}${DATADIR}/tools/updatepofiles
+
+.for FILE in lazarus startlazarus lazbuild
+	${INSTALL_PROGRAM} ${WRKSRC}/${FILE} ${STAGEDIR}${DATADIR}
+.endfor
+
+	@cd ${WRKDIR}/docs && \
+		${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${DOCSDIR}/{}" \; && \
+			${FIND} * -type f -exec ${INSTALL_DATA} {} "${STAGEDIR}${DOCSDIR}/{}" \;
+	@${LN} -s ${DOCSDIR} ${STAGEDIR}${DATADIR}/docs
+
+	@cd ${WRKDIR}/examples && \
+		${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${EXAMPLESDIR}/{}" \; && \
+			${FIND} * -type f -exec ${INSTALL_DATA} {} "${STAGEDIR}${EXAMPLESDIR}/{}" \;
+	@${LN} -s ${EXAMPLESDIR} ${STAGEDIR}${DATADIR}/examples
+
+
+.for RESO in 128 16 256 32 48 64
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${RESO}x${RESO}/apps
+	${INSTALL_DATA} ${WRKSRC}/images/icons/${PORTNAME}${RESO}x${RESO}.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/${RESO}x${RESO}/apps/${PORTNAME}.png
+.endfor
+
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/mimetypes
+	@cd ${WRKSRC}/images/mimetypes && \
+		${FIND} * -type f -name "*.png" -exec ${INSTALL_DATA} {} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/mimetypes/{} \;
+
+	@${INSTALL_DATA} ${WRKSRC}/install/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop
+
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
+	@${INSTALL_DATA} ${WRKSRC}/images/icons/${PORTNAME}.svg ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg
+
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages
+	@${INSTALL_DATA} ${WRKSRC}/install/${PORTNAME}-mime.xml ${STAGEDIR}${PREFIX}/share/mime/packages/${PORTNAME}.xml
+
+	${INSTALL_SCRIPT} ${WRKSRC}/localize.sh ${STAGEDIR}${DATADIR}
+	${INSTALL_SCRIPT} ${WRKDIR}/lazarus-wrapper ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_DATA}	${WRKSRC}/Makefile* ${WRKSRC}/fpmake*  ${STAGEDIR}${DATADIR}
+.for FILE in ${MAN1S}
+	${INSTALL_MAN} ${WRKDIR}/man1/${FILE} ${STAGEDIR}${MAN1PREFIX}/man/man1
+.endfor
+	${LN} -s ${DATADIR}/lazbuild ${STAGEDIR}${PREFIX}/bin/lazbuild
+
+.include <bsd.port.mk>
diff --git a/editors/lazarus-devel/distinfo b/editors/lazarus-devel/distinfo
new file mode 100644
index 000000000000..2cb83e5764c3
--- /dev/null
+++ b/editors/lazarus-devel/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1629601903
+SHA256 (freepascal/freepascal.org/lazarus-lazarus-6df7e8756882f7d7f28f662011ee72f21746c580_GL0.tar.gz) = 216c40a05f5a61780530be2bd82e9b1e43f805da02b849b460c2ed9555e3c2b7
+SIZE (freepascal/freepascal.org/lazarus-lazarus-6df7e8756882f7d7f28f662011ee72f21746c580_GL0.tar.gz) = 46876461
diff --git a/editors/lazarus-devel/files/pkg-message.in b/editors/lazarus-devel/files/pkg-message.in
new file mode 100644
index 000000000000..c0eeec2ddd9a
--- /dev/null
+++ b/editors/lazarus-devel/files/pkg-message.in
@@ -0,0 +1,47 @@
+[
+{ type: install
+  message: <<EOM
+The Lazarus RAD devel was installed
+
+1) You can run it using:
+
+   # lazarus
+
+2) The first time that lazarus is running, you should set the path to fpc
+   source directory at lazarus configuration environment. Also it could be
+   setting later.
+
+3) Now you can obtain freepascal source installing lang/fpc-source port or
+   package
+
+   It will be extracted to %%LOCALBASE%%/share/fpc-source-X.X.X
+
+4) You can use %%LOCALBASE%%/bin/gdb debugger instead of gdb installed debugger
+   installed from base system. Lazarus works better with this version.
+
+5) The lazbuild.cfg file has been removed, it is not necessary anymore. Now
+   we can use the following ports for aplications that depend of lazarus
+   and these can be built with an interface different than lazarus has compiled
+   by default:
+
+   editors/lazarus
+   editors/lazarus-qt5
+
+   You can added those ports if you want support for gtk2 or qt5
+   interfaces. Please look at net-p2p/transmission-remote-gui like a example of
+   how use it
+
+6) If you want built apps using trunk version of lazarus, you must add the
+   following into /etc/make.conf file
+
+   WANT_LAZARUS_DEVEL=  yes
+
+   It is neccesary for use devel version of lazarus (gtk2 or qt5)
+
+   editors/lazarus-devel
+   editors/lazarus-qt5-devel
+
+7) Enjoy it ;)
+EOM
+}
+]
diff --git a/editors/lazarus-devel/pkg-descr b/editors/lazarus-devel/pkg-descr
new file mode 100644
index 000000000000..10b5d2cb7a19
--- /dev/null
+++ b/editors/lazarus-devel/pkg-descr
@@ -0,0 +1,11 @@
+Lazarus is the class libraries for Free Pascal that emulate Delphi.
+Free Pascal is a GPL'ed compiler that runs on Linux, Win32, OS/2, 68K
+and more. Free Pascal is designed to be able to understand and compile
+Delphi syntax, which is of course OOP.
+
+Lazarus is the part of the missing puzzle that will allow you to
+develop Delphi-like programs in all of the above platforms. Unlike Java
+which strives to be a write once run anywhere, Lazarus and Free Pascal
+strives for write once compile anywhere. (devel version)
+
+WWW: https://www.lazarus-ide.org/
diff --git a/editors/lazarus-qt5-devel/Makefile b/editors/lazarus-qt5-devel/Makefile
new file mode 100644
index 000000000000..981398114ed0
--- /dev/null
+++ b/editors/lazarus-qt5-devel/Makefile
@@ -0,0 +1,13 @@
+PKGNAMESUFFIX?=  -qt5-devel
+
+COMMENT=	Portable Delphi-like IDE for the FreePascal compiler (QT5 devel)
+
+CONFLICTS=	${PORTNAME}-gtk2-* ${PORTNAME}-qt5-2*
+
+LIB_DEPENDS=	libQt5Pas.so:x11-toolkits/qt5pas
+
+LCL_PLATFORM=	qt5
+
+MASTERDIR=	${.CURDIR}/../../editors/lazarus-devel
+
+.include "${MASTERDIR}/Makefile"


More information about the dev-commits-ports-main mailing list