Re: INSTALL_PATH with spaces

2021-03-06 Thread Janosch Peters via macports-dev


> Am 06.03.2021 um 20:01 schrieb Jason Liu :
> 
> Technically, MacPorts does have an equivalent inside ${prefix}, and that 
> would be the ${prefix}/Library directory. You could create an Application 
> Support directory in there, e.g. ${prefix}/Library/Application 
> Support/MacPass, and have the app load its plugins from that location. In 
> this way, you would still be staying in-line with MacPorts' mtree layout.


Yes, I had thought about that. I was hesitating to go ahead with this, because 
I knew nothing about Objective-C. But thanks to Google I am now the worlds 
worst Objective-C programmer and I managed to make MacPass fetch plugins from 
${prefix}/Library/Application Support/MacPass.






Re: INSTALL_PATH with spaces

2021-03-06 Thread Jason Liu
Technically, MacPorts does have an equivalent inside ${prefix}, and that
would be the ${prefix}/Library directory. You could create an Application
Support directory in there, e.g. ${prefix}/Library/Application
Support/MacPass, and have the app load its plugins from that location. In
this way, you would still be staying in-line with MacPorts' mtree layout.

-- 
Jason Liu


On Sat, Mar 6, 2021 at 9:19 AM Janosch Peters via macports-dev <
macports-dev@lists.macports.org> wrote:

>
> > Am 06.03.2021 um 02:17 schrieb Ryan Schmidt :
> >
> > I would abandon this attempt because a port shouldn't be installing
> anything in a user's $HOME. Ports should accommodate being installed by one
> user but being used by another user, for example. And the user account we
> use on our build server is unlikely to be the same as the user account that
> the user is using.
> >
>
> You are of course right about not installing anything into $HOME. I
> changed the port to install into /Library/Application Support/MacPass and
> also changed the „parent“ app MacPass to load plugins from this location.
>
> If I were a seasoned Objective-C developer I would have changed the path
> to something below ${prefix}. If I find time to dig deeper into Objective-C
> I will do that, but for the time being I think /Library/Application Support
> is good enough.
>
> The PR for the new port MacPassHTTP is here:
> https://github.com/macports/macports-ports/pull/10162
>
>


Re: INSTALL_PATH with spaces

2021-03-06 Thread Janosch Peters via macports-dev


> Am 06.03.2021 um 02:17 schrieb Ryan Schmidt :
> 
> I would abandon this attempt because a port shouldn't be installing anything 
> in a user's $HOME. Ports should accommodate being installed by one user but 
> being used by another user, for example. And the user account we use on our 
> build server is unlikely to be the same as the user account that the user is 
> using.
> 

You are of course right about not installing anything into $HOME. I changed the 
port to install into /Library/Application Support/MacPass and also changed the 
„parent“ app MacPass to load plugins from this location.

If I were a seasoned Objective-C developer I would have changed the path to 
something below ${prefix}. If I find time to dig deeper into Objective-C I will 
do that, but for the time being I think /Library/Application Support is good 
enough.

The PR for the new port MacPassHTTP is here: 
https://github.com/macports/macports-ports/pull/10162



Re: INSTALL_PATH with spaces

2021-03-05 Thread Ryan Schmidt



On Mar 5, 2021, at 10:35, Janosch Peters wrote:

> I am working on a new port and I am struggling to set the INSTALL_PATH to 
> "/$HOME/Library/Application Support/MacPass“. This is what I tried:

I would abandon this attempt because a port shouldn't be installing anything in 
a user's $HOME. Ports should accommodate being installed by one user but being 
used by another user, for example. And the user account we use on our build 
server is unlikely to be the same as the user account that the user is using.



Re: INSTALL_PATH with spaces

2021-03-05 Thread Janosch Peters via macports-dev



> Am 05.03.2021 um 21:31 schrieb Joshua Root :
> 
> On 2021-3-6 07:12 , Janosch Peters via macports-dev wrote:
>> For some reason macports puts braces around the whole expression 
>> {INSTALL_PATH=…} I guess this is the reason the Variable is not recognized 
>> anymore.
> 
> To set INSTALL_PATH you're supposed to use the option xcode.destroot.path. 
> But it does look like xcode.destroot.settings is being used as a string 
> without flattening it first (options are actually lists). That is probably 
> easy enough to fix, but work may be required to adapt any ports that are 
> assuming the current behaviour.
> 

