From owner-freebsd-ports@FreeBSD.ORG Wed May 20 00:51:34 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52ADFC01; Wed, 20 May 2015 00:51:34 +0000 (UTC) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id B25751FC2; Wed, 20 May 2015 00:51:33 +0000 (UTC) Received: from ppp118-210-45-229.lns20.adl2.internode.on.net (HELO leader.local) ([118.210.45.229]) by ipmail06.adl2.internode.on.net with ESMTP; 20 May 2015 10:16:23 +0930 Message-ID: <555BD95A.6010706@ShaneWare.Biz> Date: Wed, 20 May 2015 10:16:18 +0930 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jonathan Anderson , freebsd-ports@freebsd.org Subject: Re: USE_GITHUB and submodules References: <555B84AA.30901@FreeBSD.org> In-Reply-To: <555B84AA.30901@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 00:51:34 -0000 On 20/05/2015 04:14, Jonathan Anderson wrote: > Hi all, > > Is there a mechanism for using the USE_GITHUB variable in a port that > depends on submodules? For instance, the Rust port requires an embedded > (and modified) version of LLVM, which it includes as a submodule. Right > now I'm attempting to add the following to a `post-extract` rule: While you can setup multiple files to be downloaded for a port this doesn't work with USE_GITHUB, see my 3 year old report - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=172964 This isn't an official port, but the workaround I came up with was to setup multiple files by setting MASTER_SITES using -- MASTER_SITES= https://github.com/sambler/myblender/tarball/:base \ https://github.com/sambler/myblendertranslations/tarball/:trans \ https://github.com/sambler/myblenderaddons/tarball/:addons \ https://github.com/sambler/myblendercontrib/tarball/:contrib DISTFILES= sambler-${PORTVERSION}.${PORTREVISION}:base \ translate-${PORTVERSION}.${PORTREVISION}:trans \ addons-${PORTVERSION}.${PORTREVISION}:addons \ contrib-${PORTVERSION}.${PORTREVISION}:contrib DIST_SUBDIR= ${PORTNAME} The DISTFILES names are setup to match my tag format. This gives you multiple archives for the port, each will be extracted into the work dir, I then use post-extract to move them into place within the main source tree and don't depend on git for the port-- post-extract: # tanslations @${MV} ${WRKDIR}/sambler-myblendertranslations-*/* ${WRKSRC}/release/datafiles/locale/ # addons @${MV} ${WRKDIR}/sambler-myblenderaddons-*/* ${WRKSRC}/release/scripts/addons/ # contrib @${MV} ${WRKDIR}/sambler-myblendercontrib-*/* ${WRKSRC}/release/scripts/addons_contrib/ > post-extract: > cd ${WRKSRC} && \ > git init && \ > git remote add origin https://github.com/${GH_ACCOUNT}/${PORTNAME} && \ > git fetch && \ > git reset --hard ${PORTVERSION} && \ > git submodule init && \ > git submodule update --recursive > > But this seems quite hackish! It would be great if submodules Just > Worked... but alternatively, is there a USE_GITHUB_URL or somesuch that > would check things out via Git instead of tarball to save me the `git > init` through `git reset` steps? > > Cheers, > > > Jon > -- > jonathan@FreeBSD.org > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > -- FreeBSD - the place to B...Software Developing Shane Ambler