Revision: 140495 https://trac.macports.org/changeset/140495 Author: takeshi@macports.org Date: 2015-09-20 21:26:43 -0700 (Sun, 20 Sep 2015) Log Message: ----------- fpc: install in more traditional directory /lib, install man Modified Paths: -------------- trunk/dports/lang/fpc/Portfile Modified: trunk/dports/lang/fpc/Portfile =================================================================== --- trunk/dports/lang/fpc/Portfile 2015-09-21 02:13:40 UTC (rev 140494) +++ trunk/dports/lang/fpc/Portfile 2015-09-21 04:26:43 UTC (rev 140495) @@ -5,6 +5,7 @@ name fpc version 2.6.4 +revision 1 categories lang platforms darwin license GPL-3 LGPL @@ -14,12 +15,12 @@ homepage http://www.freepascal.org master_sites sourceforge:freepascal -set src ${name}-${version}.source.tar.gz +set src ${name}build-${version}.tar.gz set pp universal-macosx-10.5-ppcuniversal.tar.bz2 distfiles ${src} ${pp} checksums ${src} \ - rmd160 35a00ed483805408ed39b1c07147c660ceb5420e \ - sha256 c16f2e6e0274c7afc0f1d2dded22d0fec98fe329b1d5b2f011af1655f3a1cc29 \ + rmd160 339b71d3c9983a720eed7c6bda1cfd330d89966f \ + sha256 8d9c3bcfa469d9b37c05663e2775d179809e4b3443604fac7d21aa64c9a56daa \ ${pp} \ rmd160 0124c2f4447ba7f96e3db0a27e6bff459c5749f4 \ sha256 e7243e83e6a04de147ebab7530754ec92cd1fbabbc9b6b00a3f90a796312f3e9 @@ -33,8 +34,10 @@ system -W ${workpath} "bzip2 -dc ${distpath}/${pp} | tar xf -" } +worksrcdir ${name}build-${version}/fpcsrc +set fpcbasepath ${prefix}/lib/${name} build.env PP=${workpath}/ppcuniversal \ - PREFIX=${destroot}${prefix}/libexec/${name} + PREFIX=${destroot}${fpcbasepath} build.target all destroot.env ${build.env} @@ -47,6 +50,7 @@ } post-destroot { +# create a symlink to the architecture dependent executable switch ${build_arch} { "x86_64" { set b "ppcx64" @@ -58,11 +62,36 @@ set b "ppcppc" } } - ln -s ${prefix}/libexec/${name}/lib/${name}/${version}/${b} ${destroot}${prefix}/libexec/${name}/bin - xinstall -d ${destroot}${prefix}/libexec/${name}/etc + ln -s ${fpcbasepath}/lib/${name}/${version}/${b} ${destroot}${fpcbasepath}/bin +# generate a configuration file + xinstall -d ${destroot}${fpcbasepath}/etc system " - ${destroot}${prefix}/libexec/${name}/bin/fpcmkcfg \ - -d basepath=${prefix}/libexec/${name}/lib/${name}/${version} \ - -o ${destroot}${prefix}/libexec/${name}/etc/fpc.cfg + ${destroot}${fpcbasepath}/bin/fpcmkcfg \ + -d basepath=${fpcbasepath}/lib/${name}/${version} \ + -o ${destroot}${fpcbasepath}/etc/fpc.cfg " +# install man + xinstall -d ${destroot}${fpcbasepath}/man + foreach d {1 5} { + file copy ${workpath}/${name}build-${version}/install/man/man${d} ${destroot}${fpcbasepath}/man + foreach f [glob ${destroot}${fpcbasepath}/man/man${d}/*.${d}] { + system "/usr/bin/gzip ${f}" + } + } + ln -s ${fpcbasepath}/man/man1/fpc.1.gz ${destroot}${prefix}/share/man/man1 + ln -s ${fpcbasepath}/man/man5/fpc.cfg.5.gz ${destroot}${prefix}/share/man/man5 } + +notes " + The compiler fpc looks for the fpc.cfg file in the following places: \n\ + - The current directory. \n\ + - Home directory, looks for .fpc.cfg \n\ + - The directory specified in the environment variable PPC_CONFIG_PATH, \n\ + and if it's not set under compilerdir/../etc. \n\ + - If it is not yet found: in /etc. \n\ + \n\ + All the files of fpc are installed in ${fpcbasepath} and \n\ + the executables are installed in ${fpcbasepath}/bin. \n\ + The fpc.cfg is installed in ${fpcbasepath}/etc to make fpc find fpc.cfg. \n\ + To customize, use ~/.fpc.cfg or /etc/fpc.cfg and call ${fpcbasepath}/bin/fpc directly. +"
participants (1)
-
takeshi@macports.org