public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/mccs/files/, sci-mathematics/mccs/
@ 2022-04-28  7:45 Alessandro Barbieri
  0 siblings, 0 replies; 3+ messages in thread
From: Alessandro Barbieri @ 2022-04-28  7:45 UTC (permalink / raw
  To: gentoo-commits

commit:     c6c93bbbc8d75d5ee0dff344851c104b477f6cc0
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Apr 28 07:45:13 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Apr 28 07:45:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c6c93bbb

sci-mathematics/mccs: new package, add 1.1

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-mathematics/mccs/Manifest                      |  2 +
 sci-mathematics/mccs/files/mccs-1.1-fix-Wl.patch   | 12 ++++
 sci-mathematics/mccs/files/mccs-1.1-glpk.patch     | 20 ++++++
 .../mccs/files/mccs-1.1-respect-flags.patch        | 12 ++++
 sci-mathematics/mccs/mccs-1.1.ebuild               | 73 ++++++++++++++++++++++
 sci-mathematics/mccs/metadata.xml                  | 15 +++++
 6 files changed, 134 insertions(+)

diff --git a/sci-mathematics/mccs/Manifest b/sci-mathematics/mccs/Manifest
new file mode 100644
index 000000000..da9bbea2a
--- /dev/null
+++ b/sci-mathematics/mccs/Manifest
@@ -0,0 +1,2 @@
+DIST mccs-1.1-srcs.tgz 65553 BLAKE2B be7a1852bb6adaba6e8e02b1efbed44a1b60ef856facb55ca9a572a6ade77b8f24616feba9ac73a587f81a09c4ea19d1ec25281b49962bfbc2c35dc469cdeb29 SHA512 95cd0af58115202dc1bb8deaae28b25662e06cbbcb195c608a01083d4c602bcc1ede213dbc4e8ece7b9ab4afc9ef419fa57c284602dc0c908595e77710281de4
+DIST mccs_1.1-9.debian.tar.xz 7360 BLAKE2B cbd52e4b30db898648348c0b6486c4338bb417b38ff7c982df246c985a017d4064b7816f44fc71df11a11bcc0260c20feb075384e9b8a0d0aa1d16dae7a65b99 SHA512 dcdb6296647748d0a484c48b5ef9fe1e663bf0a54e170e0418b9a7a791d2f7f5d6de20543e2c593721fc6dca2f43f7dc4f0c61b87295b8db96dd58b6bf75d700

diff --git a/sci-mathematics/mccs/files/mccs-1.1-fix-Wl.patch b/sci-mathematics/mccs/files/mccs-1.1-fix-Wl.patch
new file mode 100644
index 000000000..05231563c
--- /dev/null
+++ b/sci-mathematics/mccs/files/mccs-1.1-fix-Wl.patch
@@ -0,0 +1,12 @@
+diff '--color=auto' -ru /var/tmp/portage/sci-mathematics/mccs-1.1/work/mccs-1.1/makefile mccs-1.1/makefile
+--- /var/tmp/portage/sci-mathematics/mccs-1.1/work/mccs-1.1/makefile	2022-04-28 09:30:48.441298635 +0200
++++ mccs-1.1/makefile	2022-04-28 09:36:58.810650226 +0200
+@@ -163,7 +163,7 @@
+ 	ar rcs libccudf.a $(OBJDIR)/cudf.tab.o $(OBJDIR)/cudf.l.o $(OBJDIR)/cudf_hash_table.o $(OBJDIR)/cudf_tools.o
+ 
+ libccudf.so: $(OBJDIR)/cudf.tab.o $(OBJDIR)/cudf.l.o $(OBJDIR)/cudf_hash_table.o $(OBJDIR)/cudf_tools.o
+-	$(CCC) -shared -W1,-soname,libccudf.so -o libccudf.so \
++	$(CCC) -shared -Wl,-soname,libccudf.so -o libccudf.so \
+ 		$(OBJDIR)/cudf.tab.o $(OBJDIR)/cudf.l.o $(OBJDIR)/cudf_hash_table.o $(OBJDIR)/cudf_tools.o
+ 
+ $(OBJDIR)/cudf_hash_table.o: $(SRCLIB)/cudf_hash_table.c $(SRCLIB)/cudf_hash_table.h

diff --git a/sci-mathematics/mccs/files/mccs-1.1-glpk.patch b/sci-mathematics/mccs/files/mccs-1.1-glpk.patch
new file mode 100644
index 000000000..55fb1d2c9
--- /dev/null
+++ b/sci-mathematics/mccs/files/mccs-1.1-glpk.patch
@@ -0,0 +1,20 @@
+diff '--color=auto' -ru /var/tmp/portage/sci-mathematics/mccs-1.1/work/mccs-1.1/make.local mccs-1.1/make.local
+--- /var/tmp/portage/sci-mathematics/mccs-1.1/work/mccs-1.1/make.local	2022-04-28 09:26:16.480900398 +0200
++++ mccs-1.1/make.local	2022-04-28 09:29:29.136724492 +0200
+@@ -11,13 +11,13 @@
+ ifeq ($(USEGLPK),1)
+ 
+ # Path to GLPK main dir
+-GLPKDIR=$(PWD)/../glpk
++GLPKDIR=/usr/lib
+ 
+ # Path to the GPLK include files
+-GLPKINC=$(GLPKDIR)/include/
++GLPKINC=/usr/include
+ 
+ # GPLK library path and options
+-GLPKLD=-L${GLPKDIR}/lib -lglpk -Wl,-rpath,${GLPKDIR}/lib
++GLPKLD=-L${GLPKDIR} -lglpk
+ 
+ endif
+ 

diff --git a/sci-mathematics/mccs/files/mccs-1.1-respect-flags.patch b/sci-mathematics/mccs/files/mccs-1.1-respect-flags.patch
new file mode 100644
index 000000000..11b5454ce
--- /dev/null
+++ b/sci-mathematics/mccs/files/mccs-1.1-respect-flags.patch
@@ -0,0 +1,12 @@
+diff '--color=auto' -ru /var/tmp/portage/sci-mathematics/mccs-1.1/work/mccs-1.1/make.local mccs-1.1/make.local
+--- a/make.local	2022-04-28 08:46:08.604422769 +0200
++++ b/make.local	2022-04-28 08:47:58.444566394 +0200
+@@ -107,7 +107,7 @@
+ 
+ INC=-I$(OBJDIR) -I$(SRCDIR) -I$(SRCLIB)
+ #CCCOPT=-g -Wall
+-CCCOPT=-Wall -O6
++CCCOPT=-Wall $(CXXFLAGS)
+ CCC=$(CXX) $(CCCOPT) $(LDFLAGS)
+ 
+ 

diff --git a/sci-mathematics/mccs/mccs-1.1.ebuild b/sci-mathematics/mccs/mccs-1.1.ebuild
new file mode 100644
index 000000000..91d76b64d
--- /dev/null
+++ b/sci-mathematics/mccs/mccs-1.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic optfeature toolchain-funcs
+
+DESCRIPTION="Multi Criteria CUDF Solver"
+HOMEPAGE="https://www.i3s.unice.fr/~cpjm/misc/mccs.html"
+SRC_URI="
+	https://www.i3s.unice.fr/~cpjm/misc/${P}-srcs.tgz
+	http://deb.debian.org/debian/pool/main/m/mccs/${PN}_${PV}-9.debian.tar.xz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="glpk lpsolve"
+
+RDEPEND="
+	glpk? ( sci-mathematics/glpk )
+	lpsolve? ( sci-mathematics/lpsolve )
+"
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+	dev-util/quilt
+	sys-devel/bison
+	virtual/yacc
+"
+
+src_prepare() {
+	export QUILT_PATCHES="${WORKDIR}/debian/patches"
+	export QUILT_SERIES="${QUILT_PATCHES}/series"
+	quilt push -a || die
+	eapply "${FILESDIR}/${P}-respect-flags.patch"
+	eapply "${FILESDIR}/${P}-glpk.patch"
+	eapply "${FILESDIR}/${P}-fix-Wl.patch"
+	eapply_user
+
+	if use glpk; then
+		sed \
+			-e "s|#USEGLPK=1|USEGLPK=1|g" \
+			-e "s|GLPKDIR=/usr/lib|GLPKDIR=/usr/$(get_libdir)|g" \
+			-i make.local || die
+	fi
+	if use lpsolve; then
+		sed -e "s|LPSOLVEDIR=/usr/lib|LPSOLVEDIR=/usr/$(get_libdir)|g" -i make.local || die
+	else
+		sed -e "s|USELPSOLVE=1|#USELPSOLVE=1|g" -i make.local || die
+	fi
+}
+
+src_compile() {
+	tc-export CXX
+	append-cxxflags "-std=c++14"
+	MAKEOPTS="-j1" emake libccudf.so
+	MAKEOPTS="-j1" emake mccs
+}
+
+src_install() {
+	dodoc README CHANGES
+	dodoc -r examples
+
+	dobin sciplp cbclp wbopb mccs
+	exeinto "/usr/libexec/${PN}"
+	doexe solve{paranoid,trendy}
+	dolib.so libccudf.so
+}
+
+pkg_postinst() {
+	optfeature "in order to use cbclp" sci-libs/coinor-cbc
+}

diff --git a/sci-mathematics/mccs/metadata.xml b/sci-mathematics/mccs/metadata.xml
new file mode 100644
index 000000000..be6050f22
--- /dev/null
+++ b/sci-mathematics/mccs/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>lssndrbarbieri@gmail.com</email>
+    <name>Alessandro Barbieri</name>
+  </maintainer>
+  <use>
+    <flag name="glpk">enable GLPK as solver</flag>
+    <flag name="lpsolve">enable lpsolve as solver </flag>
+  </use>
+  <longdescription lang="en">
+mccs (which stands for Multi Criteria CUDF Solver) is a CUDF problem solver developed at UNS during the European MANCOOSI project. mccs take as input a CUDF problem and computes the best solution according to a set of criteria. It relies on a Integer Programming solver or a Pseudo Boolean solver to achieve its task. mccs can use a wide set of underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.
+  </longdescription>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/mccs/files/, sci-mathematics/mccs/
@ 2022-04-29  1:48 Alessandro Barbieri
  0 siblings, 0 replies; 3+ messages in thread
From: Alessandro Barbieri @ 2022-04-29  1:48 UTC (permalink / raw
  To: gentoo-commits

commit:     54f6fe2cb2998a3ca2cbf98f1fe8ade59f0af384
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Fri Apr 29 01:07:14 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Fri Apr 29 01:47:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=54f6fe2c

sci-mathematics/mccs: add cudf solvers files from debian

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-mathematics/mccs/files/mccs-cbc     |  3 +++
 sci-mathematics/mccs/files/mccs-lpsolve |  3 +++
 sci-mathematics/mccs/mccs-1.1.ebuild    | 15 +++++++++------
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/sci-mathematics/mccs/files/mccs-cbc b/sci-mathematics/mccs/files/mccs-cbc
new file mode 100644
index 000000000..86a919499
--- /dev/null
+++ b/sci-mathematics/mccs/files/mccs-cbc
@@ -0,0 +1,3 @@
+description: CUDF solver based on the Mixed Integer Linear Programming solver Cbc
+exec: /usr/bin/mccs -i $in -o $out $pref
+cudf-version: 2.0

diff --git a/sci-mathematics/mccs/files/mccs-lpsolve b/sci-mathematics/mccs/files/mccs-lpsolve
new file mode 100644
index 000000000..ee3f2b0a2
--- /dev/null
+++ b/sci-mathematics/mccs/files/mccs-lpsolve
@@ -0,0 +1,3 @@
+description: CUDF solver based on the Mixed Integer Linear Programming solver lp_solve
+exec: /usr/bin/mccs -i $in -o $out -lpsolve $pref
+cudf-version: 2.0

diff --git a/sci-mathematics/mccs/mccs-1.1.ebuild b/sci-mathematics/mccs/mccs-1.1.ebuild
index 91d76b64d..2da51d1e3 100644
--- a/sci-mathematics/mccs/mccs-1.1.ebuild
+++ b/sci-mathematics/mccs/mccs-1.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit flag-o-matic optfeature toolchain-funcs
+inherit flag-o-matic toolchain-funcs
 
 DESCRIPTION="Multi Criteria CUDF Solver"
 HOMEPAGE="https://www.i3s.unice.fr/~cpjm/misc/mccs.html"
@@ -21,7 +21,10 @@ RDEPEND="
 	glpk? ( sci-mathematics/glpk )
 	lpsolve? ( sci-mathematics/lpsolve )
 "
-DEPEND="${RDEPEND}"
+DEPEND="
+	${RDEPEND}
+	sci-libs/coinor-cbc
+"
 
 BDEPEND="
 	dev-util/quilt
@@ -62,12 +65,12 @@ src_install() {
 	dodoc README CHANGES
 	dodoc -r examples
 
+	insinto /usr/share/cudf/solvers
+	doins "${FILESDIR}/mccs-cbc"
+	use lpsolve && doins "${FILESDIR}/mccs-lpsolve"
+
 	dobin sciplp cbclp wbopb mccs
 	exeinto "/usr/libexec/${PN}"
 	doexe solve{paranoid,trendy}
 	dolib.so libccudf.so
 }
-
-pkg_postinst() {
-	optfeature "in order to use cbclp" sci-libs/coinor-cbc
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/mccs/files/, sci-mathematics/mccs/
@ 2022-05-03 20:21 Alessandro Barbieri
  0 siblings, 0 replies; 3+ messages in thread
From: Alessandro Barbieri @ 2022-05-03 20:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e8e0f024a20aa6b85dea57aaa6ba91082d6ff943
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue May  3 18:17:36 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue May  3 20:21:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e8e0f024

sci-mathematics/mccs: respect AR

Closes: https://bugs.gentoo.org/842333
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-mathematics/mccs/files/mccs-1.1-respect-AR.patch | 11 +++++++++++
 sci-mathematics/mccs/mccs-1.1.ebuild                 |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/mccs/files/mccs-1.1-respect-AR.patch b/sci-mathematics/mccs/files/mccs-1.1-respect-AR.patch
new file mode 100644
index 000000000..5bd7f124c
--- /dev/null
+++ b/sci-mathematics/mccs/files/mccs-1.1-respect-AR.patch
@@ -0,0 +1,11 @@
+--- a/makefile
++++ b/makefile
+@@ -160,7 +160,7 @@
+ #----------------------------------------------------------------------------------
+ 
+ libccudf.a: $(OBJDIR)/cudf.tab.o $(OBJDIR)/cudf.l.o $(OBJDIR)/cudf_hash_table.o $(OBJDIR)/cudf_tools.o
+-	ar rcs libccudf.a $(OBJDIR)/cudf.tab.o $(OBJDIR)/cudf.l.o $(OBJDIR)/cudf_hash_table.o $(OBJDIR)/cudf_tools.o
++	$(AR) rcs libccudf.a $(OBJDIR)/cudf.tab.o $(OBJDIR)/cudf.l.o $(OBJDIR)/cudf_hash_table.o $(OBJDIR)/cudf_tools.o
+ 
+ libccudf.so: $(OBJDIR)/cudf.tab.o $(OBJDIR)/cudf.l.o $(OBJDIR)/cudf_hash_table.o $(OBJDIR)/cudf_tools.o
+ 	$(CCC) -shared -Wl,-soname,libccudf.so -o libccudf.so \

diff --git a/sci-mathematics/mccs/mccs-1.1.ebuild b/sci-mathematics/mccs/mccs-1.1.ebuild
index bc93d919a..ee3a56aaa 100644
--- a/sci-mathematics/mccs/mccs-1.1.ebuild
+++ b/sci-mathematics/mccs/mccs-1.1.ebuild
@@ -39,6 +39,7 @@ src_prepare() {
 	eapply "${FILESDIR}/${P}-respect-flags.patch"
 	eapply "${FILESDIR}/${P}-glpk.patch"
 	eapply "${FILESDIR}/${P}-fix-Wl.patch"
+	eapply "${FILESDIR}/${P}-respect-AR.patch"
 	eapply_user
 
 	if use glpk; then
@@ -55,7 +56,7 @@ src_prepare() {
 }
 
 src_compile() {
-	tc-export CXX
+	tc-export AR CXX
 	append-cxxflags "-std=c++14"
 	MAKEOPTS="-j1" emake libccudf.so
 	MAKEOPTS="-j1" emake mccs


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-03 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-28  7:45 [gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/mccs/files/, sci-mathematics/mccs/ Alessandro Barbieri
  -- strict thread matches above, loose matches on Subject: below --
2022-04-29  1:48 Alessandro Barbieri
2022-05-03 20:21 Alessandro Barbieri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox