Page MenuHomeFreeBSD

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

Authored by rakuco on Feb 16 2019, 11:30 PM.



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

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

Event Timeline

rakuco created this revision.Feb 16 2019, 11:30 PM
mat added inline comments.Feb 20 2019, 4:08 PM

Note that in order to support WITH_DEBUG_PORTS, WITH_DEBUG should never be tested for before including


These could be simplified by having a:


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.

rakuco updated this revision to Diff 54146.Feb 20 2019, 6:49 PM

Include, simplify plist substitutions

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


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



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/ (it's no longer being used though).

rakuco added a comment.Mar 2 2019, 6:08 PM

friendly ping?