Gentoo Archives: gentoo-commits

From: "Harald van Dijk (truedfx)" <truedfx@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/fpc: fpc-2.2.4.ebuild ChangeLog
Date: Thu, 23 Apr 2009 21:05:14
Message-Id: E1Lx66R-0001rs-G8@stork.gentoo.org
1 truedfx 09/04/23 21:05:03
2
3 Modified: ChangeLog
4 Added: fpc-2.2.4.ebuild
5 Log:
6 Add fpc 2.2.4 (#266988)
7 (Portage version: 2.2_rc31/cvs/Linux i686)
8
9 Revision Changes Path
10 1.47 dev-lang/fpc/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/fpc/ChangeLog?rev=1.47&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/fpc/ChangeLog?rev=1.47&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/fpc/ChangeLog?r1=1.46&r2=1.47
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-lang/fpc/ChangeLog,v
19 retrieving revision 1.46
20 retrieving revision 1.47
21 diff -u -r1.46 -r1.47
22 --- ChangeLog 14 Mar 2009 17:29:50 -0000 1.46
23 +++ ChangeLog 23 Apr 2009 21:05:03 -0000 1.47
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-lang/fpc
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/fpc/ChangeLog,v 1.46 2009/03/14 17:29:50 truedfx Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/fpc/ChangeLog,v 1.47 2009/04/23 21:05:03 truedfx Exp $
29 +
30 +*fpc-2.2.4 (23 Apr 2009)
31 +
32 + 23 Apr 2009; Harald van Dijk <truedfx@g.o>
33 + +files/fpc-2.2.4-execstack.patch, +fpc-2.2.4.ebuild:
34 + Version bump (bug #266988)
35
36 *fpc-2.2.2-r1 (10 Mar 2009)
37
38
39
40
41 1.1 dev-lang/fpc/fpc-2.2.4.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/fpc/fpc-2.2.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/fpc/fpc-2.2.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: fpc-2.2.4.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/fpc/fpc-2.2.4.ebuild,v 1.1 2009/04/23 21:05:03 truedfx Exp $
51
52 inherit eutils
53
54 S="${WORKDIR}/fpcbuild-${PV}/fpcsrc"
55
56 HOMEPAGE="http://www.freepascal.org/"
57 DESCRIPTION="Free Pascal Compiler"
58 SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz
59 x86? ( mirror://sourceforge/freepascal/fpc-2.2.4.i386-linux.tar )
60 sparc? ( mirror://sourceforge/freepascal/fpc-2.2.4.sparc-linux.tar )
61 ppc? ( mirror://sourceforge/freepascal/fpc-2.2.4.powerpc-linux.tar )
62 amd64? ( mirror://sourceforge/freepascal/fpc-2.2.4.x86_64-linux.tar )
63 doc? ( mirror://sourceforge/freepascal/fpc-${PV}-doc-pdf.zip )"
64
65 SLOT="0"
66 LICENSE="GPL-2 LGPL-2.1 LGPL-2.1-FPC"
67 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
68 IUSE="doc source"
69
70 DEPEND="!dev-lang/fpc-bin
71 !dev-lang/fpc-source"
72 RDEPEND="${DEPEND}"
73 DEPEND="${DEPEND}
74 >=sys-devel/binutils-2.19.1-r1"
75
76 src_unpack() {
77 case ${ARCH} in
78 x86) FPC_ARCH="i386" PV_BIN=2.2.4 ;;
79 ppc) FPC_ARCH="powerpc" PV_BIN=2.2.4 ;;
80 amd64) FPC_ARCH="x86_64" PV_BIN=2.2.4 ;;
81 sparc) FPC_ARCH="sparc" PV_BIN=2.2.4 ;;
82 *) die "This ebuild doesn't support ${ARCH}." ;;
83 esac
84
85 unpack ${A} || die "Unpacking ${A} failed!"
86
87 tar -xf binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!"
88 tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!"
89
90 cd "${S}"
91 epatch "${FILESDIR}"/${P}-execstack.patch
92 sed -i -e 's/ -Xs / /g' $(find . -name Makefile) || die "sed failed"
93 }
94
95 set_pp() {
96 case ${ARCH} in
97 x86) FPC_ARCH="386" ;;
98 ppc) FPC_ARCH="ppc" ;;
99 amd64) FPC_ARCH="x64" ;;
100 sparc) FPC_ARCH="sparc" ;;
101 *) die "This ebuild doesn't support ${ARCH}." ;;
102 esac
103
104 case ${1} in
105 bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;;
106 new) pp="${S}"/compiler/ppc${FPC_ARCH} ;;
107 *) die "set_pp: unknown argument: ${1}" ;;
108 esac
109 }
110
111 src_compile() {
112 local pp
113
114 # Using the bootstrap compiler.
115 set_pp bootstrap
116
117 emake -j1 PP="${pp}" compiler_cycle || die "make compiler_cycle failed!"
118
119 # Save new compiler from cleaning...
120 cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new
121
122 # ...rebuild with current version...
123 emake -j1 PP="${S}"/ppc${FPC_ARCH}.new compiler_cycle || die "make compiler_cycle failed!"
124
125 # ..and clean up afterwards
126 rm "${S}"/ppc${FPC_ARCH}.new
127
128 # Using the new compiler.
129 set_pp new
130
131 emake -j1 PP="${pp}" rtl_clean || die "make rtl_clean failed"
132
133 emake -j1 PP="${pp}" rtl packages_all utils || die "make failed"
134
135 # Use pregenerated docs to avoid sandbox violations (#146804)
136 #if use doc ; then
137 # cd "${S}"/../fpcdocs
138 # emake -j1 pdf || die "make pdf failed!"
139 #fi
140 }
141
142 src_install() {
143 local pp
144 set_pp new
145
146 set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/fpcmake" \
147 INSTALL_PREFIX="${D}"usr \
148 INSTALL_DOCDIR="${D}"usr/share/doc/${P} \
149 INSTALL_MANDIR="${D}"usr/share/man \
150 INSTALL_SOURCEDIR="${D}"usr/lib/fpc/${PV}/source
151
152 emake -j1 "$@" compiler_install rtl_install packages_install \
153 utils_install || die "make install failed!"
154
155 dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH}
156
157 if ! has nodoc ${FEATURES} ; then
158 cd "${S}"/../install/doc
159 emake -j1 "$@" installdoc || die "make installdoc failed!"
160 fi
161
162 if ! has noman ${FEATURES} ; then
163 cd "${S}"/../install/man
164 emake -j1 "$@" installman || die "make installman failed!"
165 fi
166
167 if ! has nodoc ${FEATURES} && use doc ; then
168 insinto /usr/share/doc/${PF}
169 doins "${WORKDIR}"/doc/*.pdf
170 #cd "${S}"/../fpcdocs
171 #emake -j1 "$@" pdfinstall || die "make pdfinstall failed"
172 fi
173
174 if use source ; then
175 cd "${S}"
176 shift
177 emake -j1 PP="${D}"usr/bin/ppc${FPC_ARCH} "$@" sourceinstall || die "make sourceinstall failed!"
178 find "${D}"usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \;
179 fi
180
181 "${D}"usr/lib/fpc/${PV}/samplecfg "${D}"usr/lib/fpc/${PV} "${D}"etc || die "samplecfg failed"
182 sed -i -e "s:${D}:/:g" "${D}"etc/fpc.cfg || die "sed fpc.cfg failed"
183
184 rm -rf "${D}"usr/lib/fpc/lexyacc
185 }
186
187 pkg_postinst() {
188 # Using ewarn - it is really important for other ebuilds (e.g. Lazarus)
189 if [ -e /etc/._cfg0000_fpc.cfg ]; then
190 echo
191 ewarn "Make sure you etc-update /etc/fpc.cfg"
192 ewarn "Otherwise FPC will not work correctly."
193 echo
194 ebeep
195 fi
196
197 ewarn "The default configuration for fpc strips executables. This"
198 ewarn "will cause QA notices in ebuilds for software using fpc."
199 ewarn "You can remove -Xs from /etc/fpc.cfg to avoid this."
200 }