diff options
| author | Ben Morgan | 2015-03-23 16:38:13 +0000 |
|---|---|---|
| committer | Xu Cheng | 2015-03-29 22:01:21 +0800 |
| commit | 1795599d88c16c3edc4504f1019b9b7a875a64d6 (patch) | |
| tree | d38ae019518abe34ad55f962cefc64127ed06b62 /Library | |
| parent | 8f8061e5f84c2b9d7920506f5d2fde2723a96c45 (diff) | |
| download | brew-1795599d88c16c3edc4504f1019b9b7a875a64d6.tar.bz2 | |
keg: explicitly create cmake dir under lib
Packages supporting CMake may install configuration files for use
with CMake's find_package command. A recommended location for these
is `<prefix>/lib/cmake` which is not unique across packages. This
may cause issues for Formula using this location when their Keg
is linked.
As with pkg-config, explicitly create the `lib/cmake` folder when
linking a Keg that has installed folders/files to this location.
Also add testcase.
Closes Homebrew/homebrew#38005.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/keg.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_keg.rb | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index a4d43bc83..2271fd697 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -278,6 +278,8 @@ class Keg when 'charset.alias' then :skip_file # pkg-config database gets explicitly created when 'pkgconfig' then :mkpath + # cmake database gets explicitly created + when 'cmake' then :mkpath # lib/language folders also get explicitly created when 'dtrace' then :mkpath when /^gdk-pixbuf/ then :mkpath diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/test_keg.rb index 0fb419f0d..28cadf1c4 100644 --- a/Library/Homebrew/test/test_keg.rb +++ b/Library/Homebrew/test/test_keg.rb @@ -207,6 +207,13 @@ class LinkTests < Homebrew::TestCase assert_predicate link.lstat, :directory? end + def test_cmake_is_mkpathed + link = HOMEBREW_PREFIX.join("lib", "cmake") + @keg.join("lib", "cmake").mkpath + @keg.link + assert_predicate link.lstat, :directory? + end + def test_symlinks_are_linked_directly link = HOMEBREW_PREFIX.join("lib", "pkgconfig") |
