Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added --use-system-layout option to boost formula #14749

Closed
wants to merge 1 commit into from

4 participants

@nkakuev

I've added the '--use-system-layout' option to boost formula. It passes the '--layout=system' option instead of regular '--layout=tagged' to bjam and thus removes the '-mt' suffix from resulting binaries.

The case is, the default value of this option on unix-like systems (including os x) is 'system' as it is stated in bjam man page:

The default value is 'versioned' on Windows, and
'system' on Unix.
It produces binaries without any suffixes (i. e. 'libboost_chrono.a' instead of 'libboost_chrono-mt.a') which I find very handy, because a lot of software that links with boost searches for libraries without any suffixes in their names.

The 'tagged' layout (which boost formula is using at the moment) is dedicated to be used in case of several variants of Boost mostly:

tagged -- Names of boost binaries include the
encoded build properties such as variant and
threading, but do not including compiler name
and version, or Boost version. This option is
useful if you build several variants of Boost,
using the same compiler.

I see no reason in limiting the layout to 'tagged' only.

@adamv
Owner

What does MacPorts do?

@nkakuev

It uses '--layout=tagged'.

@manphiz
Collaborator

IMHO tagged layout is reasonable because package may break if linked to the wrong type of libraries. It might also be beneficial to use versioned as now there are 2 to 3 compilers in Mac OS X, and they are somewhat not fully compatible. The problem here may be how to get the correct ${LDFLAGS} for software using boost. Currently there's no built-in tools in boost to do this.

Autotools user can take advantage of autoconf-archive which contains several m4 files for boost which handles all flavor of library names (they actually try to find all 'libboost-.*.{so,dylib.a}'). Not sure about other tools though.

@adamv
Owner

Other maintainers: help me out here when you get a chance.

@mikemcquaid
Owner

This pull seems reasonable. Rebase and I'll merge.

@mikemcquaid mikemcquaid closed this pull request from a commit
@nkakuev nkakuev boost: add option to use system layout.
Closes #14749.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
1acb25c
@norioxkimura norioxkimura referenced this pull request from a commit in norioxkimura/homebrew
@nkakuev nkakuev boost: add option to use system layout.
Closes #14749.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
ee0dc24
@cooljeanius cooljeanius referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this pull request from a commit
@nkakuev nkakuev boost: add option to use system layout.
Closes #14749.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
cb8faae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 5, 2012
  1. @nkakuev
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 Library/Formula/boost.rb
View
7 Library/Formula/boost.rb
@@ -4,6 +4,10 @@ def needs_universal_python?
build.universal? and not build.include? "without-python"
end
+def boost_layout
+ (build.include? "use-system-layout") ? "system" : "tagged"
+end
+
class UniversalPython < Requirement
def message; <<-EOS.undent
A universal build was requested, but Python is not a universal build
@@ -34,6 +38,7 @@ class Boost < Formula
option 'with-mpi', 'Enable MPI support'
option 'without-python', 'Build without Python'
option 'with-icu', 'Build regexp engine with icu support'
+ option 'use-system-layout', 'Use system layout instead of tagged'
depends_on UniversalPython.new if needs_universal_python?
depends_on "icu4c" if build.include? "with-icu"
@@ -79,7 +84,7 @@ def install
args = ["--prefix=#{prefix}",
"--libdir=#{lib}",
"-j#{ENV.make_jobs}",
- "--layout=tagged",
+ "--layout=#{boost_layout}",
"--user-config=user-config.jam",
"threading=multi",
"install"]
Something went wrong with that request. Please try again.