aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2023-10-28 22:56:20 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2023-11-10 20:21:06 +0000
commit9c6fef652d8dec8ba308bdf5b0086755e0dfd922 (patch)
tree268cbabdcb0a058446b60901dbd0d5afc7637866
parentc422b55b6f4bddd756fa1fe9ed8cfc0c6d843388 (diff)
downloadports-9c6fef652d8dec8ba308bdf5b0086755e0dfd922.tar.gz
ports-9c6fef652d8dec8ba308bdf5b0086755e0dfd922.zip
lang/fpc-devel-source: New port: Free Pascal compiler with Turbo and Delphi compatibility (source)
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 90d03b74c9096c9a4d4f239ae56e6ba8204b0506)
-rw-r--r--lang/Makefile1
-rw-r--r--lang/fpc-devel-source/Makefile111
-rw-r--r--lang/fpc-devel-source/distinfo3
-rw-r--r--lang/fpc-devel-source/pkg-descr12
4 files changed, 127 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index 61bf1f1c69e4..fe06e32b36fd 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -74,6 +74,7 @@
SUBDIR += fpc
SUBDIR += fpc-base
SUBDIR += fpc-devel
+ SUBDIR += fpc-devel-source
SUBDIR += fpc-docs
SUBDIR += fpc-lua
SUBDIR += fpc-pastojs
diff --git a/lang/fpc-devel-source/Makefile b/lang/fpc-devel-source/Makefile
new file mode 100644
index 000000000000..b5f86a1c3124
--- /dev/null
+++ b/lang/fpc-devel-source/Makefile
@@ -0,0 +1,111 @@
+PORTNAME= fpc-devel
+PORTVERSION= 3.3.1.20231027
+PORTREVISION= 0
+CATEGORIES= lang
+PKGNAMESUFFIX= -source
+DIST_SUBDIR= freepascal
+
+MAINTAINER= acm@FreeBSD.org
+COMMENT= Free Pascal compiler with Turbo and Delphi compatibility (source)
+WWW= https://www.freepascal.org/
+
+ONLY_FOR_ARCHS= amd64 i386
+NO_BUILD= yes
+
+USE_GITLAB= yes
+GL_SITE= https://gitlab.com/freepascal.org
+GL_ACCOUNT= fpc
+GL_PROJECT= source
+GL_COMMIT= 55e72fc0f1505c75f60af706736d32ceca9815a4
+
+PORTDATA= *
+
+PATCHDIR= ${PORTSDIR}/lang/fpc-devel/files
+DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}-${FPCBASEVER}
+WRKSRC= ${WRKDIR}/${FPCSRCDIR}
+
+FPCBASEVER= 3.3.1
+FPCSRCDIR= source-${GL_COMMIT}
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "i386"
+FPC_ARCH= i386
+.elif ${ARCH} == "amd64"
+FPC_ARCH= x86_64
+.endif
+
+post-extract:
+ ${RM} -R ${WRKSRC}/.git*
+
+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} -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 or disable 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-install:
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} . \
+ ${STAGEDIR}${DATADIR})
+
+.include <bsd.port.post.mk>
diff --git a/lang/fpc-devel-source/distinfo b/lang/fpc-devel-source/distinfo
new file mode 100644
index 000000000000..5cfcc5b295e1
--- /dev/null
+++ b/lang/fpc-devel-source/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1698525521
+SHA256 (freepascal/fpc-source-55e72fc0f1505c75f60af706736d32ceca9815a4_GL0.tar.gz) = 6e8cf9b2c0b76462645239c2cd555f854536c857a01b5afb46bb2f3b6ac33061
+SIZE (freepascal/fpc-source-55e72fc0f1505c75f60af706736d32ceca9815a4_GL0.tar.gz) = 55866150
diff --git a/lang/fpc-devel-source/pkg-descr b/lang/fpc-devel-source/pkg-descr
new file mode 100644
index 000000000000..819965617bb1
--- /dev/null
+++ b/lang/fpc-devel-source/pkg-descr
@@ -0,0 +1,12 @@
+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.