Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
Add scs-1.0.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpn committed May 15, 2014
1 parent 02f9f2d commit 432bf3b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

make

# In order for conda to detect what you've built, you need to copy it into the
# relevant directory in $PREFIX (the non-absolute paths below will be relative
# to the root of the source tree):
cp -rpv out/*.a $PREFIX/lib

# Ditto for the headers. I noticed a util.h which is a bit too generic to be
# copied into $PREFIX/include directly, so stash stuff in a scs subdir.
mkdir $PREFIX/include/scs
cp -rpv include/*.h $PREFIX/include/scs

# To build/include the Python part you'd do something like:
#$PYTHON setup.py install
# Although it would probably be better to separate the C lib from the Python
# binding (i.e. have two separate conda packages, with the Python recipe pyscs
# depending on the scs C lib). Actually, the above line may not even work
# *unless* you do it like that.
24 changes: 24 additions & 0 deletions scs/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package:
name: scs
version: 1.0.2

source:
fn: scs-1.0.2.zip [not win]
url: https://github.com/cvxgrp/scs/archive/1.0.2.zip
patches:
- scs.mk.patch

build:
number: 0

requirements:
build:
- system [linux]
run:
- system [linux]

about:
home: https://github.com/cvxgrp/scs
license: MIT

# vim:set ts=8 sw=2 sts=2 tw=78 et:
14 changes: 14 additions & 0 deletions scs/scs.mk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- scs.mk.orig 2014-05-15 00:11:00.000000000 -0400
+++ scs.mk 2014-05-15 00:11:22.000000000 -0400
@@ -11,6 +11,11 @@

CFLAGS = -g -Wall -pedantic -O3 -funroll-loops -Wstrict-prototypes -Iinclude

+ifeq ($(CONDA_BUILD), 1)
+CFLAGS += -I$(PREFIX)/include
+LDFLAGS += -L$(PREFIX)/lib -lgfortran
+endif
+
LINSYS = linsys
DIRSRC = $(LINSYS)/direct
DIRSRCEXT = $(DIRSRC)/external

0 comments on commit 432bf3b

Please sign in to comment.