Modify

Opened 10 years ago

Last modified 4 years ago

#1811 new Patches

Help packaging by supporting DESTDIR

Reported by: iive Owned by: Vladimir Prus
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.35.0 Severity: Optimization
Keywords: build, make, compile, install, package Cc:

Description

Usual practice for package builders is to invoke installation with

DESTDIR=/tmp/package make install

and then build package from the content of "/tmp/package" directory. When package is installed "/tmp/package/usr" becomes "/usr"

Usually this is different than --prefix, because some component may need to reference another by using the full path. For example - in pkgconfig .pc files. If prefix is set to the temporarily location the component would try to reference on the wrong place, instead of the place where the needed component is installed.

I was assured that boost doesn't have any such dependences, however for packager convenience it is relatively easy to make it follow the above convention.

The attached patch adds "${DESTDIR}" into the generated Makefile, so when make is involved normally , DESTDIR would be empty and files would be generated using the PREFIX where they are going to reside. On installation if it is not empty, it would place the files in the directory requested by the package builder.

Attachments (1)

boost-1.30.0-destdir.patch (356 bytes) - added by iive 10 years ago.
make install to DESTDIR support

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by iive

Attachment: boost-1.30.0-destdir.patch added

make install to DESTDIR support

comment:1 Changed 9 years ago by Vladimir Prus

Owner: set to Douglas Gregor

Doug, do you have any comment?

comment:2 Changed 8 years ago by Vladimir Prus

Milestone: Boost 1.36.0To Be Determined
Owner: changed from Douglas Gregor to Vladimir Prus

comment:3 Changed 5 years ago by anonymous

any determination emerging?

comment:4 Changed 5 years ago by viboes

See #7846

comment:5 Changed 5 years ago by anonymous

http://www.gnu.org/prep/standards/html_node/DESTDIR.html

btw the patch above does not apply, it was written for the old, much saner buildsystem

comment:6 Changed 4 years ago by dank@…

How do debian distros work around the lack of DESTDIR support? The key seems to be to abuse --prefix like this:

jam --without-python jam --prefix=$DESTDIR --without-python install

So I tried

./bootstrap.sh --prefix=$PREFIX ... ./b2 --prefix=$DESTDIR$PREFIX install

and it seemed to work. Haven't used this in practice yet, but it's promising.

comment:7 Changed 4 years ago by anonymous

Sorry about the missing newlines... that should have been

./bootstrap.sh --prefix=$PREFIX ...

./b2 --prefix=$DESTDIR$PREFIX install

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Vladimir Prus.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.