Created attachment 355474 [details] libsodium-0.4.2.ebuild dev-libs/libsodium-0.4.2 ebuild submission in replacement of net-libs/nacl-0_p20110221 which is from the obsolete upstream site http://nacl.cr.yp.to/ (last version dated 2011-02-21) New site is https://github.com/jedisct1/libsodium/ and is active (last release dated 2013-07-08) I changed net-libs to dev-libs since it is more than a library for network communications : encryption, decryption, signatures, etc. From upstream : "Comparison with vanilla NaCl Sodium does not ship C++ bindings. These might be part of a distinct package. The default public-key signature system in NaCl was a prototype that shouldn't be used any more. Sodium ships with the SUPERCOP reference implementation of Ed25519, and uses this system by default for crypto_sign* operations. For backward compatibility, the previous system is still compiled in, as crypto_sign_edwards25519sha512batch*."
Created attachment 355476 [details] ChangeLog
Created attachment 355478 [details] libsodium-0.4.2.ebuild with test useflag added tests before install, with the test useflag
Comment on attachment 355476 [details] ChangeLog That's wrong in multiple ways.
Comment on attachment 355478 [details] libsodium-0.4.2.ebuild with test useflag ># Copyright 1999-2013 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/dev-libs/libsodium/libsodium-0.4.2.ebuild,v 0.4.2 2013/08/09 11:47:52 xmw Exp $ > >EAPI=5 > >inherit flag-o-matic This isn't needed (see below). >DESCRIPTION="NaCl (pronounced \"salt\") is a new easy-to-use high-speed software library for network communication, encryption, decryption, signatures, etc." This doesn't appear to describe libsodium, but net-libs/nacl. Also, it's too long. >HOMEPAGE="https://github.com/jedisct1/libsodium/" >SRC_URI="https://download.libsodium.org/libsodium/releases/${P}.tar.gz" >RESTRICT="mirror" Why do you restrict mirroring? >LICENSE="ISC license" LICENSE should be a space separated list of the names of specific license files stored in $PORTDIR/licenses/ >DEPEND="" >RDEPEND="${DEPEND}" When these are empty, there is no need to set them. >src_prepare() { > filter-flags "-O*" > append-cflags -O3 -fomit-frame-pointer -funroll-loops > append-cxxflags -O3 -fomit-frame-pointer -funroll-loops >} Why are you deliberately breaking our expectation of the build system respecting CFLAGS? >src_configure() { > econf \ > $(use_enable test) >} > >if use test ; then > src_test() { > if emake -j1 check -n &> /dev/null; then I haven't tried this out, but it doesn't seem useful to throw away the output. > vecho ">>> Test phase [check]: ${CATEGORY}/${PF}" > if ! emake -j1 check; then > hasq test $FEATURES && die "Make check failed. See above for details." > hasq test $FEATURES || eerror "Make check failed. See above for details." > fi > elif emake -j1 test -n &> /dev/null; then > vecho ">>> Test phase [test]: ${CATEGORY}/${PF}" > if ! emake -j1 test; then > hasq test $FEATURES && die "Make test failed. See above for details." > hasq test $FEATURES || eerror "Make test failed. See above for details." > fi > else > vecho ">>> Test phase [none]: ${CATEGORY}/${PF}" > fi > } >fi This looks much too complicated. It needs at least a description of why the default doesn't work. >src_install() { > emake DESTDIR="${D}" install With EAPI=5, you should call "default" instead. > dodoc NEWS README Set DOCS=( NEWS README ) in the global scope, then remove src_install() entirely and the default src_install will do everything you explicitly described.
(In reply to Jeroen Roovers from comment #4) > >inherit flag-o-matic > > This isn't needed (see below). Only "inherit flag-o-matic" ? or more ? I am not an ebuild expert. > > >DESCRIPTION="NaCl (pronounced \"salt\") is a new easy-to-use high-speed software library for network communication, encryption, decryption, signatures, etc." > > This doesn't appear to describe libsodium, but net-libs/nacl. Also, it's too > long. That's libsodium upstream description. I agree it recalls unappropriatly nacl. As it is too long, "new easy-to-use high-speed software library for network communication, encryption, decryption, signatures, etc." would be enough. > > >HOMEPAGE="https://github.com/jedisct1/libsodium/" > >SRC_URI="https://download.libsodium.org/libsodium/releases/${P}.tar.gz" > >RESTRICT="mirror" > > Why do you restrict mirroring? I always do that for my own overlay as it avoids waiting 15' for the official mirrors to time-out. Can be removed if it is better before putting it in an overlay. > > >LICENSE="ISC license" > > LICENSE should be a space separated list of the names of specific license > files stored in $PORTDIR/licenses/ ok, so ISC > > >DEPEND="" > >RDEPEND="${DEPEND}" > > When these are empty, there is no need to set them. ok, will remove them > > >src_prepare() { > > filter-flags "-O*" > > append-cflags -O3 -fomit-frame-pointer -funroll-loops > > append-cxxflags -O3 -fomit-frame-pointer -funroll-loops > >} > > Why are you deliberately breaking our expectation of the build system > respecting CFLAGS? sorry, I kept what I could from the nacl ebuild. I will remove that and check it works. > > >src_configure() { > > econf \ > > $(use_enable test) > >} > > > >if use test ; then > > src_test() { > > if emake -j1 check -n &> /dev/null; then > > I haven't tried this out, but it doesn't seem useful to throw away the > output. That is copy/paste from the Gentoo Dev Guide : http://devmanual.gentoo.org/ebuild-writing/functions/src_test/index.html > > > vecho ">>> Test phase [check]: ${CATEGORY}/${PF}" > > if ! emake -j1 check; then > > hasq test $FEATURES && die "Make check failed. See above for details." > > hasq test $FEATURES || eerror "Make check failed. See above for details." > > fi > > elif emake -j1 test -n &> /dev/null; then > > vecho ">>> Test phase [test]: ${CATEGORY}/${PF}" > > if ! emake -j1 test; then > > hasq test $FEATURES && die "Make test failed. See above for details." > > hasq test $FEATURES || eerror "Make test failed. See above for details." > > fi > > else > > vecho ">>> Test phase [none]: ${CATEGORY}/${PF}" > > fi > > } > >fi > > This looks much too complicated. It needs at least a description of why the > default doesn't work. Same remark. It is a copy past of the default from the guide, embraced in "if use test ... fi". If it is done by default, we can remove all of it. > > >src_install() { > > emake DESTDIR="${D}" install > > With EAPI=5, you should call "default" instead. This is from another Gentoo Dev Guide (http://devmanual.gentoo.org/quickstart/) which may be deprecated. Please, provide me with the full corrected line, I can't figure out what you want here. > > > dodoc NEWS README > > Set DOCS=( NEWS README ) in the global scope, then remove src_install() > entirely and the default src_install will do everything you explicitly > described. ok, will be modified. When I have your answers, I will perform the updates, tests, and upload. Thanks for your help. Cheers, Laurent.
Created attachment 355490 [details] libsodium-0.4.2.ebuild Corrections from comments #4 & #5. Incredibly simple. Thanks a lot Jeroen.
Created attachment 355608 [details] net-libs/libsodium-9999.ebuild Live ebuild This is a live ebuild that builds from the git repository, compatible with releases for easier maintenance.
Already in tree.