Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/fpc.mk
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# bsd.fpc.mk - Support for FreePascal based ports. | # Support for FPC-based ports. This automatically will install free pascal | ||||
# compiler and units. | |||||
# | # | ||||
# Created by: Alonso Cardenas Marquez <acm@FreeBSD.org> | # Feature: fpc | ||||
# Usage: USES=fpc | |||||
# Valid ARGS: (none), run, base, all | |||||
# | # | ||||
# For FreeBSD committers: | # run - Free pascal units will be registered also as run dependencies. | ||||
mat: This is not required, there is a MAINTAINER line, any unauthorized commits can (and will) be… | |||||
# Please send all suggested changes to the maintainer instead of committing | |||||
# them to SVN yourself. | |||||
# | # | ||||
# USE_FPC - If you set this to "yes", this automatically will install | # base - This automatically will install all base units of fpc | ||||
# free pascal compiler, if you need install additional fpc | # (gdbint graph ibase libasync hash httpd mysql netdb odbc | ||||
# units, they can be listed there (USE_FPC= gtk x11 opengl). | # oracle pasjpeg paszlib pthreads postgres regexpr and sqlite). | ||||
# | # | ||||
Done Inline ActionsThis is a bit strange. It would probably be better to move the first sentence at the top, after "Support for FPC-...", and move the description of USE_FPC after the arguments description. mat: This is a bit strange. It would probably be better to move the first sentence at the top, after… | |||||
# USE_FPC_RUN - If you set this to "yes", free pascal units will be | # all - This automatically will install all free pascal units. | ||||
# registered also as run dependencies. | |||||
# | # | ||||
# WANT_FPC_BASE - If you set this to "yes", this automatically will install | # if you need install additional fpc units, they can be listed there (USE_FPC=gtk2 x11 opengl). | ||||
# all base units of fpc (gdbint graph ibase libasync hash | |||||
# httpd mysql netdb odbc oracle pasjpeg paszlib pthreads | |||||
# postgres regexpr and sqlite). | |||||
# | # | ||||
# WANT_FPC_ALL - If you set this to "yes", this automatically will install | # Example: | ||||
# all free pascal units. | |||||
# | # | ||||
# USES+= fpc:run | |||||
# USE_FPC=gtk2 | |||||
# | # | ||||
.if !defined(_FPCMKINCLUDED) | .if !defined(_INCLUDE_USES_FPC_MK) | ||||
_FPCMKINCLUDED= yes | FPC_Include_MAINTAINER= acm@FreeBSD.org | ||||
_INCLUDE_USES_FPC_MK= yes | |||||
.if defined(DEFAULT_FPC_VER) | .if defined(DEFAULT_FPC_VER) | ||||
WARNING+= "DEFAULT_FPC_VER is defined, consider using DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead" | WARNING+= "DEFAULT_FPC_VER is defined, consider using DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead" | ||||
.endif | .endif | ||||
FPC_Include_MAINTAINER= freebsd-fpc@FreeBSD.org | .if ${fpc_ARGS:Nrun:Nbase:Nall} | ||||
FPC_Pre_Include= bsd.fpc.mk | IGNORE= Unknown argument for USES=fpc: ${fpc_ARGS:Nrun:Ntheme:Nmodule} | ||||
.endif | |||||
DEFAULT_FPC_VER= ${FPC_DEFAULT} | DEFAULT_FPC_VER= ${FPC_DEFAULT} | ||||
# When adding a version, please keep the comment in | # When adding a version, please keep the comment in | ||||
# Mk/bsd.default-versions.mk in sync. | # Mk/bsd.default-versions.mk in sync. | ||||
FPC_VER= ${DEFAULT_FPC_VER} | FPC_VER= ${DEFAULT_FPC_VER} | ||||
FPC_ARCH= ${ARCH:S/amd64/x86_64/} | FPC_ARCH= ${ARCH:S/amd64/x86_64/} | ||||
.if exists(${LOCALBASE}/bin/fpc) | .if exists(${LOCALBASE}/bin/fpc) | ||||
FPC_CURRENT_VER!= ${LOCALBASE}/bin/fpc -iV | FPC_CURRENT_VER!= ${LOCALBASE}/bin/fpc -iV | ||||
. if ${FPC_CURRENT_VER} != ${FPC_VER} | . if ${FPC_CURRENT_VER} != ${FPC_VER} | ||||
IGNORE= incompatible fpc ${FPC_CURRENT_VER} compiler, please install ${FPC_VER} version | IGNORE= incompatible fpc ${FPC_CURRENT_VER} compiler, please install ${FPC_VER} version | ||||
Done Inline ActionsYou should add DEV_WARNINGS if the WANT_* variables are set, so that they get removed. mat: You should add DEV_WARNINGS if the WANT_* variables are set, so that they get removed.
You do… | |||||
. endif | . endif | ||||
.endif | .endif | ||||
Done Inline ActionsAs you already removed all uses of USE_FPC_RUN, WANT_FPC_BASE and WANT_FPC_ALL, so it would probably be best to remove support for them completely, and change the warnings into errors and put them in Mk/bsd.sanity.mk. mat: As you already removed all uses of `USE_FPC_RUN`, `WANT_FPC_BASE` and `WANT_FPC_ALL`, so it… | |||||
.if ${ARCH} == "i386" | .if ${ARCH} == "i386" | ||||
PPNAME= ppc386 | PPNAME= ppc386 | ||||
.elif ${ARCH} == "amd64" | .elif ${ARCH} == "amd64" | ||||
PPNAME= ppcx64 | PPNAME= ppcx64 | ||||
.else | .else | ||||
PPNAME= ppc_not_yet_ported | PPNAME= ppc_not_yet_ported | ||||
ONLY_FOR_ARCHS= i386 amd64 | ONLY_FOR_ARCHS= i386 amd64 | ||||
Show All 14 Lines | _FPC_ALL_UNITS= a52 aspell bfd bzip2 cairo chm dblib dbus dts fastcgi \ | ||||
hermes httpd22 httpd24 ibase iconvenc imagemagick \ | hermes httpd22 httpd24 ibase iconvenc imagemagick \ | ||||
ldap libcurl libgd libmicrohttpd libpng libvlc libxml2 lua mad \ | ldap libcurl libgd libmicrohttpd libpng libvlc libxml2 lua mad \ | ||||
modplug mysql ncurses newt numlib odbc oggvorbis openal opengl \ | modplug mysql ncurses newt numlib odbc oggvorbis openal opengl \ | ||||
openssl oracle pasjpeg pcap postgres proj4 pthreads pxlib \ | openssl oracle pasjpeg pcap postgres proj4 pthreads pxlib \ | ||||
regexpr rexx rsvg rtl-console rtl-extra rtl-objpas rtl-unicode \ | regexpr rexx rsvg rtl-console rtl-extra rtl-objpas rtl-unicode \ | ||||
sdl sqlite svgalib symbolic syslog unzip users utmp uuid x11 \ | sdl sqlite svgalib symbolic syslog unzip users utmp uuid x11 \ | ||||
xforms zlib | xforms zlib | ||||
.if defined(WANT_FPC_BASE) | .if ${fpc_ARGS:Mbase} | ||||
. if ${WANT_FPC_BASE:tl} == "yes" | |||||
USE_FPC= gdbint graph httpd22 httpd24 ibase mysql odbc oracle pasjpeg \ | USE_FPC= gdbint graph httpd22 httpd24 ibase mysql odbc oracle pasjpeg \ | ||||
postgres pthreads regexpr sqlite | postgres pthreads regexpr sqlite | ||||
. else | |||||
IGNORE= unknown value, please use "yes" instead of | |||||
. endif | .endif | ||||
.endif | |||||
.if defined(WANT_FPC_ALL) | .if ${fpc_ARGS:Mall} | ||||
. if ${WANT_FPC_ALL:tl} == "yes" | |||||
USE_FPC= ${_FPC_ALL_UNITS} | USE_FPC= ${_FPC_ALL_UNITS} | ||||
. else | |||||
IGNORE= unknown value, please use "yes" instead of | |||||
. endif | .endif | ||||
.endif | |||||
.if ${USE_FPC:tl} != "yes" | .if defined(USE_FPC) && ${USE_FPC:tl} != "yes" | ||||
. for UNITS in ${USE_FPC} | . for UNITS in ${USE_FPC} | ||||
. if ${_FPC_ALL_UNITS:M${UNITS}}=="" | . if ${_FPC_ALL_UNITS:M${UNITS}}=="" | ||||
IGNORE= cannot install: unknown FPC unit ${UNITS} | IGNORE= cannot install: unknown FPC unit ${UNITS} | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
.endif | .endif | ||||
# Base units | # Base units | ||||
gdbint_UNIT= devel/fpc-gdbint | gdbint_UNIT= devel/fpc-gdbint | ||||
graph_UNIT= graphics/fpc-graph | graph_UNIT= graphics/fpc-graph | ||||
httpd22_UNIT= www/fpc-httpd22 | httpd22_UNIT= www/fpc-httpd22 | ||||
Done Inline ActionsSame here, USE_FPC=yes should give a warning. mat: Same here, USE_FPC=yes should give a warning. | |||||
httpd24_UNIT= www/fpc-httpd24 | httpd24_UNIT= www/fpc-httpd24 | ||||
ibase_UNIT= databases/fpc-ibase | ibase_UNIT= databases/fpc-ibase | ||||
mysql_UNIT= databases/fpc-mysql | mysql_UNIT= databases/fpc-mysql | ||||
odbc_UNIT= databases/fpc-odbc | odbc_UNIT= databases/fpc-odbc | ||||
oracle_UNIT= databases/fpc-oracle | oracle_UNIT= databases/fpc-oracle | ||||
pasjpeg_UNIT= graphics/fpc-pasjpeg | pasjpeg_UNIT= graphics/fpc-pasjpeg | ||||
postgres_UNIT= databases/fpc-postgres | postgres_UNIT= databases/fpc-postgres | ||||
pthreads_UNIT= devel/fpc-pthreads | pthreads_UNIT= devel/fpc-pthreads | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
utmp_UNIT= sysutils/fpc-utmp | utmp_UNIT= sysutils/fpc-utmp | ||||
uuid_UNIT= sysutils/fpc-uuid | uuid_UNIT= sysutils/fpc-uuid | ||||
x11_UNIT= x11/fpc-x11 | x11_UNIT= x11/fpc-x11 | ||||
xforms_UNIT= x11-toolkits/fpc-xforms | xforms_UNIT= x11-toolkits/fpc-xforms | ||||
zlib_UNIT= devel/fpc-zlib | zlib_UNIT= devel/fpc-zlib | ||||
.endif | .endif | ||||
.if defined(_POSTMKINCLUDED) && defined(USE_FPC) | .if defined(USE_FPC) | ||||
Not Done Inline ActionsWhy did you remove the _POST component? Is it never needed? mat: Why did you remove the _POST component? Is it never needed? | |||||
. for UNIT in ${USE_FPC} | . for UNIT in ${USE_FPC} | ||||
. if ${_FPC_ALL_UNITS:M${UNIT}} != "" | . if ${_FPC_ALL_UNITS:M${UNIT}} != "" | ||||
BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} | BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} | ||||
. if defined(USE_FPC_RUN) | . if ${fpc_ARGS:Mrun} || ${fpc_ARGS:Mbase} | ||||
RUN_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} | RUN_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} | ||||
. endif | . endif | ||||
security-check: fpc-check-install | |||||
. endif | . endif | ||||
. endfor | . endfor | ||||
fpc-check-install: | |||||
.if defined(UNITPREFIX) && defined(PKGNAMESUFFIX) | |||||
@${ECHO_CMD} "#################################################################" | |||||
@${ECHO_CMD} "" | |||||
@${ECHO_CMD} " The following freepascal unit has been installed in your system:" | |||||
@${ECHO_CMD} "" | |||||
@${ECHO_CMD} " * ${UNITPREFIX}${PKGNAMESUFFIX:S/-//} " | |||||
@${ECHO_CMD} "" | |||||
@${ECHO_CMD} "#################################################################" | |||||
.endif | .endif | ||||
Done Inline ActionsThat can probably be removed. mat: That can probably be removed. | |||||
.endif | |||||
#.endif | |||||
# End of bsd.fpc.mk file |
This is not required, there is a MAINTAINER line, any unauthorized commits can (and will) be backed out.