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

Collapse All | Expand All

(-)chiapos/Makefile (-3 / +3 lines)
Lines 1-5 Link Here
1
PORTNAME=	chiapos
1
PORTNAME=	chiapos
2
DISTVERSION=	1.0.3
2
DISTVERSION=	1.0.7
3
CATEGORIES=	finance
3
CATEGORIES=	finance
4
MASTER_SITES=	CHEESESHOP
4
MASTER_SITES=	CHEESESHOP
5
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
5
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
Lines 19-24 Link Here
19
19
20
NOT_FOR_ARCHS=	i386 powerpc
20
NOT_FOR_ARCHS=	i386 powerpc
21
21
22
BUILD_DEPENDS=	catch>0:devel/catch
23
22
USES=		cmake:noninja
24
USES=		cmake:noninja
23
USE_GITHUB=	nodefault
25
USE_GITHUB=	nodefault
24
GH_TUPLE=	jarro2783:cxxopts:302302b30839505703d37fb82f536c53cf9172fa:c/src-ext/cxxopts \
26
GH_TUPLE=	jarro2783:cxxopts:302302b30839505703d37fb82f536c53cf9172fa:c/src-ext/cxxopts \
Lines 30-37 Link Here
30
32
31
post-extract:
33
post-extract:
32
# This example is experimental, currently broken (upstream) and unnecessary.
34
# This example is experimental, currently broken (upstream) and unnecessary.
33
# The placeholder Makefile is for when/if they release a future fixed version.
34
	@${CP} ${FILESDIR}/Hellman-Makefile ${WRKSRC}/hellman_example/Makefile
35
# Remove extraneous unused files to prevent confusion
35
# Remove extraneous unused files to prevent confusion
36
	@${RM} ${WRKSRC}/lib/FiniteStateEntropy/fetch-content-CMakeLists.txt
36
	@${RM} ${WRKSRC}/lib/FiniteStateEntropy/fetch-content-CMakeLists.txt
37
	@${RM} ${WRKSRC}/pyproject.toml
37
	@${RM} ${WRKSRC}/pyproject.toml
(-)chiapos/distinfo (-3 / +3 lines)
Lines 1-6 Link Here
1
TIMESTAMP = 1623067298
1
TIMESTAMP = 1638584475
2
SHA256 (chiapos-1.0.3.tar.gz) = d987b481a3acbff1e0d77eb713af8d99ecec2bd11c2c465528a5078a433686bd
2
SHA256 (chiapos-1.0.7.tar.gz) = 1e10ce00730d293ed83ed3a3c630d525c9256fe4e31e64abbda7aa054b8a753f
3
SIZE (chiapos-1.0.3.tar.gz) = 1291513
3
SIZE (chiapos-1.0.7.tar.gz) = 1168757
4
SHA256 (jarro2783-cxxopts-302302b30839505703d37fb82f536c53cf9172fa_GH0.tar.gz) = 74e21646f3278243c9466665794d45410e63453ab7f3652acdae1d62efc4b21d
4
SHA256 (jarro2783-cxxopts-302302b30839505703d37fb82f536c53cf9172fa_GH0.tar.gz) = 74e21646f3278243c9466665794d45410e63453ab7f3652acdae1d62efc4b21d
5
SIZE (jarro2783-cxxopts-302302b30839505703d37fb82f536c53cf9172fa_GH0.tar.gz) = 89640
5
SIZE (jarro2783-cxxopts-302302b30839505703d37fb82f536c53cf9172fa_GH0.tar.gz) = 89640
6
SHA256 (gulrak-filesystem-4e21ab305794f5309a1454b4ae82ab9a0f5e0d25_GH0.tar.gz) = fef3e809d584b77fd3ec677bd0d40cbe6737bbb3dbb1570fe1b2025262ea82c2
6
SHA256 (gulrak-filesystem-4e21ab305794f5309a1454b4ae82ab9a0f5e0d25_GH0.tar.gz) = fef3e809d584b77fd3ec677bd0d40cbe6737bbb3dbb1570fe1b2025262ea82c2
(-)chiapos/files/Hellman-Makefile (-14 lines)
Lines 1-14 Link Here
1
all: HellmanAttacks
2
3
OBJ = aes.o bits.o calculate_bucket.o cxxopts.o encoding.o hellman.o picosha2.o plotter_disk.o pos_constants.o prover_disk.o sort_on_disk.o util.o verifier.o
4
5
.SUFFIXES:.hpp .o
6
7
.hpp.o:
8
	$(CC) -c $(CXXFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
9
10
HellmanAttacks: ${OBJ}
11
	${CC} -o HellmanAttacks ${OBJ}
12
13
clean:
14
	rm -f HellmanAttacks ${OBJ}
(-)chiapos/files/patch-CMakeLists.txt (-20 / +36 lines)
Lines 1-17 Link Here
1
--- CMakeLists.txt.orig	2021-05-28 02:40:44 UTC
1
--- CMakeLists.txt.orig	2021-12-03 19:59:40 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -14,29 +14,7 @@ endif()
3
@@ -14,33 +14,7 @@ endif()
4
 project(chiapos C CXX ASM)
4
 project(chiapos C CXX ASM)
5
 
5
 
6
 # CMake 3.14+
6
 # CMake 3.14+
7
-include(FetchContent)
7
-include(FetchContent)
8
 
8
 
9
-if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
10
-include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake)
11
-else()
9
-FetchContent_Declare(
12
-FetchContent_Declare(
10
-  pybind11-src
13
-  pybind11-src
11
-  GIT_REPOSITORY https://github.com/pybind/pybind11.git
14
-  GIT_REPOSITORY https://github.com/pybind/pybind11.git
12
-  GIT_TAG        v2.6.2
15
-  GIT_TAG        v2.7.1
13
-)
16
-)
14
-FetchContent_MakeAvailable(pybind11-src)
17
-FetchContent_MakeAvailable(pybind11-src)
18
-endif()
15
-
19
-
16
-FetchContent_Declare(
20
-FetchContent_Declare(
17
-  cxxopts
21
-  cxxopts
Lines 30-38 Link Here
30
 set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib)
34
 set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib)
