Created attachment 201474 [details]
The port with the attached Makefile creates broken links for multiply defined GH_TUPLE elements.
How to reproduce:
1. Save the attached Makefile as /usr/ports/devel/om/Makefile
2. cd /usr/ports/devel/om
3. Run: make makesum extract
4. Observe how all 'common' links except for one are broken:
> $ ls -l ./work/OpenModelica-1.14.0-dev/OMEdit/common
> lrwxr-xr-x 1 yuri users 41 Jan 28 00:28 ./work/OpenModelica-1.14.0-dev/OMEdit/common -> OpenModelica-1.14.0-dev/OMCompiler/common
> $ ls -l ./work/OpenModelica-1.14.0-dev/OMEdit/common/
> ls: ./work/OpenModelica-1.14.0-dev/OMEdit/common/: No such file or directory
> $ ls -l OpenModelica-1.14.0-dev/OMCompiler/common/
> ls: OpenModelica-1.14.0-dev/OMCompiler/common/: No such file or directory
Only the first instance of 'common' is usable: ./work/OpenModelica-1.14.0-dev/OMCompiler/common
All subsequent links that are supposed to link to it are broken.
Created attachment 206184 [details]
The attached patch solves the problem.
It should create links with the full path to the original directory.
Created attachment 206185 [details]
Attaching the sample port that is fixed by this patch.