Opened 15 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 15 years ago.
make install to DESTDIR support

Download all attachments as: .zip

Change History (11)

by iive, 15 years ago

Attachment: boost-1.30.0-destdir.patch added

make install to DESTDIR support

comment:1 by Vladimir Prus, 14 years ago

Owner: set to Douglas Gregor

Doug, do you have any comment?

comment:2 by Vladimir Prus, 13 years ago

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

comment:3 by anonymous, 10 years ago

any determination emerging?

comment:4 by viboes, 10 years ago

See #7846

comment:5 by anonymous, 10 years ago

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 by dank@…, 9 years ago

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 by anonymous, 9 years ago

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

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

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

comment:8 by sdeflaboffiial@…, 4 years ago

boost offline installation not working

comment:9 by sdeflaboffiial@…, 4 years ago

Building Boost.Build engine with toolset gcc... Failed to build Boost.Build build engine Consult 'bootstrap.log' for more details

comment:10 by sdeflaboffiial@…, 4 years ago

./bootstrap.sh --prefix=/usr/include

Note: See TracTickets for help on using tickets.