From 8123374d1fcfdf0fe8e39c247b6c41883a366b0c Mon Sep 17 00:00:00 2001
From: Craig Treleaven <ctreleaven@macports.org>
Date: Sat, 4 Feb 2017 20:53:17 -0500
Subject: [PATCH] taglib: prevent boost link, add variants
Prevent opportunistic linking to boost,
Add tests variant.
Add examples variant
Fixes https://trac.macports.org/ticket/53452
---
audio/taglib/Portfile | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/audio/taglib/Portfile b/audio/taglib/Portfile
index 09ae7b4..becd236 100644
a
|
b
|
PortGroup cmake 1.0 |
5 | 5 | PortGroup github 1.0 |
6 | 6 | |
7 | 7 | github.setup taglib taglib 1.11.1 v |
| 8 | revision 2 |
8 | 9 | categories audio |
9 | 10 | license {LGPL-2 MPL-1.1} |
10 | 11 | maintainers ryandesign openmaintainer |
… |
… |
platform darwin 8 { |
31 | 32 | cmake.out_of_source yes |
32 | 33 | |
33 | 34 | configure.args-append ../${distname} \ |
34 | | -DWITH_ASF=On -DWITH_MP4=On -DBUILD_SHARED_LIBS=On |
| 35 | -DWITH_ASF=On -DWITH_MP4=On -DBUILD_SHARED_LIBS=On \ |
| 36 | -DBoost_INCLUDE_DIR="" \ |
| 37 | -DBUILD_EXAMPLES=Off |
35 | 38 | |
36 | 39 | # asf and mp4 are necessary for Amarok. |
37 | 40 | # Change to make them optional was reportedly political |
38 | 41 | # http://lists.kde.org/?l=amarok&m=125338541922769&w=2 |
| 42 | |
| 43 | variant examples description "Include example programs" { |
| 44 | configure.args-replace -DBUILD_EXAMPLES=Off -DBUILD_EXAMPLES=On |
| 45 | post-destroot { |
| 46 | xinstall -m 0755 -W ${workpath}/build/examples \ |
| 47 | tagreader tagwriter framelist strip-id3v1 \ |
| 48 | ${destroot}${prefix}/bin/ |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | variant tests description "Enable building tests." { |
| 53 | depends_test port:cppunit |
| 54 | configure.args-replace -DBUILD_SHARED_LIBS=On -DBUILD_SHARED_LIBS=Off |
| 55 | configure.args-append -DBUILD_TESTS=On |
| 56 | test.run yes |
| 57 | test.target test_runner |
| 58 | } |
| 59 | |
| 60 | post-test { |
| 61 | system "${workpath}/build/tests/test_runner" |
| 62 | } |