Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157194859
D3930.id9479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D3930.id9479.diff
View Options
Index: devel/Makefile
===================================================================
--- devel/Makefile
+++ devel/Makefile
@@ -496,6 +496,7 @@
SUBDIR += f77flow
SUBDIR += fam
SUBDIR += fastcrc
+ SUBDIR += fb-adb
SUBDIR += fb303
SUBDIR += fc++
SUBDIR += ffcall
Index: devel/fb-adb/Makefile
===================================================================
--- /dev/null
+++ devel/fb-adb/Makefile
@@ -0,0 +1,117 @@
+# $FreeBSD$
+
+PORTNAME= fb-adb
+DISTVERSION= 1.4.4-101
+DISTVERSIONSUFFIX= -g31eb7b3 # has non-upstreamed patches (pull #35)
+CATEGORIES= devel
+# XXX Move NDK into a separate port once more ports depend on it
+MASTER_SITES= https://dl.google.com/android/ndk/:ndk
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ ${DISTNAME_ndk}.bin:ndk,p7zip
+DISTNAME_ndk= android-ndk-r10e-linux-${LINUX_RPM_ARCH:C/i.86/x86/}
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= Better shell for Android devices
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${LINUX_BASE_PORT} \
+ xxd:${PORTSDIR}/editors/vim-lite \
+ ${BASH_CMD}:${PORTSDIR}/shells/${BASH_CMD:T}
+RUN_DEPENDS= adb:${PORTSDIR}/devel/android-tools-adb
+
+ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS_REASON= requires linuxulator to use Android NDK in order \
+ to cross-build target stubs
+
+USE_GITHUB= yes
+GH_ACCOUNT= facebook
+
+USES= autoreconf:outsource gmake ncurses perl5 python:3,build
+USE_LINUX= yes # build
+USE_PERL5= build # pod2man
+WRKSRC_ndk= ${WRKDIR}/${DISTNAME_ndk:C/(-[^-]+){2}$//}
+BASH_CMD?= bash # can be zsh
+NDK_SHELL= ${SETENV} UNAME_s=Linux UNAME_m=${LINUX_RPM_ARCH} ${SH}
+GNU_CONFIGURE= yes
+CONFIG_SITE= # partial cross-build
+CONFIGURE_ENV= ANDROID_NDK="${WRKSRC_ndk}" \
+ ANDROID_NDK_SHELL="${NDK_SHELL}" \
+ NDK_TMPDIR="${WRKDIR}" \
+ PYTHON3="${PYTHON_CMD}" \
+ HOST_CFLAGS="${CPPFLAGS} ${CFLAGS:N-[Og][0-9]:N-pipe}" \
+ STUB_CFLAGS="${STUB_CFLAGS}" \
+ CPPFLAGS="" CFLAGS="${CFLAGS:M-[Og][0-9]} ${CFLAGS:M-pipe}" \
+ HOST_LDFLAGS="${LDFLAGS} ${LIBS}" \
+ STUB_LDFLAGS="${STUB_LDFLAGS}" \
+ LDFLAGS="" LIBS=""
+# XXX SET_LATE_CONFIGURE_ARGS doesn't respect CONFIGURE_CMD
+CONFIGURE_ARGS= --mandir="${MANPREFIX}/man"
+INSTALL_TARGET= install-strip
+PLIST_FILES= bin/${PORTNAME} \
+ man/man1/${PORTNAME}.1.gz
+
+OPTIONS_DEFINE= BASH
+
+BASH_DESC= Install JSON parser used by bash-completion
+BASH_RUN_DEPENDS= jq:${PORTSDIR}/textproc/jq
+
+.include <bsd.port.options.mk>
+
+post-extract:
+# XXX gold: fatal error: a.out: Invalid argument
+ @for f in $$(${FIND} ${WRKSRC_ndk} -type l -name '*-ld'); do \
+ (cd $${f%/*} && ${LN} -sf $${f##*/}.bfd $${f##*/}); \
+ done
+
+.if ${OPSYS} == DragonFly
+IGNORE= ${ONLY_FOR_ARCHS_REASON}
+.endif
+
+# Extract :p7zip files with 7z(1) if libarchive cannot handle x86_64 sfx
+# or is too old to have 7zip reader
+.if defined(OVERRIDE_LINUX_BASE_PORT) || \
+ (${OPSYS} == FreeBSD && ${OSVERSION} < 1000009)
+EXTRACT_ONLY+= ${DISTFILES:N*\:*p7zip*:C/:.*//}
+EXTRACT_DEPENDS+=${P7ZIP_CMD}:${PORTSDIR}/archivers/p7zip
+
+P7ZIP_CMD?= 7z
+P7ZIP_ARGS?= x -bd -y -o${WRKDIR} >/dev/null
+
+_OPTIONS_extract+= 520:do-p7zip-extract
+do-p7zip-extract:
+ @for f in ${DISTFILES:M*\:*p7zip*:C/:.*//}; do \
+ if ! ${P7ZIP_CMD} ${P7ZIP_ARGS} ${_DISTDIR}/$$f; then \
+ return 1; \
+ fi; \
+ done
+.endif
+
+# XXX Similar to USES=qmake:outsource, merge into Mk/Uses/autoreconf.mk
+.if defined(USES) && ${USES:Mautoreconf\:outsource}
+USES:= autoreconf:build ${USES:Nautoreconf*}
+CONFIGURE_CMD= ${AUTORECONF_WRKSRC}/${CONFIGURE_SCRIPT}
+CONFIGURE_WRKSRC= ${WRKDIR}/.build
+BUILD_WRKSRC= ${CONFIGURE_WRKSRC}
+INSTALL_WRKSRC= ${CONFIGURE_WRKSRC}
+AUTORECONF_WRKSRC?= ${WRKSRC}
+
+_USES_configure+= 470:do-autoreconf
+do-autoreconf:
+.for f in AUTHORS ChangeLog INSTALL NEWS README
+# Don't modify time stamps if the files already exist
+ @test -e ${AUTORECONF_WRKSRC}/${f} || ${TOUCH} ${AUTORECONF_WRKSRC}/${f}
+.endfor
+ @(cd ${AUTORECONF_WRKSRC} && ${LOCALBASE}/bin/autoreconf -f -i)
+ @${MKDIR} ${CONFIGURE_WRKSRC}
+.endif
+
+.include <bsd.port.mk>
+
+# XXX Teach USE_LINUX about cross-builds
+.if defined(.PARSEDIR)
+RUN_DEPENDS:= ${RUN_DEPENDS:N${LINUX_BASE_PORT}}
+.else
+RUN_DEPENDS:= ${RUN_DEPENDS:N*linux_base*}
+.endif
Index: devel/fb-adb/distinfo
===================================================================
--- /dev/null
+++ devel/fb-adb/distinfo
@@ -0,0 +1,6 @@
+SHA256 (facebook-fb-adb-1.4.4-101-g31eb7b3_GH0.tar.gz) = cd66af7d0240c05d88a0caa3d0722bae84b0801d75772d54805ad2624c8e7083
+SIZE (facebook-fb-adb-1.4.4-101-g31eb7b3_GH0.tar.gz) = 248387
+SHA256 (android-ndk-r10e-linux-x86.bin) = 92b07d25aaad9b341a7f2b2a62402d508e948bf2dea3ee7b65a6aeb18bca7df5
+SIZE (android-ndk-r10e-linux-x86.bin) = 394281908
+SHA256 (android-ndk-r10e-linux-x86_64.bin) = 102d6723f67ff1384330d12c45854315d6452d6510286f4e5891e00a5a8f1d5a
+SIZE (android-ndk-r10e-linux-x86_64.bin) = 401522849
Index: devel/fb-adb/files/patch-util.c
===================================================================
--- /dev/null
+++ devel/fb-adb/files/patch-util.c
@@ -0,0 +1,12 @@
+--- util.c.orig 2015-10-09 22:02:18 UTC
++++ util.c
+@@ -1563,3 +1563,9 @@ xregerror(int errcode, const regex_t* pr
+ reslist_xfer(rl->parent, rl);
+ return (char*) gb.buf;
+ }
++
++#ifndef __linux__
++// XXX For GCC 4.4 or older
++__weak_reference(my_unreachable, __builtin_unreachable);
++void my_unreachable() { abort(); }
++#endif
Index: devel/fb-adb/pkg-descr
===================================================================
--- /dev/null
+++ devel/fb-adb/pkg-descr
@@ -0,0 +1,16 @@
+fb-adb is a tool for interacting with Android systems. It does much of
+what adb does, but with better remote shell support and, hopefully,
+fewer bugs. Differences between adb and fb-adb are that fb-adb:
+
+ * is binary clean (no LF -> CRLF mangling)
+ * transmits and updates window size
+ * distinguishes standard output and standard error
+ * properly muxes streams with independent flow control
+ * allows for ssh-like pty allocation control
+ * propagates program exit status instead of always exiting
+ with status 0
+ * properly escapes program arguments
+ * kills remote program
+ * provides a generic facility to elevate to root without re-escaping
+
+WWW: https://github.com/facebook/fb-adb
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 20, 5:33 AM (22 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33337917
Default Alt Text
D3930.id9479.diff (6 KB)
Attached To
Mode
D3930: [new port] devel/fb-adb: Better shell for Android devices
Attached
Detach File
Event Timeline
Log In to Comment