Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2015 23:18:09 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r389151 - in head/devel/android-tools-fastboot: . files
Message-ID:  <201506102318.t5ANI9Rs038520@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Wed Jun 10 23:18:09 2015
New Revision: 389151
URL: https://svnweb.freebsd.org/changeset/ports/389151

Log:
  devel/android-tools-fastboot: update to 4.2.2.r1.2
  
  android.googlesource.com archives have volatile timestamps which makes
  them impossible to use as distfiles due to varying checksum.
  
  android organization on GitHub doesn't have platform/system/extras mirror.
  And various private and non-vanilla clones seem to lack android-* tags
  that are necessary to sync modules.
  
  For now, use my own mirror to avoid local-distfiles and keep the port simple
  via multi-GitHub support.

Added:
  head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c   (contents, props changed)
Modified:
  head/devel/android-tools-fastboot/Makefile   (contents, props changed)
  head/devel/android-tools-fastboot/distinfo   (contents, props changed)
  head/devel/android-tools-fastboot/files/Makefile   (contents, props changed)

Modified: head/devel/android-tools-fastboot/Makefile
==============================================================================
--- head/devel/android-tools-fastboot/Makefile	Wed Jun 10 23:17:54 2015	(r389150)
+++ head/devel/android-tools-fastboot/Makefile	Wed Jun 10 23:18:09 2015	(r389151)
@@ -1,12 +1,11 @@
 # $FreeBSD$
 
 PORTNAME=	android-tools-fastboot