Thanks Joshua. Using xcode.destroot.path works great.



Re: INSTALL_PATH with spaces

2021-03-05 Thread Joshua Root

On 2021-3-6 07:12 , Janosch Peters via macports-dev wrote:


For some reason macports puts braces around the whole expression 
{INSTALL_PATH=…} I guess this is the reason the Variable is not 
recognized anymore.


To set INSTALL_PATH you're supposed to use the option 
xcode.destroot.path. But it does look like xcode.destroot.settings is 
being used as a string without flattening it first (options are actually 
lists). That is probably easy enough to fix, but work may be required to 
adapt any ports that are assuming the current behaviour.


- Josh


Re: INSTALL_PATH with spaces

2021-03-05 Thread Janosch Peters via macports-dev


> Am 05.03.2021 um 18:52 schrieb David Strubbe :
> 
> Did you try putting quotation marks around it, like 
> {"/users/janosch/Library/Application Support/MacPass"} ?
> 


I just tried this now: 
set appsupport {"/users/janosch/Library/Application Support/MacPass“} 
and
INSTALL_PATH=$appsupport


By doing it like that the variable INSTALL_PATH is not recognized anymore. The 
port installs into /Library/Application Support/MacPass.

For some reason macports puts braces around the whole expression 
{INSTALL_PATH=…} I guess this is the reason the Variable is not recognized 
anymore.

From the logs:
Build settings from command line:
ARCHS = x86_64
CLANG_CXX_LIBRARY = libc++
CODE_SIGN_IDENTITY = -
CODE_SIGN_STYLE = Manual
DSTROOT = 
/opt/local/var/macports/build/_Users_janosch_Dev_macports-ports_security_MacPassHTTP/MacPassHTTP/work/destroot
ENABLE_HARDENED_RUNTIME = NO
FRAMEWORK_SEARCH_PATHS = /opt/local/Library/Frameworks
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
HEADER_SEARCH_PATHS = /opt/local/include/MacPass
MACOSX_DEPLOYMENT_TARGET = 11.2
OBJROOT = 
/opt/local/var/macports/build/_Users_janosch_Dev_macports-ports_security_MacPassHTTP/MacPassHTTP/work/MacPassHTTP-0.3.2/build/
SDKROOT = 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
SYMROOT = 
/opt/local/var/macports/build/_Users_janosch_Dev_macports-ports_security_MacPassHTTP/MacPassHTTP/work/MacPassHTTP-0.3.2/build/
{INSTALL_PATH = /users/janosch/Library/Application Support/MacPass}

INSTALL_PATH with spaces

2021-03-05 Thread Janosch Peters via macports-dev
I am working on a new port 

 and I am struggling to set the INSTALL_PATH to "/$HOME/Library/Application 
Support/MacPass“. This is what I tried:

xcode.destroot.settings (…) INSTALL_PATH=$appsupport

Attempt 1: set appsupport {/users/janosch/Library/Application Support/MacPass}
--> Build settings from command line: {INSTALL_PATH = 
/users/janosch/Library/Application
--> Error

Attempt 2: set appsupport {/users/janosch/Library/Application\ Support/MacPass}
--> Build settings from command line: {INSTALL_PATH = 
/users/janosch/Library/Application Support/MacPass}
--> No error, but INSTALL_PATH is ignored 
--> Installs into /Library/Application Support (Xcode project setting)

Attempt 3: set appsupport {/users/janosch/Application\\ Support/MacPass}
--> Build settings from command line: {INSTALL_PATH = 
/users/janosch/Application\
--> Error

Attempt 4: set appsupport {/users/janosch}
—> Build settings from command line:  INSTALL_PATH = /users/janosch
—> No error
—> Installs to /users/janosch


So currently I am only able to provide a space-less path. But INSTALL_PATH has 
to be "/$HOME/Library/Application Support/MacPass“.

Any ideas?