Opened 11 years ago

Last modified 5 months 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 11 years ago.
make install to DESTDIR support

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by iive

Attachment: boost-1.30.0-destdir.patch added

make install to DESTDIR support

comment:1 Changed 10 years ago by Vladimir Prus

Owner: set to Douglas Gregor

Doug, do you have any comment?

comment:2 Changed 9 years ago by Vladimir Prus

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

comment:3 Changed 6 years ago by anonymous

any determination emerging?

comment:4 Changed 6 years ago by viboes

See #7846

comment:5 Changed 6 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 5 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 5 years ago by anonymous

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

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

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

comment:8 Changed 5 months ago by sdeflaboffiial@…

boost offline installation not working

comment:9 Changed 5 months ago by sdeflaboffiial@…

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

comment:10 Changed 5 months ago by sdeflaboffiial@…

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

Note: See TracTickets for help on using tickets.