2018-04-05 04:52:36 +00:00
|
|
|
# Support for FPC-based ports. This automatically will install free pascal
|
|
|
|
# compiler and units.
|
2008-06-24 14:56:06 +00:00
|
|
|
#
|
2018-04-05 04:52:36 +00:00
|
|
|
# Feature: fpc
|
|
|
|
# Usage: USES=fpc
|
|
|
|
# Valid ARGS: (none), run, base, all
|
2008-06-24 14:56:06 +00:00
|
|
|
#
|
2018-04-05 04:52:36 +00:00
|
|
|
# run - Free pascal units will be registered also as run dependencies.
|
2008-06-24 14:56:06 +00:00
|
|
|
#
|
2018-04-05 04:52:36 +00:00
|
|
|
# base - This automatically will install all base units of fpc
|
|
|
|
# (gdbint graph ibase libasync hash httpd mysql netdb odbc
|
|
|
|
# oracle pasjpeg paszlib pthreads postgres regexpr and sqlite).
|
2008-06-24 14:56:06 +00:00
|
|
|
#
|
2018-04-05 04:52:36 +00:00
|
|
|
# all - This automatically will install all free pascal units.
|
2015-08-09 08:06:43 +00:00
|
|
|
#
|
2018-04-05 04:52:36 +00:00
|
|
|
# if you need install additional fpc units, they can be listed there (USE_FPC=gtk2 x11 opengl).
|
2008-06-24 14:56:06 +00:00
|
|
|
#
|
2018-04-05 04:52:36 +00:00
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# USES+= fpc:run
|
|
|
|
# USE_FPC=gtk2
|
2008-06-24 14:56:06 +00:00
|
|
|
#
|
|
|
|
|
2018-04-05 04:52:36 +00:00
|
|
|
.if !defined(_INCLUDE_USES_FPC_MK)
|
|
|
|
|
|
|
|
FPC_Include_MAINTAINER= acm@FreeBSD.org
|
2008-06-24 14:56:06 +00:00
|
|
|
|
2018-04-05 04:52:36 +00:00
|
|
|
_INCLUDE_USES_FPC_MK= yes
|
2008-06-24 14:56:06 +00:00
|
|
|
|
2014-02-11 17:12:28 +00:00
|
|
|
.if defined(DEFAULT_FPC_VER)
|
|
|
|
WARNING+= "DEFAULT_FPC_VER is defined, consider using DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead"
|
|
|
|
.endif
|
|
|
|
|
2018-04-05 04:52:36 +00:00
|
|
|
.if ${fpc_ARGS:Nrun:Nbase:Nall}
|
|
|
|
IGNORE= Unknown argument for USES=fpc: ${fpc_ARGS:Nrun:Nbase:Nall}
|
|
|
|
.endif
|
2008-06-24 14:56:06 +00:00
|
|
|
|
2014-02-11 17:12:28 +00:00
|
|
|
DEFAULT_FPC_VER= ${FPC_DEFAULT}
|
2016-04-14 13:34:25 +00:00
|
|
|
# When adding a version, please keep the comment in
|
|
|
|
# Mk/bsd.default-versions.mk in sync.
|
2008-06-24 14:56:06 +00:00
|
|
|
FPC_VER= ${DEFAULT_FPC_VER}
|
2010-08-16 17:45:15 +00:00
|
|
|
FPC_ARCH= ${ARCH:S/amd64/x86_64/}
|
2008-06-24 14:56:06 +00:00
|
|
|
|
|
|
|
.if exists(${LOCALBASE}/bin/fpc)
|
|
|
|
FPC_CURRENT_VER!= ${LOCALBASE}/bin/fpc -iV
|
|
|
|
. if ${FPC_CURRENT_VER} != ${FPC_VER}
|
|
|
|
IGNORE= incompatible fpc ${FPC_CURRENT_VER} compiler, please install ${FPC_VER} version
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2010-08-16 17:45:15 +00:00
|
|
|
.if ${ARCH} == "i386"
|
|
|
|
PPNAME= ppc386
|
|
|
|
.elif ${ARCH} == "amd64"
|
|
|
|
PPNAME= ppcx64
|
2011-08-12 16:10:02 +00:00
|
|
|
.else
|
|
|
|
PPNAME= ppc_not_yet_ported
|
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
|
|
ONLY_FOR_ARCHS_REASON= not yet ported to anything other than i386 and amd64
|
2010-08-16 17:45:15 +00:00
|
|
|
.endif
|
|
|
|
|
2019-09-03 15:51:50 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils \
|
|
|
|
${PPNAME}:lang/fpc
|
2008-06-24 14:56:06 +00:00
|
|
|
|
2015-12-21 01:40:44 +00:00
|
|
|
BUILDNAME= ${FPC_ARCH}-${OPSYS:tl}
|
2008-06-24 14:56:06 +00:00
|
|
|
UNITSDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/units/${BUILDNAME}
|
2015-12-05 23:29:36 +00:00
|
|
|
MKINSTDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME}
|
|
|
|
|
|
|
|
_FPC_ALL_UNITS= a52 aspell bfd bzip2 cairo chm dblib dbus dts fastcgi \
|
|
|
|
fcl-async fcl-base fcl-db fcl-extra fcl-fpcunit fcl-image \
|
2017-02-26 17:38:04 +00:00
|
|
|
fcl-js fcl-json fcl-net fcl-passrc fcl-pdf fcl-registry \
|
2020-11-25 02:57:50 +00:00
|
|
|
fcl-report fcl-res fcl-sdo fcl-sound fcl-stl fcl-web fcl-xml \
|
|
|
|
fftw fpindexer fppkg fv gdbint gdbm gnutls gmp googleapi \
|
|
|
|
graph gtk2 hermes httpd22 httpd24 ibase iconvenc imagemagick \
|
|
|
|
ldap libcups libcurl libenet libfontconfig libgd libmagic \
|
|
|
|
libmicrohttpd libpng libvlc libxml2 lua mad modplug \
|
|
|
|
mysql ncurses newt numlib odata odbc oggvorbis openal opengl openssl \
|
|
|
|
oracle pasjpeg pastojs pcap postgres proj4 pthreads pxlib \
|
|
|
|
regexpr rexx rsvg rtl-console rtl-extra rtl-generics rtl-objpas \
|
|
|
|
rtl-unicode sdl sqlite svgalib symbolic syslog unzip users utmp \
|
|
|
|
uuid vcl-compat webidl x11 xforms zlib
|
2008-06-24 14:56:06 +00:00
|
|
|
|
2018-04-05 04:52:36 +00:00
|
|
|
.if ${fpc_ARGS:Mbase}
|
2015-12-05 23:29:36 +00:00
|
|
|
USE_FPC= gdbint graph httpd22 httpd24 ibase mysql odbc oracle pasjpeg \
|
2012-04-19 06:20:01 +00:00
|
|
|
postgres pthreads regexpr sqlite
|
2008-06-24 14:56:06 +00:00
|
|
|
.endif
|
|
|
|
|
2018-04-05 04:52:36 +00:00
|
|
|
.if ${fpc_ARGS:Mall}
|
2008-06-24 14:56:06 +00:00
|
|
|
USE_FPC= ${_FPC_ALL_UNITS}
|
|
|
|
.endif
|
|
|
|
|
2018-04-05 04:52:36 +00:00
|
|
|
.if defined(USE_FPC) && ${USE_FPC:tl} != "yes"
|
2008-06-24 14:56:06 +00:00
|
|
|
. for UNITS in ${USE_FPC}
|
|
|
|
. if ${_FPC_ALL_UNITS:M${UNITS}}==""
|
|
|
|
IGNORE= cannot install: unknown FPC unit ${UNITS}
|
|
|
|
. endif
|
|
|
|
. endfor
|
2009-05-22 21:57:33 +00:00
|
|
|
.endif
|
2008-06-24 14:56:06 +00:00
|
|
|
|
|
|
|
# Base units
|
|
|
|
gdbint_UNIT= devel/fpc-gdbint
|
|
|
|
graph_UNIT= graphics/fpc-graph
|
2009-01-19 22:44:05 +00:00
|
|
|
httpd22_UNIT= www/fpc-httpd22
|
2014-03-26 03:32:45 +00:00
|
|
|
httpd24_UNIT= www/fpc-httpd24
|
2010-08-16 17:45:15 +00:00
|
|
|
ibase_UNIT= databases/fpc-ibase
|
2008-06-24 14:56:06 +00:00
|
|
|
mysql_UNIT= databases/fpc-mysql
|
|
|
|
odbc_UNIT= databases/fpc-odbc
|
|
|
|
oracle_UNIT= databases/fpc-oracle
|
|
|
|
pasjpeg_UNIT= graphics/fpc-pasjpeg
|
|
|
|
postgres_UNIT= databases/fpc-postgres
|
2010-08-16 17:45:15 +00:00
|
|
|
pthreads_UNIT= devel/fpc-pthreads
|
2008-06-24 14:56:06 +00:00
|
|
|
regexpr_UNIT= devel/fpc-regexpr
|
|
|
|
sqlite_UNIT= databases/fpc-sqlite
|
|
|
|
|
|
|
|
# Extra units
|
2010-08-16 17:45:15 +00:00
|
|
|
a52_UNIT= audio/fpc-a52
|
2009-01-14 06:13:57 +00:00
|
|
|
aspell_UNIT= textproc/fpc-aspell
|
2008-06-24 14:56:06 +00:00
|
|
|
bfd_UNIT= devel/fpc-bfd
|
2010-08-16 17:45:15 +00:00
|
|
|
bzip2_UNIT= archivers/fpc-bzip2
|
2008-06-24 14:56:06 +00:00
|
|
|
cairo_UNIT= graphics/fpc-cairo
|
2009-01-14 06:13:57 +00:00
|
|
|
chm_UNIT= misc/fpc-chm
|
2013-03-23 05:25:05 +00:00
|
|
|
dblib_UNIT= databases/fpc-dblib
|
2010-08-16 17:45:15 +00:00
|
|
|
dbus_UNIT= devel/fpc-dbus
|
|
|
|
dts_UNIT= multimedia/fpc-dts
|
|
|
|
fastcgi_UNIT= www/fpc-fastcgi
|
2009-01-14 06:13:57 +00:00
|
|
|
fcl_async_UNIT= devel/fpc-fcl-async
|
2008-06-24 14:56:06 +00:00
|
|
|
fcl_base_UNIT= devel/fpc-fcl-base
|
|
|
|
fcl_db_UNIT= devel/fpc-fcl-db
|
2012-12-12 21:31:56 +00:00
|
|
|
fcl_extra_UNIT= devel/fpc-fcl-extra
|
2008-06-24 14:56:06 +00:00
|
|
|
fcl_fpcunit_UNIT= devel/fpc-fcl-fpcunit
|
|
|
|
fcl_image_UNIT= devel/fpc-fcl-image
|
2013-03-23 05:25:05 +00:00
|
|
|
fcl_js_UNIT= devel/fpc-fcl-js
|
2009-01-14 06:13:57 +00:00
|
|
|
fcl_json_UNIT= devel/fpc-fcl-json
|
2008-06-24 14:56:06 +00:00
|
|
|
fcl_net_UNIT= devel/fpc-fcl-net
|
|
|
|
fcl_passrc_UNIT= devel/fpc-fcl-passrc
|
2017-02-26 17:38:04 +00:00
|
|
|
fcl_pdf_UNIT= devel/fpc-fcl-pdf
|
2008-06-24 14:56:06 +00:00
|
|
|
fcl_registry_UNIT= devel/fpc-fcl-registry
|
2020-11-25 02:57:50 +00:00
|
|
|
fcl_report_UNIT= devel/fpc-fcl-report
|
2010-08-16 17:45:15 +00:00
|
|
|
fcl_res_UNIT= devel/fpc-fcl-res
|
2015-12-05 23:29:36 +00:00
|
|
|
fcl_sdo_UNIT= devel/fpc-fcl-sdo
|
|
|
|
fcl_sound_UNIT= devel/fpc-fcl-sound
|
|
|
|
fcl_stl_UNIT= devel/fpc-fcl-stl
|
2008-06-24 14:56:06 +00:00
|
|
|
fcl_web_UNIT= devel/fpc-fcl-web
|
|
|
|
fcl_xml_UNIT= devel/fpc-fcl-xml
|
|
|
|
fftw_UNIT= math/fpc-fftw
|
2013-03-23 05:28:05 +00:00
|
|
|
fpindexer_UNIT= databases/fpc-fpindexer
|
2012-04-19 06:20:01 +00:00
|
|
|
fppkg_UNIT= devel/fpc-fppkg
|
2010-08-16 17:45:15 +00:00
|
|
|
fpvectorial_UNIT= graphics/fpc-fpvectorial
|
2008-06-24 14:56:06 +00:00
|
|
|
fv_UNIT= devel/fpc-fv
|
2010-08-16 17:45:15 +00:00
|
|
|
hermes_UNIT= graphics/fpc-hermes
|
2008-06-24 14:56:06 +00:00
|
|
|
gdbm_UNIT= databases/fpc-gdbm
|
2020-11-25 02:57:50 +00:00
|
|
|
gnutls_UNIT= security/fpc-gnutls
|
2010-08-16 17:45:15 +00:00
|
|
|
gmp_UNIT= math/fpc-gmp
|
2017-02-26 17:38:04 +00:00
|
|
|
googleapi_UNIT= www/fpc-googleapi
|
2008-06-24 14:56:06 +00:00
|
|
|
gtk2_UNIT= x11-toolkits/fpc-gtk2
|
2009-05-04 15:23:08 +00:00
|
|
|
iconvenc_UNIT= converters/fpc-iconvenc
|
2009-01-14 06:13:57 +00:00
|
|
|
imagemagick_UNIT= graphics/fpc-imagemagick
|
2010-08-16 17:45:15 +00:00
|
|
|
ldap_UNIT= net/fpc-ldap
|
2008-06-24 14:56:06 +00:00
|
|
|
libcurl_UNIT= ftp/fpc-libcurl
|
2020-11-25 02:57:50 +00:00
|
|
|
libcups_UNIT= print/fpc-libcups
|
|
|
|
libenet_UNIT= net/fpc-libenet
|
|
|
|
libfontconfig_UNIT= x11-fonts/fpc-libfontconfig
|
2008-06-24 14:56:06 +00:00
|
|
|
libgd_UNIT= graphics/fpc-libgd
|
2020-11-25 02:57:50 +00:00
|
|
|
libmagic_UNIT= devel/fpc-libmagic
|
2018-02-01 07:14:41 +00:00
|
|
|
libmicrohttpd_UNIT= www/fpc-libmicrohttpd
|
2008-06-24 14:56:06 +00:00
|
|
|
libpng_UNIT= graphics/fpc-libpng
|
2014-03-26 03:32:45 +00:00
|
|
|
libvlc_UNIT= multimedia/fpc-libvlc
|
2010-08-16 17:45:15 +00:00
|
|
|
libxml2_UNIT= textproc/fpc-libxml2
|
|
|
|
lua_UNIT= lang/fpc-lua
|
|
|
|
mad_UNIT= audio/fpc-mad
|
|
|
|
modplug_UNIT= audio/fpc-modplug
|
|
|
|
newt_UNIT= devel/fpc-newt
|
2008-06-24 14:56:06 +00:00
|
|
|
ncurses_UNIT= graphics/fpc-ncurses
|
2009-01-14 06:13:57 +00:00
|
|
|
numlib_UNIT= math/fpc-numlib
|
2020-11-25 02:57:50 +00:00
|
|
|
odata_UNIT= devel/fpc-odata
|
2010-08-16 17:45:15 +00:00
|
|
|
oggvorbis_UNIT= audio/fpc-oggvorbis
|
|
|
|
openal_UNIT= audio/fpc-openal
|
2008-06-24 14:56:06 +00:00
|
|
|
opengl_UNIT= graphics/fpc-opengl
|
|
|
|
openssl_UNIT= security/fpc-openssl
|
2020-11-25 02:57:50 +00:00
|
|
|
pastojs_UNIT= lang/fpc-pastojs
|
2008-06-24 14:56:06 +00:00
|
|
|
pcap_UNIT= net/fpc-pcap
|
2010-08-16 17:45:15 +00:00
|
|
|
proj4_UNIT= graphics/fpc-proj4
|
2009-01-14 06:13:57 +00:00
|
|
|
pxlib_UNIT= databases/fpc-pxlib
|
2010-08-16 17:45:15 +00:00
|
|
|
rexx_UNIT= lang/fpc-rexx
|
|
|
|
rsvg_UNIT= graphics/fpc-rsvg
|
2015-12-05 23:29:36 +00:00
|
|
|
rtl_console_UNIT= lang/fpc-rtl-console
|
|
|
|
rtl_extra_UNIT= lang/fpc-rtl-extra
|
2020-11-25 02:57:50 +00:00
|
|
|
rtl_generics_UNIT= lang/fpc-rtl-generics
|
2015-12-05 23:29:36 +00:00
|
|
|
rtl_objpas_UNIT= lang/fpc-rtl-objpas
|
|
|
|
rtl_unicode_UNIT= lang/fpc-rtl-unicode
|
2009-01-14 06:13:57 +00:00
|
|
|
sdl_UNIT= devel/fpc-sdl
|
2008-06-24 14:56:06 +00:00
|
|
|
svgalib_UNIT= graphics/fpc-svgalib
|
2009-01-14 06:13:57 +00:00
|
|
|
symbolic_UNIT= devel/fpc-symbolic
|
2008-06-24 14:56:06 +00:00
|
|
|
syslog_UNIT= sysutils/fpc-syslog
|
|
|
|
unzip_UNIT= archivers/fpc-unzip
|
2009-01-14 06:13:57 +00:00
|
|
|
users_UNIT= sysutils/fpc-users
|
2008-06-24 14:56:06 +00:00
|
|
|
utmp_UNIT= sysutils/fpc-utmp
|
2010-08-16 17:45:15 +00:00
|
|
|
uuid_UNIT= sysutils/fpc-uuid
|
2020-11-25 02:57:50 +00:00
|
|
|
vcl_compat_UNIT= graphics/fpc-vcl-compat
|
|
|
|
webidl_UNIT= www/fpc-webidl
|
2008-06-24 14:56:06 +00:00
|
|
|
x11_UNIT= x11/fpc-x11
|
2009-01-14 06:13:57 +00:00
|
|
|
xforms_UNIT= x11-toolkits/fpc-xforms
|
2008-06-24 14:56:06 +00:00
|
|
|
zlib_UNIT= devel/fpc-zlib
|
|
|
|
|
2009-05-22 21:57:33 +00:00
|
|
|
.endif
|
|
|
|
|
2018-04-05 04:52:36 +00:00
|
|
|
.if defined(USE_FPC)
|
2015-12-05 23:29:36 +00:00
|
|
|
. for UNIT in ${USE_FPC}
|
|
|
|
. if ${_FPC_ALL_UNITS:M${UNIT}} != ""
|
2016-04-01 13:29:15 +00:00
|
|
|
BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT}
|
2018-04-05 04:52:36 +00:00
|
|
|
. if ${fpc_ARGS:Mrun} || ${fpc_ARGS:Mbase}
|
2016-04-01 13:29:15 +00:00
|
|
|
RUN_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT}
|
2012-04-19 06:20:01 +00:00
|
|
|
. endif
|
2008-06-24 14:56:06 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
2011-06-23 05:05:29 +00:00
|
|
|
.endif
|