4 # bsd.fpc.mk - Support for FreePascal based ports.
6 # Created by: Alonso Cardenas Marquez <acm@FreeBSD.org>
8 # For FreeBSD committers:
9 # Please send all suggested changes to the maintainer instead of committing
10 # them to SVN yourself.
12 # USE_FPC - If you set this to "yes", this automatically will install
13 # free pascal compiler, if you need install additional fpc
14 # units, they can be listed there (USE_FPC= gtk x11 opengl).
16 # USE_FPC_RUN - If you set this to "yes", free pascal units will be
17 # registered also as run dependencies.
19 # WANT_FPC_BASE - If you set this to "yes", this automatically will install
20 # all base units of fpc (gdbint graph ibase libasync hash
21 # httpd mysql netdb odbc oracle pasjpeg paszlib pthreads
22 # postgres regexpr and sqlite).
24 # WANT_FPC_ALL - If you set this to "yes", this automatically will install
25 # all free pascal units.
29 .if !defined(_FPCMKINCLUDED)
33 .if defined(DEFAULT_FPC_VER)
34 WARNING+= "DEFAULT_FPC_VER is defined, consider using DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead"
37 FPC_Include_MAINTAINER= freebsd-fpc@FreeBSD.org
38 FPC_Pre_Include= bsd.fpc.mk
40 DEFAULT_FPC_VER= ${FPC_DEFAULT}
41 # When adding a version, please keep the comment in
42 # Mk/bsd.default-versions.mk in sync.
43 FPC_VER= ${DEFAULT_FPC_VER}
44 FPC_ARCH= ${ARCH:S/amd64/x86_64/}
46 .if exists(${LOCALBASE}/bin/fpc)
47 FPC_CURRENT_VER!= ${LOCALBASE}/bin/fpc -iV
48 . if ${FPC_CURRENT_VER} != ${FPC_VER}
49 IGNORE= incompatible fpc ${FPC_CURRENT_VER} compiler, please install ${FPC_VER} version
55 .elif ${ARCH} == "x86_64"
58 PPNAME= ppc_not_yet_ported
59 ONLY_FOR_ARCHS= i386 amd64 x86_64
60 ONLY_FOR_ARCHS_REASON= not yet ported to anything other than i386 and amd64
63 BUILD_DEPENDS+= ${PPNAME}:lang/fpc
65 BUILDNAME= ${FPC_ARCH}-${OPSYS:tl}
66 UNITSDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/units/${BUILDNAME}
67 MKINSTDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME}
69 _FPC_ALL_UNITS= a52 aspell bfd bzip2 cairo chm dblib dbus dts fastcgi \
70 fcl-async fcl-base fcl-db fcl-extra fcl-fpcunit fcl-image \
71 fcl-js fcl-json fcl-net fcl-passrc fcl-registry fcl-res \
72 fcl-sdo fcl-sound fcl-stl fcl-web fcl-xml fftw \
73 fpindexer fppkg fv gdbint gdbm gmp graph gtk2 hermes \
74 httpd22 httpd24 ibase iconvenc imagemagick ldap libcurl \
75 libgd libpng libvlc libxml2 lua mad modplug mysql \
76 ncurses newt numlib odbc oggvorbis openal opengl openssl \
77 oracle pasjpeg pcap postgres proj4 pthreads pxlib regexpr \
78 rexx rsvg rtl-console rtl-extra rtl-objpas rtl-unicode sdl \
79 sqlite svgalib symbolic syslog tcl unzip users utmp \
82 .if defined(WANT_FPC_BASE)
83 . if ${WANT_FPC_BASE:tl} == "yes"
84 USE_FPC= gdbint graph httpd22 httpd24 ibase mysql odbc oracle pasjpeg \
85 postgres pthreads regexpr sqlite
87 IGNORE= unknown value, please use "yes" instead of
91 .if defined(WANT_FPC_ALL)
92 . if ${WANT_FPC_ALL:tl} == "yes"
93 USE_FPC= ${_FPC_ALL_UNITS}
95 IGNORE= unknown value, please use "yes" instead of
99 .if ${USE_FPC:tl} != "yes"
100 . for UNITS in ${USE_FPC}
101 . if ${_FPC_ALL_UNITS:M${UNITS}}==""
102 IGNORE= cannot install: unknown FPC unit ${UNITS}
108 gdbint_UNIT= devel/fpc-gdbint
109 graph_UNIT= graphics/fpc-graph
110 httpd22_UNIT= www/fpc-httpd22
111 httpd24_UNIT= www/fpc-httpd24
112 ibase_UNIT= databases/fpc-ibase
113 mysql_UNIT= databases/fpc-mysql
114 odbc_UNIT= databases/fpc-odbc
115 oracle_UNIT= databases/fpc-oracle
116 pasjpeg_UNIT= graphics/fpc-pasjpeg
117 postgres_UNIT= databases/fpc-postgres
118 pthreads_UNIT= devel/fpc-pthreads
119 regexpr_UNIT= devel/fpc-regexpr
120 sqlite_UNIT= databases/fpc-sqlite
123 a52_UNIT= audio/fpc-a52
124 aspell_UNIT= textproc/fpc-aspell
125 bfd_UNIT= devel/fpc-bfd
126 bzip2_UNIT= archivers/fpc-bzip2
127 cairo_UNIT= graphics/fpc-cairo
128 chm_UNIT= misc/fpc-chm
129 dblib_UNIT= databases/fpc-dblib
130 dbus_UNIT= devel/fpc-dbus
131 dts_UNIT= multimedia/fpc-dts
132 fastcgi_UNIT= www/fpc-fastcgi
133 fcl_async_UNIT= devel/fpc-fcl-async
134 fcl_base_UNIT= devel/fpc-fcl-base
135 fcl_db_UNIT= devel/fpc-fcl-db
136 fcl_extra_UNIT= devel/fpc-fcl-extra
137 fcl_fpcunit_UNIT= devel/fpc-fcl-fpcunit
138 fcl_image_UNIT= devel/fpc-fcl-image
139 fcl_js_UNIT= devel/fpc-fcl-js
140 fcl_json_UNIT= devel/fpc-fcl-json
141 fcl_net_UNIT= devel/fpc-fcl-net
142 fcl_passrc_UNIT= devel/fpc-fcl-passrc
143 fcl_registry_UNIT= devel/fpc-fcl-registry
144 fcl_res_UNIT= devel/fpc-fcl-res
145 fcl_sdo_UNIT= devel/fpc-fcl-sdo
146 fcl_sound_UNIT= devel/fpc-fcl-sound
147 fcl_stl_UNIT= devel/fpc-fcl-stl
148 fcl_web_UNIT= devel/fpc-fcl-web
149 fcl_xml_UNIT= devel/fpc-fcl-xml
150 fftw_UNIT= math/fpc-fftw
151 fpindexer_UNIT= databases/fpc-fpindexer
152 fppkg_UNIT= devel/fpc-fppkg
153 fpvectorial_UNIT= graphics/fpc-fpvectorial
154 fv_UNIT= devel/fpc-fv
155 hermes_UNIT= graphics/fpc-hermes
156 gdbm_UNIT= databases/fpc-gdbm
157 gmp_UNIT= math/fpc-gmp
158 gtk2_UNIT= x11-toolkits/fpc-gtk2
159 iconvenc_UNIT= converters/fpc-iconvenc
160 imagemagick_UNIT= graphics/fpc-imagemagick
161 ldap_UNIT= net/fpc-ldap
162 libcurl_UNIT= ftp/fpc-libcurl
163 libgd_UNIT= graphics/fpc-libgd
164 libpng_UNIT= graphics/fpc-libpng
165 libvlc_UNIT= multimedia/fpc-libvlc
166 libxml2_UNIT= textproc/fpc-libxml2
167 lua_UNIT= lang/fpc-lua
168 mad_UNIT= audio/fpc-mad
169 modplug_UNIT= audio/fpc-modplug
170 newt_UNIT= devel/fpc-newt
171 ncurses_UNIT= graphics/fpc-ncurses
172 numlib_UNIT= math/fpc-numlib
173 oggvorbis_UNIT= audio/fpc-oggvorbis
174 openal_UNIT= audio/fpc-openal
175 opengl_UNIT= graphics/fpc-opengl
176 openssl_UNIT= security/fpc-openssl
177 pcap_UNIT= net/fpc-pcap
178 proj4_UNIT= graphics/fpc-proj4
179 pxlib_UNIT= databases/fpc-pxlib
180 rexx_UNIT= lang/fpc-rexx
181 rsvg_UNIT= graphics/fpc-rsvg
182 rtl_console_UNIT= lang/fpc-rtl-console
183 rtl_extra_UNIT= lang/fpc-rtl-extra
184 rtl_objpas_UNIT= lang/fpc-rtl-objpas
185 rtl_unicode_UNIT= lang/fpc-rtl-unicode
186 sdl_UNIT= devel/fpc-sdl
187 svgalib_UNIT= graphics/fpc-svgalib
188 symbolic_UNIT= devel/fpc-symbolic
189 syslog_UNIT= sysutils/fpc-syslog
190 tcl_UNIT= lang/fpc-tcl
191 unzip_UNIT= archivers/fpc-unzip
192 users_UNIT= sysutils/fpc-users
193 utmp_UNIT= sysutils/fpc-utmp
194 uuid_UNIT= sysutils/fpc-uuid
195 x11_UNIT= x11/fpc-x11
196 xforms_UNIT= x11-toolkits/fpc-xforms
197 zlib_UNIT= devel/fpc-zlib
201 .if defined(_POSTMKINCLUDED) && defined(USE_FPC)
202 . for UNIT in ${USE_FPC}
203 . if ${_FPC_ALL_UNITS:M${UNIT}} != ""
204 BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT}
205 . if defined(USE_FPC_RUN)
206 RUN_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT}
209 security-check: fpc-check-install
214 .if defined(UNITPREFIX) && defined(PKGNAMESUFFIX)
215 @${ECHO_CMD} "#################################################################"
217 @${ECHO_CMD} " The following freepascal unit has been installed in your system:"
219 @${ECHO_CMD} " * ${UNITPREFIX}${PKGNAMESUFFIX:S/-//} "
221 @${ECHO_CMD} "#################################################################"
226 # End of bsd.fpc.mk file