11 | | maintainers {takeshi @tenomoto} openmaintainer |
12 | | description free pascal |
13 | | long_description Open source compiler for Pascal and Object Pascal |
| 10 | maintainers takeshi openmaintainer |
| 11 | description Free Pascal, an open source Pascal and Object Pascal compiler. |
| 12 | long_description Free Pascal is a 32, 64 and 16 bit professional Pascal compiler. \ |
| 13 | It can target many processor architectures: Intel x86 (including 8086), \ |
| 14 | AMD64/x86-64, PowerPC, PowerPC64, SPARC, ARM, AArch64, MIPS and the JVM. \ |
| 15 | Supported operating systems include Linux, FreeBSD, Mac OS X/iOS/iPhoneSimulator/Darwin, \ |
| 16 | Win32, Win64, WinCE and Android. |
44 | | # Yosemite fix: fpc's build system checkes MACOSX_DEPLOYMENT_TARGET and halts if > 10.9 |
45 | | platform darwin { |
46 | | if {${os.major} > 13} { |
47 | | macosx_deployment_target 10.9 |
| 48 | depends_build-append \ |
| 49 | port:${name} |
| 50 | extract.post_args-append \ |
| 51 | ${name}build-${version}/fpcsrc/packages/chm \ |
| 52 | ${name}build-${version}/fpcsrc/packages/fcl-xml \ |
| 53 | ${name}build-${version}/fpcsrc/packages/fcl-base \ |
| 54 | ${name}build-${version}/fpcsrc/packages/fcl-process \ |
| 55 | ${name}build-${version}/fpcsrc/packages/fpmkunit \ |
| 56 | ${name}build-${version}/fpcsrc/packages/hash \ |
| 57 | ${name}build-${version}/fpcsrc/packages/iconvenc \ |
| 58 | ${name}build-${version}/fpcsrc/packages/libtar \ |
| 59 | ${name}build-${version}/fpcsrc/packages/paszlib \ |
| 60 | ${name}build-${version}/fpcsrc/packages/univint \ |
| 61 | ${name}build-${version}/fpcsrc/rtl |
| 62 | worksrcdir ${name}build-${version}/fpcsrc/packages/chm |
| 63 | use_configure yes |
| 64 | configure.cmd ${fpcbasepath}/bin/fpcmake |
| 65 | configure.pre_args |
| 66 | configure.args -r -v Makefile.fpc.fpcmake |
| 67 | configure.post_args |
| 68 | build.env PREFIX=${prefix} |
| 69 | build.target |
| 70 | build.post_args-append \ |
| 71 | V=1 VERBOSE=1 |
| 72 | destroot { |
| 73 | xinstall -m 755 ${build.dir}/chmcmd ${destroot}${prefix}/bin |
64 | | ln -s ${fpcbasepath}/lib/${name}/${version}/${b} ${destroot}${fpcbasepath}/bin |
65 | | # generate a configuration file |
66 | | xinstall -d ${destroot}${fpcbasepath}/etc |
67 | | system " |
68 | | ${destroot}${fpcbasepath}/bin/fpcmkcfg \ |
69 | | -d basepath=${fpcbasepath}/lib/${name}/${version} \ |
70 | | -o ${destroot}${fpcbasepath}/etc/fpc.cfg |
71 | | " |
72 | | # install man |
73 | | xinstall -d ${destroot}${fpcbasepath}/man |
74 | | foreach d {1 5} { |
75 | | file copy ${workpath}/${name}build-${version}/install/man/man${d} ${destroot}${fpcbasepath}/man |
76 | | foreach f [glob ${destroot}${fpcbasepath}/man/man${d}/*.${d}] { |
77 | | system "/usr/bin/gzip ${f}" |
| 109 | |
| 110 | post-destroot { |
| 111 | # create a symlink to the architecture dependent executable |
| 112 | ln -s ${fpcbasepath}/lib/${name}/${version}/${b} ${destroot}${fpcbasepath}/bin |
| 113 | # generate a configuration file |
| 114 | xinstall -d ${destroot}${fpcbasepath}/etc |
| 115 | system " |
| 116 | ${destroot}${fpcbasepath}/bin/fpcmkcfg \ |
| 117 | -d basepath=${fpcbasepath}/lib/${name}/${version} \ |
| 118 | -o ${destroot}${fpcbasepath}/etc/fpc.cfg |
| 119 | " |
| 120 | ln -s ${fpcbasepath}/etc/fpc.cfg ${destroot}${prefix}/etc |
| 121 | |
| 122 | # install man |
| 123 | xinstall -d ${destroot}${fpcbasepath}/man |
| 124 | foreach d {1 5} { |
| 125 | file copy ${workpath}/${name}build-${version}/install/man/man${d} ${destroot}${fpcbasepath}/man |
| 126 | foreach f [glob ${destroot}${fpcbasepath}/man/man${d}/*.${d}] { |
| 127 | system "/usr/bin/gzip ${f}" |
| 128 | } |
| 129 | } |
| 130 | ln -s ${fpcbasepath}/man/man1/fpc.1.gz ${destroot}${prefix}/share/man/man1 |
| 131 | ln -s ${fpcbasepath}/man/man5/fpc.cfg.5.gz ${destroot}${prefix}/share/man/man5 |
| 132 | |
| 133 | # chmcmd will be installed by the chmcmd-fpc subport |
| 134 | file delete -force ${destroot}${fpcbasepath}/bin/chmcmd |
| 135 | foreach b [glob -nocomplain ${destroot}${fpcbasepath}/bin/*] { |
| 136 | set n [file tail ${b}] |
| 137 | ln -s ${fpcbasepath}/bin/${n} ${destroot}${prefix}/bin |
84 | | notes " |
85 | | The compiler fpc looks for the fpc.cfg file in the following places: \n\ |
86 | | - The current directory. \n\ |
87 | | - Home directory, looks for .fpc.cfg \n\ |
88 | | - The directory specified in the environment variable PPC_CONFIG_PATH, \n\ |
89 | | and if it's not set under compilerdir/../etc. \n\ |
90 | | - If it is not yet found: in /etc. \n\ |
91 | | \n\ |
92 | | All the files of fpc are installed in ${fpcbasepath} and \n\ |
93 | | the executables are installed in ${fpcbasepath}/bin. \n\ |
94 | | The fpc.cfg is installed in ${fpcbasepath}/etc to make fpc find fpc.cfg. \n\ |
95 | | To customize, use ~/.fpc.cfg or /etc/fpc.cfg and call ${fpcbasepath}/bin/fpc directly. |
96 | | " |
| 141 | notes " |
| 142 | The compiler fpc looks for the fpc.cfg file in the following places: \n\ |
| 143 | - The current directory. \n\ |
| 144 | - Home directory, looks for .fpc.cfg \n\ |
| 145 | - The directory specified in the environment variable PPC_CONFIG_PATH, \n\ |
| 146 | and if it's not set under compilerdir/../etc. \n\ |
| 147 | - If it is not yet found: in /etc. \n\ |
| 148 | \n\ |
| 149 | All the files of fpc are installed in ${fpcbasepath} and \n\ |
| 150 | the executables are installed in ${fpcbasepath}/bin. \n\ |
| 151 | The fpc.cfg is installed in ${fpcbasepath}/etc to make fpc find fpc.cfg. \n\ |
| 152 | To customize, use ~/.fpc.cfg or /etc/fpc.cfg and call ${fpcbasepath}/bin/fpc directly. |
| 153 | " |
| 154 | } |