From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 937AD15808E for ; Thu, 28 Apr 2022 07:45:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BE581E0891; Thu, 28 Apr 2022 07:45:38 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 903EDE0891 for ; Thu, 28 Apr 2022 07:45:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 58AEA341118 for ; Thu, 28 Apr 2022 07:45:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8251375 for ; Thu, 28 Apr 2022 07:45:35 +0000 (UTC) From: "Alessandro Barbieri" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alessandro Barbieri" Message-ID: <1651131913.c6c93bbbc8d75d5ee0dff344851c104b477f6cc0.Alessandro-Barbieri@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/mccs/files/, sci-mathematics/mccs/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sci-mathematics/mccs/Manifest sci-mathematics/mccs/files/mccs-1.1-fix-Wl.patch sci-mathematics/mccs/files/mccs-1.1-glpk.patch sci-mathematics/mccs/files/mccs-1.1-respect-flags.patch sci-mathematics/mccs/mccs-1.1.ebuild sci-mathematics/mccs/metadata.xml X-VCS-Directories: sci-mathematics/mccs/files/ sci-mathematics/mccs/ X-VCS-Committer: Alessandro-Barbieri X-VCS-Committer-Name: Alessandro Barbieri X-VCS-Revision: c6c93bbbc8d75d5ee0dff344851c104b477f6cc0 X-VCS-Branch: dev Date: Thu, 28 Apr 2022 07:45:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e0e68455-8b52-49de-8542-7da035cba90d X-Archives-Hash: 386c3b31051bf1c9e471c6079f82ee1c commit: c6c93bbbc8d75d5ee0dff344851c104b477f6cc0 Author: Alessandro Barbieri gmail com> AuthorDate: Thu Apr 28 07:45:13 2022 +0000 Commit: Alessandro Barbieri gmail 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 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 @@ + + + + + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + enable GLPK as solver + enable lpsolve as solver + + +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. + +