svn commit: r339367 - in head/math: . aspcud aspcud/files
Vsevolod Stakhov
vsevolod at FreeBSD.org
Fri Jan 10 16:35:54 UTC 2014
Author: vsevolod
Date: Fri Jan 10 16:35:52 2014
New Revision: 339367
URL: http://svnweb.freebsd.org/changeset/ports/339367
Log:
Add aspcud - a solver for package dependencies that uses CUDF format.
Added:
head/math/aspcud/
head/math/aspcud/Makefile (contents, props changed)
head/math/aspcud/distinfo (contents, props changed)
head/math/aspcud/files/
head/math/aspcud/files/patch-libcudf-src-dependency.cpp (contents, props changed)
head/math/aspcud/files/patch-scripts-aspcud.sh (contents, props changed)
head/math/aspcud/pkg-descr (contents, props changed)
head/math/aspcud/pkg-plist (contents, props changed)
Modified:
head/math/Makefile
Modified: head/math/Makefile
==============================================================================
--- head/math/Makefile Fri Jan 10 16:28:07 2014 (r339366)
+++ head/math/Makefile Fri Jan 10 16:35:52 2014 (r339367)
@@ -60,6 +60,7 @@
SUBDIR += arpack++
SUBDIR += arpack-ng
SUBDIR += asir2000
+ SUBDIR += aspcud
SUBDIR += asymptote
SUBDIR += atlas
SUBDIR += atlas-devel
Added: head/math/aspcud/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/aspcud/Makefile Fri Jan 10 16:35:52 2014 (r339367)
@@ -0,0 +1,33 @@
+# Created by: Vsevolod Stakhov <vsevolod at 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 at 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>
Added: head/math/aspcud/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/aspcud/distinfo Fri Jan 10 16:35:52 2014 (r339367)
@@ -0,0 +1,2 @@
+SHA256 (aspcud-1.8.0-source.tar.gz) = 491c42a8e769c6d244f106021df4c61344b53c5e133837b0589b4d384bf9d17b
+SIZE (aspcud-1.8.0-source.tar.gz) = 96121
Added: head/math/aspcud/files/patch-libcudf-src-dependency.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/aspcud/files/patch-libcudf-src-dependency.cpp Fri Jan 10 16:35:52 2014 (r339367)
@@ -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)
Added: head/math/aspcud/files/patch-scripts-aspcud.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/aspcud/files/patch-scripts-aspcud.sh Fri Jan 10 16:35:52 2014 (r339367)
@@ -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
Added: head/math/aspcud/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/aspcud/pkg-descr Fri Jan 10 16:35:52 2014 (r339367)
@@ -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/
Added: head/math/aspcud/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/aspcud/pkg-plist Fri Jan 10 16:35:52 2014 (r339367)
@@ -0,0 +1,5 @@
+bin/aspcud
+bin/cudf2lp
+%%DATADIR%%/misc2012.lp
+%%DATADIR%%/specification.lp
+ at dirrmtry %%DATADIR%%
More information about the svn-ports-all
mailing list