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