Page MenuHomeFreeBSD

cad/qcad: Stop setting MAKE_JOBS_UNSAFE by only building release or debug
ClosedPublic

Authored by rakuco on Feb 16 2019, 11:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 21, 7:59 PM
Unknown Object (File)
Mar 12 2024, 9:08 PM
Unknown Object (File)
Mar 12 2024, 9:07 PM
Unknown Object (File)
Mar 12 2024, 9:07 PM
Unknown Object (File)
Mar 8 2024, 8:50 PM
Unknown Object (File)
Mar 8 2024, 7:43 PM
Unknown Object (File)
Jan 7 2024, 2:14 PM
Unknown Object (File)
Dec 20 2023, 2:38 AM
Subscribers

Details

Summary

MAKE_JOBS_UNSAFE is currently needed because we ALL_TARGET is set to the default value "all". This means we will build most of the code twice, in release and debug mode, and only install one of the versions. The parallel build seems to fail when e.g. a library is built in release mode and the debug build assumes it is present as well.

If we choose the right target to pass to make, we can make sure only the code we will use is actually built, and parallel builds work as expected. Some plugins have different names depending on the build type, so add some PLIST_SUB trickery to handle that.

While here, remove the .desktop file from the plist, as the install-desktop-entries target already adds an entry to the plist (make check-plist actually fails right now because the file does not even exist at the time it is run).

Test Plan

I've built the port with and without WITH_DEBUG, with MAKE_JOBS_NUMBER=56 and MAKE_JOBS_NUMBER=2, and all builds worked correctly. The debug package also seems to work even though some plugins have different names (I was able to import a DXF file in it).

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 22624
Build 21737: arc lint + arc unit

Event Timeline

cad/qcad/Makefile
34–35

Note that in order to support WITH_DEBUG_PORTS, WITH_DEBUG should never be tested for before including bsd.port.options.mk.

cad/qcad/pkg-plist
483–484

These could be simplified by having a:

%%DATADIR%%/plugins/designer/libqcadcustomwidgets%DEBUG%%.so

And having DEBUG set to "" or "_debug".

Side note, I doubt this built because you don't have DEBUG in PLIST_SUB in the Makefile.

Include bsd.port.options.mk, simplify plist substitutions

Thanks, I think I've addressed both of your points in this update.

cad/qcad/Makefile
34–35

This could be solved independently since my change doesn't introduce that check, but I've addressed it here in patch v2.

cad/qcad/pkg-plist
483–484

I've added DEBUG_LIB_SUFFIX to PLIST_SUB.

Side note, I doubt this built because you don't have DEBUG in PLIST_SUB in the Makefile.

As I said in the description, I did build the port with and without WITH_DEBUG to verify the change. The DEBUG substitution comes from Uses/qmake.mk (it's no longer being used though).

Sorry for the long delay.
I've adapted your changes for the current qcad version.
It's being commited shortly.
Thanks for your work!

This revision is now accepted and ready to land.Mar 28 2021, 8:05 PM