From owner-svn-ports-all@freebsd.org Fri Feb 2 19:07:22 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AEF7EE9FD6; Fri, 2 Feb 2018 19:07:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 291957AF59; Fri, 2 Feb 2018 19:07:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 229681FBED; Fri, 2 Feb 2018 19:07:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w12J7MwM042218; Fri, 2 Feb 2018 19:07:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w12J7LMe042208; Fri, 2 Feb 2018 19:07:21 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201802021907.w12J7LMe042208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 2 Feb 2018 19:07:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460727 - in head/devel: p4 p4/files p4api p4api/files X-SVN-Group: ports-head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/devel: p4 p4/files p4api p4api/files X-SVN-Commit-Revision: 460727 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2018 19:07:22 -0000 Author: asomers (src committer) Date: Fri Feb 2 19:07:21 2018 New Revision: 460727 URL: https://svnweb.freebsd.org/changeset/ports/460727 Log: devel/p4 devel/p4api: build from source Build devel/p4 and devel/p4api from source rather than use the prebuilt binary downloads. This fixes p4api on FreeBSD 12. The ports originally used the binaries because source wasn't available until a few years ago. By happy accident, building from source also makes the ports available on non-Intel architectures. PR: 225613 Reviewed by: brd Approved by: brd (ports) Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14162 Added: head/devel/p4/distinfo (contents, props changed) head/devel/p4/files/ head/devel/p4/files/patch-Jamrules (contents, props changed) head/devel/p4api/distinfo (contents, props changed) head/devel/p4api/files/ head/devel/p4api/files/patch-Jamrules (contents, props changed) Deleted: head/devel/p4/distinfo.freebsd100x86 head/devel/p4/distinfo.freebsd100x86_64 head/devel/p4api/distinfo.freebsd100x86 head/devel/p4api/distinfo.freebsd100x86_64 Modified: head/devel/p4/Makefile head/devel/p4/Makefile.inc head/devel/p4api/Makefile Modified: head/devel/p4/Makefile ============================================================================== --- head/devel/p4/Makefile Fri Feb 2 18:54:12 2018 (r460726) +++ head/devel/p4/Makefile Fri Feb 2 19:07:21 2018 (r460727) @@ -2,25 +2,21 @@ # $FreeBSD$ PORTNAME= p4 -PORTVERSION= 2016.1.1492381 +PORTVERSION= ${YEAR}.${MAJOR}.${MINOR} +PORTREVISION= 1 CATEGORIES= devel -MASTER_SITES= ftp://ftp.perforce.com/perforce/${P4VERSION}/bin.${PLATFORM}/ \ - http://filehost.perforce.com/perforce/${P4VERSION}/bin.${PLATFORM}/ -DISTNAME= p4 -EXTRACT_SUFX= -EXTRACT_ONLY= # none +MASTER_SITES= https://swarm.workshop.perforce.com/projects/perforce_software-p4/archives/:zip +DISTNAME= ${YEAR}-${MAJOR} +DISTFILES= ${ZIP_FILES}:zip +EXTRACT_ONLY= ${ZIP_FILES} MAINTAINER= gordon@FreeBSD.org COMMENT= Perforce client -# The LICENSE file is not included in the distfile, but Catherine Louie of -# Perforce Support assures me that the LICENSE file on swarm also applies to -# the binary distribution. -# https://swarm.workshop.perforce.com/projects/perforce_software-p4/files/2016-1/LICENSE LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE -NO_BUILD= yes -NO_WRKSUBDIR= yes +BUILD_DEPENDS= ${JAM}:devel/jam PLIST_FILES= bin/p4 @@ -28,7 +24,16 @@ PLIST_FILES= bin/p4 .include "Makefile.inc" +# Sadly, Jam always returns 1 even on success. Ignore its return value and +# detect build errors during the install phase. +do-build: + cd ${WRKSRC} && ${SETENV} C++="${CXX}" C++FLAGS="${CXXFLAGS}" \ + CCFLAGS="${CFLAGS}" \ + LINKFLAGS="${LDFLAGS}" \ + OSVER=${OSVER} \ + ${JAM} -dx -j${MAKE_JOBS_NUMBER} || true + do-install: - ${INSTALL_PROGRAM} ${DISTDIR}/${DIST_SUBDIR}/p4 ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/p4-bin/p4 ${STAGEDIR}${PREFIX}/bin .include Modified: head/devel/p4/Makefile.inc ============================================================================== --- head/devel/p4/Makefile.inc Fri Feb 2 18:54:12 2018 (r460726) +++ head/devel/p4/Makefile.inc Fri Feb 2 19:07:21 2018 (r460727) @@ -1,22 +1,8 @@ -# Figure out what to install -.if ${OPSYS} == FreeBSD - -ONLY_FOR_ARCHS?= amd64 i386 - -.if ${ARCH} == amd64 -PLATFORM= freebsd100x86_64 - -.elif ${ARCH} == i386 -PLATFORM= freebsd100x86 - -.else -IGNORE= unsupported OS release, sorry -.endif - -.else -IGNORE= ${OPSYS} is unsupported, sorry -.endif - +ZIP_FILES= ${DISTNAME}.zip P4VERSION?= r${PORTVERSION:S/^20//:C/\.[0-9]+$//} -DIST_SUBDIR?= perforce/${PORTVERSION}/bin.${PLATFORM} -DISTINFO_FILE?= ${MASTERDIR}/distinfo.${PLATFORM} +YEAR= 2016 +MAJOR= 1 +MINOR= 1492381 + +JAM?= ${LOCALBASE}/bin/jam +OSVER?= ${OSREL:S/.//} Added: head/devel/p4/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p4/distinfo Fri Feb 2 19:07:21 2018 (r460727) @@ -0,0 +1,3 @@ +TIMESTAMP = 1517531476 +SHA256 (2016-1.zip) = 75ee76a2eb1b6a866b61c2e6bd473aa57ff796d8e5e2f2497d219bf5628a4fc7 +SIZE (2016-1.zip) = 2249015 Added: head/devel/p4/files/patch-Jamrules ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p4/files/patch-Jamrules Fri Feb 2 19:07:21 2018 (r460727) @@ -0,0 +1,28 @@ +--- Jamrules.orig 2018-02-01 21:40:54 UTC ++++ Jamrules +@@ -449,12 +449,11 @@ + # P4BIN is set to ../p4-bin (relative to P4) + + SubDir AllP4 p4 ; # where we are +- SubDir AllP4 p4-bin ; # where we want to be ++ SubDir AllP4 p4 p4-bin ; # where we want to be + SubDir P4BIN ; # name is that + SubDir AllP4 p4 ; # back to where we started + + EXEC_SUB_TOKENS = +- $(OS:L)$(OSVER:EL)$(OSPLAT:EL) + $(BUILD) + $(TYPE:L) ; + +@@ -931,11 +930,6 @@ + OPTIM += -Wno-parentheses -Wno-switch -fwrapv ; + + _mflags = ; +- switch $(OSPLAT:U) +- { +- case X86 : _mflags = -m32 ; +- case X86_64 : _mflags = -m64 ; +- } + + $(GENFLAGS) += $(_mflags) -pipe ; + LINKFLAGS += $(_mflags) ; Modified: head/devel/p4api/Makefile ============================================================================== --- head/devel/p4api/Makefile Fri Feb 2 18:54:12 2018 (r460726) +++ head/devel/p4api/Makefile Fri Feb 2 19:07:21 2018 (r460727) @@ -1,41 +1,55 @@ # $FreeBSD$ PORTNAME= p4api -PORTVERSION= 2016.1.1492381 +PORTVERSION= ${YEAR}.${MAJOR}.${MINOR} +PORTREVISION= 1 CATEGORIES= devel -MASTER_SITES= ftp://ftp.perforce.com/perforce/${P4VERSION}/bin.${PLATFORM}/:tar \ +MASTER_SITES= https://swarm.workshop.perforce.com/projects/perforce_software-p4/archives/:zip \ ftp://ftp.perforce.com/perforce/${P4VERSION}/doc/manuals/p4api/:pdf -EXTRACT_SUFX= -DISTFILES= ${TAR_FILES}:tar p4api.pdf:pdf -EXTRACT_ONLY= ${TAR_FILES} +DISTNAME= ${YEAR}-${MAJOR} +DISTFILES= ${ZIP_FILES}:zip p4api.pdf:pdf +EXTRACT_ONLY= ${ZIP_FILES} MAINTAINER= gordon@FreeBSD.org COMMENT= Perforce API (static libraries and header files) -# The LICENSE file is not included in the distfile, but Catherine Louie of -# Perforce Support assures me that the LICENSE file on swarm also applies to -# the binary distribution. -# https://swarm.workshop.perforce.com/projects/perforce_software-p4/files/2016-1/LICENSE LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE -NO_BUILD= yes +BUILD_DEPENDS= ${JAM}:devel/jam OPTIONS_DEFINE= DOCS EXAMPLES -.include +USES= zip -.include "${.CURDIR}/../p4/Makefile.inc" +WRKSRC= ${WRKDIR}/${DISTNAME} -TAR_FILES= p4api.tgz +.include +.include "../p4/Makefile.inc" +# Sadly, Jam always returns 1 even on success. Ignore its return value and +# detect build errors during the install phase. +do-build: + cd ${WRKSRC} && ${SETENV} C++="${CXX}" C++FLAGS="${CXXFLAGS}" \ + CCFLAGS="${CFLAGS}" \ + LINKFLAGS="${LDFLAGS}" \ + OSVER=${OSVER} \ + API=1 \ + TYPE=pic \ + ${JAM} -dx -j${MAKE_JOBS_NUMBER} || true + do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/include/perforce - cd ${WRKSRC}/include/p4 && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/perforce + cd ${WRKSRC}/p4-bin/bin.pic/p4api-*/include/p4 && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/perforce ${MKDIR} ${STAGEDIR}${PREFIX}/lib/perforce - cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/perforce + cd ${WRKSRC}/p4-bin/bin.pic/p4api-*/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/perforce + +do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/p4api.pdf ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${DISTDIR}/p4api.pdf ${STAGEDIR}${DOCSDIR} + +do-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - cd ${WRKSRC}/sample && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC}/p4-bin/bin.pic/p4api-*/sample && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} .include Added: head/devel/p4api/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p4api/distinfo Fri Feb 2 19:07:21 2018 (r460727) @@ -0,0 +1,5 @@ +TIMESTAMP = 1517528733 +SHA256 (2016-1.zip) = 75ee76a2eb1b6a866b61c2e6bd473aa57ff796d8e5e2f2497d219bf5628a4fc7 +SIZE (2016-1.zip) = 2249015 +SHA256 (p4api.pdf) = df5e388c2753925d8411d98a14d7b634ef2543d4a0a04a340513e89d887ab57b +SIZE (p4api.pdf) = 1908708 Added: head/devel/p4api/files/patch-Jamrules ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p4api/files/patch-Jamrules Fri Feb 2 19:07:21 2018 (r460727) @@ -0,0 +1,28 @@ +--- Jamrules.orig 2018-02-01 21:40:54 UTC ++++ Jamrules +@@ -449,12 +449,11 @@ + # P4BIN is set to ../p4-bin (relative to P4) + + SubDir AllP4 p4 ; # where we are +- SubDir AllP4 p4-bin ; # where we want to be ++ SubDir AllP4 p4 p4-bin ; # where we want to be + SubDir P4BIN ; # name is that + SubDir AllP4 p4 ; # back to where we started + + EXEC_SUB_TOKENS = +- $(OS:L)$(OSVER:EL)$(OSPLAT:EL) + $(BUILD) + $(TYPE:L) ; + +@@ -931,11 +930,6 @@ + OPTIM += -Wno-parentheses -Wno-switch -fwrapv ; + + _mflags = ; +- switch $(OSPLAT:U) +- { +- case X86 : _mflags = -m32 ; +- case X86_64 : _mflags = -m64 ; +- } + + $(GENFLAGS) += $(_mflags) -pipe ; + LINKFLAGS += $(_mflags) ;