From owner-svn-ports-head@freebsd.org Fri Jan 5 23:20:52 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04677EA63AE; Fri, 5 Jan 2018 23:20:52 +0000 (UTC) (envelope-from dumbbell@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 mx1.freebsd.org (Postfix) with ESMTPS id C2B0E64E02; Fri, 5 Jan 2018 23:20:51 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05NKoRo040949; Fri, 5 Jan 2018 23:20:50 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05NKoWw040948; Fri, 5 Jan 2018 23:20:50 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201801052320.w05NKoWw040948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Fri, 5 Jan 2018 23:20:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458177 - head/lang/rust X-SVN-Group: ports-head X-SVN-Commit-Author: dumbbell X-SVN-Commit-Paths: head/lang/rust X-SVN-Commit-Revision: 458177 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 23:20:52 -0000 Author: dumbbell Date: Fri Jan 5 23:20:50 2018 New Revision: 458177 URL: https://svnweb.freebsd.org/changeset/ports/458177 Log: lang/rust: Find libstd's suffix at runtime ... instead of hard-coding all values in the Makefile. This eases the update of Rust. Modified: head/lang/rust/Makefile Modified: head/lang/rust/Makefile ============================================================================== --- head/lang/rust/Makefile Fri Jan 5 22:47:53 2018 (r458176) +++ head/lang/rust/Makefile Fri Jan 5 23:20:50 2018 (r458177) @@ -126,11 +126,6 @@ pre-fetch: fi RUST_STD_DIR= ${RUST_STD_BOOTSTRAP:T:R:R} -LIBSTD_SUFFIX_aarch64= 0b5479f9b944419b -LIBSTD_SUFFIX_amd64= d5600fa473bb2268 -LIBSTD_SUFFIX_i386= 7c10a38de31dc096 -LIBSTD= ${RUST_STD_DIR}/rust-std-${RUST_TARGET}/lib/rustlib/${RUST_TARGET}/lib/libstd-${LIBSTD_SUFFIX_${ARCH}:U${LIBSTD_SUFFIX}}.rlib -STDF= ${LIBSTD:T:R:S/lib//}.0.o post-extract: @${MKDIR} \ @@ -147,12 +142,16 @@ post-extract: .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200031 ${TAR} -x -C ${WRKSRC} -f ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP} ${CC} ${CFLAGS} -fPIC -c -o ${WRKSRC}/old_fstat.o ${FILESDIR}/old_fstat.c - (cd ${WRKSRC} && ${AR} x ${WRKSRC}/${LIBSTD} ${STDF}) - ${LD} -r -o ${WRKSRC}/std.xx.o ${WRKSRC}/${STDF} ${WRKSRC}/old_fstat.o - ${MV} ${WRKSRC}/std.xx.o ${WRKSRC}/${STDF} - (cd ${WRKSRC} && ${AR} r ${WRKSRC}/${LIBSTD} ${STDF}) - ${TAR} -cy --format=ustar -C ${WRKSRC} -f ${WRKSRC}/rustc.tbz ${RUST_STD_DIR} - ${MV} ${WRKSRC}/rustc.tbz ${WRKSRC}/build/cache/${RUST_STD_BOOTSTRAP} + (set -ex; cd ${WRKSRC}; \ + libstd="$$(echo "${RUST_STD_DIR}/rust-std-${RUST_TARGET}/lib/rustlib/${RUST_TARGET}/lib/"libstd-*.rlib)"; \ + hash="$$(basename "$$libstd" .rlib | ${SED} 's/^libstd-//')"; \ + std_o="std-$$hash.0.o"; \ + ${AR} x "$$libstd" "$$std_o"; \ + ${LD} -r -o std.xx.o "$$std_o" old_fstat.o; \ + ${MV} std.xx.o "$$std_o"; \ + ${AR} r "$$libstd" "$$std_o") + ${TAR} -cz --format=ustar -C ${WRKSRC} -f ${WRKSRC}/rust-std.tar.gz ${RUST_STD_DIR} + ${MV} ${WRKSRC}/rust-std.tar.gz ${WRKSRC}/build/cache/${RUST_STD_BOOTSTRAP} .endif post-patch: