diff options
Diffstat (limited to 'dev-lang/fpc')
-rw-r--r-- | dev-lang/fpc/Manifest | 27 | ||||
-rw-r--r-- | dev-lang/fpc/fpc-2.6.4.ebuild | 174 | ||||
-rw-r--r-- | dev-lang/fpc/fpc-3.0.0.ebuild | 161 | ||||
-rw-r--r-- | dev-lang/fpc/fpc-3.0.2-r1.ebuild | 165 | ||||
-rw-r--r-- | dev-lang/fpc/fpc-3.0.2.ebuild | 161 | ||||
-rw-r--r-- | dev-lang/fpc/metadata.xml | 13 |
6 files changed, 701 insertions, 0 deletions
diff --git a/dev-lang/fpc/Manifest b/dev-lang/fpc/Manifest new file mode 100644 index 000000000000..49e028240f84 --- /dev/null +++ b/dev-lang/fpc/Manifest @@ -0,0 +1,27 @@ +DIST fpc-2.6.2.sparc-linux.tar 33843200 SHA256 3a1918c7076e4984f8c085d0dde672907f730940214c5abca2d9513051d1cd79 SHA512 9f6ba30680bd51ccb6b627935ce2cc10dfa8671f621d5ef7d7e047b036c48934829e165c3f9bbac61bbccda8b679ee132fc26e41c4f9b66cf30966481eb81f09 WHIRLPOOL c754e925761d99bc0ad5185d19ee2f0db83a5c5bafca26051efccfeef4db5f3f29464542127d27b950a0cef6463f5333eec7dea260fd386fab74ec5ef26facf6 +DIST fpc-2.6.4-doc-html.tar.gz 4864530 SHA256 bdfa09ff5d362bc39262fa33f8f4365a4767871df17095b3cbf83582c60d0e3b SHA512 c76b15c3c9c47d687bb4760753f605a169c7e76b8b8478dc4e557d0a172f9e7ce7abb24fc1512f7eaa305807a1f4cb0a1305bb02e983f932b02aa9683026e54d WHIRLPOOL a24a99cc5a0450f377a3235b5d9d697a431e93a9825263869ee5d861dd91a3f3f18ca899beec01a8180e60da24769fb2e85c52c8be307e8fd5497dc3fc01aac9 +DIST fpc-2.6.4-fpctoc.htx.bz2 125626 SHA256 2718b88921370cadee365849224b0edbb3a2a0d4e3f2c9767f4631d246ce5050 SHA512 12fdc2755adfabbda74257b058e00072e5e11925b8e62cf7959b2acab90b3e226b8f51544a127f88fc3cd473ba9794e6c9da4e73c04ced2a0d41994b520cd33d WHIRLPOOL 73279b563c683fdb8c25546b9c3f8438a464ca6499f38e30bab2ab452c943802035753bd8c442fd17f12b02cffe79d29c2d242b38d37ab33e46553376a791331 +DIST fpc-2.6.4.arm-linux.tar 38440960 SHA256 cf0aa330a60327865125e74063ef9e62648f26ce8431fba548204e94c9da3fdc SHA512 3a11ebed39f37021201cac8a7e435d7ef3b1110d6893de7faf33651ff9b5a9aa13b6b529b0011132850386048483a55754ed8b1dba7de2e7ba9b2e881e7f0203 WHIRLPOOL 67e19376a6d5a1a5d374397e2af4d311cde5e2a06e9de31302a5c0f87ae9647c1510ab73216b4e9ab2cab0fd93050662154254cf89cc6a5c365dfad45a67ba04 +DIST fpc-2.6.4.i386-linux.tar 47718400 SHA256 3ca6271d18f9b4f48b4bd6e9500045cd18964aea62abede9cf9f130f3c72e602 SHA512 2c1c33c80553d8a331f4fb35e1b136ab195de9fa03ab566b218a265a64cc75447a697a34472fa9cceeedf1e3acd664fada2cd36d60b319ea43eed7e1f9e57615 WHIRLPOOL 4f2fa5b569907dcec030e4501670b7b2d4b13da429c9ef0900de64cda95820d05a03b290b4487ee86751264647d4218fa3d583f1054f8fb7fc9f39993c740ddb +DIST fpc-2.6.4.powerpc-linux.tar 48220160 SHA256 c1af7e353b7ac40fdd542fbcb6fbfb0cc8f8c68bc0c89e14d3aeeac4c86ed752 SHA512 a78b416a6dd59a10ad50c3549956f15fae5962b64d43be1f1d605befd035732cf860146970dcb410080f9ceb2af1a4f798434fceb11be550cb87d41c72be1810 WHIRLPOOL 4a1d285c682b31f8cdd4cd6c317bd3ad26f88894117c9de71bb982e7ba6aab5fe21075687d4b141d01ef0362c00ea7b3b665d2fd2913e5bafdb6331f049588c3 +DIST fpc-2.6.4.powerpc64-linux.tar 53975040 SHA256 20a0b4ef0810afe826c4dbf7003f72f5968c3b7caa581e3202f29e38c075fa29 SHA512 0e978f68e339f12e2c53c8641c4f0918604b6b970949159dd20c49d65dabb5253d338d180da144eea3c6102a0110c401d03efbd634885220a320fce5fc686b16 WHIRLPOOL 65c3c496a32f86372db1eb7dc81dd413b0c813313fc6acf3d09c90d37c7c923b4c03420c9043b25dc054072bcbec4b8cb1255bd2e95ad1b966001d09d7031982 +DIST fpc-2.6.4.source.tar.gz 29904088 SHA256 c16f2e6e0274c7afc0f1d2dded22d0fec98fe329b1d5b2f011af1655f3a1cc29 SHA512 653968786b40c69c3703f67cddfe7c501686cc8b3524a045498c247dc36b66a6619e9cdb5bb5ca002fb700ddc0b653f2a4298e92527df46fc09c8a69e8e9c3a5 WHIRLPOOL 73fa37e002c1674dee097955b6e199df4bd2a25e0149121810593378b9083660bf1e3eda7398b07d9e97a5a6bdbffe41018d2e40d4b86915076f097422dae417 +DIST fpc-2.6.4.x86_64-linux.tar 50350080 SHA256 196c386f927d772c447fb4c84f61b29133891d14261f0ed3aa773c2f9dda3b39 SHA512 3a993d1f978353a1d68d8ce2cd62748a875b0d0589ed8daf71ebba545b51879b09173e26245e02ac327b5d64932153a7695975c02f3f266642b4ef68e8ff48dc WHIRLPOOL eba5dde2fa6614ebc1e3969a7a8524c779cdb7a3ebdb8855872669387488d5606f0c482cc8e9f8ac9db33203edbb5e0fc01c26c61d3179cd67479167705ecc2a +DIST fpc-3.0.0-doc-html.tar.gz 5253600 SHA256 0e2f2d873750602f1ec21d879e710deec3cfc9cc015dd2694fd2e6b01f697111 SHA512 8a6fb405330eb5d4faa6bc892c7cd8b757b2e7b437e3ce19d85d5b98f702df936e1111e0ba9aac24099d20f6366a3bc8c674e087adbd463e62c2b5c615136486 WHIRLPOOL 0336fc2bfcb129e8c8bac25b85fc696cf516d08d5114df85a8b9f81c57850c66d357c169c453304edeb0c55f358d3c0dd5d3cfe6400e8b378aeb5ea57eccd41e +DIST fpc-3.0.0.i386-linux.tar 44892160 SHA256 b3bc31c7650bea785ca44bd6e5a8d685bf2dad3ae6cd34f73e5dffa05f0b6e40 SHA512 6d409aaa3827018f27813d7965f2d820e36b725ad8ec3257b89688b0bbf722b41e44ab99495050422b91db71323a081bd60c68f3919d04f17b1922264ec10e13 WHIRLPOOL a3bce4937215a706b9ad2d14a1a96e0fd02b792524b36e3455b0dea40ee3ec404fb2cd8677f2488325a85ad52c95cb9143481a00a44010f70636c73de3cf0292 +DIST fpc-3.0.0.source.tar.gz 38311370 SHA256 46354862cefab8011bcfe3bc2942c435f96a8958b245c42e10283ec3e44be2dd SHA512 18b91a10320b0c52d0486aa241dbfeb5777eebe040f393f9b3661e8ab27a338b5a8d84c9461d40c6d11b362af2deb014f7c3fc273fc11fee1fc9badf19e18b88 WHIRLPOOL 08d4dad14255fcedab822d189abcd74d80b9e0596489277dced626dfcfda8a8768d035061c080a54ce2e977e0a0074204809359a4bb8c254a0316126427510c3 +DIST fpc-3.0.0.x86_64-linux.tar 46571520 SHA256 c952a6f1fc9a32da7a3f77c309e64fa1b536516e4fae16ff58ac10d5ece85dd4 SHA512 26502cf1dfd2bb83fe860e41cb064ccc5b971d112bf05f95e92089ea71bf0e3aafe659ef4cfc4967dd62271b5ecd3468fedf63dc351944b9e8cb52d662d4a3bb WHIRLPOOL 8d99e813da5c04b7160b42d87b759890af286903db982df9ad2e61b8e11f54f92994dd6b038252541ee46d8edd9ec217281ef3dfd9e34e8357023dde6b55500a +DIST fpc-3.0.2-doc-html.tar.gz 5534720 SHA256 844b7f804526d27c7902d230357f4feee6724ac5ff5d9e8f4ec18db3a0fb9537 SHA512 1334e0bd5fbcc5d06513c9f9b1cd99b9a79782cca6224761d18ea314ba88da79517fac46c7135316f00bbaefd779080406f1b9e6c33ffb1e7b228f0c11618669 WHIRLPOOL 6bf46987f267079077a0334a816924ab17b093212f0814e68623a479c03b3efa60904c2e96a064870373af2aa6dd81336211e696466b050ea3399efbb8c4699b +DIST fpc-3.0.2.i386-linux.tar 55019520 SHA256 2ddb0a27a7c38b5679bd818ae138e15820a2caaa1bc059d935e7e9fa643ff5ef SHA512 adeba89838eceec899edf54a7655a57551319c59eda9f437aa0b6a76bcce1d3cce691a69f40a9fa57ad5c9064abf514c07b879cf40e87cf55c6e10768deb1b7d WHIRLPOOL 6ce242565ef453d7f01ab11af95c82c360531d08a5dbecc3ce6df443b73e30a1294f958bc6f4a682ed773be7edafabd787ce00c5e20c6173952fd4b567d4e1d2 +DIST fpc-3.0.2.source.tar.gz 39841597 SHA256 67fccddf5da992356f4e90d836444750ce9363608c7db8e38c077f710fcb6258 SHA512 8b2540af910c31c96c4bf6bc546f7824b2acd9509fea76b5884370d8ebecd836c167a6ef98fac46b16278027cc15aa6a9f63fb72919e3a103408dc16416e43ae WHIRLPOOL 629d735593da7ecc39033493fe4524079976ab5b2109014d88ab75dc231c512cb1baadde27b1c393b1562627c9ad5101f6f37106f4fde6cbbb21aca9311f4adc +DIST fpc-3.0.2.x86_64-linux.tar 57190400 SHA256 b5b27fdbc31b1d05b6a898f3c192d8a5083050562b29c19eb9eb018ba4482bd8 SHA512 fac103f3bf7fad5af9a435831f456c5dd7b546729f56c4b51b2a6dedceea27b331edf48024b4ec7993e50432332e8404ae63d64913d793e787756413c8d95417 WHIRLPOOL d8888928b6e5c7c39ad8e16b9eae5871581e86d6dcc588b2dafcef8c936d341b21019d69c436968b0a29942b527ce3f0bb2ec5166b961046ac1833efa6efae47 +DIST fpcbuild-2.6.4.tar.gz 55604643 SHA256 8d9c3bcfa469d9b37c05663e2775d179809e4b3443604fac7d21aa64c9a56daa SHA512 7c48fb48a3742ffe533a8a172758071c0a1129ffac09231e6969aa1d31bac346dc764598b6ae78dc9d25585a788f6ed4f2b4c39502774d4d3620f09185b807de WHIRLPOOL d2cb72917031f6ffaeb66c2e1e4f0bc18050da2437241da9e6655af4f62aa3e05c7f7c89ba88ba3f96ee20571c3e0d733bebab7a9c2e3f04aa2f0208bb1dc7f9 +DIST fpcbuild-3.0.0.tar.gz 66934428 SHA256 d5913b1d5d3d13190ae7ee72c305d5da49ac2ddc1b375b814751ef09ae5c80ec SHA512 d010cdc2dd2d4c6efe67cf005d0babb00c2a8ae70942c8b838bb690153ad72e52c0d7198eded7bbde8c77e64d28b2d7f5a220fdcd6117e5991cd11a24369d1f1 WHIRLPOOL 1b0d68b0b1f9f9825a21774269a02eb6144932af1e132932b88bc10d0d234a20b8b441b2281abf50c919e4dd8e20e97a4467b7a6498d2d13a887167f44999e76 +DIST fpcbuild-3.0.2.tar.gz 68407379 SHA256 f261ed0a361f190169fff428d65b707df1507df317fc0ed101b0e63596541b75 SHA512 dfa4865d8166b7903914ac101e48bae9761671a77e37cbfd54c2ee8eb6b2ba0e5f3ac4b55867a2ead79499dbae68cc785db531385c5b77d533945c644a2f6fe6 WHIRLPOOL 27568e7dc9d4ee3a8c30dbf68f4cd03a4fa23ddd7ede67253d3da897b48aa2fcd0a537e68432058c8cc030af18c42649e04a4a60b1a58d08b539da09e5fb9dfa +EBUILD fpc-2.6.4.ebuild 4822 SHA256 1bd56a51a465b1c7444fa108fc3691155823f995e8b0c72536179d84117f2251 SHA512 c9f972c77e85c2ed949e4c3093e2710a093cdb78f29dc3ff6108e320aa38a5c2184f0b81f1f264486ccb48462d672bf313af124c02fd7774fa6098522c5a3d66 WHIRLPOOL 9ed79d4b96c98899825b5acd8d2105b11405431dbf51b37087d9e49c9208b6507e9878487dd60094e1fad59a17e94d17aa24c85152cac6ef501ddc819ddf2e68 +EBUILD fpc-3.0.0.ebuild 4228 SHA256 4e2a1bad75a6b5a22fe679ebc9a7eb6bce1f8391f4b2b4e36329eb75a0d40ef6 SHA512 557e48b626a1845231584e19aa55dd935c889630663416f29f133520bf5e1ae22504c8213eee86dc61d42a676a711b686aca9865100a440295654986f2d6dd5b WHIRLPOOL 5b9da01589d57ad5e7af484ac90491a161330ebdeb5fcb7329f4e674c40fca2bc2e1316c45afbcd394e9732ed221ce7b5cdd7138db2dce19a833d9469df27d65 +EBUILD fpc-3.0.2-r1.ebuild 4464 SHA256 e3103982ae05cf1da70bc39d924f91d63fb631dbb6c79312e44f4c49f2b14218 SHA512 7ee63fa4801074005b248a192f0905e8d146ab06cc43b797460dce60c1418aac4ac1600bb055c428766c36ee1f28db3ab18ea45ca1313684f2a275ec86b20fa5 WHIRLPOOL 1e5cf82ef414b42090beb8403183cd9b533fd6c0b1ece22e5f35d93dfbeb15bbceeaa41e84d98b84a789e0327711f5005da13a2581ed6198923d512020a21abb +EBUILD fpc-3.0.2.ebuild 4251 SHA256 4c1a2d508f1575bcf7a0543f1aa2667b656ee53952b4862ffe7f1310516936d1 SHA512 b791aaaf9af69e00559de87f48f3c358ff3772dff3fdabc94c02b57d84265ad5df19b069ccb25a2cf58ef68408668f6720480ca697911f9faf1fd45b7687eef6 WHIRLPOOL cd6255f355ad0aa9c49f1dbbe0a3e5c3c7720d1a18ec4f4a35d5c09374b22df6ee42f74b7efbd21023252537520fe78b3d110bbb6fc42bb34e8f9f57253a997c +MISC ChangeLog 2961 SHA256 9af9ff2ca7681521126d727c633bf80a3044dc043e5f8ff2ffbd504ef620e49a SHA512 59ecb69f25ed22137f0114ba63019759236deab28a8725bbe0752ceafc6f2e00f7ff9f24bdb12ce26349eba3bef6947e7cae39185e68a7165be305877b11e2e2 WHIRLPOOL b13a5ca94e84ffa00fd7e83a17259c63a3d9e5de577004cc3c79d746406fb8cdfbf45f8fd64e81f74faa2d653b61369501646d55e3e2c8ff715766cd874e14d7 +MISC ChangeLog-2015 9613 SHA256 d49081f703912de7bbe3f5957165af90b9c2d9b39747c80031be6f7d971acca0 SHA512 2c9a0c3fa20a3b2be63695cb69f4ea17df2f354ddc460fd69134e1f0ddc6ebeb8b1081cf6aea3929df11787c887bd4c81f1a7e681c9247946eb52ae198f7a3c4 WHIRLPOOL 4c271e7ad58c5cbaae136a1fa1f9c39976432c011defbe60341d44ef253cef1e4e989867a9a735756b4773ea519e1e4527705aa4bc2d26c329d45375b205fcc4 +MISC metadata.xml 385 SHA256 5ba51aea2e0ff1b88dc58583748b547703cdd4ce8b444a1daed73e198a2bfd4c SHA512 1d1ec643e71bbaf3f38dd0f817aeba74f8871071a429b203b3b3397b114ef09e89cb5f166a08e7027e834f4f2ef6ad26049063a2d633ecbd65754945d0be1c46 WHIRLPOOL fd2e25df41c1eb0b88277664c3db423a6e5bec5583c1507eda674eeb13a11ccd4a5a0a9f0a93e4014c807a914d20a063a9c48b8859c8977f5498b341c633dcbc diff --git a/dev-lang/fpc/fpc-2.6.4.ebuild b/dev-lang/fpc/fpc-2.6.4.ebuild new file mode 100644 index 000000000000..08d31db8fecf --- /dev/null +++ b/dev-lang/fpc/fpc-2.6.4.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +HOMEPAGE="https://www.freepascal.org/" +DESCRIPTION="Free Pascal Compiler" +SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz + mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz + amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar ) + arm? ( mirror://sourceforge/freepascal/${P}.arm-linux.tar ) + ppc? ( mirror://sourceforge/freepascal/${P}.powerpc-linux.tar ) + ppc64? ( mirror://sourceforge/freepascal/${P}.powerpc64-linux.tar ) + sparc? ( mirror://sourceforge/freepascal/${PN}-2.6.2.sparc-linux.tar ) + x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar ) + doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz + https://dev.gentoo.org/~radhermit/distfiles/${P}-fpctoc.htx.bz2 )" + +SLOT="0" +LICENSE="GPL-2 LGPL-2.1-with-linking-exception" +KEYWORDS="amd64 ~arm ppc x86" +IUSE="doc ide source" + +RDEPEND="ide? ( !dev-lang/fpc-ide )" + +RESTRICT="strip" #269221 + +S=${WORKDIR}/fpcbuild-${PV}/fpcsrc + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + # Bug 475210 + if $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "fpc does not function correctly when built with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + fi +} + +src_unpack() { + case ${ARCH} in + amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;; + arm) FPC_ARCH="arm" PV_BIN=${PV} ;; + ppc) FPC_ARCH="powerpc" PV_BIN=${PV} ;; + ppc64) FPC_ARCH="powerpc64" PV_BIN=${PV} ;; + sparc) FPC_ARCH="sparc" PV_BIN=2.6.2 ;; + x86) FPC_ARCH="i386" PV_BIN=${PV} ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + unpack ${A} + + tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!" + tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!" +} + +src_prepare() { + find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die + + # let the pkg manager compress man files + sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die +} + +set_pp() { + case ${ARCH} in + amd64) FPC_ARCH="x64" ;; + arm) FPC_ARCH="arm" ;; + ppc) FPC_ARCH="ppc" ;; + ppc64) FPC_ARCH="ppc64" ;; + sparc) FPC_ARCH="sparc" ;; + x86) FPC_ARCH="386" ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + case ${1} in + bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;; + new) pp="${S}"/compiler/ppc${FPC_ARCH} ;; + *) die "set_pp: unknown argument: ${1}" ;; + esac +} + +src_compile() { + local pp + + # Using the bootstrap compiler. + set_pp bootstrap + + emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)" + + # Save new compiler from cleaning... + cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die + + # ...rebuild with current version... + emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle + + # ..and clean up afterwards + rm "${S}"/ppc${FPC_ARCH}.new || die + + # Using the new compiler. + set_pp new + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils + + if use ide ; then + cd "${S}"/ide || die + emake -j1 PP="${pp}" AS="$(tc-getAS)" + fi +} + +src_install() { + local pp + set_pp new + + set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/fpcmake" \ + INSTALL_PREFIX="${D}"/usr \ + INSTALL_DOCDIR="${D}"/usr/share/doc/${PF} \ + INSTALL_MANDIR="${D}"/usr/share/man \ + INSTALL_SOURCEDIR="${D}"/usr/lib/fpc/${PV}/source + + emake -j1 "$@" compiler_install rtl_install packages_install utils_install + + dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH} + + cd "${S}"/../install/doc || die + emake -j1 "$@" installdoc + + cd "${S}"/../install/man || die + emake -j1 "$@" installman + + if use doc ; then + cd "${S}"/../../doc || die + dodoc -r * + newdoc "${WORKDIR}"/${P}-fpctoc.htx fpctoc.htx + docompress -x /usr/share/doc/${PF}/fpctoc.htx + fi + + if use ide ; then + cd "${S}"/ide + emake -j1 "$@" install + fi + + if use source ; then + cd "${S}" || die + shift + emake -j1 PP="${D}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall + find "${D}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \; + fi + + "${D}"/usr/lib/fpc/${PV}/samplecfg "${D}"/usr/lib/fpc/${PV} "${D}"/etc || die + + sed -i "s:${D}::g" "${D}"/etc/fpc.cfg || die + + if use ide ; then + sed -e "s:${D}::g" \ + -i "${D}"/etc/fppkg.cfg \ + -i "${D}"/etc/fppkg/* \ + -i "${D}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \ + || die + fi + + rm -r "${D}"/usr/lib/fpc/lexyacc || die +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then + einfo "To read the documentation in the fpc IDE, enable the doc USE flag" + einfo "and add /usr/share/doc/${PF}/fpctoc.htx to the Help Files list." + fi +} diff --git a/dev-lang/fpc/fpc-3.0.0.ebuild b/dev-lang/fpc/fpc-3.0.0.ebuild new file mode 100644 index 000000000000..8e703c097ba0 --- /dev/null +++ b/dev-lang/fpc/fpc-3.0.0.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +HOMEPAGE="https://www.freepascal.org/" +DESCRIPTION="Free Pascal Compiler" +SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz + mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz + amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar ) + x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar ) + doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz )" + +SLOT="0" +LICENSE="GPL-2 LGPL-2.1-with-linking-exception" +KEYWORDS="~amd64 ~x86" +IUSE="doc ide source" + +RDEPEND="ide? ( !dev-lang/fpc-ide )" + +RESTRICT="strip" #269221 + +S=${WORKDIR}/fpcbuild-${PV}/fpcsrc + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + # Bug 475210 + if $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "fpc does not function correctly when built with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + fi +} + +src_unpack() { + case ${ARCH} in + amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;; + x86) FPC_ARCH="i386" PV_BIN=${PV} ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + unpack ${A} + + tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!" + tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!" +} + +src_prepare() { + find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die + + # let the pkg manager compress man files + sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die +} + +set_pp() { + case ${ARCH} in + amd64) FPC_ARCH="x64" FPC_PARCH="x86_64" ;; + x86) FPC_ARCH="386" FPC_PARCH="i386" ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + case ${1} in + bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;; + new) pp="${S}"/compiler/ppc${FPC_ARCH} ;; + *) die "set_pp: unknown argument: ${1}" ;; + esac +} + +src_compile() { + local pp + + # Using the bootstrap compiler. + set_pp bootstrap + + emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)" + + # Save new compiler from cleaning... + cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die + + # ...rebuild with current version... + emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle + + # ..and clean up afterwards + rm "${S}"/ppc${FPC_ARCH}.new || die + + # Using the new compiler. + set_pp new + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils + + if use ide ; then + cd "${S}"/ide || die + emake -j1 PP="${pp}" AS="$(tc-getAS)" + fi +} + +src_install() { + local pp + set_pp new + + #fpcbuild-3.0.0/utils/fpcm/fpcmake + #${WORKDIR}/${PN}build-${PV}/utils/fpcm/fpcmake" + #fpcbuild-3.0.0/fpcsrc/utils/fpcm/bin/x86_64-linux/fpcmake + set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/bin/${FPC_PARCH}-linux/fpcmake" \ + INSTALL_PREFIX="${D}"/usr \ + INSTALL_DOCDIR="${D}"/usr/share/doc/${PF} \ + INSTALL_MANDIR="${D}"/usr/share/man \ + INSTALL_SOURCEDIR="${D}"/usr/lib/fpc/${PV}/source + + emake -j1 "$@" compiler_install rtl_install packages_install utils_install + + dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH} + + cd "${S}"/../install/doc || die + emake -j1 "$@" installdoc + + cd "${S}"/../install/man || die + emake -j1 "$@" installman + + if use doc ; then + cd "${S}"/../../doc || die + dodoc -r * + fi + + if use ide ; then + cd "${S}"/ide + emake -j1 "$@" install + fi + + if use source ; then + cd "${S}" || die + shift + emake -j1 PP="${D}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall + find "${D}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \; + fi + + "${D}"/usr/lib/fpc/${PV}/samplecfg "${D}"/usr/lib/fpc/${PV} "${D}"/etc || die + + sed -i "s:${D}::g" "${D}"/etc/fpc.cfg || die + + if use ide ; then + sed -e "s:${D}::g" \ + -i "${D}"/etc/fppkg.cfg \ + -i "${D}"/etc/fppkg/* \ + -i "${D}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \ + || die + fi + + rm -r "${D}"/usr/lib/fpc/lexyacc || die +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then + einfo "To read the documentation in the fpc IDE, enable the doc USE flag" + fi +} diff --git a/dev-lang/fpc/fpc-3.0.2-r1.ebuild b/dev-lang/fpc/fpc-3.0.2-r1.ebuild new file mode 100644 index 000000000000..38a17395ed74 --- /dev/null +++ b/dev-lang/fpc/fpc-3.0.2-r1.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit prefix toolchain-funcs + +HOMEPAGE="https://www.freepascal.org/" +DESCRIPTION="Free Pascal Compiler" +SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz + mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz + amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar ) + x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar ) + doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz )" + +SLOT="0" +LICENSE="GPL-2 LGPL-2.1-with-linking-exception" +KEYWORDS="~amd64 ~x86" +IUSE="doc ide source" + +RDEPEND="ide? ( !dev-lang/fpc-ide )" + +RESTRICT="strip" #269221 + +S=${WORKDIR}/fpcbuild-${PV}/fpcsrc + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + # Bug 475210 + if $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "fpc does not function correctly when built with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + fi +} + +src_unpack() { + case ${ARCH} in + amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;; + x86) FPC_ARCH="i386" PV_BIN=${PV} ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + unpack ${A} + + tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!" + tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!" +} + +src_prepare() { + find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die + + # let the pkg manager compress man files + sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die + + # make the compiled binary check for fpc.cfg under the prefixed /etc/ path + hprefixify "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas +} + +set_pp() { + case ${ARCH} in + amd64) FPC_ARCH="x64" FPC_PARCH="x86_64" ;; + x86) FPC_ARCH="386" FPC_PARCH="i386" ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + case ${1} in + bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;; + new) pp="${S}"/compiler/ppc${FPC_ARCH} ;; + *) die "set_pp: unknown argument: ${1}" ;; + esac +} + +src_compile() { + local pp + + # Using the bootstrap compiler. + set_pp bootstrap + + emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)" + + # Save new compiler from cleaning... + cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die + + # ...rebuild with current version... + emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle + + # ..and clean up afterwards + rm "${S}"/ppc${FPC_ARCH}.new || die + + # Using the new compiler. + set_pp new + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils + + if use ide ; then + cd "${S}"/ide || die + emake -j1 PP="${pp}" AS="$(tc-getAS)" + fi +} + +src_install() { + local pp + set_pp new + + #fpcbuild-3.0.0/utils/fpcm/fpcmake + #${WORKDIR}/${PN}build-${PV}/utils/fpcm/fpcmake" + #fpcbuild-3.0.0/fpcsrc/utils/fpcm/bin/x86_64-linux/fpcmake + set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/bin/${FPC_PARCH}-linux/fpcmake" \ + INSTALL_PREFIX="${ED}"/usr \ + INSTALL_DOCDIR="${ED}"/usr/share/doc/${PF} \ + INSTALL_MANDIR="${ED}"/usr/share/man \ + INSTALL_SOURCEDIR="${ED}"/usr/lib/fpc/${PV}/source + + emake -j1 "$@" compiler_install rtl_install packages_install utils_install + + dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH} + + cd "${S}"/../install/doc || die + emake -j1 "$@" installdoc + + cd "${S}"/../install/man || die + emake -j1 "$@" installman + + if use doc ; then + cd "${S}"/../../doc || die + dodoc -r * + fi + + if use ide ; then + cd "${S}"/ide || die + emake -j1 "$@" install + fi + + if use source ; then + cd "${S}" || die + shift + emake -j1 PP="${ED}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall + find "${ED}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \; + fi + + "${ED}"/usr/lib/fpc/${PV}/samplecfg "${ED}"/usr/lib/fpc/${PV} "${ED}"/etc || die + + # set correct (prefixed) path for e.g. unit files + sed -i "s:${ED}:${EPREFIX}:g" "${ED}"/etc/fpc.cfg || die + + if use ide ; then + sed -e "s:${ED}::g" \ + -i "${ED}"/etc/fppkg.cfg \ + -i "${ED}"/etc/fppkg/* \ + -i "${ED}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \ + || die + fi + + rm -r "${ED}"/usr/lib/fpc/lexyacc || die +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then + einfo "To read the documentation in the fpc IDE, enable the doc USE flag" + fi +} diff --git a/dev-lang/fpc/fpc-3.0.2.ebuild b/dev-lang/fpc/fpc-3.0.2.ebuild new file mode 100644 index 000000000000..f8ea1b5b8b4c --- /dev/null +++ b/dev-lang/fpc/fpc-3.0.2.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +HOMEPAGE="https://www.freepascal.org/" +DESCRIPTION="Free Pascal Compiler" +SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz + mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz + amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar ) + x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar ) + doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz )" + +SLOT="0" +LICENSE="GPL-2 LGPL-2.1-with-linking-exception" +KEYWORDS="~amd64 ~x86" +IUSE="doc ide source" + +RDEPEND="ide? ( !dev-lang/fpc-ide )" + +RESTRICT="strip" #269221 + +S=${WORKDIR}/fpcbuild-${PV}/fpcsrc + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + # Bug 475210 + if $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "fpc does not function correctly when built with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + fi +} + +src_unpack() { + case ${ARCH} in + amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;; + x86) FPC_ARCH="i386" PV_BIN=${PV} ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + unpack ${A} + + tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!" + tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!" +} + +src_prepare() { + find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die + + # let the pkg manager compress man files + sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die +} + +set_pp() { + case ${ARCH} in + amd64) FPC_ARCH="x64" FPC_PARCH="x86_64" ;; + x86) FPC_ARCH="386" FPC_PARCH="i386" ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + case ${1} in + bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;; + new) pp="${S}"/compiler/ppc${FPC_ARCH} ;; + *) die "set_pp: unknown argument: ${1}" ;; + esac +} + +src_compile() { + local pp + + # Using the bootstrap compiler. + set_pp bootstrap + + emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)" + + # Save new compiler from cleaning... + cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die + + # ...rebuild with current version... + emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle + + # ..and clean up afterwards + rm "${S}"/ppc${FPC_ARCH}.new || die + + # Using the new compiler. + set_pp new + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean + + emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils + + if use ide ; then + cd "${S}"/ide || die + emake -j1 PP="${pp}" AS="$(tc-getAS)" + fi +} + +src_install() { + local pp + set_pp new + + #fpcbuild-3.0.0/utils/fpcm/fpcmake + #${WORKDIR}/${PN}build-${PV}/utils/fpcm/fpcmake" + #fpcbuild-3.0.0/fpcsrc/utils/fpcm/bin/x86_64-linux/fpcmake + set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/bin/${FPC_PARCH}-linux/fpcmake" \ + INSTALL_PREFIX="${ED}"/usr \ + INSTALL_DOCDIR="${ED}"/usr/share/doc/${PF} \ + INSTALL_MANDIR="${ED}"/usr/share/man \ + INSTALL_SOURCEDIR="${ED}"/usr/lib/fpc/${PV}/source + + emake -j1 "$@" compiler_install rtl_install packages_install utils_install + + dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH} + + cd "${S}"/../install/doc || die + emake -j1 "$@" installdoc + + cd "${S}"/../install/man || die + emake -j1 "$@" installman + + if use doc ; then + cd "${S}"/../../doc || die + dodoc -r * + fi + + if use ide ; then + cd "${S}"/ide || die + emake -j1 "$@" install + fi + + if use source ; then + cd "${S}" || die + shift + emake -j1 PP="${ED}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall + find "${ED}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \; + fi + + "${ED}"/usr/lib/fpc/${PV}/samplecfg "${ED}"/usr/lib/fpc/${PV} "${ED}"/etc || die + + sed -i "s:${ED}::g" "${ED}"/etc/fpc.cfg || die + + if use ide ; then + sed -e "s:${ED}::g" \ + -i "${ED}"/etc/fppkg.cfg \ + -i "${ED}"/etc/fppkg/* \ + -i "${ED}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \ + || die + fi + + rm -r "${ED}"/usr/lib/fpc/lexyacc || die +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then + einfo "To read the documentation in the fpc IDE, enable the doc USE flag" + fi +} diff --git a/dev-lang/fpc/metadata.xml b/dev-lang/fpc/metadata.xml new file mode 100644 index 000000000000..f42de96b8d5a --- /dev/null +++ b/dev-lang/fpc/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>amynka@gentoo.org</email> + </maintainer> + <use> + <flag name="ide">Build and install the Free Pascal Compiler IDE</flag> + </use> + <upstream> + <remote-id type="sourceforge">freepascal</remote-id> + </upstream> +</pkgmetadata> |