Opened 11 years ago

Closed 11 years ago

#42342 closed enhancement (fixed)

LibreCAD Portfile that run's under OSX 10.7

Reported by: librecad@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: haspatch maintainer Cc:
Port: LibreCAD

Description

Hello,

attached a patch to LibreCAD's portfile so it can compile and run under OSX 10.7.

The compiler has been forced to configure.compiler macports-gcc-4.8 for < 10.9 and some funky Makefile replace needs to be executed to remove -Xarch_x86_64 from the Makefiles Finally after building the resulting LibreCAD executable be fixed with install_name_tool and local 'libgcc' libraries are copied into the local LibreCAD.app directory, this is done because of a bug in macdeployqt that didn't seem to locate the libgcc libraries (I believe there dis a bug report against it).

Attachments (2)

Portfile-LibreCAD.diff (2.8 KB) - added by librecad@… 11 years ago.
Patch for LibreCAD's portfile
Portfile-LibreCAD.2.diff (2.5 KB) - added by librecad@… 11 years ago.
New patch with suggested changes

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by librecad@…

Attachment: Portfile-LibreCAD.diff added

Patch for LibreCAD's portfile

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch maintainer added; LibreCAD removed

Some remarks:

  • Why is stdlib being forced to libc++? Surely that will at least fail on those older versions of OS X that don't have libc++ (i.e. all versions earlier than Lion), but I would expect it to cause problems on any OS X version where libc++ is not the default (i.e. all versions earlier than Mavericks)
  • Indentation should conform to our standards (4 spaces per indent)
  • Use fs-traverse instead of exec find
  • The duplicate code in the destroot block should be refactored (the last two lines, running macdeployqt and copying the app, should be moved out of the conditional)

Changed 11 years ago by librecad@…

Attachment: Portfile-LibreCAD.2.diff added

New patch with suggested changes

comment:2 Changed 11 years ago by librecad@…

Attached a new diff file that tries to solve the suggested modifications: The Portfile has been tested on OSX 10.7 and 10.9.

Here are answers to your questions:

  • Why is stdlib being forced to libc++? Old habit I guess, In the past we had issues compiling LibreCAD on older version's of OSX but we required c++11, these lines seemed to fix it (that was already a couple of years ago...), please note, I am not a guru on the subject of compilers and what's new in the world of c++ any advice is more then welcome. I removed it and verified LibreCAD compiles and runs fine on 10.7 There is no way for me to test on OSX 10.6 because Apple doesn't allow me to install 10.6 in a VM. Testing on 10.8 will be done as soon as I have a couple of hours left over this week but not worried at this point.
  • Identation is fixed to 4 characters
  • I removed exec find to fs.traverse, but had to add a ugly test for Makefile in a separate if Statement because I couldn't figure out to make a one liner, sorry I never touched Tcl in my life so I do what works for me...
  • The duplicate code is removed, that was just stupid of me

comment:3 Changed 11 years ago by librecad@…

Is there anything I can do to give this a nudge so it will be available to our users? Or, are there still any doubts?

comment:4 Changed 11 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

I guess using compiler.blacklist would have been better than to unconditionally force a dependency on MacPorts GCC 4.8, but since it works as-is…

I can't really test, but it seems none of the libraries will reference any of the GCC libs in $prefix anymore, so you could theoretically drop the lib-dependency on the package providing them that MacPorts automatically adds when using a MacPorts compiler.

Anyway, that's a minor issue, committed in r117047, let's see what the buildbots have to say.

Note: See TracTickets for help on using tickets.