Changeset 73290


Ignore:
Timestamp:
Nov 9, 2010, 1:25:08 PM (8 years ago)
Author:
michaelld@…
Message:

liblastfm changes:

  • fixes ticket #22924 by reinstating "-arch foo -arch" QMake output correction, with explanation.
  • allow for use of ccache/distcc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/audio/liblastfm/Portfile

    r73120 r73290  
    5151}
    5252
    53 # QMake does not handle this flag.
    54 configure.universal_args-delete --disable-dependency-tracking
    55 configure.args-delete  --disable-dependency-tracking
    56 
    5753configure.pre_args  --prefix ${prefix}
    5854configure.args      --release
     55configure.universal_args
     56
     57# when Qt is installed without +universal, and qmake is called with
     58# "QMAKE_LDFLAGS += -arch foo" (or this is in the .qmake.cache, or
     59# some other location that is used by QMake), and "foo" is the native
     60# arch, then, at least sometimes, qmake will erroneously remove the
     61# second "foo" but leave the "-arch" flag -- generating an error at
     62# linking.  Not sure if this is the case with +debug; does not matter
     63# for this port, since it has not debug variant.
     64post-configure {
     65    if {![variant_isset universal]} {
     66        # (1) find subdir Makefile names from top-level
     67        # Makefile, and have 'make' create each in turn.
     68        foreach fixfile [exec grep -e "Makefile\[\^ \]\*:" \
     69                ${worksrcpath}/Makefile | \
     70                sed -e "s@\\(\[^ \]*/Makefile\[^ \]*\\):\[^ \]*@\\1@g"] {
     71            system "cd ${worksrcpath} && \
     72                    PATH=${qt_bins_dir}:$env(PATH) \
     73                    make ${fixfile}"
     74        }
     75
     76        # (2) find all of the just-created Makefile*'s, and reinplace
     77        # the offending QMake flaw
     78        foreach fixfile [exec find ${worksrcpath} -name "Makefile*"] {
     79            reinplace "s@\\(-arch \[^ \]*\\) -arch@\\1@" ${fixfile}
     80        }
     81    }
     82}
     83
     84# allow ccache, if specified by the user
     85pre-build {
     86    if {[tbool configure.ccache]} {
     87        build.post_args "CCACHE=ccache"
     88    }
     89}
Note: See TracChangeset for help on using the changeset viewer.