Lazarus port

Ryan Schmidt ryandesign at macports.org
Sat Oct 12 01:56:01 UTC 2019



On Oct 11, 2019, at 09:13, Karl-Michael Schindler wrote:

> Hi.
> 
> I am working on the Portfile for Lazarus, an integrated IDE for FreePascal similar to Delphi. Besides some smaller issues, which I am sure I can address, a major issue shows up that was suggested to present here for discussion.
> 
> The pull request is here: https://github.com/macports/macports-ports/pull/5439
> 
> The issue:
> 
> Setting the directory ${prefix}/share/lazarus to have read/write permissions for all by this line:
> 
>    system -W ${destroot}${prefix}/share "chmod -R a+rw lazarus“
> 
> The reason for this is, that it happens fairly often, that lazarus is completely recompiled, because a different lcl (lazarus component library) is selected as target or additional packages are installed, which modify the menus of lazarus. It also happens, as soon as a source file is newer than its object file (.o) or unit file (.ppu). 
> 
> The object and unit files are created in directories, usually named lib, units or tmp and only they need to be created and their content be updated. However, they are distributed all over the tree of source files and some are created when the unit is created for the first time. I think, it is a lot of work and error prone procedure, to restrict the read/write permission to these directories and keep the source files readonly. I have already tried to do so, when i was setting up the package description for fink, but i did not manage it in a reasonable time. It is just to easy to forget, where such a directory may be created.
> 
> The question is, whether this can be accepted or how to resolve it.
> 
> Thanks - Michael Schindler aka known as mischi (IRC)

I am not familiar with Lazarus but it sounds like a very strange program indeed if it requires its own files to be modified at runtime. Normally software shouldn't do anything like that.

Normally in MacPorts we want to ensure that using the `port` command (`port install`, `port upgrade`) is the only way that files get installed into the MacPorts prefix. There are many reasons for this.

If a user reports a bug, the person who receives the bug report wants to be able to try to reproduce the issue on their own system and know that they have the same software that the user has.

We want the user to be able to run `port -v installed` and to trust the version number and installation date presented there.

We want `port uninstall` to completely uninstall a port. If Lazarus recompiles itself and now installs new files that weren't there when MacPorts originally installed it, MacPorts won't know about those new files -- they won't have been recorded in the registry -- so when the port is later uninstalled, those new files would be left behind. That would be bad.

It's similar to the auto-update capability that many programs (especially GUI programs) have. If such a program is installed via MacPorts, the portfile should ensure that the auto-update feature is disabled so that the user must receive updates only via MacPorts.



More information about the macports-dev mailing list