diff options
author | vsevolod <vsevolod@FreeBSD.org> | 2014-01-11 00:35:52 +0800 |
---|---|---|
committer | vsevolod <vsevolod@FreeBSD.org> | 2014-01-11 00:35:52 +0800 |
commit | a1ace84f7fba82e8c66291b9fa9a94fdf39421cd (patch) | |
tree | 585018c9908cde4d03a58e46c027a9882e44eeb4 /math | |
parent | 3dfbce74500595301f72695f6750bbd3f0401968 (diff) | |
download | freebsd-ports-gnome-a1ace84f7fba82e8c66291b9fa9a94fdf39421cd.tar.gz freebsd-ports-gnome-a1ace84f7fba82e8c66291b9fa9a94fdf39421cd.tar.zst freebsd-ports-gnome-a1ace84f7fba82e8c66291b9fa9a94fdf39421cd.zip |
Add aspcud - a solver for package dependencies that uses CUDF format.
Diffstat (limited to 'math')
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/aspcud/Makefile | 33 | ||||
-rw-r--r-- | math/aspcud/distinfo | 2 | ||||
-rw-r--r-- | math/aspcud/files/patch-libcudf-src-dependency.cpp | 10 | ||||
-rw-r--r-- | math/aspcud/files/patch-scripts-aspcud.sh | 29 | ||||
-rw-r--r-- | math/aspcud/pkg-descr | 6 | ||||
-rw-r--r-- | math/aspcud/pkg-plist | 5 |
7 files changed, 86 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile index 99b9668e930c..a4532545d660 100644 --- a/math/Makefile +++ b/math/Makefile @@ -60,6 +60,7 @@ SUBDIR += arpack++ SUBDIR += arpack-ng SUBDIR += asir2000 + SUBDIR += aspcud SUBDIR += asymptote SUBDIR += atlas SUBDIR += atlas-devel diff --git a/math/aspcud/Makefile b/math/aspcud/Makefile new file mode 100644 index 000000000000..94c536e97afd --- /dev/null +++ b/math/aspcud/Makefile @@ -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> diff --git a/math/aspcud/distinfo b/math/aspcud/distinfo new file mode 100644 index 000000000000..f33061858ad4 --- /dev/null +++ b/math/aspcud/distinfo @@ -0,0 +1,2 @@ +SHA256 (aspcud-1.8.0-source.tar.gz) = 491c42a8e769c6d244f106021df4c61344b53c5e133837b0589b4d384bf9d17b +SIZE (aspcud-1.8.0-source.tar.gz) = 96121 diff --git a/math/aspcud/files/patch-libcudf-src-dependency.cpp b/math/aspcud/files/patch-libcudf-src-dependency.cpp new file mode 100644 index 000000000000..7ae476f51077 --- /dev/null +++ b/math/aspcud/files/patch-libcudf-src-dependency.cpp @@ -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) diff --git a/math/aspcud/files/patch-scripts-aspcud.sh b/math/aspcud/files/patch-scripts-aspcud.sh new file mode 100644 index 000000000000..cd303f30896f --- /dev/null +++ b/math/aspcud/files/patch-scripts-aspcud.sh @@ -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 diff --git a/math/aspcud/pkg-descr b/math/aspcud/pkg-descr new file mode 100644 index 000000000000..3a407b76d246 --- /dev/null +++ b/math/aspcud/pkg-descr @@ -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/ diff --git a/math/aspcud/pkg-plist b/math/aspcud/pkg-plist new file mode 100644 index 000000000000..80d0b2c46017 --- /dev/null +++ b/math/aspcud/pkg-plist @@ -0,0 +1,5 @@ +bin/aspcud +bin/cudf2lp +%%DATADIR%%/misc2012.lp +%%DATADIR%%/specification.lp +@dirrmtry %%DATADIR%% |