Bug 191927 - bugfixes: lang/rust fix build failure and Bug #189357
Summary: bugfixes: lang/rust fix build failure and Bug #189357
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks: 189357
  Show dependency treegraph
 
Reported: 2014-07-17 16:51 UTC by mitsururike
Modified: 2014-07-28 23:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mitsururike 2014-07-17 16:51:30 UTC
bugfixes: fix build failure and Bug #189357
    
    - gpy fails with an error
        ImportError: This platform lacks a functioning sem_open implementation,
        therefore, the required synchronization primitives needed will not funct
        see issue 3770.
      and build fails.
    
    - the patch posted to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=1893
      has not been applied yet.

Fix:
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 41e5b4c..98fea06 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -3,6 +3,7 @@
 
 PORTNAME=	rust
 PORTVERSION=	0.11.0
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	http://static.rust-lang.org/dist/:src \
 		http://static.rust-lang.org/stage0-snapshots/:boot
@@ -64,6 +65,6 @@ post-patch:
 
 post-install:
 	@${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest
-	${STRIP_CMD} `${GREP} -v -e '^@dirrm' -e '^man' -e 'rlib$$' ${PLIST} | ${SED} 's:^:${STAGEDIR}${PREFIX}/:g'`
+	${STRIP_CMD} `${GREP} -v -e '^@dirrm' -e '^man' -e 'rlib$$' -e '\.a$$' ${PLIST} | ${SED} 's:^:${STAGEDIR}${PREFIX}/:g'`
 
 .include <bsd.port.post.mk>
diff --git a/lang/rust/files/patch-src__libuv__gyp_uv.py b/lang/rust/files/patch-src__libuv__gyp_uv.py
new file mode 100644
index 0000000..fdb69da
--- /dev/null
+++ b/lang/rust/files/patch-src__libuv__gyp_uv.py
@@ -0,0 +1,12 @@
+--- ./src/libuv/gyp_uv.py.orig	2014-06-28 04:53:11.000000000 +0900
++++ ./src/libuv/gyp_uv.py	2014-07-17 12:32:13.000000000 +0900
+@@ -96,6 +96,9 @@
+ 
+   if sys.platform == 'darwin' and '-DOS=android' in sys.argv[1:]:
+     sys.platform='linux'    
++
++  if sys.platform.startswith('freebsd'):
++    args.append('--no-parallel')
+     
+   gyp_args = list(args)
+   print gyp_args
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-24 11:59:05 UTC
no maintainer for this port, indicate patch-ready
Comment 2 John Marino freebsd_committer freebsd_triage 2014-07-28 23:06:49 UTC
Author: marino
Date: Mon Jul 28 22:58:33 2014
New Revision: 363270
URL: http://svnweb.freebsd.org/changeset/ports/363270
QAT: https://qat.redports.org/buildarchive/r363270/

Log:
  lang/rust: Fix link issue and build failure
  
  [1] Linking fails with missing reference to __morestack symbol
  [2] gpy fails with error about missing sem implementation
  
  PR:		189357 [1]
  PR:		191927 [2]
  Submitted by:	bertrand.augereau (gmail) [1]
  Submitted by:	maintainer: mitsuruike (gmail) [2]

Added:
  head/lang/rust/files/patch-src__libuv__gyp_uv.py   (contents, props changed)
Modified:
  head/lang/rust/Makefile