aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2015-11-05 21:56:20 +0800
committerwg <wg@FreeBSD.org>2015-11-05 21:56:20 +0800
commit348316686024d32fadc11a17f82456b7d6a7d49e (patch)
tree95b27b3f045f7a4f5baf28057e7bf89e786c3d09 /sysutils
parent9dad2ad085a30ec5ed9501d763aac987d99a08aa (diff)
downloadfreebsd-ports-gnome-348316686024d32fadc11a17f82456b7d6a7d49e.tar.gz
freebsd-ports-gnome-348316686024d32fadc11a17f82456b7d6a7d49e.tar.zst
freebsd-ports-gnome-348316686024d32fadc11a17f82456b7d6a7d49e.zip
sysutils/ipfs-go: fix build for i386
PR: 203991 Submitted by: amdmi3
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ipfs-go/Makefile11
-rw-r--r--sysutils/ipfs-go/files/extra-patch-32bit11
2 files changed, 18 insertions, 4 deletions
diff --git a/sysutils/ipfs-go/Makefile b/sysutils/ipfs-go/Makefile
index 81d23b5013a4..446ac2017687 100644
--- a/sysutils/ipfs-go/Makefile
+++ b/sysutils/ipfs-go/Makefile
@@ -16,9 +16,6 @@ USE_GITHUB= yes
GH_ACCOUNT= ipfs
GH_PROJECT= go-ipfs
-ONLY_FOR_ARCHS= amd64
-ONLY_FOR_ARCHS_REASON= Does not build on i386 due to a dependency
-
MAKE_ENV+= GOPATH=${WRKSRC}
PLIST_FILES= bin/${PORTNAME}
@@ -27,6 +24,12 @@ USE_RC_SUBR= ${PORTNAME}
STRIP= # stripping can break go binaries
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == i386
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-32bit
+.endif
+
# Prepare for possible extra modules in future
post-extract:
@${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}
@@ -41,4 +44,4 @@ do-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/cmd/ipfs/ipfs ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/sysutils/ipfs-go/files/extra-patch-32bit b/sysutils/ipfs-go/files/extra-patch-32bit
new file mode 100644
index 000000000000..44d0e647b6c8
--- /dev/null
+++ b/sysutils/ipfs-go/files/extra-patch-32bit
@@ -0,0 +1,11 @@
+--- src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-reuseport/poll/poll_bsd.go.orig 2015-08-02 14:00:34 UTC
++++ src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-reuseport/poll/poll_bsd.go
+@@ -21,7 +21,7 @@ func New(fd int) (p *Poller, err error)
+ }
+
+ p.event = syscall.Kevent_t{
+- Ident: uint64(fd),
++ Ident: uint32(fd),
+ Filter: syscall.EVFILT_WRITE,
+ Flags: syscall.EV_ADD | syscall.EV_ENABLE | syscall.EV_ONESHOT,
+ Fflags: 0,