From nobody Fri Nov 10 20:19:42 2023 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SRqtQ1sqnz50FBB; Fri, 10 Nov 2023 20:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SRqtQ1fVCz4bGc; Fri, 10 Nov 2023 20:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699647582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fZBk3PrunE6K33yAepc6zrquZ8FZkmBX3xclNgaOON8=; b=hTSRqUFyfOt+gQRLFAGQE1CmJgYg2ADkwPM4fTuSkq8hJ9dfAgU8VhOh8IMcry9IO8y09/ QXlc704PvZIv3opBQuZZ6UaFeykiOzKU+vwtNKRkvVXMrg46Uos3YrZMX+Cm0B8nVLr2ey DDihhMMQuIbKwgQbAk1FD/esW5zCzZZeu9oOyVUylk3JW6bs3qG6rUyBpbXvsJgqOj/Oqs o4JQOlBGN81+tSejqNaOBsmRuAatB/ZRlOqhCT5EzXCxMVLI+dYO5NkV5LAd6i3XoTGnkm 7WJJHNvFWcCXP4kISM4e/YMhAgsdWQRbFIATf/3AfUap6LycmFKOxO+SYfrI6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699647582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fZBk3PrunE6K33yAepc6zrquZ8FZkmBX3xclNgaOON8=; b=lDPRCB1WdAz+aBnGEEh8NZv5kBbTny/VA7aT7CHFPXfIXD2I0L+KUzuxZZ9D9+LwW+nXuu 7Y6d2lhwa2b45NPnkQA/VrUcC5NrxSZ6U8VPTTjblK1WrqWvXguHWOVHG19oHlPUUkt+jg gPzCv7mtjliKdnWivZLzUqb/MYjsA0OTgHuxynVCoOYzkGE91UP3Why68d8AgOE2thyD5h ZD+wrdTeM/yG6zjGYr0pgDw8IS9fSptqVv2SoJ/qf3LTlvE0YDLPgSLC59zkb2rCGOAX6Q 9kd5At32ntu4hNwJ8MiB+/ifnLF+/d3OtJC1/jMBFJPP1uCVQfxwPOMeEwRFZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699647582; a=rsa-sha256; cv=none; b=AzkTJG0wF8bbmbIG0+uH9Wu+FXKq6F6ALi42MWH5NldxDegfBiQrier+QzNHgENXjt4j8o j4456pXRMMsRKkmDiGdhU4OufQ2FwZXrqL+KT5xJabFv63QoAbW7gShHfXFwBg/8JXEhKq 28nJAhwgxcnTrJ1lHfIiv3wF4G49fvd9f4QjRODOzZE+dzPQReotro5NTt8fTA6d1ZtQcc QNlqBVsMnRt4wa4AsfxApaz062jAzLfbIhWmJC5uUvvUP1Y5ZijCTmKG752KSSyhaJEXNS JWu3otH2L8b9y7hRKSAa6VjmxVyFpsT/fsLKBv56sp1iY57ujjelZtDgJi7Qtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SRqtQ0hZ4z1BBG; Fri, 10 Nov 2023 20:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AAKJgM3036806; Fri, 10 Nov 2023 20:19:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AAKJgGf036804; Fri, 10 Nov 2023 20:19:42 GMT (envelope-from git) Date: Fri, 10 Nov 2023 20:19:42 GMT Message-Id: <202311102019.3AAKJgGf036804@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: 1fc1c0f9dfa2 - 2023Q4 - lang/fpc-devel: New port: Free Pascal compiler with Turbo and Delphi (devel) List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q4 X-Git-Reftype: branch X-Git-Commit: 1fc1c0f9dfa26826d6b135a9b3273337e9adc442 Auto-Submitted: auto-generated The branch 2023Q4 has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=1fc1c0f9dfa26826d6b135a9b3273337e9adc442 commit 1fc1c0f9dfa26826d6b135a9b3273337e9adc442 Author: Jose Alonso Cardenas Marquez AuthorDate: 2023-10-28 22:54:03 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2023-11-10 20:19:32 +0000 lang/fpc-devel: New port: Free Pascal compiler with Turbo and Delphi (devel) Free Pascal is a mature, versatile, open source Pascal compiler. It can target many processor architectures: Intel x86 (16 and 32 bit), AMD64/x86-64, PowerPC, PowerPC64, SPARC, SPARC64, ARM, AArch64, MIPS, Motorola 68k, AVR, and the JVM. Supported operating systems include Windows (16/32/64 bit, CE, and native NT), Linux, Mac OS X/iOS/iPhoneSimulator/Darwin, FreeBSD and other BSD flavors, DOS (16 bit, or 32 bit DPMI), OS/2, AIX, Android, Haiku, Nintendo GBA/DS/Wii, AmigaOS, MorphOS, AROS, Atari TOS, and various embedded platforms. Additionally, support for RISC-V (32/64), Xtensa, and Z80 architectures, and for the LLVM compiler infrastructure is available in the development version. Additionally, the Free Pascal team maintains a transpiler for pascal to Javascript called pas2js. (cherry picked from commit db9286bab5ad2d84ea3e7daeeb05ddf8f100c596) --- lang/Makefile | 1 + lang/fpc-devel/Makefile | 183 ++ lang/fpc-devel/distinfo | 9 + .../files/patch-compiler-systems_t__bsd.pas | 22 + .../fpc-devel/files/patch-compiler-utils_samplecfg | 13 + lang/fpc-devel/files/patch-compiler_globals.pas | 32 + .../fpc-devel/files/patch-packages-dts-src-dts.pas | 97 + .../patch-packages-libnettle-src_libnettle.pp | 11 + .../files/patch-packages-opencl-src_cl.pp | 11 + .../files/patch-packages_libvlc_fpmake.pp | 13 + lang/fpc-devel/files/pkg-message.in | 21 + lang/fpc-devel/pkg-descr | 12 + lang/fpc-devel/pkg-plist | 3403 ++++++++++++++++++++ 13 files changed, 3828 insertions(+) diff --git a/lang/Makefile b/lang/Makefile index ff26605973bd..61bf1f1c69e4 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -73,6 +73,7 @@ SUBDIR += ficl SUBDIR += fpc SUBDIR += fpc-base + SUBDIR += fpc-devel SUBDIR += fpc-docs SUBDIR += fpc-lua SUBDIR += fpc-pastojs diff --git a/lang/fpc-devel/Makefile b/lang/fpc-devel/Makefile new file mode 100644 index 000000000000..6c2dd658e87f --- /dev/null +++ b/lang/fpc-devel/Makefile @@ -0,0 +1,183 @@ +PORTNAME= fpc +PORTVERSION= 3.3.1.20231027 +PORTREVISION= 0 +CATEGORIES= lang +MASTER_SITES= LOCAL/acm/freepascal/:bootstrap \ + LOCAL/acm/freepascal/:man +PKGNAMESUFFIX= -devel +DIST_SUBDIR= freepascal + +MAINTAINER= acm@FreeBSD.org +COMMENT= Free Pascal compiler with Turbo and Delphi (devel) +WWW= https://www.freepascal.org/ + +CONFLICTS= fpc + +RUN_DEPENDS= ${LOCALBASE}/bin/as:devel/binutils + +ONLY_FOR_ARCHS= amd64 i386 + +USES+= gmake iconv +USE_BINUTILS= yes +BOOTVER= 3.2.2 +FPCBASEVER= 3.3.1 +MANVER= 3.0.4 + +FPC_LDPATH?= "${LOCALBASE}/bin/ld.bfd" + +USE_GITLAB= yes +GL_SITE= https://gitlab.com/freepascal.org +GL_ACCOUNT= fpc +GL_PROJECT= source +GL_COMMIT= 55e72fc0f1505c75f60af706736d32ceca9815a4 + +FPCSRCDIR= source-${GL_COMMIT} + +.include + +.if ${ARCH} == "i386" +PPNAME= ppc386 +FPC_ARCH= i386 +PLIST_SUB+= FPC_I386="" \ + FPC_AMD64="@comment " +.elif ${ARCH} == "amd64" +PPNAME= ppcx64 +FPC_ARCH= x86_64 +PLIST_SUB+= FPC_I386="@comment " \ + FPC_AMD64="" +.endif + +.if ${OPSYS} == FreeBSD +PLIST_SUB+= FREEBSD="" +.else +PLIST_SUB+= FREEBSD="@comment " +.endif + +SUB_FILES= pkg-message + +BUILDNAME= ${FPC_ARCH}-${OPSYS:tl} +PLIST_SUB+= PORTVERSION=${FPCBASEVER} \ + BUILDNAME=${BUILDNAME} +DISTFILES+= ${BOOTDIR}.tar.gz:${OPSYS:MDragonFly}bootstrap \ + fpc-${MANVER}.man.tar.gz:man +NEWFPCMAKE= ${WRKDIR}/${FPCSRCDIR}/utils/fpcm/bin/${BUILDNAME}/fpcmake +MAKE_ARGS+= FPCMAKE=${NEWFPCMAKE} \ + FPCTARGET=${BUILDNAME} \ + ARCH=${FPC_ARCH} \ + OPT="${OPT}" \ + BSDHIER=1 \ + INSTALL="${INSTALL_DATA}" \ + INSTALLEXE="${INSTALL_PROGRAM}" \ + INSTALLSCR="${INSTALL_SCRIPT}" \ + INSTALL_PREFIX=${STAGEDIR}${PREFIX} \ + FPC_LDPATH=${FPC_LDPATH} +NEWPPC= PP=${WRKSRC}/compiler/${PPNAME} +NEWFPC= FPC=${WRKSRC}/compiler/${PPNAME} +BOOTDIR= ${PPNAME}-${BOOTVER}-${OPSYS:tl} +BOOTPPC= PP=${WRKDIR}/${BOOTDIR} + +do-extract: +# unpack binary distribution + @${MKDIR} ${WRKDIR} + @${TAR} -xzf ${_DISTDIR}/${BOOTDIR}.tar.gz \ + --directory ${WRKDIR} && ${CHMOD} +x ${WRKDIR}/${BOOTDIR} +# unpack man files + @${TAR} -xzf ${_DISTDIR}/fpc-${MANVER}.man.tar.gz --directory ${WRKDIR} +# unpack source distribution + @(cd ${WRKDIR} && ${GZIP_CMD} -dc \ + ${_DISTDIR}/${PORTNAME}-source-${GL_COMMIT}_GL0${EXTRACT_SUFX} | \ + ${TAR} -xf -) + +post-patch: +.if ${OPSYS} == FreeBSD + @${REINPLACE_CMD} -i "" -e 's|900044|${OSVERSION}|g' \ + -e 's|1201000|${OSVERSION}|g' \ + -e 's|1200000|${OSVERSION}|g' \ + ${WRKSRC}/rtl/freebsd/${FPC_ARCH}/*.as \ + ${WRKSRC}/rtl/freebsd/${FPC_ARCH}/*.inc +.else + @${REINPLACE_CMD} -i "" -e 's|400000|${DFLYVERSION}|g' \ + ${WRKSRC}/rtl/dragonfly/${FPC_ARCH}/*.as +.endif +.if empty(ICONV_LIB) + @${REINPLACE_CMD} -i "" -e "s|s<>'c'|(s<>'c') and (s<>'iconv')|" \ + -e "s|%%FPC_LDPATH%%|${FPC_LDPATH}|g" \ + ${WRKDIR}/${FPCSRCDIR}/compiler/systems/t_bsd.pas + @${REINPLACE_CMD} -i "" -e 's|defined(bsd) and not ||' \ + ${WRKDIR}/${FPCSRCDIR}/rtl/unix/cwstring.pp +.endif + @${REINPLACE_CMD} -i "" -e '/samplecfg/ {s/INSTALLEXE/INSTALLSCR/;}' \ + ${WRKDIR}/${FPCSRCDIR}/compiler/Makefile + @${REINPLACE_CMD} -i "" -e 's|/usr/local|${PREFIX}|g' \ + ${WRKDIR}/${FPCSRCDIR}/packages/fpmkunit/src/fpmkunit.pp + +# enable units + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/a52/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/dts/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|freebsd,||g' \ + ${WRKSRC}/packages/fpgtk/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|iphonesim|freebsd,iphonesim|g' \ + ${WRKSRC}/packages/gnome1/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|iphonesim|freebsd,iphonesim|g' \ + ${WRKSRC}/packages/gtk1/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|iphonesim|freebsd,iphonesim|g' \ + ${WRKSRC}/packages/imlib/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/ldap/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/libnettle/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/libsee/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/lua/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/mad/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/modplug/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/newt/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/oggvorbis/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/openal/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/opencl/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/proj4/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|os2|freebsd,os2|g' \ + ${WRKSRC}/packages/rexx/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/wasmedge/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/wasmtime/fpmake.pp + @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \ + ${WRKSRC}/packages/zorba/fpmake.pp + +do-build: +# build fpc compiler + @${ECHO_MSG} "##### STARTING COMPILER AND UNITS #####" + (cd ${WRKDIR}/${FPCSRCDIR} && ${SETENV} ${MAKE_ENV} \ + ${MAKE_CMD} all ${MAKE_ARGS} ${BOOTPPC}) + @${ECHO_MSG} "##### COMPLETE COMPILER AND UNITS #####" + +do-install: + # Installing fpc compiler + (cd ${WRKDIR}/${FPCSRCDIR} && ${SETENV} ${MAKE_ENV} \ + ${MAKE_CMD} install ${MAKE_ARGS} ${BOOTPPC}) + + # Installing manpages + ${INSTALL_MAN} ${WRKDIR}/man/man1/* ${STAGEDIR}${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKDIR}/man/man5/* ${STAGEDIR}${MAN1PREFIX}/man/man5 + # symlinking compiler + (cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ../lib/fpc/${FPCBASEVER}/${PPNAME}) + # creating sample configuration file + ${SH} "${STAGEDIR}${PREFIX}/lib/fpc/${FPCBASEVER}/samplecfg" \ + "${STAGEDIR}${PREFIX}/lib/fpc/${FPCBASEVER}" \ + "${STAGEDIR}${PREFIX}/etc" + @${REINPLACE_CMD} -i "" -e 's|${STAGEDIR}||' \ + -e 's|^#-Fl/lib;/usr/lib|-Fl${LOCALBASE}/lib;${LOCALBASE}/lib/qt5;${LOCALBASE}/lib/qt6|g' \ + ${STAGEDIR}${PREFIX}/etc/fpc.cfg.sample + +.include diff --git a/lang/fpc-devel/distinfo b/lang/fpc-devel/distinfo new file mode 100644 index 000000000000..57b9a7abdf7c --- /dev/null +++ b/lang/fpc-devel/distinfo @@ -0,0 +1,9 @@ +TIMESTAMP = 1698457114 +SHA256 (freepascal/ppc386-3.2.2-freebsd.tar.gz) = 2e175954442e28799edfe08c01635d209298b992f1062d03872571d58aa9f43a +SIZE (freepascal/ppc386-3.2.2-freebsd.tar.gz) = 1364288 +SHA256 (freepascal/ppcx64-3.2.2-freebsd.tar.gz) = 8cf6258688c3457f27bcec18e6993443ed2fcfe7d7c8697d54a13f32965e8fb0 +SIZE (freepascal/ppcx64-3.2.2-freebsd.tar.gz) = 2052903 +SHA256 (freepascal/fpc-3.0.4.man.tar.gz) = bc5357fc6e56d77eeeb5d820023f7f721f5febcc684837f296a598c6c772b26c +SIZE (freepascal/fpc-3.0.4.man.tar.gz) = 47294 +SHA256 (freepascal/fpc-source-55e72fc0f1505c75f60af706736d32ceca9815a4_GL0.tar.gz) = 6e8cf9b2c0b76462645239c2cd555f854536c857a01b5afb46bb2f3b6ac33061 +SIZE (freepascal/fpc-source-55e72fc0f1505c75f60af706736d32ceca9815a4_GL0.tar.gz) = 55866150 diff --git a/lang/fpc-devel/files/patch-compiler-systems_t__bsd.pas b/lang/fpc-devel/files/patch-compiler-systems_t__bsd.pas new file mode 100644 index 000000000000..3d4b57df7478 --- /dev/null +++ b/lang/fpc-devel/files/patch-compiler-systems_t__bsd.pas @@ -0,0 +1,22 @@ +--- compiler/systems/t_bsd.pas 2023-10-27 23:25:22.849393000 -0500 ++++ compiler/systems/t_bsd.pas 2023-10-27 23:26:39.226882000 -0500 +@@ -115,6 +115,8 @@ + if not Dontlinkstdlibpath Then + if target_info.system in systems_openbsd then + LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib;=$OPENBSD_X11BASE/lib;=$OPENBSD_LOCALBASE/lib',true) ++ else if target_info.system in systems_freebsd then ++ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib;=$FREEBSD_LOCALBASE/lib',true) + else + LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true); + end; +@@ -130,7 +132,9 @@ + if cs_link_lld in current_settings.globalswitches then + LdProgram:='ld.lld' + else if target_info.system in (systems_openbsd+systems_freebsd+[system_x86_64_dragonfly]) then +- LdProgram:='ld.bfd'; ++ LdProgram:=GetEnvPChar('FPC_LDPATH'); ++ if not FileExists(LdProgram,True) then ++ LdProgram:='ld.bfd'; + LibrarySuffix:=' '; + LdSupportsNoResponseFile := (target_info.system in ([system_m68k_netbsd]+systems_darwin)); + with Info do diff --git a/lang/fpc-devel/files/patch-compiler-utils_samplecfg b/lang/fpc-devel/files/patch-compiler-utils_samplecfg new file mode 100644 index 000000000000..901f71d8cf35 --- /dev/null +++ b/lang/fpc-devel/files/patch-compiler-utils_samplecfg @@ -0,0 +1,13 @@ +--- compiler/utils/samplecfg.orig 2015-08-06 19:47:53 UTC ++++ compiler/utils/samplecfg +@@ -38,8 +38,8 @@ sysfpdir=$sysfpdirbase2/text + # Detect if we have write permission in sysdir. + if [ -w "$sysdir" ] ; then + echo Write permission in $sysdir. +- fpccfgfile="$sysdir"/fpc.cfg +- fppkgfile="$sysdir"/fppkg.cfg ++ fpccfgfile="$sysdir"/fpc.cfg.sample ++ fppkgfile="$sysdir"/fppkg.cfg.sample + defaultfile="$sysdir"/fppkg/default + compilerconfigdir="-d CompilerConfigDir=$sysdir/fppkg" + else diff --git a/lang/fpc-devel/files/patch-compiler_globals.pas b/lang/fpc-devel/files/patch-compiler_globals.pas new file mode 100644 index 000000000000..c55dfddc8f62 --- /dev/null +++ b/lang/fpc-devel/files/patch-compiler_globals.pas @@ -0,0 +1,32 @@ +--- compiler/globals.pas 2023-10-27 23:30:38.797736000 -0500 ++++ compiler/globals.pas 2023-10-27 23:31:45.729414000 -0500 +@@ -1023,6 +1023,19 @@ + FreeEnvPChar(envvalue); + end; + {$endif openbsd} ++{$ifdef freebsd} ++ function GetFreeBSDLocalBase: ansistring; ++ var ++ envvalue: pchar; ++ begin ++ envvalue := GetEnvPChar('LOCALBASE'); ++ if assigned(envvalue) then ++ Result:=envvalue ++ else ++ Result:='/usr/local'; ++ FreeEnvPChar(envvalue); ++ end; ++{$endif freebsd} + var + envstr: string; + envvalue: pchar; +@@ -1062,6 +1075,9 @@ + Replace(s,'$OPENBSD_LOCALBASE',GetOpenBSDLocalBase); + Replace(s,'$OPENBSD_X11BASE',GetOpenBSDX11Base); + {$endif openbsd} ++{$ifdef freebsd} ++ Replace(s,'$FREEBSD_LOCALBASE',GetFreeBSDLocalBase); ++{$endif freebsd} + if not substitute_env_variables then + exit; + { Replace environment variables between dollar signs } diff --git a/lang/fpc-devel/files/patch-packages-dts-src-dts.pas b/lang/fpc-devel/files/patch-packages-dts-src-dts.pas new file mode 100644 index 000000000000..623471ea21a0 --- /dev/null +++ b/lang/fpc-devel/files/patch-packages-dts-src-dts.pas @@ -0,0 +1,97 @@ +--- packages/dts/src/dts.pas 2010-04-21 20:42:31.000000000 +0100 ++++ packages/dts/src/dts.pas 2010-04-21 20:52:51.000000000 +0100 +@@ -272,7 +272,7 @@ + {$IF Defined(WINDOWS)} + dtslib = 'dts.dll'; + {$ELSEIF Defined(UNIX)} +- dtslib = 'libdts.so'; ++ dtslib = 'libdca.so'; + {$ELSE} + {$MESSAGE ERROR 'DYNLINK not supported'} + {$IFEND} +@@ -331,14 +331,14 @@ + DTS_ADJUST_LEVEL = $100; + + +-function dts_init(mm_accel: cuint32): pdts_state_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; +-function dts_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; +-function dts_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; +-procedure dts_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; +-function dts_blocks_num(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; +-function dts_block(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; +-function dts_samples(state: pdts_state_t): pdts_sample_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; +-procedure dts_free(state: pdts_state_t); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++function dca_init(mm_accel: cuint32): pdts_state_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++function dca_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++function dca_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++procedure dca_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++function dca_blocks_num(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++function dca_block(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++function dca_samples(state: pdts_state_t): pdts_sample_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; ++procedure dca_free(state: pdts_state_t); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF}; + + + +@@ -378,12 +378,61 @@ + end; + + ++function dts_init(mm_accel: cuint32): pdts_state_t; ++function dts_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint; ++function dts_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint; ++procedure dts_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer); ++function dts_blocks_num(state: pdts_state_t): cint; ++function dts_block(state: pdts_state_t): cint; ++function dts_samples(state: pdts_state_t): pdts_sample_t; ++procedure dts_free(state: pdts_state_t); ++ + function dts_decoder_init(mm_accel: cuint32; user: pointer; read: dts_read_func; seek: dts_seek_func; close: dts_close_func; tell: dts_tell_func): pdts_decoder; + function dts_decoder_read(decoder: pdts_decoder; buffer: pointer; length: cint): cint; + procedure dts_decoder_free(decoder: pdts_decoder); + + implementation + ++function dts_init(mm_accel: cuint32): pdts_state_t; ++begin ++ Result := dca_init(mm_accel); ++end; ++ ++function dts_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint; ++begin ++ Result := dca_syncinfo(state, buf, flags, sample_rate, bit_rate, frame_length); ++end; ++ ++function dts_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint; ++begin ++ Result := dca_frame(state, buf, flags, level, bias); ++end; ++ ++procedure dts_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer); ++begin ++ dca_dynrng(state, call, data); ++end; ++ ++function dts_blocks_num(state: pdts_state_t): cint; ++begin ++ Result := dca_blocks_num(state); ++end; ++ ++function dts_block(state: pdts_state_t): cint; ++begin ++ Result := dca_block(state); ++end; ++ ++function dts_samples(state: pdts_state_t): pdts_sample_t; ++begin ++ Result := dca_samples(state) ++end; ++ ++procedure dts_free(state: pdts_state_t); ++begin ++ dca_free(state); ++end; ++ + function dts_decoder_init(mm_accel: cuint32; user: pointer; read: dts_read_func; seek: dts_seek_func; close: dts_close_func; tell: dts_tell_func): pdts_decoder; + begin + GetMem(Result, Sizeof(dts_decoder)); +Only in work.new/fpc-2.4.0/packages/dts/src: dts.pas~ diff --git a/lang/fpc-devel/files/patch-packages-libnettle-src_libnettle.pp b/lang/fpc-devel/files/patch-packages-libnettle-src_libnettle.pp new file mode 100644 index 000000000000..9432276f4e91 --- /dev/null +++ b/lang/fpc-devel/files/patch-packages-libnettle-src_libnettle.pp @@ -0,0 +1,11 @@ +--- packages/libnettle/src/libnettle.pp 2023-10-28 12:47:25.745893000 -0500 ++++ packages/libnettle/src/libnettle.pp 2023-10-28 12:52:31.472802000 -0500 +@@ -51,7 +51,7 @@ + NettleExternal_library='nettle'; + HogweedExternal_library='hogweed'; + +-{$ifdef linux} ++{$if defined(linux) or defined(freebsd)} + NettleLibraryFileName = 'lib'+NettleExternal_library+'.so'; + HogweedLibraryFileName = 'lib'+HogweedExternal_library+'.so'; + {$else} diff --git a/lang/fpc-devel/files/patch-packages-opencl-src_cl.pp b/lang/fpc-devel/files/patch-packages-opencl-src_cl.pp new file mode 100644 index 000000000000..a45464f029ce --- /dev/null +++ b/lang/fpc-devel/files/patch-packages-opencl-src_cl.pp @@ -0,0 +1,11 @@ +--- packages/opencl/src/cl.pp 2023-10-28 12:54:09.078367000 -0500 ++++ packages/opencl/src/cl.pp 2023-10-28 12:54:33.911516000 -0500 +@@ -55,7 +55,7 @@ + OpenCLlib = 'OpenCL.dll'; + {$DEFINE extdecl := stdcall} + {$ELSE} +- {$IFDEF LINUX} ++ {$IF DEFINED(LINUX) OR DEFINED(FREEBSD)} + {$DEFINE DYNLINK} + const + OpenCLlib = 'libOpenCL.so'; diff --git a/lang/fpc-devel/files/patch-packages_libvlc_fpmake.pp b/lang/fpc-devel/files/patch-packages_libvlc_fpmake.pp new file mode 100644 index 000000000000..0e1cddb83736 --- /dev/null +++ b/lang/fpc-devel/files/patch-packages_libvlc_fpmake.pp @@ -0,0 +1,13 @@ +--- packages/libvlc/fpmake.pp 2023-10-28 00:57:22.224953000 -0500 ++++ packages/libvlc/fpmake.pp 2023-10-28 00:57:38.346447000 -0500 +@@ -23,8 +23,8 @@ + P.HomepageURL := 'www.freepascal.org'; + P.Email := 'michael@freepascal.org'; + P.Description := 'VLC library (version 2 or higher) interface and component.'; +- T:=P.Targets.AddUnit('src/libvlc.pp',[linux,win32,win64]); +- T:=P.Targets.AddUnit('src/vlc.pp',[linux,win32,win64]); ++ T:=P.Targets.AddUnit('src/libvlc.pp',[freebsd,linux,win32,win64]); ++ T:=P.Targets.AddUnit('src/vlc.pp',[freebsd,linux,win32,win64]); + with T.Dependencies do + begin + AddUnit('libvlc'); diff --git a/lang/fpc-devel/files/pkg-message.in b/lang/fpc-devel/files/pkg-message.in new file mode 100644 index 000000000000..e8b3db50a8cd --- /dev/null +++ b/lang/fpc-devel/files/pkg-message.in @@ -0,0 +1,21 @@ +[ +{ type: install + message: <