pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Remove android-tools-adb8.



> Module Name:	pkgsrc-wip
> Committed By:	coypu <coypu%sdf.org@localhost>
> Pushed By:	coypu
> Date:		Thu Jun 14 15:31:02 2018 +0300
> Changeset:	e8044a7c638ffd10984d8f347e596ccb317def0d

> Modified Files:
> 	Makefile
> Removed Files:
> 	android-tools-adb8/DESCR
> 	android-tools-adb8/Makefile
[...]
> Log Message:
> Remove android-tools-adb8.
>
> It's not completed and confusing.

Can you try the following patch? I'm not familar with PkgSrc (and NetBSD),
so haven't tested it much.

From eae5e28cd8384153583929d932a9efa2901ce315 Mon Sep 17 00:00:00 2001
From: Jan Beich <jbeich%FreeBSD.org@localhost>
Date: Mon, 31 Dec 2018 19:19:03 +0000
Subject: [PATCH] android-tools-adb: update to 9.0.0_r3

- Vendor FreeBSD patches and Makefile
- Fix a few pkglint warnings
---
 android-tools-adb/Makefile                    |  54 ++++++---
 android-tools-adb/distinfo                    | 107 +++++++++++++++++-
 android-tools-adb/files/Makefile              |  64 -----------
 .../patches/patch-adb__auth__host.c           |  56 ---------
 .../patches/patch-adb_client_usb__libusb.cpp  |  67 +++++++++++
 .../patches/patch-get__my__path__freebsd.c    |  32 ------
 android-tools-adb/patches/patch-usb__libusb.c |  64 -----------
 7 files changed, 208 insertions(+), 236 deletions(-)
 delete mode 100644 android-tools-adb/files/Makefile
 delete mode 100644 android-tools-adb/patches/patch-adb__auth__host.c
 create mode 100644 android-tools-adb/patches/patch-adb_client_usb__libusb.cpp
 delete mode 100644 android-tools-adb/patches/patch-get__my__path__freebsd.c
 delete mode 100644 android-tools-adb/patches/patch-usb__libusb.c

diff --git a/android-tools-adb/Makefile b/android-tools-adb/Makefile
index 7ef0688cef..4fe55e5987 100644
--- a/android-tools-adb/Makefile
+++ b/android-tools-adb/Makefile
@@ -1,28 +1,54 @@
 # $NetBSD: Makefile,v 1.4 2015/03/07 21:39:40 tnn2 Exp $
 
 DISTNAME=	${GITHUB_PROJECT}-${GITHUB_TAG}
-PKGNAME=	android-tools-adb-5.0.2
+PKGNAME=	android-tools-adb-9.0.0_r3
 CATEGORIES=	devel
-MASTER_SITES=	https://github.com/android/
+MASTER_SITES=	${MASTER_SITE_GITHUB:=aosp-mirror/}
 GITHUB_PROJECT=	platform_system_core
