View | Details | Raw Unified | Return to bug 256427 | Differences between
and this patch

Collapse All | Expand All

(-)b/finance/py-chiapos/Makefile (+39 lines)
Added Link Here
1
# $FreeBSD$
2
3
PORTNAME=	chiapos
4
DISTVERSION=	1.0.3
5
CATEGORIES=	finance python
6
MASTER_SITES=	CHEESESHOP
7
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
9
10
MAINTAINER=	risner@stdio.com
11
COMMENT=	Chia proof of space plotting, proving, and verifying (wraps C++)
12
13
LICENSE=	APACHE20
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
16
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools_scm>=3.5.0:devel/py-setuptools_scm@${PY_FLAVOR} \
17
		cmake:devel/cmake \
18
		pybind11>0:devel/pybind11
19
20
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flake8>0:devel/py-flake8@${PY_FLAVOR} \
21
		${PYTHON_PKGNAMEPREFIX}mypy>0:devel/py-mypy@${PY_FLAVOR}
22
23
USES=		python:3.7+
24
USE_GITHUB=	nodefault
25
GH_TUPLE=	jarro2783:cxxopts:302302b30839505703d37fb82f536c53cf9172fa:c/src-ext/cxxopts \
26
		gulrak:filesystem:4e21ab305794f5309a1454b4ae82ab9a0f5e0d25:g/src-ext/gulrak
27
USE_PYTHON=	autoplist concurrent distutils
28
29
PYDISTUTILS_INSTALLARGS+=	--skip-build
30
31
post-extract:
32
# Remove extraneous unused files to prevent confusion
33
	@${RM} ${WRKSRC}/lib/FiniteStateEntropy/fetch-content-CMakeLists.txt
34
	@${RM} ${WRKSRC}/pyproject.toml
35
36
do-test: stage
37
	@(cd ${WRKSRC}; py.test ./tests -s -v)
38
39
.include <bsd.port.mk>
(-)b/finance/py-chiapos/files/patch-CMakeLists.txt (+94 lines)
Added Link Here
1
--- CMakeLists.txt.orig	2021-05-28 02:40:44 UTC
2
+++ CMakeLists.txt
3
@@ -14,29 +14,8 @@ endif()
4
 project(chiapos C CXX ASM)
5
 
6
 # CMake 3.14+
7
-include(FetchContent)
8
+include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake)
9
 
10
-FetchContent_Declare(
11
-  pybind11-src
12
-  GIT_REPOSITORY https://github.com/pybind/pybind11.git
13
-  GIT_TAG        v2.6.2
14
-)
15
-FetchContent_MakeAvailable(pybind11-src)
16
-
17
-FetchContent_Declare(
18
-  cxxopts
19
-  GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git
20
-  GIT_TAG        v2.2.1
21
-)
22
-FetchContent_MakeAvailable(cxxopts)
23
-
24
-FetchContent_Declare(
25
-  gulrak
26
-  GIT_REPOSITORY https://github.com/gulrak/filesystem.git
27
-  GIT_TAG        v1.5.6
28
-)
29
-FetchContent_MakeAvailable(gulrak)
30
-
31
 set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib)
