Bug 200003 - net/luasocket chokes on CC=/nxb-bin/usr/bin/cc
Summary: net/luasocket chokes on CC=/nxb-bin/usr/bin/cc
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: David Thiel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 16:43 UTC by Sean Bruno
Modified: 2015-08-11 18:10 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (lx)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer freebsd_triage 2015-05-06 16:43:03 UTC
I don't think the sed syntax is quite right in this port post-patch to handle the case where CC is an absolute path to a compiler.  This breaks cross compilation for this port.

http://chips.ysv.freebsd.org/data/11armv6-default/2015-05-04_04h43m53s/logs/errors/lua51-luasocket-3.0r1.log

I'll attempt to do something that looks like this and submit a patch.

https://svnweb.freebsd.org/ports/head/devel/zpu-binutils/Makefile?r1=377492&r2=377491&pathrev=377492
Comment 1 Sean Bruno freebsd_committer freebsd_triage 2015-06-29 17:31:55 UTC
This seems to be a reasonable fix for this problem:

Index: net/luasocket/Makefile
===================================================================
--- net/luasocket/Makefile      (revision 390646)
+++ net/luasocket/Makefile      (working copy)
@@ -26,7 +26,7 @@
 post-extract:
        @${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile
        @${MV} ${WRKSRC}/src/makefile ${WRKSRC}/src/Makefile
-       @${REINPLACE_CMD} -e 's/gcc/${CC}/g' ${WRKSRC}/src/Makefile
+       @${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/src/Makefile
        @${REINPLACE_CMD} -e 's/CFLAGS=/CFLAGS\+=/g' ${WRKSRC}/src/Makefile
        @${REINPLACE_CMD} -e 's/LDFLAGS=/LDFLAGS\+=/g' ${WRKSRC}/src/Makefile
        @${REINPLACE_CMD} -e 's/prefix/PREFIX/g' ${WRKSRC}/src/Makefile


http://tasty.ysv.freebsd.org/data/11armv6-default/2015-06-29_17h31m08s/logs/lua51-luasocket-3.0r1.log
Comment 2 Sean Bruno freebsd_committer freebsd_triage 2015-08-11 18:10:02 UTC
r392212 | amdmi3 | 2015-07-15 13:39:32 -0700 (Wed, 15 Jul 2015) | 10 lines

- Use | as separator in sed regexps to not stumble on ${CC} containing slashes
- Add LICENSE_FILE
- Sort USES
- Strip libraries
- Unsilence INSTALL_*

PR:             201269
Submitted by:   amdmi3
Approved by:    maintainer timeout (lx, 2 weeks)