-GITHUB_TAG=	android-5.0.2_r1
+GITHUB_TAG=	${PKGNAME:S/-tools-adb//}
+DIST_SUBDIR=	adb${PKGVERSION_NOREV:R:R}
+DISTFILES=	${DEFAULT_DISTFILES} Makefile
+SITES.Makefile:=${PATCH_SITES}
+
+PATCH_SITES=	${MASTER_SITE_GITHUB:=freebsd/freebsd-ports/raw/19267837c186/devel/android-tools-adb/files/}
+PATCHFILES+=	patch-adb_adb__auth__host.cpp
+PATCHFILES+=	patch-adb_adb__io__test.cpp
+PATCHFILES+=	patch-adb_bugreport__test.cpp
+PATCHFILES+=	patch-adb_client_usb__libusb.cpp
+PATCHFILES+=	patch-adb_commandline.cpp
+PATCHFILES+=	patch-adb_commandline.h
+PATCHFILES+=	patch-adb_fdevent__test.cpp
+PATCHFILES+=	patch-adb_sysdeps.h
+PATCHFILES+=	patch-adb_sysdeps__test.cpp
+PATCHFILES+=	patch-adb_sysdeps_posix_network.cpp
+PATCHFILES+=	patch-adb_transport__usb.cpp
+PATCHFILES+=	patch-adb_usb.h
+PATCHFILES+=	patch-base_file.cpp
+PATCHFILES+=	patch-base_file__test.cpp
+PATCHFILES+=	patch-base_include_android-base_logging.h
+PATCHFILES+=	patch-base_logging.cpp
+PATCHFILES+=	patch-base_parsenetaddress.cpp
+PATCHFILES+=	patch-base_stringprintf__test.cpp
+PATCHFILES+=	patch-gtest-1.8.1
+PATCHFILES+=	patch-include_cutils_trace.h
+PATCHFILES+=	patch-libcrypto__utils_android__pubkey.c
+PATCHFILES+=	patch-libcutils_threads.cpp
+PATCHFILES+=	patch-liblog_logger__write.c
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://developer.android.com/tools/help/adb.html
 COMMENT=	Android debug bridge command line tool
 LICENSE=	apache-2.0
 
-WRKSRC=		${WRKDIR}/${DISTNAME}/adb
-USE_TOOLS+=	gmake
-
-MAKE_JOBS_SAFE=	no
-
-CPPFLAGS+=	-I${BUILDLINK_PREFIX.libusb1}/include/libusb-1.0
-
-INSTALLATION_DIRS+=	bin
-
-post-extract:
-	${CP} ${FILESDIR}/Makefile ${WRKSRC}
+USE_LANGUAGES=		c c++
+GCC_REQD+=		5.3 # c++14
+USE_TOOLS+=		pkg-config
+USE_BSD_MAKEFILE=	yes
+MAKE_FILE=		${_DISTDIR}/Makefile
+MAKE_ENV+=		MDNSEXT=_unsupported # XXX expose as option
+CXXFLAGS+=		$${PIE_CFLAGS} # XXX move to bsd.sys.mk
+BUILD_DIRS=		adb
+INSTALLATION_DIRS=	bin
 
 .include "../../devel/libusb1/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
diff --git a/android-tools-adb/distinfo b/android-tools-adb/distinfo
index 41393f9e84..474ae64ce0 100644
--- a/android-tools-adb/distinfo
+++ b/android-tools-adb/distinfo
@@ -1,8 +1,103 @@
 $NetBSD: distinfo,v 1.2 2015/03/07 16:28:33 tnn2 Exp $
 
-SHA1 (platform_system_core-android-5.0.2_r1.tar.gz) = fc5626cf84cc18175be498ea3e664d7c7b188c27
-RMD160 (platform_system_core-android-5.0.2_r1.tar.gz) = e1e73c0f6ac99cd0641b8ff575fe56f3a79decfb
-Size (platform_system_core-android-5.0.2_r1.tar.gz) = 1202992 bytes
-SHA1 (patch-adb__auth__host.c) = f0e559f3643e660960c69cd466cf73ec5078b091
-SHA1 (patch-get__my__path__freebsd.c) = 608d3d51d46519487e1494918647dfa6540bccb0
-SHA1 (patch-usb__libusb.c) = d41f8a5d7639682c6d186121cd56f0a5ba87dcd7
+SHA1 (adb9/Makefile) = 082006ac7a03eade6a479a6d5461c08302af45db
+RMD160 (adb9/Makefile) = bfea5dee23815c0eeda891d8b8bb8d8d1ed58969
+SHA512 (adb9/Makefile) = 86d49298ac0a46d7d6cddfddef64052d0d0753e4b73f8820093b35b681e869f1b467dee8610d303dc0e3b919497b69e92db740387bae436b541e11be924a78a8
+Size (adb9/Makefile) = 3799 bytes
+SHA1 (adb9/patch-adb_adb__auth__host.cpp) = dff4da9c65c1ed906d1f87de8a6c4ec262ae8e9f
+RMD160 (adb9/patch-adb_adb__auth__host.cpp) = ec0fbd83734d76a69eeca8c9efb590adc11ba853
+SHA512 (adb9/patch-adb_adb__auth__host.cpp) = b0915be32e52e8067224da4024b347fe63aae4fc38856a106ddc4795c0793149f58926d6ccc4513dbfac87d739f7692b390b76e902e3269ced15ce661e930969
+Size (adb9/patch-adb_adb__auth__host.cpp) = 1121 bytes
+SHA1 (adb9/patch-adb_adb__io__test.cpp) = 9050fc079f9701360dc52b72b7dcb13acd492a5f
+RMD160 (adb9/patch-adb_adb__io__test.cpp) = 7620d8e8d795d3358f08bbd206f803bf3a3af6f0
+SHA512 (adb9/patch-adb_adb__io__test.cpp) = 41ea0606d380ee35742bed7ec79c5404bd49424c2f3d3306d6b4c729bba4d8aca8455640c11fd6fd058d89f21565b855a3a3a67c0642d3525f3f61f78d4f3ada
+Size (adb9/patch-adb_adb__io__test.cpp) = 206 bytes
+SHA1 (adb9/patch-adb_bugreport__test.cpp) = 310c3ba6e4e4332f642457f869880f8cc4bbf1dd
+RMD160 (adb9/patch-adb_bugreport__test.cpp) = 4bc93c02d0b6ac47b1c8017e958fc5ff3c7823be
+SHA512 (adb9/patch-adb_bugreport__test.cpp) = bc02d1f47755fde980d3f473403f7cca145f301faeb90e26103f27f6de2c98c2e8a1f5724587c1d1142f5e4da81720b2d249fcd0c5d021a70ad14d19bbedb4fc
+Size (adb9/patch-adb_bugreport__test.cpp) = 809 bytes
+SHA1 (adb9/patch-adb_client_usb__libusb.cpp) = 26a7f5d8236ff3a55a9eef9b724a1050f094cc7d
+RMD160 (adb9/patch-adb_client_usb__libusb.cpp) = 459d22dcb381d3812ef6fc65973982f9cfaca8d1
+SHA512 (adb9/patch-adb_client_usb__libusb.cpp) = 5a56c1c31207479078afa750ceb922efc08d03ce8b136d05b2b2931a998c3fbb5bd5aace2b173c93a5db79e659a77f31c59583c7d329da71f8e10ff956b28a60
+Size (adb9/patch-adb_client_usb__libusb.cpp) = 4263 bytes
+SHA1 (adb9/patch-adb_commandline.cpp) = 4980ea64581edaaf5bf42b992a0d0a99bf93ca33
+RMD160 (adb9/patch-adb_commandline.cpp) = c56d7ce31782dddb0848a05b1f6bc258d091754d
+SHA512 (adb9/patch-adb_commandline.cpp) = e422aee09ea18dacb878b82467a3ae60cd4855a7b5613db71f99ea40b0e4c126de2e2f25e35aaa1e1e6d1a1f85c949754faeb353db8aa57b820c3c059024dd03
+Size (adb9/patch-adb_commandline.cpp) = 818 bytes
+SHA1 (adb9/patch-adb_commandline.h) = 38b9eec6662d69a6ba014367dec87f7792c6ac13
+RMD160 (adb9/patch-adb_commandline.h) = 0ea6ce6e308d05ddc4c8d31aeeb703cbac603213
+SHA512 (adb9/patch-adb_commandline.h) = 2007d03605f1396cf6d856831978c86a7481c0e11b24a49971ff5f89c535ac5ca808a6a8eb7ef515b44ade86ec185524ac1c4755b075c06b6c8b4150b33474e0
+Size (adb9/patch-adb_commandline.h) = 272 bytes
+SHA1 (adb9/patch-adb_fdevent__test.cpp) = 8ea7c59786d80ad144562a89caf9e99ff9094c9a
+RMD160 (adb9/patch-adb_fdevent__test.cpp) = d34ca02037d32b26e9e7084b8535b8fe718dae47
+SHA512 (adb9/patch-adb_fdevent__test.cpp) = 55d9501b2e6b347c96926be1dbf8a2a601d924e4ea8ab758e4b6826379b9bed7ff596743c8ce5e70fe943d1c9b88804bdbc74e10a5f9819726a0b3749f11aa18
+Size (adb9/patch-adb_fdevent__test.cpp) = 238 bytes
+SHA1 (adb9/patch-adb_sysdeps.h) = 00d2e790685aa79d4ac109cc8bde1d36021cdb11
+RMD160 (adb9/patch-adb_sysdeps.h) = 57a20f5211488d111fb6d37939ec8c1a1bf4520f
+SHA512 (adb9/patch-adb_sysdeps.h) = 0e6a1b8472a77b00d6f6c3089c43f3318b2eec809f91a45646ea8c5964be8aa2bf2b872bcb7b488714edcd9ff1b9b98c64a8516240880c7adfccb02bd1cbb71e
+Size (adb9/patch-adb_sysdeps.h) = 1206 bytes
+SHA1 (adb9/patch-adb_sysdeps__test.cpp) = 8d5affc4c883bb5427402f2a94e3361586e77917
+RMD160 (adb9/patch-adb_sysdeps__test.cpp) = 1e9fecd19988c5e75d10c575aad810beacef59d9
+SHA512 (adb9/patch-adb_sysdeps__test.cpp) = b27647510567930f1764027fd20b9f7055ed2987358e15c001fa501d0bdd5bf42303b735d5027d29496184f413863ed360628be19bb8aa02a971ead5bb1e181a
+Size (adb9/patch-adb_sysdeps__test.cpp) = 209 bytes
+SHA1 (adb9/patch-adb_sysdeps_posix_network.cpp) = 3ccec5f49b2d45e2790e004ba4ca660bea2c6472
+RMD160 (adb9/patch-adb_sysdeps_posix_network.cpp) = 08c624284a409db5bf9b24d20f73e8ba49569578
+SHA512 (adb9/patch-adb_sysdeps_posix_network.cpp) = c843a5b7f069197baa1ddb9f6afe8478e1057cb1e382b08d4189bc5feebc846e9b7a73b15375d86b6b955e4818bbcfe2a5b8cb0d2fde5f306d54774edaed0b4d
+Size (adb9/patch-adb_sysdeps_posix_network.cpp) = 252 bytes
+SHA1 (adb9/patch-adb_transport__usb.cpp) = 50488f08fc92646ce538085544fc60f0b0ee5b24
+RMD160 (adb9/patch-adb_transport__usb.cpp) = 87f9c25e7395a53404491cad970f09edaea381a7
+SHA512 (adb9/patch-adb_transport__usb.cpp) = 06c30089223be42173190872b4d19ee0a9ae217f9e81fcd753b3af6cc682bab9765eda5e6937dc8c60ff8e71acd3cc0cbb2d4df614c9adf87adbfaa549fa2b7e
+Size (adb9/patch-adb_transport__usb.cpp) = 423 bytes
+SHA1 (adb9/patch-adb_usb.h) = 975a35ced3c31e7f32818e869d2e33ddb9b461bd
+RMD160 (adb9/patch-adb_usb.h) = e1b326fcc8c2bb633aefab29a8fb044c4fbee6be
+SHA512 (adb9/patch-adb_usb.h) = ef8505a672e43d8997d984096da015c25a5f504c7ef32604b87d3f83a98fa1521c1aaf8ef8b03ee8dcdaa03d30e6628c7a3ac474bbb5f89e70d0c6797678a89c
+Size (adb9/patch-adb_usb.h) = 453 bytes
+SHA1 (adb9/patch-base_file.cpp) = 040a86a79475c4459fb5aea7dbff51ca4ab55531
+RMD160 (adb9/patch-base_file.cpp) = f8ea30dcee85828c4b2a1ea29f7dc7ee6e937dec
+SHA512 (adb9/patch-base_file.cpp) = 91f71ad6bd57067b0f9ea1d8cee4511bc7c704709fb6b9623251ed71e2a35c64d92fe6672160f796a5bdaf83bfbd286a672e772e5236f9b3322b6177a4452bc7
+Size (adb9/patch-base_file.cpp) = 1167 bytes
+SHA1 (adb9/patch-base_file__test.cpp) = 67e71f0facf9d912389d12ac1150e378d2d8f208
+RMD160 (adb9/patch-base_file__test.cpp) = 35acd003d68456ed2e099b48fd4d465b27727a5c
+SHA512 (adb9/patch-base_file__test.cpp) = be88d2a51eebb25e27ef857c9cdba8f8ab9e7a6cd919a2d088e043cc87e2aa235eba3c66a4c4b24f37baf36cc202232c045bbdc721e32b4baf1184b563f7ba94
+Size (adb9/patch-base_file__test.cpp) = 1414 bytes
+SHA1 (adb9/patch-base_include_android-base_logging.h) = 1263121afb607ab9229ea838d8253e78cde2c91f
+RMD160 (adb9/patch-base_include_android-base_logging.h) = 7131c341a05d56475cc8bba7df62b8e26f635e6e
+SHA512 (adb9/patch-base_include_android-base_logging.h) = c3d157e1ddd32b6c9a1f34a45fe1a33169e04f72296d2793cea30e8c0844bf37e5380aafec83d9c186915a9fd4b324bd444dcd39dcb89e509acbef03bf6b4688
+Size (adb9/patch-base_include_android-base_logging.h) = 696 bytes
+SHA1 (adb9/patch-base_logging.cpp) = 765f9752c9278a714d2e22d3cf5fd3979a7ca23c
+RMD160 (adb9/patch-base_logging.cpp) = b815b9275238579440bbee71c093df56c3ff8b36
+SHA512 (adb9/patch-base_logging.cpp) = 0eee2f2acb7172ba47b324b464055ec31a3601c0b40014fd2324596a43125b9d95737ae704544c9658307c6653348cd26365e169e50110c145da61b199219746
+Size (adb9/patch-base_logging.cpp) = 1196 bytes
+SHA1 (adb9/patch-base_parsenetaddress.cpp) = b247867a51c8936310f1682e27b5a1730a2279d4
+RMD160 (adb9/patch-base_parsenetaddress.cpp) = a0cd5b986a85eecb5c8846a744ae851f369fd1fd
+SHA512 (adb9/patch-base_parsenetaddress.cpp) = 0f326624a0a18b28cf41067f179ae4b01b16df3e50632439e20ca9b52b66f54866e013e40ffc470dc9ad3d00ab69cf9f0c58ab666747ac8e17cd33a549eeabd1
+Size (adb9/patch-base_parsenetaddress.cpp) = 246 bytes
+SHA1 (adb9/patch-base_stringprintf__test.cpp) = ab772e494c57f27c2f549ac320511901f71a7df0
+RMD160 (adb9/patch-base_stringprintf__test.cpp) = a98a29d1ac330ea9e8567898984871163c91ec48
+SHA512 (adb9/patch-base_stringprintf__test.cpp) = 814c1014d8b016aa3e56689f78801701fda0585f2dfe19c694304fcb352d88cbe7512dd732cb47cf9c97312202d01db47096e6d08b59ea837fb0c0d19168aa65
+Size (adb9/patch-base_stringprintf__test.cpp) = 216 bytes
+SHA1 (adb9/patch-gtest-1.8.1) = 102d5294087fd6481c3d16c5d02d9dac690a4dbb
+RMD160 (adb9/patch-gtest-1.8.1) = 3e469ad7318381f118fdba938d50b0314b17d4a6
+SHA512 (adb9/patch-gtest-1.8.1) = 8004cffce3ffa04b5ed5466f8662cbc2df20db809dceb27af21d20305457d2ea96df8a14014759c58108f5d5f967602d951800fe9eec055253bab78f21f22217
+Size (adb9/patch-gtest-1.8.1) = 3430 bytes
+SHA1 (adb9/patch-include_cutils_trace.h) = bbe70ad0e494892cf8caebe6d7ded2f124831425
+RMD160 (adb9/patch-include_cutils_trace.h) = 6e2a9c622a06d96afb86c1430e64eca3d656c32a
+SHA512 (adb9/patch-include_cutils_trace.h) = b5622308126347ba3f1ac804ca56598e394ed34af78c983ba1dd68c1bdc3a359cb0c0c7c6dd9836c7665611f092c75ecceaf6175f18623de84bf9184a2da2ce4
+Size (adb9/patch-include_cutils_trace.h) = 381 bytes
+SHA1 (adb9/patch-libcrypto__utils_android__pubkey.c) = 8efa2db8bf7ceeefb310a2274dd0a78e8c5ce178
+RMD160 (adb9/patch-libcrypto__utils_android__pubkey.c) = 17694deeb3b1b2ac29a5eb0cec940c33f3db4cf6
+SHA512 (adb9/patch-libcrypto__utils_android__pubkey.c) = 93bd6b2c0fbb55efed6a1ff09649036e08c6f3576be6852690c18b6d95afc90a43cdf5db5d7584475899af7c8d2914ca7c4d09e53417509f0cbe1cd45091ab6c
+Size (adb9/patch-libcrypto__utils_android__pubkey.c) = 7028 bytes
+SHA1 (adb9/patch-libcutils_threads.cpp) = 37a1a6af3cfc2bb79cd52a1cdced8c4181e34f46
+RMD160 (adb9/patch-libcutils_threads.cpp) = 2e326da31dec3c6b73e42f255faf4645c503d5cd
+SHA512 (adb9/patch-libcutils_threads.cpp) = 736c5b28bdf5711ae027481011e9651df23c19f5e040a593ebad20ca214b9f58f6d342510f13bc21a685014173ed9c3ffbc78d2345407ba610248e92d92bb97b
+Size (adb9/patch-libcutils_threads.cpp) = 1081 bytes
+SHA1 (adb9/patch-liblog_logger__write.c) = 557ef35f81dbc2c82c51969a92f7e101bdacb9ad
+RMD160 (adb9/patch-liblog_logger__write.c) = bb6f46e3c9c2baba95c572b04cb2120f8f7d69b5
+SHA512 (adb9/patch-liblog_logger__write.c) = 235f235f6b248931c9aa80342c0b79650a0a1ad446370f4db316264a476209e3acdb8b7ad310d282ba53c8208a422a2f37d0c9301b3f1d81a6fea8ecc8360c97
+Size (adb9/patch-liblog_logger__write.c) = 312 bytes
+SHA1 (adb9/platform_system_core-android-9.0.0_r3.tar.gz) = d5063dba2abfa0e167e79b8e91589df1c5a470f2
+RMD160 (adb9/platform_system_core-android-9.0.0_r3.tar.gz) = d26db0b087ac343adf0ee583d29374ad7e665f8e
+SHA512 (adb9/platform_system_core-android-9.0.0_r3.tar.gz) = 0edc8b02b57085ce88b39c987284af1c681870594b20ab9ecf4be98a0cfdff2905bc80f5d8eeb7fbc7f4604b800b6f95bc6b2b0321c900bf833313dfcbb2eefb
+Size (adb9/platform_system_core-android-9.0.0_r3.tar.gz) = 27484684 bytes
+SHA1 (patch-adb_client_usb__libusb.cpp) = 4d3ea331fc23696ecbe26ba5826c75011d800a6d
diff --git a/android-tools-adb/files/Makefile b/android-tools-adb/files/Makefile
deleted file mode 100644
index cadd85976f..0000000000
--- a/android-tools-adb/files/Makefile
+++ /dev/null
@@ -1,64 +0,0 @@
-# $FreeBSD: 372832 $
-# $NetBSD: Makefile,v 1.3 2015/02/28 22:03:25 tnn2 Exp $
-
-SRCS+= adb.c
-SRCS+= adb_client.c
-SRCS+= adb_auth_host.c
-SRCS+= commandline.c
-SRCS+= console.c
-SRCS+= file_sync_client.c
-SRCS+= fdevent.c
-ifeq ("${OPSYS}", "FreeBSD")
-SRCS+= get_my_path_freebsd.c
-else ifeq ("${OPSYS}", "DragonFly")
-SRCS+= get_my_path_freebsd.c
-else ifeq ("${OPSYS}", "Darwin")
-SRCS+= get_my_path_darwin.c
-else
-SRCS+= get_my_path_linux.c
-endif
-SRCS+= services.c
-SRCS+= sockets.c
-SRCS+= transport.c
-SRCS+= transport_local.c
-SRCS+= transport_usb.c
-SRCS+= usb_libusb.c
-SRCS+= usb_vendors.c
-
-VPATH+= ../libcutils
-SRCS+= socket_inaddr_any_server.c
-SRCS+= socket_local_client.c
-SRCS+= socket_local_server.c
-SRCS+= socket_loopback_client.c
-SRCS+= socket_loopback_server.c
-SRCS+= socket_network_client.c
-SRCS+= load_file.c
-
-VPATH+= ../libzipfile
-SRCS+= centraldir.c
-SRCS+= zipfile.c
-
-
-CPPFLAGS+= -DADB_HOST=1
-CPPFLAGS+= -DHAVE_FORKEXEC=1
-CPPFLAGS+= -DHAVE_SYMLINKS
-CPPFLAGS+= -DHAVE_TERMIO_H
-CPPFLAGS+= -DHAVE_SYS_SOCKET_H
-CPPFLAGS+= -D_FILE_OFFSET_BITS=64
-CPPFLAGS+= -I.
-CPPFLAGS+= -I../include
-
-LIBS+= -lc -pthread -lz -lcrypto -lusb-1.0
-
-OBJS= $(SRCS:.c=.o)
-
-all: adb
-
-adb: $(OBJS)
-	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
-
-install: adb
-	${BSD_INSTALL_PROGRAM} adb ${DESTDIR}${PREFIX}/bin/
-
-clean:
-	rm -rf $(OBJS) adb
diff --git a/android-tools-adb/patches/patch-adb__auth__host.c b/android-tools-adb/patches/patch-adb__auth__host.c
deleted file mode 100644
index accec60f4b..0000000000
--- a/android-tools-adb/patches/patch-adb__auth__host.c
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD$
-
-OpenSSL 1.1.x compatibility.
-Use getter for rsa->n, suggested by
-https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes
-
---- adb_auth_host.c.orig	2014-10-22 00:46:49.000000000 +0000
-+++ adb_auth_host.c
-@@ -50,6 +50,18 @@
- #define ANDROID_PATH   ".android"
- #define ADB_KEY_FILE   "adbkey"
- 
-+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+static inline void RSA_get0_key(const RSA *r,
-+     const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
-+{
-+	if (n)
-+		*n = r->n;
-+	if (e)
-+		*e = r->e;
-+	if (d)
-+		*d = r->d;
-+}
-+#endif
- 
- struct adb_private_key {
-     struct listnode node;
-@@ -73,13 +85,17 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
-     BIGNUM* n = BN_new();
-     BIGNUM* n0inv = BN_new();
- 
-+    const BIGNUM* getter1;
-+    const BIGNUM* getter2;
-+
-     if (RSA_size(rsa) != RSANUMBYTES) {
-         ret = 0;
-         goto out;
-     }
- 
-     BN_set_bit(r32, 32);
--    BN_copy(n, rsa->n);
-+    RSA_get0_key(rsa, &getter1, NULL, NULL);
-+    BN_copy(n, getter1);
-     BN_set_bit(r, RSANUMWORDS * 32);
-     BN_mod_sqr(rr, r, n, ctx);
-     BN_div(NULL, rem, n, r32, ctx);
-@@ -93,7 +109,8 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
-         BN_div(n, rem, n, r32, ctx);
-         pkey->n[i] = BN_get_word(rem);
-     }
--    pkey->exponent = BN_get_word(rsa->e);
-+    RSA_get0_key(rsa, NULL, &getter2, NULL);
-+    pkey->exponent = BN_get_word(getter2);
- 
- out:
-     BN_free(n0inv);
diff --git a/android-tools-adb/patches/patch-adb_client_usb__libusb.cpp b/android-tools-adb/patches/patch-adb_client_usb__libusb.cpp
new file mode 100644
index 0000000000..51b6995376
--- /dev/null
+++ b/android-tools-adb/patches/patch-adb_client_usb__libusb.cpp
@@ -0,0 +1,67 @@
+$NetBSD$
+
+* Disable USB hotplugging on NetBSD as it appears to be unstable. Needs
+  more investigation whether it's caused by misconfiguration, libusb1 bug or
+  kernel bug.
+
+$ adb connect 1.2.3.4
+* daemon not running; starting now at tcp:5037
+ADB server didn't ACK
+Full server startup log: /tmp/adb.1000.log
+Server had pid: 1193
+--- adb starting (pid 1193) ---
+adb I 12-31 10:41:58  1193     1 main.cpp:56] Android Debug Bridge version 1.0.40
+adb I 12-31 10:41:58  1193     1 main.cpp:56] Version 28.0.0-0
+adb I 12-31 10:41:58  1193     1 main.cpp:56] Installed as /usr/pkg/bin/adb
+adb I 12-31 10:41:58  1193     1 main.cpp:56]
+adb F 12-31 10:41:58  1193     1 usb_libusb.cpp:517] failed to register libusb hotplug callback
+
+* failed to start daemon
+error: cannot connect to daemon
+
+--- adb/client/usb_libusb.cpp.orig	2017-06-20 10:50:27 UTC
++++ adb/client/usb_libusb.cpp
+@@ -156,7 +156,7 @@ struct usb_handle {
+ static auto& usb_handles = *new std::unordered_map<std::string, std::unique_ptr<usb_handle>>();
+ static auto& usb_handles_mutex = *new std::mutex();
+ 
+-#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
++#if !defined(__NetBSD__) && defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+ static libusb_hotplug_callback_handle hotplug_handle;
+ #else
+ static std::thread* device_poll_thread = nullptr;
+@@ -398,7 +398,7 @@ static void process_device(libusb_device* device) {
+     LOG(INFO) << "registered new usb device '" << device_serial << "'";
+ }
+ 
+-#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
++#if !defined(__NetBSD__) && defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+ static std::atomic<int> connecting_devices(0);
+ 
+ static void device_connected(libusb_device* device) {
+@@ -505,7 +505,7 @@ void usb_init() {
+         LOG(FATAL) << "failed to initialize libusb: " << libusb_error_name(rc);
+     }
+ 
+-#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
++#if !defined(__NetBSD__) && defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+     // Register the hotplug callback.
+     rc = libusb_hotplug_register_callback(
+         nullptr, static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
+@@ -526,14 +526,14 @@ void usb_init() {
+         }
+     }).detach();
+ 
+-#if !defined(LIBUSB_API_VERSION) || LIBUSB_API_VERSION < 0x01000102
++#if defined(__NetBSD__) || !defined(LIBUSB_API_VERSION) || LIBUSB_API_VERSION < 0x01000102
+     std::unique_lock<std::mutex> lock(device_poll_mutex);
+     device_poll_thread = new std::thread(poll_for_devices);
+ #endif
+ }
+ 
+ void usb_cleanup() {
+-#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
++#if !defined(__NetBSD__) && defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+     libusb_hotplug_deregister_callback(nullptr, hotplug_handle);
+ #else
+     {
diff --git a/android-tools-adb/patches/patch-get__my__path__freebsd.c b/android-tools-adb/patches/patch-get__my__path__freebsd.c
deleted file mode 100644
index 81f6c41fa3..0000000000
--- a/android-tools-adb/patches/patch-get__my__path__freebsd.c
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-get__my__path__freebsd.c,v 1.1 2015/02/28 18:09:32 tnn2 Exp $
-
---- get_my_path_freebsd.c.orig	2014-10-22 00:46:49.000000000 +0000
-+++ get_my_path_freebsd.c
-@@ -18,19 +18,18 @@
-  */
- 
- #include <sys/types.h>
-+#include <sys/sysctl.h>
- #include <unistd.h>
--#include <limits.h>
--#include <stdio.h>
- 
- void
- get_my_path(char *exe, size_t maxLen)
- {
--    char proc[64];
-+    int mib[4] = {
-+        CTL_KERN,
-+        KERN_PROC,
-+        KERN_PROC_PATHNAME,
-+        getpid()
-+    };
- 
--    snprintf(proc, sizeof(proc), "/proc/%d/file", getpid());
--
--    int err = readlink(proc, exe, maxLen - 1);
--
--    exe[err > 0 ? err : 0] = '\0';
-+    sysctl(mib, 4, exe, &maxLen, NULL, 0);
- }
--
diff --git a/android-tools-adb/patches/patch-usb__libusb.c b/android-tools-adb/patches/patch-usb__libusb.c
deleted file mode 100644
index 6d24334a8e..0000000000
--- a/android-tools-adb/patches/patch-usb__libusb.c
+++ /dev/null
@@ -1,64 +0,0 @@
-$NetBSD: patch-usb__libusb.c,v 1.1 2015/02/28 18:09:32 tnn2 Exp $
-
---- usb_libusb.c.orig	2014-10-22 00:46:49.000000000 +0000
-+++ usb_libusb.c
-@@ -37,7 +37,7 @@
- #define   TRACE_TAG  TRACE_USB
- #include "adb.h"
- 
--static adb_mutex_t usb_lock = ADB_MUTEX_INITIALIZER;
-+ADB_MUTEX_DEFINE( usb_lock );
- static libusb_context *ctx = NULL;
- 
- struct usb_handle
-@@ -246,8 +246,8 @@ void usb_kick(struct usb_handle *h)
- }
- 
- int
--check_usb_interface(libusb_interface *interface,
--                    libusb_device_descriptor *desc,
-+check_usb_interface(struct libusb_interface *interface,
-+                    struct libusb_device_descriptor *desc,
-                     struct usb_handle *uh)
- {    
-     int e;
-@@ -257,7 +257,7 @@ check_usb_interface(libusb_interface *in
-         return -1;
-     }
-     
--    libusb_interface_descriptor *idesc = &interface->altsetting[0];
-+    const struct libusb_interface_descriptor *idesc = &interface->altsetting[0];
-     
-     if (idesc->bNumEndpoints != 2) {
-         D("check_usb_interface(): Interface have not 2 endpoints, ignoring\n");
-@@ -265,7 +265,7 @@ check_usb_interface(libusb_interface *in
-     }
- 
-     for (e = 0; e < idesc->bNumEndpoints; e++) {
--        libusb_endpoint_descriptor *edesc = &idesc->endpoint[e];
-+        const struct libusb_endpoint_descriptor *edesc = &idesc->endpoint[e];
-         
-         if (edesc->bmAttributes != LIBUSB_TRANSFER_TYPE_BULK) {
-             D("check_usb_interface(): Endpoint (%u) is not bulk (%u), ignoring\n",
-@@ -304,8 +304,8 @@ check_usb_interface(libusb_interface *in
- }
- 
- int
--check_usb_interfaces(libusb_config_descriptor *config,
--                     libusb_device_descriptor *desc, struct usb_handle *uh)
-+check_usb_interfaces(struct libusb_config_descriptor *config,
-+                     struct libusb_device_descriptor *desc, struct usb_handle *uh)
- {  
-     int i;
-     
-@@ -382,8 +382,8 @@ check_device(libusb_device *dev) 
-     int found = -1;
-     char serial[256] = {0};
- 
--    libusb_device_descriptor desc;
--    libusb_config_descriptor *config = NULL;
-+    struct libusb_device_descriptor desc;
-+    struct libusb_config_descriptor *config = NULL;
-     
-     int r = libusb_get_device_descriptor(dev, &desc);
- 


Home | Main Index | Thread Index | Old Index