1 |
commit: 47ea62d41d80d071626c566a9efaf6b2bc57ca2d |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Apr 29 00:59:33 2022 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Fri Apr 29 01:47:58 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47ea62d4 |
7 |
|
8 |
sci-mathematics/minisatp: new package, add 0.1_p20121002 |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
sci-mathematics/minisatp/Manifest | 1 + |
13 |
.../files/minisatp-0.1_p20121002-find-gmp.patch | 25 ++++++++++++ |
14 |
.../minisatp-0.1_p20121002-fix-build-errors.patch | 41 +++++++++++++++++++ |
15 |
sci-mathematics/minisatp/metadata.xml | 12 ++++++ |
16 |
.../minisatp/minisatp-0.1_p20121002.ebuild | 46 ++++++++++++++++++++++ |
17 |
5 files changed, 125 insertions(+) |
18 |
|
19 |
diff --git a/sci-mathematics/minisatp/Manifest b/sci-mathematics/minisatp/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000..dbe60d53f |
22 |
--- /dev/null |
23 |
+++ b/sci-mathematics/minisatp/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST minisatp-0.1_p20121002.tar.gz 47256 BLAKE2B e03d626cad913f4587d356a891e93e5031804912dc9794e0c6b7646aaa78c5d4ac015c927d36d2c8f57018301662b216efbdc47e56c9cee090920f63c613149d SHA512 01ebcd02fe195cccc06c4a579676ce5d72adce075fea4bb44f687e7f1865313346f6b7805b1d6230a97a3d1a5827c18f621dc2ad3e7c6bd2a7d955b459b01eaa |
26 |
|
27 |
diff --git a/sci-mathematics/minisatp/files/minisatp-0.1_p20121002-find-gmp.patch b/sci-mathematics/minisatp/files/minisatp-0.1_p20121002-find-gmp.patch |
28 |
new file mode 100644 |
29 |
index 000000000..57619871c |
30 |
--- /dev/null |
31 |
+++ b/sci-mathematics/minisatp/files/minisatp-0.1_p20121002-find-gmp.patch |
32 |
@@ -0,0 +1,25 @@ |
33 |
+--- a/CMakeLists.txt 2022-04-29 02:03:45.823385000 +0200 |
34 |
++++ b/CMakeLists.txt 2022-04-29 02:08:46.208369263 +0200 |
35 |
+@@ -31,8 +31,9 @@ |
36 |
+ #-------------------------------------------------------------------------------------------------- |
37 |
+ # Dependencies: |
38 |
+ |
39 |
+-find_package(GMP REQUIRED) |
40 |
+-include_directories(${GMP_INCLUDE_DIR}) |
41 |
++find_package(PkgConfig REQUIRED) |
42 |
++pkg_check_modules(GMP REQUIRED gmp) |
43 |
++include_directories(${GMP_INCLUDE_DIRS}) |
44 |
+ |
45 |
+ include_directories(${minisat_SOURCE_DIR}) |
46 |
+ include_directories(${minisatp_SOURCE_DIR}) |
47 |
+@@ -60,8 +61,8 @@ |
48 |
+ add_library(minisatp-lib-static STATIC ${MINISATP_LIB_SOURCES}) |
49 |
+ add_library(minisatp-lib-shared SHARED ${MINISATP_LIB_SOURCES}) |
50 |
+ |
51 |
+-target_link_libraries(minisatp-lib-shared minisat-lib-shared ${GMP_LIBRARY}) |
52 |
+-target_link_libraries(minisatp-lib-static minisat-lib-static ${GMP_LIBRARY}) |
53 |
++target_link_libraries(minisatp-lib-shared minisat gmp) |
54 |
++target_link_libraries(minisatp-lib-static minisat gmp) |
55 |
+ |
56 |
+ set_target_properties(minisatp-lib-static PROPERTIES OUTPUT_NAME "minisatp") |
57 |
+ set_target_properties(minisatp-lib-shared |
58 |
|
59 |
diff --git a/sci-mathematics/minisatp/files/minisatp-0.1_p20121002-fix-build-errors.patch b/sci-mathematics/minisatp/files/minisatp-0.1_p20121002-fix-build-errors.patch |
60 |
new file mode 100644 |
61 |
index 000000000..850845f3a |
62 |
--- /dev/null |
63 |
+++ b/sci-mathematics/minisatp/files/minisatp-0.1_p20121002-fix-build-errors.patch |
64 |
@@ -0,0 +1,41 @@ |
65 |
+diff '--color=auto' -ru /var/tmp/portage/sci-mathematics/minisatp-0.1_p20121002/work/minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Debug.h minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Debug.h |
66 |
+--- /var/tmp/portage/sci-mathematics/minisatp-0.1_p20121002/work/minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Debug.h 2012-10-02 13:42:07.000000000 +0200 |
67 |
++++ minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Debug.h 2022-04-29 02:47:15.776380427 +0200 |
68 |
+@@ -24,6 +24,10 @@ |
69 |
+ #include "PbSolver.h" |
70 |
+ #include "FEnv.h" |
71 |
+ |
72 |
++using Minisat::l_True; |
73 |
++using Minisat::l_False; |
74 |
++using Minisat::l_Undef; |
75 |
++using Minisat::toInt; |
76 |
+ |
77 |
+ //================================================================================================= |
78 |
+ |
79 |
+diff '--color=auto' -ru /var/tmp/portage/sci-mathematics/minisatp-0.1_p20121002/work/minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Hardware.h minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Hardware.h |
80 |
+--- /var/tmp/portage/sci-mathematics/minisatp-0.1_p20121002/work/minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Hardware.h 2012-10-02 13:42:07.000000000 +0200 |
81 |
++++ minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/Hardware.h 2022-04-29 02:48:41.173081698 +0200 |
82 |
+@@ -23,6 +23,9 @@ |
83 |
+ #include "PbSolver.h" |
84 |
+ #include "FEnv.h" |
85 |
+ |
86 |
++using Minisat::lit_Undef; |
87 |
++using Minisat::var_Undef; |
88 |
++ |
89 |
+ //================================================================================================= |
90 |
+ |
91 |
+ |
92 |
+diff '--color=auto' -ru /var/tmp/portage/sci-mathematics/minisatp-0.1_p20121002/work/minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/PbSolver.h minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/PbSolver.h |
93 |
+--- /var/tmp/portage/sci-mathematics/minisatp-0.1_p20121002/work/minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/PbSolver.h 2012-10-02 13:42:07.000000000 +0200 |
94 |
++++ minisatp-d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2/PbSolver.h 2022-04-29 02:46:20.361276449 +0200 |
95 |
+@@ -31,7 +31,9 @@ |
96 |
+ using Minisat::SimpSolver; |
97 |
+ using Minisat::lbool; |
98 |
+ using Minisat::mkLit; |
99 |
+-using Minisat::lit_Undef; |
100 |
++using Minisat::l_Undef; |
101 |
++using Minisat::l_True; |
102 |
++using Minisat::l_False; |
103 |
+ |
104 |
+ //================================================================================================= |
105 |
+ // Linear -- a class for storing pseudo-boolean constraints: |
106 |
|
107 |
diff --git a/sci-mathematics/minisatp/metadata.xml b/sci-mathematics/minisatp/metadata.xml |
108 |
new file mode 100644 |
109 |
index 000000000..c86eec107 |
110 |
--- /dev/null |
111 |
+++ b/sci-mathematics/minisatp/metadata.xml |
112 |
@@ -0,0 +1,12 @@ |
113 |
+<?xml version="1.0" encoding="UTF-8"?> |
114 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
115 |
+<pkgmetadata> |
116 |
+ <maintainer type="person"> |
117 |
+ <email>lssndrbarbieri@×××××.com</email> |
118 |
+ <name>Alessandro Barbieri</name> |
119 |
+ </maintainer> |
120 |
+ <upstream> |
121 |
+ <bugs-to>https://github.com/niklasso/minisatp/issues</bugs-to> |
122 |
+ <remote-id type="github">niklasso/minisatp</remote-id> |
123 |
+ </upstream> |
124 |
+</pkgmetadata> |
125 |
|
126 |
diff --git a/sci-mathematics/minisatp/minisatp-0.1_p20121002.ebuild b/sci-mathematics/minisatp/minisatp-0.1_p20121002.ebuild |
127 |
new file mode 100644 |
128 |
index 000000000..ed2fa8bd3 |
129 |
--- /dev/null |
130 |
+++ b/sci-mathematics/minisatp/minisatp-0.1_p20121002.ebuild |
131 |
@@ -0,0 +1,46 @@ |
132 |
+# Copyright 1999-2022 Gentoo Authors |
133 |
+# Distributed under the terms of the GNU General Public License v2 |
134 |
+ |
135 |
+EAPI=8 |
136 |
+ |
137 |
+COMMIT="d91742bcd18bf9dc9b5e94f48a4aa59d3c954fd2" |
138 |
+ |
139 |
+inherit cmake |
140 |
+ |
141 |
+DESCRIPTION="solver for pseudo-Boolean constraints" |
142 |
+HOMEPAGE="https://github.com/niklasso/minisatp/tree/master" |
143 |
+SRC_URI="https://github.com/niklasso/minisatp/archive/${COMMIT}.tar.gz -> ${PF}.tar.gz" |
144 |
+S="${WORKDIR}/${PN}-${COMMIT}" |
145 |
+ |
146 |
+LICENSE="MIT" |
147 |
+SLOT="0" |
148 |
+KEYWORDS="~amd64" |
149 |
+ |
150 |
+RDEPEND=" |
151 |
+ dev-libs/gmp |
152 |
+ sci-mathematics/minisat |
153 |
+ sys-libs/zlib |
154 |
+" |
155 |
+DEPEND="${RDEPEND}" |
156 |
+ |
157 |
+PATCHES=( |
158 |
+ "${FILESDIR}/${PF}-find-gmp.patch" |
159 |
+ "${FILESDIR}/${PF}-fix-build-errors.patch" |
160 |
+) |
161 |
+ |
162 |
+src_configure() { |
163 |
+ local mycmakeargs=( |
164 |
+ -DSTATIC_BINARIES=OFF |
165 |
+ ) |
166 |
+ cmake_src_configure |
167 |
+} |
168 |
+ |
169 |
+src_install() { |
170 |
+ dodoc README |
171 |
+ dodoc -r Examples |
172 |
+ newman doc/minisat+.1 minisatp.1 |
173 |
+ dolib.so "${BUILD_DIR}/libminisatp.so" |
174 |
+ dolib.so "${BUILD_DIR}/libminisatp.so.1" |
175 |
+ dolib.so "${BUILD_DIR}/libminisatp.so.1.1.0" |
176 |
+ dobin "${BUILD_DIR}/minisatp" |
177 |
+} |