Bug 204850 - math/cryptominisat & math/py-cryptominisat: Update to 4.5.3
Summary: math/cryptominisat & math/py-cryptominisat: Update to 4.5.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2015-11-27 18:04 UTC by Gleb Popov
Modified: 2016-01-07 14:31 UTC (History)
3 users (show)

See Also:
arrowd: maintainer-feedback+


Attachments
patch (6.08 KB, patch)
2015-11-27 18:04 UTC, Gleb Popov
arrowd: maintainer-approval+
Details | Diff
math/{py-}cryptominisat: Update to 4.5.3 (11.86 KB, patch)
2016-01-05 12:44 UTC, Kubilay Kocak
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Popov freebsd_committer freebsd_triage 2015-11-27 18:04:22 UTC
Created attachment 163587 [details]
patch
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-28 11:42:33 UTC
It's probably worth trying to remove the need for:

+do-install:
+	cd ${WRKSRC}/py-lib && ${PYTHON_CMD} ${PYSETUP} install ${PYDISTUTILS_INSTALLARGS} --root=${STAGEDIR}
+

I'm not sure that the issue with USE_PYTHON=distutils was that required removing it, but the replacement do-install doesn't look any different than what the default does.

Can you elaborate on why this change was necessary?
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2015-11-28 17:24:46 UTC
(In reply to Kubilay Kocak from comment #1)
This port uses CMake to create setup.py file, hence USES = cmake. This leads to configure, build and install targets to be overriden with cmake ones even with USE_PYTHON=distutils. Because of this, I need to override do-install neverthless.

Additionally, USE_PYTHON=distutils adds --single-version-externally-managed flag to PYDISTUTILS_INSTALLARGS, which aren't supported by port's setup.py.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-29 01:49:14 UTC
--single-version-externally-managed is a requirement for consistent Python port packaging/installation. Upstream needs to fix their packaging, so that it works with standard tooling and processes (pip, etc). In the meantime though, what's the *actual* blocker/problem to installation with single-version-externally-managed?

Ideally they should distribute their package separately on PyPI so we (and others) can just grab the sdist, with the setup.py already generated.
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2015-11-29 08:32:28 UTC
(In reply to Kubilay Kocak from comment #3)
>In the meantime though, what's the *actual* blocker/problem to installation with single-version-externally-managed?

It says "unknown flag" and dies.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-29 08:51:47 UTC
(In reply to 6yearold from comment #4)

You observe that error when using USE_PYTHON=distutils, or with the existing do-install?

Note: The flag will only 'exist' (be available):

a) If the package by default imports setuptools (which this one doesn't), OR
b) When the setup.py build|install calls are wrapped using the '''import setuptools ...' code, as USE_PYTHON=distutils provides. This feature is *specifically* implemented to wrap pure distutils-only packages like this one. So if it doesn't work, we need to understand why.

See: contents of PYDISTUTILS_SETUP variable.

I'm testing the build of this to see what's going on, as I can't see anything in the upstream setup.py that would preclude that command running.
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2015-11-29 08:59:25 UTC
(In reply to Kubilay Kocak from comment #5)
>You observe that error when using USE_PYTHON=distutils, or with the existing do-install?

I get this with both USE_PYTHON=distutils and overriden do-install. Without the latter, install targets turns into `make install` due to USES=cmake.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-05 08:15:16 UTC
Adding:

+BUILD_DEPENDS=	xxd:${PORTSDIR}/editors/vim # for xxd tool

Turns this into a 130 dependency monster.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-05 08:18:06 UTC
Looks like vim-lite provides xxd, switching BUILD_DEPENDS to that (ugh)
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-05 08:28:09 UTC
I'll have a patch for you to approve soon.
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-05 12:44:54 UTC
Created attachment 165103 [details]
math/{py-}cryptominisat: Update to 4.5.3

math/{py-}cryptominisat: Update to 4.5.3

Common:

- Update PORTVERSION and distinfo checksum (4.5.3)
- Switch to GITHUB for DISTFILES, remove USES=tar accordingly

py-cryptominisat:

- Convert into fully fledged port
- Add distinfo and proper (unique) pkg-descr
- Remove MASTER port overrides accordingly
- Match COMMENT to upstream setup.py:description
- De-scope USES=compiler to compiler only
- Remove upstreamed patches
- Patch to properly use distutils and autoplist instead
  of an uncessary cmake build (Also add post-patch for this)
- Strip shared library

cryptominisat:

- Remove slave port overrides
- Add BUILD_DEPENDS on vim-lite for xxd(8) tool
- Remove upstreamed patches
- Add patches for missing includes breaking builds on 9.3 [1]
- Update pkg-plist

[1] https://github.com/msoos/cryptominisat/issues/304
Comment 11 Gleb Popov freebsd_committer freebsd_triage 2016-01-05 18:23:56 UTC
Looks good. Thanks!
Comment 12 commit-hook freebsd_committer freebsd_triage 2016-01-06 14:07:58 UTC
A commit references this bug:

Author: koobs
Date: Wed Jan  6 14:07:06 UTC 2016
New revision: 405351
URL: https://svnweb.freebsd.org/changeset/ports/405351

Log:
  math/{py-}cryptominisat: Update to 4.5.3

  Common:

  - Update PORTVERSION and distinfo checksum (4.5.3) [1]
  - Switch to GITHUB for DISTFILES, remove USES=tar accordingly [1]

  py-cryptominisat:

  - Convert into fully fledged port
  - Add distinfo and proper (unique) pkg-descr
  - Remove MASTER port overrides accordingly
  - Match COMMENT to upstream setup.py:description
  - De-scope USES=compiler to compiler only
  - Remove upstreamed patches
  - Patch to properly use distutils and autoplist instead
    of an uncessary cmake build (Also add post-patch for this)
  - Strip shared library

  cryptominisat:

  - Remove slave port overrides
  - Add BUILD_DEPENDS on vim-lite for xxd(8) tool [1]
  - Remove upstreamed patches [1]
  - Add patches for missing includes breaking builds on 9.3 [1]
  - Update pkg-plist [1]

  [1] https://github.com/msoos/cryptominisat/issues/304

  PR:		204850 [1]
  Submitted by:	maintainer [1]
  Approved by:	maintainer [*]

Changes:
  head/math/cryptominisat/Makefile
  head/math/cryptominisat/distinfo
  head/math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt
  head/math/cryptominisat/files/patch-cryptominisat4_bva.cpp
  head/math/cryptominisat/files/patch-src_dimacsparser.cpp
  head/math/cryptominisat/files/patch-src_dimacsparser.h
  head/math/cryptominisat/pkg-plist
  head/math/py-cryptominisat/Makefile
  head/math/py-cryptominisat/distinfo
  head/math/py-cryptominisat/files/patch-pycryptosat.cpp
  head/math/py-cryptominisat/files/patch-setup.py.in
  head/math/py-cryptominisat/pkg-descr
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-07 14:31:20 UTC
Committed with changes, thank you!