[70730] trunk/dports/aqua
michaelld at macports.org
michaelld at macports.org
Thu Aug 19 07:56:41 PDT 2010
Revision: 70730
http://trac.macports.org/changeset/70730
Author: michaelld at macports.org
Date: 2010-08-19 07:56:41 -0700 (Thu, 19 Aug 2010)
Log Message:
-----------
Better way to retrieve phonon version info.
Fixes phonon header file containing phonon version.
Modified Paths:
--------------
trunk/dports/aqua/qt4-mac/Portfile
trunk/dports/aqua/qt4-mac-devel/Portfile
Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile 2010-08-19 14:42:40 UTC (rev 70729)
+++ trunk/dports/aqua/qt4-mac/Portfile 2010-08-19 14:56:41 UTC (rev 70730)
@@ -46,24 +46,37 @@
patch-qaudioinput-readyread.diff \
patch-qaudiooutput-period-size.diff
-post-extract {
+post-patch {
# correct phonon version info.
# (1) retrieve the correct info (minor, patch)
+ set phonon_major_version \
+ [exec grep "set\[^\\$\]*PHONON_LIB_MAJOR_VERSION" \
+ ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
+ grep set | tr -dc '\[0-9\]']
set phonon_minor_version \
- [exec grep PHONON_LIB_MINOR_VERSION \
+ [exec grep "set\[^\\$\]*PHONON_LIB_MINOR_VERSION" \
${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
grep set | tr -dc '\[0-9\]']
set phonon_patch_version \
- [exec grep PHONON_LIB_PATCH_VERSION \
+ [exec grep "set\[^\\$\]*PHONON_LIB_PATCH_VERSION" \
${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
grep set | tr -dc '\[0-9\]']
# (2) correct that which Qt uses
+ # (a) in src/phonon/phonon.pro
# (there has GOT to be a better way :)
reinplace "/PHONON_MINOR_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_minor_version}\\2@" \
${worksrcpath}/src/phonon/phonon.pro
reinplace "/PHONON_PATCH_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_patch_version}\\2@" \
${worksrcpath}/src/phonon/phonon.pro
+
+ # (b) in src/3rdparty/phonon/phonon/phononnamespace.h
+ # use the .h.in file & sed replace variables
+ system "sed -e 's/@PHONON_LIB_MAJOR_VERSION@/${phonon_major_version}/g' \
+-e 's/@PHONON_LIB_MINOR_VERSION@/${phonon_minor_version}/g' \
+-e 's/@PHONON_LIB_PATCH_VERSION@/${phonon_patch_version}/g' \
+< ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h.in \
+> ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h"
}
# The build process uses -fconstant-cfstrings.
Modified: trunk/dports/aqua/qt4-mac-devel/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac-devel/Portfile 2010-08-19 14:42:40 UTC (rev 70729)
+++ trunk/dports/aqua/qt4-mac-devel/Portfile 2010-08-19 14:56:41 UTC (rev 70730)
@@ -40,24 +40,37 @@
# but configure calls it, by default, with a C compiler.
patchfiles patch-precomp.test.diff
-post-extract {
+post-patch {
# correct phonon version info.
# (1) retrieve the correct info (minor, patch)
+ set phonon_major_version \
+ [exec grep "set\[^\\$\]*PHONON_LIB_MAJOR_VERSION" \
+ ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
+ grep set | tr -dc '\[0-9\]']
set phonon_minor_version \
- [exec grep PHONON_LIB_MINOR_VERSION \
+ [exec grep "set\[^\\$\]*PHONON_LIB_MINOR_VERSION" \
${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
grep set | tr -dc '\[0-9\]']
set phonon_patch_version \
- [exec grep PHONON_LIB_PATCH_VERSION \
+ [exec grep "set\[^\\$\]*PHONON_LIB_PATCH_VERSION" \
${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
grep set | tr -dc '\[0-9\]']
# (2) correct that which Qt uses
+ # (a) in src/phonon/phonon.pro
# (there has GOT to be a better way :)
reinplace "/PHONON_MINOR_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_minor_version}\\2@" \
${worksrcpath}/src/phonon/phonon.pro
reinplace "/PHONON_PATCH_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_patch_version}\\2@" \
${worksrcpath}/src/phonon/phonon.pro
+
+ # (b) in src/3rdparty/phonon/phonon/phononnamespace.h
+ # use the .h.in file & sed replace variables
+ system "sed -e 's/@PHONON_LIB_MAJOR_VERSION@/${phonon_major_version}/g' \
+-e 's/@PHONON_LIB_MINOR_VERSION@/${phonon_minor_version}/g' \
+-e 's/@PHONON_LIB_PATCH_VERSION@/${phonon_patch_version}/g' \
+< ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h.in \
+> ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h"
}
# The build process uses -fconstant-cfstrings.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100819/b7bed9d3/attachment-0001.html>
More information about the macports-changes
mailing list