Package Details: msieve 1.53-2

Git Clone URL: https://aur.archlinux.org/msieve.git (read-only, click to copy)
Package Base: msieve
Description: Library for factoring large integers
Upstream URL: https://sourceforge.net/projects/msieve
Licenses: custom
Submitter: vesath
Maintainer: None
Last Packager: 0b100100
Votes: 13
Popularity: 0.000000
First Submitted: 2011-10-25 06:17 (UTC)
Last Updated: 2021-12-28 22:17 (UTC)

Required by (0)

Sources (1)

Latest Comments

0b100100 commented on 2021-12-15 00:26 (UTC) (edited on 2021-12-15 02:25 (UTC) by 0b100100)

Hi everyone,

Had to downgrade the package to the newest public release version to conform to the VCS package guidelines.

To get access to the newest upstream changes the newly created msieve-svn package can be used.

I am open for any feedback.

PS.: Thank you ccorn for your great suggestions. I added most of them.

jgeralnik commented on 2021-04-01 19:20 (UTC)

Package is broken because source (on maintainer's personal website because of sourceforge issues below) 404s

vesath commented on 2020-10-05 08:29 (UTC)

ccorn: That's a great suggestion but since I lack the time and interest to work on this package I've just orphaned it so you can adopt it and become its new maintainer. Cheers.

ccorn commented on 2020-10-04 01:33 (UTC)

Since Sourceforge does not seem to support reproducible snapshot archives, it is probably best to use subversion directly. This also reduces the transfer costs of updates and eliminates the need to patch Makefile for SVN_VERSION.

Some more tweaks. My commit message reads:

Use svn; make package optionally auto-updatable; further tweaks.

To avoid having to host sources separately, use subversion directly.
This maintains a persistent svn checkout, thus reduces update size.

_pkgrev specifies the SVN revision to use.
Unset means the latest.
pkgver is automatically set accordingly.
Depending on whether _pkgrev is set or not,
pkgname becomes msieve or msieve-svn.
The -svn package also declares that it provides,
and conflicts with, the non-svn variant.
The built executable keeps the name "msieve" in both variants.

Also install more documentation files.

No longer patch Makefile. It knows to run `svnversion .`,
but that would append "M" to the revision number if any changes
to the checkout are detected. To tweak CFLAGS, use MACHINE_FLAGS.

Note: This means that our CFLAGS now follow the Makefile's
OPT_FLAGS instead of preceding them. Therefore, unless we
explicitly filter out -O and -m flags, we override their
counterparts from OPT_FLAGS.

I'll post the PKGBUILD here directly because that's shorter than the diff:

# Maintainer: Gaetan Bisson <bisson@archlinux.org>

# Set _pkgrev to a revision number in order to fix the version.
# Leaving _pkgrev empty or undefined makes a latest-version *-svn package.
_pkgrev=1034

_prjname=msieve
pkgname=${_prjname}
if [ -z "${_pkgrev}" ]; then
    pkgname+=-svn
    provides=(${_prjname})
    conflicts=(${_prjname})
fi
# pkgver gets auto-updated (but to the version determined by _pkgrev if given)
pkgver=1.54r1034
pkgrel=3
pkgdesc='Library for factoring large integers'
url='https://sourceforge.net/projects/${_prjname}/'
license=('custom')
arch=('x86_64')
depends=('zlib' 'gmp-ecm')
makedepends=('subversion')
source=("${_prjname}::svn://svn.code.sf.net/p/${_prjname}/code/trunk")
sha256sums=('SKIP')

prepare() {
    cd "${srcdir}/${_prjname}"
    if test -n "${_pkgrev}"; then svn update -r "${_pkgrev}"; fi
}

# Find line(s) beginning with "#define $1 " in file $2 and output the remainder
_get_def() {
    local s="[[:space:]]"
    sed -n -E "s/^$s*#$s*define$s+$1$s+//p" "$2"
}

pkgver() {
    cd "${srcdir}/${_prjname}"
    local MAJOR_VERSION MINOR_VERSION SVN_VERSION
    MAJOR_VERSION=$(_get_def MSIEVE_MAJOR_VERSION include/msieve.h)
    MINOR_VERSION=$(_get_def MSIEVE_MINOR_VERSION include/msieve.h)
    # Note: if you modify the checkout, svnversion will append "M"
    SVN_VERSION=$(svnversion .)
    printf '%d.%02dr%s\n' "$MAJOR_VERSION" "$MINOR_VERSION" "$SVN_VERSION"
}

build() {
    cd "${srcdir}/${_prjname}"
    CFLAGS+=' -fopenmp'
    # Note: Makefile defines auto-configured OPT_FLAGS
    # and leaves MACHINE_FLAGS for us to tweak CFLAGS.
    # (a) If you do not want to override OPT_FLAGS's -O3 or -march=native:
    # make all ECM=1 MACHINE_FLAGS="\$(filter-out -O% -m%,$CFLAGS)"
    # (b) Better keep our -m overrides, but use OPT_FLAGS's -O3 setting:
    # make all ECM=1 MACHINE_FLAGS="\$(filter-out -O%,$CFLAGS)"
    # (c) Use all CFLAGS from makepkg.conf, including -O* and -m* flags:
    make all ECM=1 MACHINE_FLAGS="$CFLAGS"
}

package() {
    cd "${srcdir}/${_prjname}"
    install -Dm755 msieve "${pkgdir}"/usr/bin/msieve
    install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" Changes Readme*
    install -d "${pkgdir}/usr/share/licenses/${pkgname}"
    ln -s /usr/share/doc/${pkgname}/Readme "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

vesath commented on 2020-09-28 22:28 (UTC)

hotaru: Thanks for noticig. I guess you need to click on the sourceforge website UI to trigger the zip file generation and then the URL remains valid for about an hour. I'll host a copy on my server and update the PKGBUILD. Cheers.

hotaru commented on 2020-09-28 17:41 (UTC)

https://sourceforge.net/code-snapshots/svn/m/ms/msieve/code/msieve-code-r1034-trunk.zip is giving a 404 error.

vesath commented on 2020-09-28 06:19 (UTC)

Great work! Thanks a lot.

However that sha256sums did not work for me. I'm guessing sourceforge generates the zip file on demand and only caches it for a couple of hours. That's annoying. I don't want to use 'SKIP' as checksum and I don't feel like hosting a static copy of the zip file myself. Hopefully Jason will release a new msieve soon... :-)

ccorn commented on 2020-09-27 18:44 (UTC)

Version update (necessary with GMP v6.2) and minor tweaks:

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,36 @@
 # Maintainer: Gaetan Bisson <bisson@archlinux.org>

 pkgname=msieve
-pkgver=1.53
+_pkgrev=1034
+_srcrev=code-r${_pkgrev}-trunk
+pkgver=1.54r${_pkgrev}
 pkgrel=1
 pkgdesc='Library for factoring large integers'
-url='http://sourceforge.net/projects/msieve/'
+url='https://sourceforge.net/projects/msieve/'
 license=('custom')
 arch=('x86_64')
 depends=('zlib' 'gmp-ecm')
-source=("http://downloads.sourceforge.net/project/msieve/msieve/Msieve%20v${pkgver}/msieve${pkgver/./}_src.tar.gz")
-sha256sums=('c5fcbaaff266a43aa8bca55239d5b087d3e3f138d1a95d75b776c04ce4d93bb4')
+source=("https://sourceforge.net/code-snapshots/svn/m/ms/msieve/code/msieve-${_srcrev}.zip")
+sha256sums=('d7caf7f459b6b2a7392ad1e4ea468e6d053e592dd82e5470f74f1cdb8aff05b0')

 prepare() {
-   cd "${srcdir}/${pkgname}-${pkgver}"
+   cd "${srcdir}/${pkgname}-${_srcrev}"
    sed \
        -e 's/^CFLAGS =/CFLAGS +=/' \
+       -e "/^SVN_VERSION :=/s/=.*/= r${_pkgrev}/" \
        -i Makefile
 }

 build() {
-   cd "${srcdir}/${pkgname}-${pkgver}"
+   cd "${srcdir}/${pkgname}-${_srcrev}"
    CFLAGS+=' -fopenmp'
    make all ECM=1
 }

 package() {
-   cd "${srcdir}/${pkgname}-${pkgver}"
+   cd "${srcdir}/${pkgname}-${_srcrev}"
    install -Dm755 msieve "${pkgdir}"/usr/bin/msieve
-   install -Dm544 Readme "${pkgdir}"/usr/share/doc/msieve/Readme
-   install -d "${pkgdir}"/usr/share/licenses/msieve; ln -s /usr/share/doc/msieve/Readme "${pkgdir}"/usr/share/licenses/msieve/Readme
+   install -Dm644 Readme "${pkgdir}"/usr/share/doc/msieve/Readme
+   install -d "${pkgdir}"/usr/share/licenses/msieve
+   ln -s /usr/share/doc/msieve/Readme "${pkgdir}"/usr/share/licenses/msieve/LICENSE
 }