[78734] trunk/dports/textproc
ryandesign at macports.org
ryandesign at macports.org
Fri May 20 03:24:44 PDT 2011
Revision: 78734
http://trac.macports.org/changeset/78734
Author: ryandesign at macports.org
Date: 2011-05-20 03:24:44 -0700 (Fri, 20 May 2011)
Log Message:
-----------
ocropus: new port, version 0.4; see #29497
Added Paths:
-----------
trunk/dports/textproc/ocropus/
trunk/dports/textproc/ocropus/Portfile
trunk/dports/textproc/ocropus/files/
trunk/dports/textproc/ocropus/files/patch-SConstruct.diff
Added: trunk/dports/textproc/ocropus/Portfile
===================================================================
--- trunk/dports/textproc/ocropus/Portfile (rev 0)
+++ trunk/dports/textproc/ocropus/Portfile 2011-05-20 10:24:44 UTC (rev 78734)
@@ -0,0 +1,45 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+name ocropus
+hg.tag 62bdc7b8be62
+version 0.4-${hg.tag}
+categories textproc
+maintainers nomaintainer
+platforms darwin
+
+description The OCRopus open source document analysis and OCR system
+
+long_description OCRopus is a state-of-the-art document analysis and OCR \
+ system, featuring pluggable layout analysis, pluggable \
+ character recognition, statistical natural language \
+ modeling, and multi-lingual capabilities.
+
+fetch.type hg
+hg.url https://ocropus.googlecode.com/hg/
+
+homepage http://code.google.com/p/ocropus/
+
+depends_build port:scons
+
+depends_lib port:iulib \
+ port:sqlite3 \
+ port:giflib
+
+patchfiles patch-SConstruct.diff
+
+post-patch {
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/SConstruct
+}
+
+use_configure no
+
+build.cmd scons
+build.target
+build.args prefix=${prefix} iulib=${prefix} omp=no
+
+destroot.cmd scons
+destroot.args ${build.args}
+destroot.destdir destdir=${destroot}
Property changes on: trunk/dports/textproc/ocropus/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/textproc/ocropus/files/patch-SConstruct.diff
===================================================================
--- trunk/dports/textproc/ocropus/files/patch-SConstruct.diff (rev 0)
+++ trunk/dports/textproc/ocropus/files/patch-SConstruct.diff 2011-05-20 10:24:44 UTC (rev 78734)
@@ -0,0 +1,47 @@
+--- SConstruct.orig 2011-05-17 20:59:50.000000000 -0700
++++ SConstruct 2011-05-17 23:54:27.000000000 -0700
+@@ -123,9 +123,9 @@
+ # sources = [s for s in sources if not "/fst" in s]
+
+ ### SDL (include if it's there in case iulib needs it)
+-
+-if conf.CheckLibWithHeader('SDL', 'SDL/SDL.h', 'C'):
+- if conf.CheckLibWithHeader('SDL_gfx', 'SDL/SDL_gfxPrimitives.h', 'C'):
++#Jason C. avoid SDL_main problem
++if conf.CheckCXXHeader("SDL/SDL.h"):
++ if conf.CheckCXXHeader('SDL/SDL_gfxPrimitives.h'):
+ env.Append(LIBS=["SDL","SDL_gfx"])
+
+ ### Leptonica
+@@ -175,6 +175,7 @@
+
+ env.Prepend(CPPPATH=glob("ocr-*"))
+ env.Prepend(LIBPATH=['.'])
++env.Append(SHLINKFLAGS = '-dynamiclib -install_name "@@PREFIX@@/lib/libocropus.dylib"')
+ # libocropus = env.StaticLibrary('libocropus.a',sources)
+ libocropus = env.SharedLibrary('libocropus',sources)
+ # env.Prepend(LIBS=[File("libocropus.so")])
+@@ -204,12 +205,10 @@
+ ################################################################
+
+ penv = env.Clone()
+-penv.Append(LIBS=[File("libocropus.so")])
+-penv.Append(CCFLAGS=["-Xlinker","-rpath=${iulib}/lib"])
+-penv.Append(LINKFLAGS=["-Xlinker","-rpath=${iulib}/lib"])
++penv.Append(LIBS=[File(libocropus)])
+
+ for cmd in glob("commands/*.cc"):
+- penv.Program(cmd,LIBS=File("libocropus.so"))
++ penv.Program(cmd,LIBS=File(libocropus))
+ penv.Install(destdir+bindir,re.sub('.cc$','',cmd))
+
+ ################################################################
+@@ -221,7 +220,7 @@
+ test_builder = Builder(action='$SOURCE && touch $TARGET',
+ suffix = '.passed',
+ src_suffix = '')
+- env.Append(BUILDERS={'Test':test_builder})
++ penv.Append(BUILDERS={'Test':test_builder})
+ for cmd in Glob("*/test-*.cc")+Glob("*/test*/test-*.cc"):
+ cmd = str(cmd)
+ penv.Program(cmd)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110520/778ff8b7/attachment.html>
More information about the macports-changes
mailing list