-DISTVERSIONPREFIX=	${GH_ACCOUNT}-
-DISTVERSION=	4.0.4_r2.1
+DISTVERSIONPREFIX=	android-
+DISTVERSION=	4.2.2_r1.2
 CATEGORIES=	devel
 MASTER_SITES=	https://anonscm.debian.org/cgit/android-tools/android-tools.git/plain/debian/:manpage
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
-		fastboot.1?id=706e754:manpage
+DISTFILES=	fastboot.1?id=706e754:manpage
 EXTRACT_ONLY=	${DISTFILES:N*\:manpage:C/:.*//}
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -16,16 +15,21 @@ LICENSE=	APACHE20 BSD2CLAUSE
 LICENSE_COMB=	multi
 
 USE_GITHUB=	yes
-GH_ACCOUNT=	android
-GH_PROJECT=	platform_system_core
+GH_ACCOUNT=	android jbeich:extras
+GH_PROJECT=	platform_system_core platform_system_extras:extras
 
 USES=		uidfix
-WRKSRC_SUBDIR=	fastboot
+BUILD_WRKSRC=	${WRKSRC}/fastboot
+INSTALL_WRKSRC=	${BUILD_WRKSRC}
 MAKEFILE=	${FILESDIR}/Makefile
 MAKE_ENV=	FILESDIR="${FILESDIR}" BINDIR="${PREFIX}/bin"
 PLIST_FILES=	bin/fastboot \
 		man/man1/fastboot.1.gz
 
+post-extract:
+# Adjust paths relative to core
+	@(cd ${WRKSRC_extras} && ${COPYTREE_SHARE} . ${WRKSRC})
+
 post-install:
 	${INSTALL_MAN} ${_DISTDIR}/${DISTFILES:M*\:manpage:C/:.*//} \
 		${STAGEDIR}${MAN1PREFIX}/man/man1/fastboot.1

Modified: head/devel/android-tools-fastboot/distinfo
==============================================================================
--- head/devel/android-tools-fastboot/distinfo	Wed Jun 10 23:17:54 2015	(r389150)
+++ head/devel/android-tools-fastboot/distinfo	Wed Jun 10 23:18:09 2015	(r389151)
@@ -1,4 +1,6 @@
-SHA256 (android-platform_system_core-android-4.0.4_r2.1_GH0.tar.gz) = a60b54b73ef5f739d19bde75d7d8bb3045b990591e5c9cad4c30b68ac86019f7
-SIZE (android-platform_system_core-android-4.0.4_r2.1_GH0.tar.gz) = 896079
 SHA256 (fastboot.1?id=706e754) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283
 SIZE (fastboot.1?id=706e754) = 5906
+SHA256 (android-platform_system_core-android-4.2.2_r1.2_GH0.tar.gz) = a86a63b4acc75aa25540ab6cbcca88602a5f00ac6bd9b34a5e935ec29befbce7
+SIZE (android-platform_system_core-android-4.2.2_r1.2_GH0.tar.gz) = 991826
+SHA256 (jbeich-platform_system_extras-android-4.2.2_r1.2_GH0.tar.gz) = 0c066215575cb429522a1f77ceb952aabd881bed647ab0193d82f3daed761775
+SIZE (jbeich-platform_system_extras-android-4.2.2_r1.2_GH0.tar.gz) = 213995

Modified: head/devel/android-tools-fastboot/files/Makefile
==============================================================================
--- head/devel/android-tools-fastboot/files/Makefile	Wed Jun 10 23:17:54 2015	(r389150)
+++ head/devel/android-tools-fastboot/files/Makefile	Wed Jun 10 23:18:09 2015	(r389151)
@@ -13,13 +13,36 @@ SRCS+=	protocol.c
 SRCS+=	usb_freebsd.c
 SRCS+=	util_freebsd.c
 
+.PATH: ${.CURDIR}/../ext4_utils
+SRCS+=	allocate.c
+SRCS+=	contents.c
+SRCS+=	ext4_utils.c
+SRCS+=	ext4fixup.c
+SRCS+=	extent.c
+SRCS+=	indirect.c
+SRCS+=	make_ext4fs.c
+SRCS+=	sha1.c
+SRCS+=	uuid.c
+SRCS+=	wipe.c
+
+.PATH:	${.CURDIR}/../libsparse
+SRCS+=	backed_block.c
+SRCS+=	output_file.c
+SRCS+=	sparse.c
+SRCS+=	sparse_crc32.c
+SRCS+=	sparse_err.c
+SRCS+=	sparse_read.c
+
 .PATH:	${.CURDIR}/../libzipfile
 SRCS+=	centraldir.c
 SRCS+=	zipfile.c
 
+CFLAGS+=-D__APPLE__ -D__MACH__ # off64_t
 CFLAGS+=-I${.CURDIR}
 CFLAGS+=-I${.CURDIR}/../include
 CFLAGS+=-I${.CURDIR}/../mkbootimg
+CFLAGS+=-I${.CURDIR}/../ext4_utils
+CFLAGS+=-I${.CURDIR}/../libsparse/include
 
 LDADD+=	-lusb -lz
 DPADD+=	${LIBUSB} ${LIBZ}

Added: head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c	Wed Jun 10 23:18:09 2015	(r389151)
@@ -0,0 +1,47 @@
+--- ext4_utils/ext4_utils.c.orig	2012-12-18 23:27:26 UTC
++++ ext4_utils/ext4_utils.c
+@@ -36,8 +36,16 @@
+ 
+ #if defined(__linux__)
+ #include <linux/fs.h>
+-#elif defined(__APPLE__) && defined(__MACH__)
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
++  || (defined(__APPLE__) && defined(__MACH__))
+ #include <sys/disk.h>
++#elif defined(__sun)
++#include <sys/dkio.h>
++#elif defined(__Bitrig__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#include <sys/disklabel.h>
++#include <sys/dkio.h>
++#elif defined(__DragonFly__)
++#include <sys/diskslice.h>
+ #endif
+ 
+ #include "ext4.h"
+@@ -383,10 +391,24 @@ static u64 get_block_device_size(int fd)
+ 	u64 size = 0;
+ 	int ret;
+ 
+-#if defined(__linux__)
++#if defined(BLKGETSIZE64)
+ 	ret = ioctl(fd, BLKGETSIZE64, &size);
+-#elif defined(__APPLE__) && defined(__MACH__)
++#elif defined(DKIOCGETBLOCKCOUNT)
+ 	ret = ioctl(fd, DKIOCGETBLOCKCOUNT, &size);
++#elif defined(DIOCGMEDIASIZE)
++	ret = ioctl(fd, DIOCGMEDIASIZE, &size);
++#elif defined(DKIOCGMEDIAINFO)
++	struct dk_minfo minfo;
++	ret = ioctl(fd, DKIOCGMEDIAINFO, &minfo);
++	size = minfo.dki_lbsize * minfo.dki_capacity;
++#elif defined(DIOCGDINFO)
++	struct disklabel dl;
++	ret = ioctl(fd, DIOCGDINFO, &dl);
++	size = dl.d_secsize * dl.d_nsectors * dl.d_ntracks * dl.d_ncylinders;
++#elif defined(DIOCGPART)
++	struct partinfo pi;
++	ret = ioctl(fd, DIOCGPART, &pi);
++	size = pi.media_size;
+ #else
+ 	close(fd);
+ 	return 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506102318.t5ANI9Rs038520>