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)
Change History (11)
by , 15 years ago
Attachment: | boost-1.30.0-destdir.patch added |
---|
comment:2 by , 13 years ago
Milestone: | Boost 1.36.0 → To Be Determined |
---|---|
Owner: | changed from | to
comment:5 by , 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 , 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 , 9 years ago
Sorry about the missing newlines... that should have been
./bootstrap.sh --prefix=$PREFIX ...
./b2 --prefix=$DESTDIR$PREFIX install
comment:9 by , 4 years ago
Building Boost.Build engine with toolset gcc... Failed to build Boost.Build build engine Consult 'bootstrap.log' for more details
make install to DESTDIR support