Update www/rubygem-rails-settings-cached-rails50 to version 0.6.6
[dports.git] / Mk / bsd.fpc.mk
1 #
2 # $FreeBSD$
3 #
4 # bsd.fpc.mk - Support for FreePascal based ports.
5 #
6 # Created by: Alonso Cardenas Marquez <acm@FreeBSD.org>
7 #
8 # For FreeBSD committers:
9 # Please send all suggested changes to the maintainer instead of committing
10 # them to SVN yourself.
11 #
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).
15 #
16 # USE_FPC_RUN           - If you set this to "yes", free pascal units will be 
17 #                         registered also as run dependencies.
18 #
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).
23 #
24 # WANT_FPC_ALL          - If you set this to "yes", this automatically will install
25 #                         all free pascal units.
26 #
27 #
28
29 .if !defined(_FPCMKINCLUDED)
30
31 _FPCMKINCLUDED= yes
32
33 .if defined(DEFAULT_FPC_VER)
34 WARNING+=       "DEFAULT_FPC_VER is defined, consider using DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead"
35 .endif
36
37 FPC_Include_MAINTAINER= freebsd-fpc@FreeBSD.org
38 FPC_Pre_Include=        bsd.fpc.mk
39
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/}
45
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
50 .       endif
51 .endif
52
53 .if ${ARCH} == "i386"
54 PPNAME=                 ppc386
55 .elif ${ARCH} == "x86_64"
56 PPNAME=                 ppcx64
57 .else
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
61 .endif
62
63 BUILD_DEPENDS+=         ${PPNAME}:lang/fpc
64
65 BUILDNAME=              ${FPC_ARCH}-${OPSYS:tl}
66 UNITSDIR=               ${LOCALBASE}/lib/fpc/${FPC_VER}/units/${BUILDNAME}
67 MKINSTDIR=              ${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME}
68
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-pdf fcl-registry \
72                 fcl-res fcl-sdo fcl-sound fcl-stl fcl-web fcl-xml fftw \
73                 fpindexer fppkg fv gdbint gdbm gmp googleapi graph gtk2 \
74                 hermes httpd22 httpd24 ibase iconvenc imagemagick \
75                 ldap libcurl 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 \
80                 uuid x11 xforms zlib
81
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
86 .       else
87 IGNORE= unknown value, please use "yes" instead of
88 .       endif
89 .endif
90
91 .if defined(WANT_FPC_ALL)
92 .       if ${WANT_FPC_ALL:tl} == "yes"
93 USE_FPC=        ${_FPC_ALL_UNITS}
94 .       else
95 IGNORE= unknown value, please use "yes" instead of
96 .       endif
97 .endif
98
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}
103 .               endif
104 .       endfor
105 .endif
106
107 # Base 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
121
122 # Extra units
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_pdf_UNIT=   devel/fpc-fcl-pdf
144 fcl_registry_UNIT=      devel/fpc-fcl-registry
145 fcl_res_UNIT=   devel/fpc-fcl-res
146 fcl_sdo_UNIT=   devel/fpc-fcl-sdo
147 fcl_sound_UNIT= devel/fpc-fcl-sound
148 fcl_stl_UNIT=   devel/fpc-fcl-stl
149 fcl_web_UNIT=   devel/fpc-fcl-web
150 fcl_xml_UNIT=   devel/fpc-fcl-xml
151 fftw_UNIT=      math/fpc-fftw
152 fpindexer_UNIT= databases/fpc-fpindexer
153 fppkg_UNIT=     devel/fpc-fppkg
154 fpvectorial_UNIT=       graphics/fpc-fpvectorial
155 fv_UNIT=        devel/fpc-fv
156 hermes_UNIT=    graphics/fpc-hermes
157 gdbm_UNIT=      databases/fpc-gdbm
158 gmp_UNIT=       math/fpc-gmp
159 googleapi_UNIT= www/fpc-googleapi
160 gtk2_UNIT=      x11-toolkits/fpc-gtk2
161 iconvenc_UNIT=  converters/fpc-iconvenc
162 imagemagick_UNIT=       graphics/fpc-imagemagick
163 ldap_UNIT=      net/fpc-ldap
164 libcurl_UNIT=   ftp/fpc-libcurl
165 libgd_UNIT=     graphics/fpc-libgd
166 libpng_UNIT=    graphics/fpc-libpng
167 libvlc_UNIT=    multimedia/fpc-libvlc
168 libxml2_UNIT=   textproc/fpc-libxml2
169 lua_UNIT=       lang/fpc-lua
170 mad_UNIT=       audio/fpc-mad
171 modplug_UNIT=   audio/fpc-modplug
172 newt_UNIT=      devel/fpc-newt
173 ncurses_UNIT=   graphics/fpc-ncurses
174 numlib_UNIT=    math/fpc-numlib
175 oggvorbis_UNIT= audio/fpc-oggvorbis
176 openal_UNIT=    audio/fpc-openal
177 opengl_UNIT=    graphics/fpc-opengl
178 openssl_UNIT=   security/fpc-openssl
179 pcap_UNIT=      net/fpc-pcap
180 proj4_UNIT=     graphics/fpc-proj4
181 pxlib_UNIT=     databases/fpc-pxlib
182 rexx_UNIT=      lang/fpc-rexx
183 rsvg_UNIT=      graphics/fpc-rsvg
184 rtl_console_UNIT=       lang/fpc-rtl-console
185 rtl_extra_UNIT=         lang/fpc-rtl-extra
186 rtl_objpas_UNIT=        lang/fpc-rtl-objpas
187 rtl_unicode_UNIT=       lang/fpc-rtl-unicode
188 sdl_UNIT=       devel/fpc-sdl
189 svgalib_UNIT=   graphics/fpc-svgalib
190 symbolic_UNIT=  devel/fpc-symbolic
191 syslog_UNIT=    sysutils/fpc-syslog
192 tcl_UNIT=       lang/fpc-tcl
193 unzip_UNIT=     archivers/fpc-unzip
194 users_UNIT=     sysutils/fpc-users
195 utmp_UNIT=      sysutils/fpc-utmp
196 uuid_UNIT=      sysutils/fpc-uuid
197 x11_UNIT=       x11/fpc-x11
198 xforms_UNIT=    x11-toolkits/fpc-xforms
199 zlib_UNIT=      devel/fpc-zlib
200
201 .endif
202
203 .if defined(_POSTMKINCLUDED) && defined(USE_FPC)
204 .       for UNIT in ${USE_FPC}
205 .               if ${_FPC_ALL_UNITS:M${UNIT}} != ""
206 BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT}
207 .                       if defined(USE_FPC_RUN)
208 RUN_DEPENDS+=   ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT}
209 .                       endif
210
211 security-check: fpc-check-install
212 .               endif
213 .       endfor
214
215 fpc-check-install:
216 .if defined(UNITPREFIX) && defined(PKGNAMESUFFIX)
217         @${ECHO_CMD} "#################################################################"
218         @${ECHO_CMD} ""
219         @${ECHO_CMD} " The following freepascal unit has been installed in your system:"
220         @${ECHO_CMD} ""
221         @${ECHO_CMD} " * ${UNITPREFIX}${PKGNAMESUFFIX:S/-//}                           "
222         @${ECHO_CMD} ""
223         @${ECHO_CMD} "#################################################################"
224 .endif
225
226 .endif
227 #.endif
228 # End of bsd.fpc.mk file