Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/ocaml: ChangeLog ocaml-3.10.2_rc1.ebuild
Date: Sun, 24 Feb 2008 16:39:18
Message-Id: E1JTJsh-00062l-4o@stork.gentoo.org
1 aballier 08/02/24 16:39:15
2
3 Modified: ChangeLog
4 Added: ocaml-3.10.2_rc1.ebuild
5 Log:
6 bump release candidate under pmask
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.136 dev-lang/ocaml/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/ChangeLog?rev=1.136&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/ChangeLog?rev=1.136&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/ChangeLog?r1=1.135&r2=1.136
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v
19 retrieving revision 1.135
20 retrieving revision 1.136
21 diff -u -r1.135 -r1.136
22 --- ChangeLog 24 Feb 2008 15:51:57 -0000 1.135
23 +++ ChangeLog 24 Feb 2008 16:39:14 -0000 1.136
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-lang/ocaml
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.135 2008/02/24 15:51:57 aballier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.136 2008/02/24 16:39:14 aballier Exp $
29 +
30 +*ocaml-3.10.2_rc1 (24 Feb 2008)
31 +
32 + 24 Feb 2008; Alexis Ballier <aballier@g.o>
33 + +ocaml-3.10.2_rc1.ebuild:
34 + bump release candidate under pmask
35
36 24 Feb 2008; Alexis Ballier <aballier@g.o> -ocaml-3.09.2.ebuild,
37 -ocaml-3.09.3.ebuild, -ocaml-3.10.0.ebuild:
38
39
40
41 1.1 dev-lang/ocaml/ocaml-3.10.2_rc1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/ocaml-3.10.2_rc1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/ocaml-3.10.2_rc1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ocaml-3.10.2_rc1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.10.2_rc1.ebuild,v 1.1 2008/02/24 16:39:14 aballier Exp $
51
52 inherit flag-o-matic eutils multilib versionator toolchain-funcs
53
54 EAPI="1"
55
56 MY_P="${P/_rc/+rc}"
57 DESCRIPTION="fast modern type-inferring functional programming language descended from the ML (Meta Language) family"
58 HOMEPAGE="http://www.ocaml.org/"
59 SRC_URI="http://caml.inria.fr/distrib/ocaml-$( get_version_component_range 1-2)/${MY_P}.tar.bz2"
60
61 LICENSE="QPL-1.0 LGPL-2"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
64 IUSE="emacs gdbm latex ncurses +ocamlopt tk X xemacs"
65
66 DEPEND="tk? ( >=dev-lang/tk-3.3.3 )
67 ncurses? ( sys-libs/ncurses )
68 X? ( x11-libs/libX11 x11-proto/xproto )
69 gdbm? ( sys-libs/gdbm )"
70
71 PDEPEND="emacs? ( app-emacs/ocaml-mode )
72 xemacs? ( app-xemacs/ocaml )"
73
74 S="${WORKDIR}/${MY_P}"
75 pkg_setup() {
76 # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
77 # results in relocations if gcc wants to create a PIE executable
78 if gcc-specs-pie ; then
79 append-ldflags -nopie
80 ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
81 ewarn "We have appended -nopie to ocaml build options"
82 ewarn "because linking an executable with pie while the objects are not pic will not work"
83 fi
84 }
85
86 src_unpack() {
87 unpack ${A}
88 cd "${S}"
89
90 # Fix the EXEC_STACK in ocaml compiled binaries (#153382)
91 epatch "${FILESDIR}"/${PN}-3.10.0-exec-stack-fixes.patch
92
93 # The configure script doesn't inherit previous defined variables,
94 # overwriting previous declarations of bytecccompopts, bytecclinkopts,
95 # nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
96 epatch "${FILESDIR}"/${PN}-3.10.0-configure.patch
97
98 # ocaml has automagics on libX11 and gdbm
99 # http://caml.inria.fr/mantis/view.php?id=4278
100 epatch "${FILESDIR}/${PN}-3.10.0-automagic.patch"
101
102 # Call ld with proper flags, different from gcc ones
103 # This happens when calling ocamlc -pack
104 # See comment in the patch
105 epatch "${FILESDIR}/${PN}-3.10.0-call-ld-with-proper-ldflags.patch"
106
107 }
108
109 src_compile() {
110 local myconf="--host ${CHOST}"
111
112 # dev-lang/ocaml tends to break/give unexpected results with "unsafe" CFLAGS.
113 strip-flags
114 replace-flags "-O?" -O2
115
116 # It doesn't compile on alpha without this LDFLAGS
117 use alpha && append-ldflags "-Wl,--no-relax"
118
119 use tk || myconf="${myconf} -no-tk"
120 use ncurses || myconf="${myconf} -no-curses"
121 use X || myconf="${myconf} -no-graph"
122 use gdbm || myconf="${myconf} -no-dbm"
123
124 # ocaml uses a home-brewn configure script, preventing it to use econf.
125 ./configure -prefix /usr \
126 --bindir /usr/bin \
127 --libdir /usr/$(get_libdir)/ocaml \
128 --mandir /usr/share/man \
129 --with-pthread ${myconf} || die "configure failed!"
130
131 make world || die "make world failed!"
132
133 # Native code generation can be disabled now
134 if use ocamlopt ; then
135 make opt || die "make opt failed!"
136 make opt.opt || die "make opt.opt failed!"
137 fi
138 }
139
140 src_install() {
141 make BINDIR="${D}"/usr/bin \
142 LIBDIR="${D}"/usr/$(get_libdir)/ocaml \
143 MANDIR="${D}"/usr/share/man \
144 install || die "make install failed!"
145
146 # Install the compiler libs
147 dodir /usr/$(get_libdir)/ocaml/compiler-libs
148 insinto /usr/$(get_libdir)/ocaml/compiler-libs
149 doins {utils,typing,parsing}/*.{mli,cmi,cmo,cmx,o}
150
151 # Symlink the headers to the right place
152 dodir /usr/include
153 dosym /usr/$(get_libdir)/ocaml/caml /usr/include/
154
155 # Remove ${D} from ld.conf, as the buildsystem isn't $(DESTDIR) aware
156 dosed "s:${D}::g" /usr/$(get_libdir)/ocaml/ld.conf
157
158 dodoc Changes INSTALL README Upgrading
159
160 # Create and envd entry for latex input files (this definitely belongs into
161 # CONTENT and not in pkg_postinst.
162 if use latex ; then
163 echo "TEXINPUTS=/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
164 doenvd "${T}"/99ocamldoc
165 fi
166
167 # Install ocaml-rebuild.sh script rather than keeping it in $PORTDIR
168 dosbin "${FILESDIR}/ocaml-rebuild.sh"
169 }
170
171 pkg_postinst() {
172 echo
173 ewarn "OCaml is not binary compatible from version to version, so you"
174 ewarn "need to rebuild all packages depending on it, that are actually"
175 ewarn "installed on your system. To do so, you can run:"
176 ewarn "/usr/sbin/ocaml-rebuild.sh [-h | emerge options]"
177 ewarn "Which will call emerge on all old packages with the given options"
178 echo
179 }
180
181
182
183 --
184 gentoo-commits@l.g.o mailing list