Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] gen_usr_ldscript & --libdir=/lib
Date: Mon, 24 Dec 2012 19:08:45
Message-Id: 201212241408.30068.vapier@gentoo.org
1 On Friday 14 December 2012 05:43:41 Fabian Groffen wrote:
2 > gen_usr_ldscript() vs --libdir=/lib. Questions on why, and if it makes
3 > sense to remove gen_usr_ldscript in favour of --libdir. WilliamH will
4 > open a discussion on gentoo-dev ML.
5
6 these are orthogonal issues. not every package using gen_usr_ldscript has a
7 --libdir option, and even the ones that do commonly install more than one
8 library but we really only want to move one. plus with static libs, --libdir
9 will install those into the wrong place.
10
11 so for most packages, the choice is either:
12 src_configure() { econf ; }
13 src_install() { default ; gen_usr_ldscript -a bar ; }
14 or:
15 src_configure() { econf --libdir=/lib ; }
16 src_install() {
17 default
18 dodir /usr/$(get_libdir)
19 mv "${ED}"/$(get_libdir)/lib{f,x}* "${ED}"/usr/$(get_libdir)/ || die
20 if use static-libs ; then
21 mv "${ED}"/$(get_libdir)/*.{a,la} \
22 "${ED}"/usr/$(get_libdir)/ || die
23 fi
24 }
25
26 the only time --libdir=/lib makes sense to use is when the path itself then
27 gets used for things other than just the installation of libraries and there's
28 no knob to control those other things. like rules.d files.
29
30 i.e. saying "we should get rid of gen_usr_ldscript and use --libdir=/lib"
31 makes absolutely no sense. it's just begging for people to screw things up
32 constantly and waste developer time for 0 gain.
33 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] gen_usr_ldscript & --libdir=/lib "Diego Elio Pettenò" <flameeyes@×××××××××.eu>