13 | | description free pascal |
14 | | long_description Open source compiler for Pascal and Object Pascal |
| 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. |
37 | | worksrcdir ${name}build-${version}/fpcsrc |
38 | | set fpcbasepath ${prefix}/lib/${name} |
39 | | build.env PP=${workpath}/ppcuniversal \ |
40 | | PREFIX=${destroot}${fpcbasepath} |
41 | | build.target all |
42 | | |
43 | | destroot.env ${build.env} |
44 | | |
45 | | # Yosemite fix: fpc's build system checkes MACOSX_DEPLOYMENT_TARGET and halts if > 10.9 |
46 | | platform darwin { |
47 | | if {${os.major} > 13} { |
48 | | macosx_deployment_target 10.9 |
| 37 | subport "chmcmd-${name}" { |
| 38 | description The FPC Pascal htmlhelp (CHM) compiler |
| 39 | long_description \ |
| 40 | chmcmd is an cross-platform utility to generate compressed HTML (.chm)\ |
| 41 | documentation, written in Free Pascal |
| 42 | installs_libs no |
| 43 | |
| 44 | depends_build-append \ |
| 45 | port:${name} |
| 46 | extract.post_args-append \ |
| 47 | ${name}build-${version}/fpcsrc/packages/chm \ |
| 48 | ${name}build-${version}/fpcsrc/packages/fcl-xml \ |
| 49 | ${name}build-${version}/fpcsrc/packages/fcl-base \ |
| 50 | ${name}build-${version}/fpcsrc/packages/fcl-process \ |
| 51 | ${name}build-${version}/fpcsrc/packages/fpmkunit \ |
| 52 | ${name}build-${version}/fpcsrc/packages/hash \ |
| 53 | ${name}build-${version}/fpcsrc/packages/iconvenc \ |
| 54 | ${name}build-${version}/fpcsrc/packages/libtar \ |
| 55 | ${name}build-${version}/fpcsrc/packages/paszlib \ |
| 56 | ${name}build-${version}/fpcsrc/packages/univint \ |
| 57 | ${name}build-${version}/fpcsrc/rtl |
| 58 | worksrcdir ${name}build-${version}/fpcsrc/packages/chm |
| 59 | use_configure yes |
| 60 | configure.cmd ${fpcbasepath}/bin/fpcmake |
| 61 | configure.pre_args |
| 62 | configure.args -r -v Makefile.fpc.fpcmake |
| 63 | configure.post_args |
| 64 | build.env PREFIX=${prefix} |
| 65 | build.target |
| 66 | build.post_args-append \ |
| 67 | V=1 VERBOSE=1 |
| 68 | destroot { |
| 69 | xinstall -m 755 ${build.dir}/chmcmd ${destroot}${prefix}/bin |
52 | | post-destroot { |
53 | | # create a symlink to the architecture dependent executable |
54 | | switch ${build_arch} { |
55 | | "x86_64" { |
56 | | set b "ppcx64" |
57 | | } |
58 | | "i386" { |
59 | | set b "ppc386" |
60 | | } |
61 | | default { |
62 | | set b "ppcppc" |
| 73 | if {${subport} eq "${name}"} { |
| 74 | installs_libs yes |
| 75 | |
| 76 | post-extract { |
| 77 | system -W ${workpath} "bzip2 -dc ${distpath}/${pp} | tar xf -" |
| 78 | } |
| 79 | |
| 80 | worksrcdir ${name}build-${version}/fpcsrc |
| 81 | build.env PP=${workpath}/ppcuniversal \ |
| 82 | PREFIX=${destroot}${fpcbasepath} |
| 83 | build.target all |
| 84 | |
| 85 | destroot.env ${build.env} |
| 86 | |
| 87 | # Yosemite fix: fpc's build system checkes MACOSX_DEPLOYMENT_TARGET and halts if > 10.9 |
| 88 | platform darwin { |
| 89 | if {${os.major} > 13} { |
| 90 | macosx_deployment_target 10.9 |
65 | | ln -s ${fpcbasepath}/lib/${name}/${version}/${b} ${destroot}${fpcbasepath}/bin |
66 | | # generate a configuration file |
67 | | xinstall -d ${destroot}${fpcbasepath}/etc |
68 | | system " |
69 | | ${destroot}${fpcbasepath}/bin/fpcmkcfg \ |
70 | | -d basepath=${fpcbasepath}/lib/${name}/${version} \ |
71 | | -o ${destroot}${fpcbasepath}/etc/fpc.cfg |
72 | | " |
73 | | # install man |
74 | | xinstall -d ${destroot}${fpcbasepath}/man |
75 | | foreach d {1 5} { |
76 | | file copy ${workpath}/${name}build-${version}/install/man/man${d} ${destroot}${fpcbasepath}/man |
77 | | foreach f [glob ${destroot}${fpcbasepath}/man/man${d}/*.${d}] { |
78 | | system "/usr/bin/gzip ${f}" |
| 93 | |
| 94 | post-destroot { |
| 95 | # create a symlink to the architecture dependent executable |
| 96 | switch ${build_arch} { |
| 97 | "x86_64" { |
| 98 | set b "ppcx64" |
| 99 | } |
| 100 | "i386" { |
| 101 | set b "ppc386" |
| 102 | } |
| 103 | default { |
| 104 | set b "ppcppc" |
| 105 | } |
| 106 | } |
| 107 | ln -s ${fpcbasepath}/lib/${name}/${version}/${b} ${destroot}${fpcbasepath}/bin |
| 108 | # generate a configuration file |
| 109 | xinstall -d ${destroot}${fpcbasepath}/etc |
| 110 | system " |
| 111 | ${destroot}${fpcbasepath}/bin/fpcmkcfg \ |
| 112 | -d basepath=${fpcbasepath}/lib/${name}/${version} \ |
| 113 | -o ${destroot}${fpcbasepath}/etc/fpc.cfg |
| 114 | " |
| 115 | ln -s ${fpcbasepath}/etc/fpc.cfg ${destroot}${prefix}/etc |
| 116 | |
| 117 | # install man |
| 118 | xinstall -d ${destroot}${fpcbasepath}/man |
| 119 | foreach d {1 5} { |
| 120 | file copy ${workpath}/${name}build-${version}/install/man/man${d} ${destroot}${fpcbasepath}/man |
| 121 | foreach f [glob ${destroot}${fpcbasepath}/man/man${d}/*.${d}] { |
| 122 | system "/usr/bin/gzip ${f}" |
| 123 | } |
| 124 | } |
| 125 | ln -s ${fpcbasepath}/man/man1/fpc.1.gz ${destroot}${prefix}/share/man/man1 |
| 126 | ln -s ${fpcbasepath}/man/man5/fpc.cfg.5.gz ${destroot}${prefix}/share/man/man5 |
| 127 | |
| 128 | # chmcmd will be installed by the chmcmd-fpc subport |
| 129 | file delete -force ${destroot}${fpcbasepath}/bin/chmcmd |
| 130 | foreach b [glob -nocomplain ${destroot}${fpcbasepath}/bin/*] { |
| 131 | set n [file tail ${b}] |
| 132 | ln -s ${fpcbasepath}/bin/${n} ${destroot}${prefix}/bin |
85 | | notes " |
86 | | The compiler fpc looks for the fpc.cfg file in the following places: \n\ |
87 | | - The current directory. \n\ |
88 | | - Home directory, looks for .fpc.cfg \n\ |
89 | | - The directory specified in the environment variable PPC_CONFIG_PATH, \n\ |
90 | | and if it's not set under compilerdir/../etc. \n\ |
91 | | - If it is not yet found: in /etc. \n\ |
92 | | \n\ |
93 | | All the files of fpc are installed in ${fpcbasepath} and \n\ |
94 | | the executables are installed in ${fpcbasepath}/bin. \n\ |
95 | | The fpc.cfg is installed in ${fpcbasepath}/etc to make fpc find fpc.cfg. \n\ |
96 | | To customize, use ~/.fpc.cfg or /etc/fpc.cfg and call ${fpcbasepath}/bin/fpc directly. |
97 | | " |
| 136 | notes " |
| 137 | The compiler fpc looks for the fpc.cfg file in the following places: \n\ |
| 138 | - The current directory. \n\ |
| 139 | - Home directory, looks for .fpc.cfg \n\ |
| 140 | - The directory specified in the environment variable PPC_CONFIG_PATH, \n\ |
| 141 | and if it's not set under compilerdir/../etc. \n\ |
| 142 | - If it is not yet found: in /etc. \n\ |
| 143 | \n\ |
| 144 | All the files of fpc are installed in ${fpcbasepath} and \n\ |
| 145 | the executables are installed in ${fpcbasepath}/bin. \n\ |
| 146 | The fpc.cfg is installed in ${fpcbasepath}/etc to make fpc find fpc.cfg. \n\ |
| 147 | To customize, use ~/.fpc.cfg or /etc/fpc.cfg and call ${fpcbasepath}/bin/fpc directly. |
| 148 | " |
| 149 | } |