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

Commit

Permalink
fix pattern recipe on OSX (build libs)
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan committed Oct 9, 2015
1 parent b2d0732 commit da69514
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 43 deletions.
19 changes: 19 additions & 0 deletions liblinear/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set INCLUDE=%INCLUDE%;%LIBRARY_INC%
set LIB=%LIB%;%LIBRARY_LIB%
set LIBPATH=%LIBPATH%;%LIBRARY_LIB%

REM Build step
nmake /f Makefile.vc
if errorlevel 1 exit 1

REM Install step
copy libtiff\libtiff.dll %LIBRARY_BIN%\
if errorlevel 1 exit 1
copy libtiff\libtiff.lib %LIBRARY_LIB%\
if errorlevel 1 exit 1
copy libtiff\libtiff.lib %LIBRARY_LIB%\tiff.lib
if errorlevel 1 exit 1
copy libtiff\libtiff_i.lib %LIBRARY_LIB%\
if errorlevel 1 exit 1
xcopy libtiff\*.h %LIBRARY_INC%\
if errorlevel 1 exit 1
5 changes: 5 additions & 0 deletions liblinear/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

make lib
mkdir $PREFIX/lib
mv liblinear* $PREFIX/lib/
11 changes: 11 additions & 0 deletions liblinear/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package:
name: liblinear
version: 210

source:
git_url: https://github.com/cjlin1/liblinear/
git_rev: v210

about:
home: https://www.csie.ntu.edu.tw/~cjlin/liblinear/
license: modified BSD
19 changes: 19 additions & 0 deletions libsvm/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set INCLUDE=%INCLUDE%;%LIBRARY_INC%
set LIB=%LIB%;%LIBRARY_LIB%
set LIBPATH=%LIBPATH%;%LIBRARY_LIB%

REM Build step
nmake /f Makefile.vc
if errorlevel 1 exit 1

REM Install step
copy libtiff\libtiff.dll %LIBRARY_BIN%\
if errorlevel 1 exit 1
copy libtiff\libtiff.lib %LIBRARY_LIB%\
if errorlevel 1 exit 1
copy libtiff\libtiff.lib %LIBRARY_LIB%\tiff.lib
if errorlevel 1 exit 1
copy libtiff\libtiff_i.lib %LIBRARY_LIB%\
if errorlevel 1 exit 1
xcopy libtiff\*.h %LIBRARY_INC%\
if errorlevel 1 exit 1
5 changes: 5 additions & 0 deletions libsvm/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

make lib
mkdir $PREFIX/lib
mv libsvm* $PREFIX/lib/
27 changes: 27 additions & 0 deletions libsvm/enable_zip.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From d196e78c60f4b471a40bff85aec40b1ca2f03e51 Mon Sep 17 00:00:00 2001
From: Mark Wiebe <[email protected]>
Date: Sat, 1 Sep 2012 22:50:53 -0700
Subject: [PATCH] 'b'


diff --git nmake.opt nmake.opt
index c136c36..df324a3 100644
--- nmake.opt
+++ nmake.opt
@@ -63,10 +63,10 @@ LOGLUV_SUPPORT = 1
# Uncomment and edit following lines to enable ZIP support
# (required for Deflate compression and Pixar log-format)
#
-#ZIP_SUPPORT = 1
+ZIP_SUPPORT = 1
#ZLIBDIR = d:/projects/zlib-1.2.1
-#ZLIB_INCLUDE = -I$(ZLIBDIR)
-#ZLIB_LIB = $(ZLIBDIR)/zlib.lib
+ZLIB_INCLUDE =
+ZLIB_LIB = zlibstatic.lib

#
# Uncomment and edit following lines to enable ISO JBIG support
--
1.7.8.msysgit.0

11 changes: 11 additions & 0 deletions libsvm/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package:
name: libsvm
version: 320

source:
git_url: https://github.com/cjlin1/libsvm/
git_rev: v320

about:
home: https://www.csie.ntu.edu.tw/~cjlin/libsvm/
license: modified BSD
6 changes: 0 additions & 6 deletions pattern/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#!/bin/bash

$PYTHON setup.py install

# Add more build steps here, if they are necessary.

# See
# http://docs.continuum.io/conda/build.html
# for a list of environment variables that are set during the build process.
43 changes: 6 additions & 37 deletions pattern/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,10 @@ package:
version: 2.6

source:
fn: pattern-2.6.zip
url: http://www.clips.ua.ac.be/media/pattern-2.6.zip
md5: 3327561b792720cd3744741c1c1b1939
# patches:
# List any patch files here
# - fix.patch

# build:
# entry_points:
# Put any entry points (scripts to be generated automatically) here. The
# syntax is module:function. For example
#
# - pattern = pattern:main
#
# Would create an entry point called pattern that calls pattern.main()


# If this is a new build for the same version, increment the build
# number. If you do not include this key, it defaults to 0.
# number: 1
git_url: https://github.com/clips/pattern
git_tag: 2.6
patches:
- no_lib_packaging.patch

requirements:
build:
Expand All @@ -31,28 +15,13 @@ requirements:

run:
- python
- liblinear
- libsvm

test:
# Python imports
imports:
- pattern

# commands:
# You can put test commands to be run here. Use this to test that the
# entry points work.


# You can also put a file called run_test.py in the recipe that will be run
# at test time.

# requires:
# Put any additional test requirements here. For example
# - nose

about:
home: http://www.clips.ua.ac.be/pages/pattern
license: BSD License

# See
# http://docs.continuum.io/conda/build.html for
# more information about meta.yaml
20 changes: 20 additions & 0 deletions pattern/no_lib_packaging.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git setup.py setup.py
index cc76e65..45fc1c3 100644
--- setup.py
+++ setup.py
@@ -55,7 +55,7 @@ setup(
"pattern.text.it" : ["*.txt", "*.xml"],
"pattern.text.nl" : ["*.txt", "*.xml"],
"pattern.vector" : ["*.txt"],
- "pattern.vector.svm" : ["*.txt", "libsvm-3.11/*", "libsvm-3.17/*", "liblinear-1.93/*"],
+ "pattern.vector.svm" : ["*.txt"],
"pattern.graph" : ["*.js", "*.csv"],
},
py_modules = [
@@ -87,4 +87,4 @@ setup(
"Topic :: Text Processing :: Linguistic",
"Topic :: Text Processing :: Markup :: HTML"
]
-)
\ No newline at end of file
+)

0 comments on commit da69514

Please sign in to comment.