32
 set(FSE_FILES
33
     ${FSE_LIB}/fse_compress.c
34
@@ -48,8 +27,8 @@ set(FSE_FILES
35
 include_directories(
36
   ${INCLUDE_DIRECTORIES}
37
   ${CMAKE_CURRENT_SOURCE_DIR}/../lib/include
38
-  ${cxxopts_SOURCE_DIR}/include
39
-  ${gulrak_SOURCE_DIR}/include/ghc
40
+  ${CMAKE_CURRENT_SOURCE_DIR}/src-ext/cxxopts/include
41
+  ${CMAKE_CURRENT_SOURCE_DIR}/src-ext/gulrak/include/ghc
42
   ${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib
43
   ${CMAKE_CURRENT_SOURCE_DIR}/src
44
   ${CMAKE_CURRENT_SOURCE_DIR}/test
45
@@ -132,19 +111,6 @@ ENDIF()
46
 
47
 pybind11_add_module(chiapos ${CMAKE_CURRENT_SOURCE_DIR}/python-bindings/chiapos.cpp src/chacha8.c ${BLAKE3_SRC})
48
 
49
-add_executable(ProofOfSpace
50
-    src/cli.cpp
51
-    src/chacha8.c
52
-    ${BLAKE3_SRC}
53
-)
54
-
55
-add_executable(RunTests
56
-    tests/test-main.cpp
57
-    tests/test.cpp
58
-    src/chacha8.c
59
-    ${BLAKE3_SRC}
60
-)
61
-
62
 find_package(Threads REQUIRED)
63
 
64
 add_library(uint128 STATIC uint128_t/uint128_t.cpp)
65
@@ -152,29 +118,15 @@ target_include_directories(uint128 PUBLIC uint128_t)
66
 
67
 target_compile_features(fse PUBLIC cxx_std_17)
68
 target_compile_features(chiapos PUBLIC cxx_std_17)
69
-target_compile_features(RunTests PUBLIC cxx_std_17)
70
 
71
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
72
   target_link_libraries(chiapos PRIVATE fse Threads::Threads)
73
-  target_link_libraries(ProofOfSpace fse Threads::Threads)
74
-  target_link_libraries(RunTests fse Threads::Threads)
75
 elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
76
   target_link_libraries(chiapos PRIVATE fse Threads::Threads)
77
-  target_link_libraries(ProofOfSpace fse Threads::Threads)
78
-  target_link_libraries(RunTests fse Threads::Threads)
79
 elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
80
   target_link_libraries(chiapos PRIVATE fse Threads::Threads)
81
-  target_link_libraries(ProofOfSpace fse Threads::Threads)
82
-  target_link_libraries(RunTests fse Threads::Threads)
83
 elseif (MSVC)
84
   target_link_libraries(chiapos PRIVATE fse Threads::Threads uint128)
85
-  target_link_libraries(ProofOfSpace fse Threads::Threads uint128)
86
-  target_link_libraries(RunTests fse Threads::Threads uint128)
87
 else()
88
   target_link_libraries(chiapos PRIVATE fse stdc++fs Threads::Threads)
89
-  target_link_libraries(ProofOfSpace fse stdc++fs Threads::Threads)
90
-  target_link_libraries(RunTests fse stdc++fs Threads::Threads)
91
 endif()
92
-
93
-enable_testing()
94
-add_test(NAME RunTests COMMAND RunTests)
(-)b/finance/py-chiapos/files/patch-setup.py (+19 lines)
Added Link Here
1
--- setup.py.orig	2021-05-28 02:40:44 UTC
2
+++ setup.py
3
@@ -202,6 +202,7 @@ if platform.system() == "Windows":
4
 else:
5
     setup(
6
         name="chiapos",
7
+        version="1.0.3",
8
         author="Mariano Sorgente",
9
         author_email="mariano@chia.net",
10
         description="Chia proof of space plotting, proving, and verifying (wraps C++)",
11
@@ -209,7 +210,7 @@ else:
12
         python_requires=">=3.7",
13
         long_description=open("README.md").read(),
14
         long_description_content_type="text/markdown",
15
-        url="https://github.com/Chia-Network/chiavdf",
16
+        url="https://github.com/Chia-Network/chiapos",
17
         ext_modules=[CMakeExtension("chiapos", ".")],
18
         cmdclass=dict(build_ext=CMakeBuild),
19
         zip_safe=False,
(-)b/finance/py-chiapos/pkg-descr (+11 lines)
Added Link Here
1
Chia's proof of space is written in C++. Includes a plotter, prover, and
2
verifier. It exclusively runs on 64 bit architectures. Read the Proof of
3
Space document to learn about what proof of space is and how it works.
4
5
Notes:
6
Any ghc references are not Haskell related, rather a developer initials.
7
The HellmanAttacks example is experimental and incomplete upstream.
8
9
This port is for the Python module (library).
10
11
WWW: https://github.com/Chia-Network/chiapos

Return to bug 256427