Re: [macports-ports] branch master updated: aqua/x2goclient: update to 4.1.0.0.

2017-02-25 Thread Mihai Moldovan
On 23.02.2017 11:24 AM, Ryan Schmidt wrote:
>> +post-patch {
>> +foreach filename [list "src/onmainwindow.cpp" "src/pulsemanager.cpp"] {
>> +reinplace -W "${worksrcpath}" "s#@@PREFIX@@#${prefix}#g" $filename
>> +}
>> +}
> 
> You don't need a foreach loop here. reinplace accepts multiple filenames.
> 
> 
> post-patch {
> reinplace -W ${worksrcpath}/src "s#@@PREFIX@@#${prefix}#g" 
> onmainwindow.cpp pulsemanager.cpp
> }


Thanks, I'll try to remember that. Definitely easier to read than a foreach 
loop.

This patching is temporary only, though, and will vanish with the next upstream
version. I have since reworked the upstream package  so that qmake takes a
MACPORTS_PREFIX parameter which is much, much cleaner. Forgot about that stuff
before the upstream release, though.

Ref:
http://code.x2go.org/gitweb?p=x2goclient.git;a=commitdiff;h=6ff714b0ee5372576ce209daa033ae6fd31f1927



Mihai



signature.asc
Description: OpenPGP digital signature


Re: [macports-ports] branch master updated: aqua/x2goclient: update to 4.1.0.0.

2017-02-23 Thread Ryan Schmidt

> On Feb 23, 2017, at 02:56, Mihai Moldovan  wrote:
> 
> Mihai Moldovan (Ionic) pushed a commit to branch master
> in repository macports-ports.
> 
> 
> https://github.com/macports/macports-ports/commit/5ef7d72e34586081b904c15830ec70741f758566
> 
> The following commit(s) were added to refs/heads/master by this push:
> 
>  new 5ef7d72  aqua/x2goclient: update to 4.1.0.0.
> 
> 5ef7d72 is described below
> 
> 
> commit 5ef7d72e34586081b904c15830ec70741f758566
> 
> Author: Mihai Moldovan 
> AuthorDate: Thu Feb 23 09:54:32 2017 +0100
> 
> aqua/x2goclient: update to 4.1.0.0.
> 
> Fix startup failure and non-default prefixes via patches/reinplaces.


> +post-patch {
> +foreach filename [list "src/onmainwindow.cpp" "src/pulsemanager.cpp"] {
> +reinplace -W "${worksrcpath}" "s#@@PREFIX@@#${prefix}#g" $filename
> +}
> +}

You don't need a foreach loop here. reinplace accepts multiple filenames.


post-patch {
reinplace -W ${worksrcpath}/src "s#@@PREFIX@@#${prefix}#g" onmainwindow.cpp 
pulsemanager.cpp
}