31
 set(FSE_FILES
35
 set(FSE_FILES
32
     ${FSE_LIB}/fse_compress.c
36
     ${FSE_LIB}/fse_compress.c
33
@@ -48,8 +26,8 @@ set(FSE_FILES
37
@@ -51,9 +25,10 @@ set(FSE_FILES
38
 
34
 include_directories(
39
 include_directories(
35
   ${INCLUDE_DIRECTORIES}
40
   ${INCLUDE_DIRECTORIES}
41
+  ${CMAKE_INSTALL_PREFIX}/include
36
   ${CMAKE_CURRENT_SOURCE_DIR}/../lib/include
42
   ${CMAKE_CURRENT_SOURCE_DIR}/../lib/include
37
-  ${cxxopts_SOURCE_DIR}/include
43
-  ${cxxopts_SOURCE_DIR}/include
38
-  ${gulrak_SOURCE_DIR}/include/ghc
44
-  ${gulrak_SOURCE_DIR}/include/ghc
Lines 41-47 Link Here
41
   ${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib
47
   ${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib
42
   ${CMAKE_CURRENT_SOURCE_DIR}/src
48
   ${CMAKE_CURRENT_SOURCE_DIR}/src
43
   ${CMAKE_CURRENT_SOURCE_DIR}/test
49
   ${CMAKE_CURRENT_SOURCE_DIR}/test
44
@@ -130,8 +108,6 @@ set(BLAKE3_SRC
50
@@ -134,8 +109,6 @@ set(BLAKE3_SRC
45
 )
51
 )
46
 ENDIF()
52
 ENDIF()
47
 
53
 
Lines 50-57 Link Here
50
 add_executable(ProofOfSpace
56
 add_executable(ProofOfSpace
51
     src/cli.cpp
57
     src/cli.cpp
52
     src/chacha8.c
58
     src/chacha8.c
53
@@ -145,33 +121,30 @@ add_executable(RunTests
59
@@ -148,13 +121,6 @@ IF (BUILD_PROOF_OF_SPACE_STATICALLY)
54
     ${BLAKE3_SRC}
60
   target_link_libraries(ProofOfSpace -static -Wl,--whole-archive -lrt -lpthread -Wl,--no-whole-archive)
61
 ENDIF()
62
 
63
-FetchContent_Declare(
64
-  Catch2
65
-  GIT_REPOSITORY https://github.com/catchorg/Catch2.git
66
-  GIT_TAG        v2.13.7
67
-)
68
-FetchContent_MakeAvailable(Catch2)
69
-
70
 add_executable(RunTests
71
     tests/test-main.cpp
72
     tests/test.cpp
73
@@ -166,18 +132,20 @@ target_link_libraries(RunTests
74
   PRIVATE
75
     fse
76
     Threads::Threads
77
-    Catch2::Catch2
55
 )
78
 )
56
 
79
 
57
+install(TARGETS ProofOfSpace DESTINATION bin)
80
+install(TARGETS ProofOfSpace DESTINATION bin)
Lines 66-89 Link Here
66
-target_compile_features(chiapos PUBLIC cxx_std_17)
89
-target_compile_features(chiapos PUBLIC cxx_std_17)
67
 target_compile_features(RunTests PUBLIC cxx_std_17)
90
 target_compile_features(RunTests PUBLIC cxx_std_17)
68
 
91
 
92
+
69
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
93
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
70
-  target_link_libraries(chiapos PRIVATE fse Threads::Threads)
94
   target_link_libraries(chiapos PRIVATE fse Threads::Threads)
71
   target_link_libraries(ProofOfSpace fse Threads::Threads)
95
   target_link_libraries(ProofOfSpace fse Threads::Threads)
72
   target_link_libraries(RunTests fse Threads::Threads)
96
@@ -185,8 +153,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
73
 elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
97
   target_link_libraries(chiapos PRIVATE fse Threads::Threads)
74
-  target_link_libraries(chiapos PRIVATE fse Threads::Threads)
75
   target_link_libraries(ProofOfSpace fse Threads::Threads)
98
   target_link_libraries(ProofOfSpace fse Threads::Threads)
76
   target_link_libraries(RunTests fse Threads::Threads)
77
 elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
99
 elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
78
-  target_link_libraries(chiapos PRIVATE fse Threads::Threads)
100
-  target_link_libraries(chiapos PRIVATE fse Threads::Threads)
79
   target_link_libraries(ProofOfSpace fse Threads::Threads)
101
   target_link_libraries(ProofOfSpace fse Threads::Threads)
80
   target_link_libraries(RunTests fse Threads::Threads)
102
+  include(${CMAKE_INSTALL_PREFIX}/lib/cmake/Catch2/Catch.cmake)
81
 elseif (MSVC)
103
 elseif (MSVC)
82
-  target_link_libraries(chiapos PRIVATE fse Threads::Threads uint128)
104
   target_link_libraries(chiapos PRIVATE fse Threads::Threads uint128)
83
   target_link_libraries(ProofOfSpace fse Threads::Threads uint128)
105
   target_link_libraries(ProofOfSpace fse Threads::Threads uint128)
84
   target_link_libraries(RunTests fse Threads::Threads uint128)
85
 else()
86
-  target_link_libraries(chiapos PRIVATE fse stdc++fs Threads::Threads)
87
   target_link_libraries(ProofOfSpace fse stdc++fs Threads::Threads)
88
   target_link_libraries(RunTests fse stdc++fs Threads::Threads)
89
 endif()
(-)chiapos/files/patch-setup.py (-8 / +20 lines)
Lines 1-5 Link Here
1
--- setup.py.orig	2021-05-28 02:40:44 UTC
1
--- setup.py.orig	2021-12-03 19:59:40 UTC
2
+++ setup.py
2
+++ setup.py
3
@@ -9,13 +9,6 @@ from setuptools import setup, setuptools, Extension
4
 from setuptools.command.build_ext import build_ext
5
 from distutils.version import LooseVersion
6
 
7
-
8
-class CMakeExtension(Extension):
9
-    def __init__(self, name, sourcedir=""):
10
-        Extension.__init__(self, name, sources=["./"])
11
-        self.sourcedir = os.path.abspath(sourcedir)
12
-
13
-
14
 class CMakeBuild(build_ext):
15
     def run(self):
16
         try:
3
@@ -107,9 +100,6 @@ ext_modules = [
17
@@ -107,9 +100,6 @@ ext_modules = [
4
             "src/chacha8.c",
18
             "src/chacha8.c",
5
         ],
19
         ],
Lines 10-30 Link Here
10
             "src",
24
             "src",
11
             "uint128_t",
25
             "uint128_t",
12
             ".",
26
             ".",
13
@@ -202,6 +192,7 @@ if platform.system() == "Windows":
27
@@ -203,6 +193,7 @@ if platform.system() == "Windows":
14
 else:
28
 else:
15
     setup(
29
     setup(
16
         name="chiapos",
30
         name="chiapos",
17
+        version="1.0.3",
31
+        version="1.0.7",
18
         author="Mariano Sorgente",
32
         author="Mariano Sorgente",
19
         author_email="mariano@chia.net",
33
         author_email="mariano@chia.net",
20
         description="Chia proof of space plotting, proving, and verifying (wraps C++)",
34
         description="Chia proof of space plotting, proving, and verifying (wraps C++)",
21
@@ -209,8 +200,7 @@ else:
35
@@ -212,7 +203,6 @@ else:
22
         python_requires=">=3.7",
23
         long_description=open("README.md").read(),
24
         long_description_content_type="text/markdown",
36
         long_description_content_type="text/markdown",
25
-        url="https://github.com/Chia-Network/chiavdf",
37
         url="https://github.com/Chia-Network/chiapos",
38
         tests_require=["pytest"],
26
-        ext_modules=[CMakeExtension("chiapos", ".")],
39
-        ext_modules=[CMakeExtension("chiapos", ".")],
27
+        url="https://github.com/Chia-Network/chiapos",
28
         cmdclass=dict(build_ext=CMakeBuild),
40
         cmdclass=dict(build_ext=CMakeBuild),
29
         zip_safe=False,
41
         zip_safe=False,
30
     )
42
     )
(-)chiapos/pkg-descr (-3 lines)
Lines 2-10 Link Here
2
verifier. It exclusively runs on 64 bit architectures. Read the Proof of
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.
3
Space document to learn about what proof of space is and how it works.
4
4
5
Notes:
6
i386 is not supported, and would be too slow for practical use if supported.
7
8
This port is for the cmake build (binaries).
5
This port is for the cmake build (binaries).
9
6
10
WWW: https://github.com/Chia-Network/chiapos
7
WWW: https://github.com/Chia-Network/chiapos

Return to bug 260190