diff options
author | Sergey Torokhov <torokhov-s-a@yandex.ru> | 2021-06-22 22:43:38 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-06-22 22:43:38 +0200 |
commit | a5288c69c7b6d094344bcf84cc700ae596872aa9 (patch) | |
tree | 3ef3a8ebe24beba69726575773c89665d01a54dd /dev-lang/fpc | |
parent | media-video/mkvtoolnix: drop versions (diff) | |
download | gentoo-a5288c69c7b6d094344bcf84cc700ae596872aa9.tar.gz gentoo-a5288c69c7b6d094344bcf84cc700ae596872aa9.tar.bz2 gentoo-a5288c69c7b6d094344bcf84cc700ae596872aa9.zip |
dev-lang/fpc: 3.2.2 bump
- Switch to EAPI-7.
- The "ide" sources is in "packages" subdirectory in 3.2.0 release.
It's now build unconditionally so USE="ide" is dropped.
- Remove RDEPEND "ide? (!dev-lang/fpc-ide)" as fpc-ide
was dropped from portage in 2014.
- Drop "-j1" after emake calls. If appropriate issue will take place
then it could be restored.
- In the src_install() for "ide" configs now excplicit
filenames are used within "sed".
- For amd64 the built "libpas2jslib.so" conditionally moved
to "/usr/lib64" directory.
Closes: https://github.com/gentoo/gentoo/pull/20271
Closes: https://bugs.gentoo.org/730720
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-lang/fpc')
-rw-r--r-- | dev-lang/fpc/Manifest | 5 | ||||
-rw-r--r-- | dev-lang/fpc/fpc-3.2.2.ebuild | 173 |
2 files changed, 178 insertions, 0 deletions
diff --git a/dev-lang/fpc/Manifest b/dev-lang/fpc/Manifest index e31c7ab20f94..3a24f3672fac 100644 --- a/dev-lang/fpc/Manifest +++ b/dev-lang/fpc/Manifest @@ -2,4 +2,9 @@ DIST fpc-3.0.4-doc-html.tar.gz 5658315 BLAKE2B 49f9e6f3848ad1aaad8b1621ffd5d2026 DIST fpc-3.0.4.i386-linux.tar 54691840 BLAKE2B c0951c85a3916c29e8e7391408da09abd86898a42159bfd7e637410ecf3e3a3f266a33edb5eb5ad458be92cf1fc7741eb249a512fe817a73a13207e216e0c0d2 SHA512 eee7528a69d5c745981efc90f571542047a5e6b4f1b391ad5341460035da5feffdfc4c38229134d23513239ccb33dcbc95354559e45746f1f6665541c60d0ca7 DIST fpc-3.0.4.source.tar.gz 40347617 BLAKE2B 0764c92cc379d6e70a3f33368d96244ea0203b3395a5dbcadebe6ef51b508cbc7c112f9bc7bce69ae6dae1fde03bc9e45a1a8ad70ca154cc4dd51bc93cab82f9 SHA512 fc64fd94c39f220bd7531126d6281fa2141aed61c218595a7906a025660b46629a305ff7eb023f5e1359eafdec2dba69aa5405f1bbc3c1182414968689cbb52e DIST fpc-3.0.4.x86_64-linux.tar 56842240 BLAKE2B fda488466f409d4f50501ad17edcce2740f0a7e60ac86bbfec235ccc27c619d62d2aab01aa7878ba3e174c35fd46aab98e43eda4528e98fdf3e098330eea9b26 SHA512 085110d0fade11c4e6e79c002522080eb070cebb8ebbed48ca35e3a2dc025df678516e36c7cba5f951e20c0da57dd261d673dda6839ecdf5d88aa8dfe15a56e5 +DIST fpc-3.2.2-doc-html.tar.gz 5810672 BLAKE2B 5d2c0ce35024f58d35e59034d4c071ec58214874f31ef44b8f4ea8cb68636080b61dea9a5d0ccc8062814c0b2fe3bc5269e6584ae30fedb29dbb0709ce1b3103 SHA512 0bdefd25b9f46bb6684bb4dd8f60de796cbbf81049a7e8bac4cc4bc87dd6100a42ea05601cf1bb0254e8b73ddaf5d1bf186dbf1909f1ed7db7bdf97f50df7cdc +DIST fpc-3.2.2.i386-linux.tar 85043200 BLAKE2B 9e2fae2d272c79cc7fcf4d062589bd888c342ccfb01e3f14e412bc58ff6b04928c6a7a0a4b3392b30f0864f16029d063632bd72bd9cac55e0a40a00fb726ef93 SHA512 b4f1a94d1a05901f4ffc2e07519e9b03666850211e571cbce33f0ba16d8a1d88de256c8e111579f46d56f157630dfc722a8ae9ce2b200fc784c588ea4e6bd5df +DIST fpc-3.2.2.source.tar.gz 52240052 BLAKE2B e30cf1b10c4cafd0ae2a25673678213669c29dec0549f4d7b357011e84a0a2c8ecf343cb6443798e6c36c02ae97a0c7cae7ca24829510c552968d4a58426576f SHA512 6d320b4e0805d63c40d3037f9d2078068c2c9fcdeb6ac073a6fcc19249bd6325dc542fcc7fc6dbb7e69507dcd84cf9e720e7d73925afe955e2a24e8c7d92606a +DIST fpc-3.2.2.x86_64-linux.tar 86978560 BLAKE2B 29cac8c0da4ba65cee6a0e0cd3c111202c8943ca61a02c5dfeaeb174c353db6fc07e291794ef7433f9fdf88ed694260e734bc715567c6a12292b0c8524d17f4e SHA512 534df830a951824525044479ded23ef1e61b104c0dd65c837ad0d8d9ced9eb7349925a3f759756aa95ae17e567d8b1cd5c7e2092d3c665eaac578845b48aa467 DIST fpcbuild-3.0.4.tar.gz 68908523 BLAKE2B b5c3936cf0b803aa2cc71f9c25ded470f207c540a1691cf3c2a9876c9e4eefd5c04f45b9f1f3ca17917b14ba4a90e0f16cc890b27024ff225d9d6bb25649862b SHA512 eedfeb4d25b3f4cb30ae9c8f30e0fec2405ef806fa565933cef7904d512f781730e3f023aea2f908c21250e3ced4f74fa780abad77b560728a88cedf591505b6 +DIST fpcbuild-3.2.2.tar.gz 84195619 BLAKE2B 88848308c93f949b59197649cc344498082b6520e43eb1d4413bf68eb251fcab75c863794a188a2298d9e8aba47346253a596ac630b30049ac8bd6f6934aa5a2 SHA512 75889bb54adc70a6e2cbd291476b9b12d61c8f943a05b7d16d2024de3215c935465ff43b1400c412e128e260c7f49a9c66e35c21f86cb866e671b5b60a282d82 diff --git a/dev-lang/fpc/fpc-3.2.2.ebuild b/dev-lang/fpc/fpc-3.2.2.ebuild new file mode 100644 index 000000000000..843ec9edcd9a --- /dev/null +++ b/dev-lang/fpc/fpc-3.2.2.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 )" +S="${WORKDIR}/fpcbuild-${PV}/fpcsrc" + +LICENSE="GPL-2 LGPL-2.1-with-linking-exception" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc source" +RESTRICT="strip" #269221 + +# fpc is special: it can't use CFLAGS and LDFLAGS directly +# since those are geared for running through gcc's frontend +QA_FLAGS_IGNORED=" + usr/bin/.* + usr/lib.*/.*" + +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} + + unpack "${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar" + unpack ./base.${FPC_ARCH}-linux.tar.gz +} + +src_prepare() { + default + + local f + while IFS="" read -d $'\0' -r f ; do + sed -i -e 's/ -Xs / /' "${f}" || die + done < <(find "${WORKDIR}" -name Makefile -type f -print0) + + # 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 +} + +src_configure() { + tc-ld-disable-gold # bug 475210 +} + +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 PP="${pp}" compiler_cycle AS="$(tc-getAS)" + + # Save new compiler from cleaning... + cp compiler/ppc${FPC_ARCH} ppc${FPC_ARCH}.new || die + + # ...rebuild with current version... + emake PP="${S}/ppc${FPC_ARCH}.new" AS="$(tc-getAS)" compiler_cycle + + # ..and clean up afterwards + rm ppc${FPC_ARCH}.new || die + + # Using the new compiler. + set_pp new + + emake PP="${pp}" AS="$(tc-getAS)" rtl_clean + + # ide is moved to packages directory and build unconditionally + emake PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils +} + +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 "$@" compiler_install rtl_install packages_install utils_install + + dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH} + + emake -C "${S}"/../install/doc "$@" installdoc + emake -C "${S}"/../install/man "$@" installman + + use doc && dodoc -r "${S}"/../../doc/. + + if use source ; then + shift + emake PP="${ED}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall + find "${ED}"/usr/lib/fpc/${PV}/source -name '*.o' -delete || die + 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 + + sed -e "s:${ED}::g" \ + -i "${ED}"/etc/fppkg.cfg \ + -i "${ED}"/etc/fppkg/default \ + -i "${ED}"/usr/lib/fpc/${PV}/ide/text/fp.cfg \ + || die + + rm -r "${ED}"/usr/lib/fpc/lexyacc || die + + case ${ARCH} in + amd64) + mkdir -p "${ED}"/usr/$(get_libdir) || die + mv "${ED}"/usr/lib/*.so "${ED}/usr/$(get_libdir)/" || die + ;; + esac +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] && ! use doc; then + elog "To read the documentation in the fpc IDE, enable the doc USE flag" + fi +} |