mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
Add aspcud - a solver for package dependencies that uses CUDF format.
This commit is contained in:
parent
77247d8f9d
commit
f09c534b48
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339367
7 changed files with 86 additions and 0 deletions
|
@ -60,6 +60,7 @@
|
||||||
SUBDIR += arpack++
|
SUBDIR += arpack++
|
||||||
SUBDIR += arpack-ng
|
SUBDIR += arpack-ng
|
||||||
SUBDIR += asir2000
|
SUBDIR += asir2000
|
||||||
|
SUBDIR += aspcud
|
||||||
SUBDIR += asymptote
|
SUBDIR += asymptote
|
||||||
SUBDIR += atlas
|
SUBDIR += atlas
|
||||||
SUBDIR += atlas-devel
|
SUBDIR += atlas-devel
|
||||||
|
|
33
math/aspcud/Makefile
Normal file
33
math/aspcud/Makefile
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Created by: Vsevolod Stakhov <vsevolod@FreeBSD.org>
|
||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
PORTNAME= aspcud
|
||||||
|
PORTVERSION= 1.8.0
|
||||||
|
DISTVERSIONSUFFIX= -source
|
||||||
|
CATEGORIES= math ports-mgmt sysutils
|
||||||
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||||
|
MASTER_SITE_SUBDIR= potassco/${PORTNAME}/${PORTVERSION}
|
||||||
|
|
||||||
|
MAINTAINER= vsevolod@FreeBSD.org
|
||||||
|
COMMENT= Advanced solver for package dependencies
|
||||||
|
|
||||||
|
LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs
|
||||||
|
RUN_DEPENDS= gringo:${PORTSDIR}/math/gringo \
|
||||||
|
clasp:${PORTSDIR}/math/clasp \
|
||||||
|
bash:${PORTSDIR}/shells/bash
|
||||||
|
|
||||||
|
USE_PYTHON_RUN= yes
|
||||||
|
USES= cmake:outsource shebangfix
|
||||||
|
SHEBANG_FILES= ${WRKSRC}/scripts/aspcud.sh
|
||||||
|
|
||||||
|
post-patch:
|
||||||
|
${REINPLACE_CMD} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/scripts/${PORTNAME}.sh
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/bin/cudf2lp ${STAGEDIR}${PREFIX}/bin/cudf2lp
|
||||||
|
${INSTALL_SCRIPT} ${WRKSRC}/scripts/${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
||||||
|
${MKDIR} ${STAGEDIR}${DATADIR}
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/scripts/encodings/misc2012.lp ${STAGEDIR}${DATADIR}/misc2012.lp
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/scripts/encodings/specification.lp ${STAGEDIR}${DATADIR}/specification.lp
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
2
math/aspcud/distinfo
Normal file
2
math/aspcud/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
SHA256 (aspcud-1.8.0-source.tar.gz) = 491c42a8e769c6d244f106021df4c61344b53c5e133837b0589b4d384bf9d17b
|
||||||
|
SIZE (aspcud-1.8.0-source.tar.gz) = 96121
|
10
math/aspcud/files/patch-libcudf-src-dependency.cpp
Normal file
10
math/aspcud/files/patch-libcudf-src-dependency.cpp
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- libcudf/src/dependency.cpp.orig 2014-01-10 15:13:07.000000000 +0000
|
||||||
|
+++ libcudf/src/dependency.cpp 2014-01-10 15:29:32.000000000 +0000
|
||||||
|
@@ -49,6 +49,7 @@
|
||||||
|
struct CudfPackageRefFilter
|
||||||
|
{
|
||||||
|
CudfPackageRefFilter(const Cudf::PackageRef &ref) : ref(ref) { }
|
||||||
|
+ CudfPackageRefFilter &operator = (const CudfPackageRefFilter &t) { return *this; }
|
||||||
|
bool operator()(const Entity *entity)
|
||||||
|
{
|
||||||
|
switch(ref.op)
|
29
math/aspcud/files/patch-scripts-aspcud.sh
Normal file
29
math/aspcud/files/patch-scripts-aspcud.sh
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
--- scripts/aspcud.sh.orig 2014-01-10 16:00:28.000000000 +0000
|
||||||
|
+++ scripts/aspcud.sh 2014-01-10 16:25:29.000000000 +0000
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
|
||||||
|
function enc()
|
||||||
|
{
|
||||||
|
- for x in "." "$base" "$base/encodings"; do
|
||||||
|
+ for x in "@@PREFIX@@/share/aspcud"; do
|
||||||
|
[[ -e "$x/$1" ]] && { echo "$x/$1"; return 0; }
|
||||||
|
done
|
||||||
|
echo "$x"
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
|
||||||
|
function usage()
|
||||||
|
{
|
||||||
|
- echo "Usage: ${0} [OPTION]... CUDFIN CUDFOUT [CRITERIA]"
|
||||||
|
+ echo "Usage: ${0} [OPTION]... CUDFIN CUDFOUT CRITERIA"
|
||||||
|
echo " -h print this help"
|
||||||
|
echo " -c OPT append clasp option OPT"
|
||||||
|
echo " -e ENC append encoding ENC"
|
||||||
|
@@ -135,7 +135,7 @@
|
||||||
|
trap usrtrap USR1 TERM INT
|
||||||
|
|
||||||
|
cat <<EOF > "$tmp/parse.py"
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/env python
|
||||||
|
import signal, re, sys
|
||||||
|
|
||||||
|
def ignore(x, y): pass
|
6
math/aspcud/pkg-descr
Normal file
6
math/aspcud/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Aspcud is a solver for package dependencies. A package universe and a request
|
||||||
|
to install, remove, or upgrade packages have to be encoded in the CUDF format.
|
||||||
|
Such a CUDF document can then be passed to aspcud along with an optimization
|
||||||
|
criteria to obtain a solution to the given package problem.
|
||||||
|
|
||||||
|
WWW: http://potassco.sourceforge.net/
|
5
math/aspcud/pkg-plist
Normal file
5
math/aspcud/pkg-plist
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
bin/aspcud
|
||||||
|
bin/cudf2lp
|
||||||
|
%%DATADIR%%/misc2012.lp
|
||||||
|
%%DATADIR%%/specification.lp
|
||||||
|
@dirrmtry %%DATADIR%%
|
Loading…
Add table
Reference in a new issue