Permalink
Browse files

Remove dependency towards pcre (which breaks on ubuntu)

  • Loading branch information...
samoht committed Mar 6, 2012
1 parent ad5c399 commit de73a752acd82c11156ef4c75fd8ab039ab41bda
Showing with 50 additions and 16 deletions.
  1. +7 −7 Makefile
  2. +0 −1 README.md
  3. +17 −8 ocp-get.ocp
  4. +26 −0 pcre.ml
View
@@ -22,7 +22,7 @@ opt: ./_obuild/unixrun
compile: ./_obuild/unixrun clone
$(OCPBUILD) -init -scan -sanitize $(TARGET)
-clone: cudf extlib ocaml-pcre ocamlgraph dose
+clone: cudf extlib ocaml-re ocamlgraph dose
cudf:
git clone git://scm.gforge.inria.fr/mancoosi-tools/cudf.git
@@ -35,10 +35,10 @@ extlib:
dose:
git clone git://scm.gforge.inria.fr/mancoosi-tools/dose.git
-ocaml-pcre:
- $(WGET) http://hg.ocaml.info/release/pcre-ocaml/archive/release-6.2.5.tar.gz
- tar xfvz release-6.2.5.tar.gz
- mv pcre-ocaml-release-6.2.5 ocaml-pcre
+# ocaml-pcre:
+# $(WGET) http://hg.ocaml.info/release/pcre-ocaml/archive/release-6.2.5.tar.gz
+# tar xfvz release-6.2.5.tar.gz
+# mv pcre-ocaml-release-6.2.5 ocaml-pcre
ocamlgraph:
$(WGET) http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.1.tar.gz
@@ -48,8 +48,8 @@ ocamlgraph:
clean:
$(OCPBUILD) -clean
-# ocaml-re:
-# git clone https://github.com/avsm/ocaml-re
+ocaml-re:
+ git clone https://github.com/avsm/ocaml-re
distclean:
rm -f *.tar.gz
View
@@ -5,7 +5,6 @@
# Prerequisites:
* ocaml
-* pcre (the C library)
* wget
To compile `ocp-get`, simply run:
View
@@ -1,3 +1,7 @@
+(* typerex support *)
+(* ocamlc = ["ocp-ocamlc.opt"]
+ ocamlopt = ["ocp-ocamlopt.opt"] *)
+
begin library "extlib"
sort = true
files = [
@@ -25,12 +29,18 @@ begin library "extlib"
]
end
-begin library "pcre"
+begin library "re"
sort = true
- cclib = [ "-lpcre" ] (* ADDED by Fabrice *)
files = [
- "ocaml-pcre/lib/pcre_stubs.c"
- "ocaml-pcre/lib/pcre.ml"
+ "pcre.ml"
+ "ocaml-re/lib/re_str.ml"
+ "ocaml-re/lib/re_posix.ml"
+ "ocaml-re/lib/re_perl.ml"
+ "ocaml-re/lib/re_glob.ml"
+ "ocaml-re/lib/re_emacs.ml"
+ "ocaml-re/lib/re.ml"
+ "ocaml-re/lib/cset.ml"
+ "ocaml-re/lib/automata.ml"
]
end
@@ -72,15 +82,15 @@ begin library "graph"
"ocamlgraph/src/sig_pack.mli"
"ocamlgraph/src/sig.mli"
"ocamlgraph/src/rand.ml"
- "ocamlgraph/src/persistent.ml" (nodeps = [ "Graph"]) (* ADDED by Fabrice *)
+ "ocamlgraph/src/persistent.ml" (nodeps = [ "Graph" ])
"ocamlgraph/src/path.ml"
"ocamlgraph/src/pack.ml"
"ocamlgraph/src/oper.ml"
"ocamlgraph/src/minsep.ml"
"ocamlgraph/src/md.ml"
"ocamlgraph/src/mcs_m.ml"
"ocamlgraph/src/kruskal.ml"
- "ocamlgraph/src/imperative.ml" (nodeps = [ "Graph"]) (* ADDED by Fabrice *)
+ "ocamlgraph/src/imperative.ml" (nodeps = [ "Graph" ])
"ocamlgraph/src/graphviz.ml"
"ocamlgraph/src/gml.mll"
"ocamlgraph/src/gmap.ml"
@@ -133,7 +143,6 @@ begin library "dose"
]
pack Algo [
-(* "dose/algo/tests.ml" *) (* COMMENTED by Fabrice *)
"dose/algo/strongdeps_int.ml"
"dose/algo/strongdeps.ml"
"dose/algo/strongconflicts_int.ml"
@@ -149,7 +158,7 @@ begin library "dose"
]]
requires = [
- "pcre"
+ "re"
"extlib"
"cudf"
"graph"
View
26 pcre.ml
@@ -0,0 +1,26 @@
+let regexp pat =
+ Re_perl.compile_pat pat
+
+let extract ~rex s =
+ Re.get_all (Re.exec rex s)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

0 comments on commit de73a75

Please sign in to comment.