From nobody Sat Oct 28 22:54:57 2023 X-Original-To: dev-commits-ports-all@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 4SHvxY6Bh3z4y8kC; Sat, 28 Oct 2023 22:54:57 +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 4SHvxY5wLvz3GHD; Sat, 28 Oct 2023 22:54:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698533697; 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=z34nFZ6Y4yPFfSw7cxbttly1TZkUVbhJB5uWk8bgw/U=; b=b5EkhIiKFO5KsU3FdvsKcV2dRpC60jBQ+nBhrorfrOH1BEPwKeIZOifRqDft1C0qffGV3E 5QGdx0PZnoltPqmiBMKwPVl7u1DB9fYgpKOwRid+UyhoUp4HoNiPi3LbvM379Qa1yciT0+ dkK070xmDXwOFueJXKZUyHkYguHMLf3kTW7c1hNTFa8PAzInVGTuVioBaQTwrCoAB+KvBZ vqdqm+2s4K1s4MC8vftPzzpaDMFk4e+RjkHwO/V4MBrLNbxKXW7osLJuyeupVR0JiuXmAq Vx892VtE7x93g8l4Fo2f5iCcYKGZFNbvggYOJD3TLiAm3Mcn/0jiBKQ279kr1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698533697; 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=z34nFZ6Y4yPFfSw7cxbttly1TZkUVbhJB5uWk8bgw/U=; b=bIy87tx+8TYonMXrSZcTl/UHVHUq+gD/tOasqEoILxNEq+oNhm8qwUq4h/HK6E6sHjgvwG byVV/2kpiSIILRszyARaQTD8EtBM28A9TR3R/hX0qry0UjSR/FujeWw28+Jyd7mYkVkNDN SikAUppFBVE8GrfpBANM2CA0FYcp0epqP6zKFPNjDkhcV6IpVN1zRng+0P7qA+UC2Kn0Rc 8rZZjDZCDxBgb8Btbt7/s/ELuFym6UymAGELVcD3ihyKC5LaU2GfmLi+Oa0KWC9Ky3cPtW AZgUjTkJVwu0wSFxGvSH3Sy4Py/E+GgiX9zIVRyrw9RmcNeGB/JZjwGqXi8NQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698533697; a=rsa-sha256; cv=none; b=l4T+aKgpHt4qnNcUrMiT5CpUKqa8ic5wnF3MKGgVzmBaRgrbfSro0Q2pzaiGiuGhNAvZjG fDbi4GG8luPxCS5Y6s+CkOGcvpasd9Uj9SuK2J+qEj9I9ufsH9ZmPcSdXFk7/1LpiGYnT+ /ZFd7+IdwLa8fmjbqRG29CMJb9vN5PjB2L+puWzzgEFF5lscdURRek28UyTNJzfImKhScY JHw1SO0IC+aGWTkLzUeHXjNLTKhNeBO47pic2ZCaVIJW97AXY4RhonpgKSu46Z2B2tUnB8 t3xY/kh4SyEC2CwfkDtrshEzDT7rXW63t8NrYKeyVAMKCxIAy453SCcZEHPw3A== 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 4SHvxY4sf0zSt; Sat, 28 Oct 2023 22:54:57 +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 39SMsvFG027762; Sat, 28 Oct 2023 22:54:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39SMsvqv027759; Sat, 28 Oct 2023 22:54:57 GMT (envelope-from git) Date: Sat, 28 Oct 2023 22:54:57 GMT Message-Id: <202310282254.39SMsvqv027759@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: db9286bab5ad - main - lang/fpc-devel: New port: Free Pascal compiler with Turbo and Delphi (devel) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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/main X-Git-Reftype: branch X-Git-Commit: db9286bab5ad2d84ea3e7daeeb05ddf8f100c596 Auto-Submitted: auto-generated The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=db9286bab5ad2d84ea3e7daeeb05ddf8f100c596 commit db9286bab5ad2d84ea3e7daeeb05ddf8f100c596 Author: Jose Alonso Cardenas Marquez AuthorDate: 2023-10-28 22:54:03 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2023-10-28 22:54:03 +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. --- 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 261aef56d5c8..9c731a06ab2a 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: <