Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#12140 closed defect (fixed)

BUG: lua-numlua: prefix reinplaces and gcc42

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: bfulgham@…
Priority: Normal Milestone:
Component: ports Version: 1.4.42
Keywords: Cc: bfulgham@…, ryandesign (Ryan Carsten Schmidt)
Port:

Description

I don't use lua-numlua, but I have some concerns about the portfile, specifically with this part:

variant darwin powerpc {
        depends_build-append port:gcc41

        post-patch {
		reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Makefile
		reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/lib/config
		reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/src/Makefile
        }
}

variant darwin i386 {
        depends_build-append port:gcc42

        post-patch {
		reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Makefile
		reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/lib/config
		reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/src/Makefile
        }
}

My concerns:

  • It should be "platform", not "variant".
  • Though MacPorts now officially supports only Mac OS X, I see no reason to restrict the prefix reinplaces to darwin; they should be performed always.
  • Since gcc42 is now final and no longer beta, you should depend on it in all cases, not just on darwin and not just on Intel.
  • Your patchfile patch-lib-config already replaces "gcc" with "gcc-mp-4.2" and "g77" with "gfortran-mp-4.2" so the current port can't possibly work on anything other than darwin on Intel right now, unless the gcc42 port is already installed.
  • Your patchfiles replace /usr/local with /opt/local, then you reinplace /opt/local with the real prefix. While this works, I prefer the ports that put something like "@PREFIX@" into the patchfiles. While your method works, mine is better for those looking through the entire ports tree trying to identify instances where /opt/local has been incorrectly hardcoded.

If there's some reason why any of the above needs to be the way it is, please let me know. Otherwise, the attached patch should address all of these concerns. But note that I haven't attempted to install lua-numlua, either before or after these changes, so you should certainly confirm the port still works before committing the changes.

Attachments (1)

lua-numlua-patch.diff (2.7 KB) - added by ryandesign (Ryan Carsten Schmidt) 17 years ago.

Download all attachments as: .zip

Change History (3)

Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: lua-numlua-patch.diff added

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

Resolution: fixed
Status: newclosed

bfulgham committed the changes in r26434.

comment:2 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.