From owner-svn-ports-head@freebsd.org Wed Mar 29 02:47:06 2017 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 19E75D221ED; Wed, 29 Mar 2017 02:47:06 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [96.47.72.37]) (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 E8AF711A5; Wed, 29 Mar 2017 02:47:05 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2T2joKf025627; Wed, 29 Mar 2017 02:45:50 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2T2jnQK025625; Wed, 29 Mar 2017 02:45:49 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201703290245.v2T2jnQK025625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Wed, 29 Mar 2017 02:45:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r437180 - head/math/primegen X-SVN-Group: ports-head 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.23 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: Wed, 29 Mar 2017 02:47:06 -0000 Author: danfe Date: Wed Mar 29 02:45:49 2017 New Revision: 437180 URL: https://svnweb.freebsd.org/changeset/ports/437180 Log: - Optimize away PROGRAM_FILES, HEADER_FILES, and LIB_FILES variables: they contain one to two values and make things harder to understand; this allows to simplify PLIST_FILES setting and `do-install' target - Fix `post-patch' target: instead of sed(1)ing each and every file, and leaving lots of `*.bak' files behind, apply the fix where it is needed only (while here, simplify that regular expression as well) - Set correct ALL_TARGET instead blanking it; fix pkg-descr formatting Modified: head/math/primegen/Makefile head/math/primegen/pkg-descr Modified: head/math/primegen/Makefile ============================================================================== --- head/math/primegen/Makefile Wed Mar 29 01:49:02 2017 (r437179) +++ head/math/primegen/Makefile Wed Mar 29 02:45:49 2017 (r437180) @@ -9,28 +9,18 @@ MASTER_SITES= http://cr.yp.to/primegen/ MAINTAINER= ports@FreeBSD.org COMMENT= Small, fast library to generate prime numbers in order -ALL_TARGET= +ALL_TARGET= default -PROGRAM_FILES= primes primegaps -HEADER_FILES= primegen.h -LIB_FILES= libprimegen.a - -# programs -PLIST_FILES+= ${PROGRAM_FILES:S,^,bin/,} - -# header files -PLIST_FILES+= ${HEADER_FILES:S,^,include/,} - -# libraries -PLIST_FILES+= ${LIB_FILES:S,^,lib/,} - -# man pages -PLIST_FILES+= man/man1/primes.1.gz man/man1/primegaps.1.gz \ +PLIST_FILES= bin/primes bin/primegaps \ + include/primegen.h \ + lib/libprimegen.a \ + man/man1/primes.1.gz \ + man/man1/primegaps.1.gz \ man/man3/primegen.3.gz post-patch: - @${FIND} ${WRKSRC} -type f -exec \ - ${REINPLACE_CMD} -E -e 's!(primegen.a)!lib\1!' {} \; + @${REINPLACE_CMD} -e 's,primegen\.a,lib&,' ${WRKSRC}/Makefile \ + ${WRKSRC}/TARGETS ${WRKSRC}/hier.c do-configure: @${ECHO_CMD} '${CC} ${CFLAGS} -fsigned-char -fPIC' > ${WRKSRC}/conf-cc @@ -38,15 +28,10 @@ do-configure: @${ECHO_CMD} '${PREFIX}' > ${WRKSRC}/conf-home do-install: -.for file in ${PROGRAM_FILES} - ${INSTALL_PROGRAM} ${WRKSRC}/${file} ${STAGEDIR}${PREFIX}/bin -.endfor -.for file in ${HEADER_FILES} - ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${PREFIX}/include -.endfor -.for file in ${LIB_FILES} - ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${PREFIX}/lib -.endfor + ${INSTALL_PROGRAM} ${WRKSRC}/primes ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/primegaps ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/primegen.h ${STAGEDIR}${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/libprimegen.a ${STAGEDIR}${PREFIX}/lib ${INSTALL_MAN} ${WRKSRC}/primes.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/primegaps.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/primegen.3 ${STAGEDIR}${MAN3PREFIX}/man/man3 Modified: head/math/primegen/pkg-descr ============================================================================== --- head/math/primegen/pkg-descr Wed Mar 29 01:49:02 2017 (r437179) +++ head/math/primegen/pkg-descr Wed Mar 29 02:45:49 2017 (r437180) @@ -1,7 +1,6 @@ -primegen is a small, fast library to generate prime numbers in -order. It generates the 50847534 primes up to 1000000000 in just 8 -seconds on a Pentium II-350; it prints them in decimal in just 35 -seconds. +primegen is a small, fast library to generate prime numbers in order. +It generates the 50847534 primes up to 1000000000 in just 8 seconds +on a Pentium II-350; it prints them in decimal in just 35 seconds. primegen can generate primes up to 1000000000000000, although it is not optimized for primes past 32 bits. It uses the Sieve of Atkin