On 09/14/2012 04:58 AM, Alexandre Paz Mena wrote:
> Hi, I'm trying to generate an ebuild for mldonkey-3.1.3 from version
> 3.1.0 in a "x86_64" machine.
>
> To manually compile de project I have to export LDFLAGS="-png15" before
> running ./configure
>
> the problem is that I don't know how to export it inside the ebuild,
> I've tried with "append-ldflags -lpng15" in different places but, that
> doesn't seem to work.
>
> Does anybody have an idea?
The *real* way is to tell upstream to fix their build system. But this
works too:
--- /usr/portage/net-p2p/mldonkey/mldonkey-3.1.0.ebuild 2012-02-24
16:01:22.000000000 -0500
+++ ./mldonkey-3.1.3.ebuild 2012-09-14 09:47:39.613742734 -0400
@@ -92,7 +92,13 @@
src_compile() {
export OCAMLRUNPARAM="l=256M"
- emake || die "emake failed"
+
+ local my_extra_libs
+ if use gd; then
+ my_extra_libs="-lpng15"
+ fi
+
+ emake LIBS="${my_extra_libs}" || die "emake failed"
if ! use guionly; then
emake utils || die "emake utils failed"