Ticket #29497: patch-SConstruct.diff

File patch-SConstruct.diff, 1.8 KB (added by jason@…, 13 years ago)

patches to SConstruct build

  • SConstruct

    old new  
    123123# sources = [s for s in sources if not "/fst" in s]
    124124
    125125### SDL (include if it's there in case iulib needs it)
    126 
    127 if conf.CheckLibWithHeader('SDL', 'SDL/SDL.h', 'C'):
    128     if conf.CheckLibWithHeader('SDL_gfx', 'SDL/SDL_gfxPrimitives.h', 'C'):
     126#Jason C. avoid SDL_main problem
     127if conf.CheckCXXHeader("SDL/SDL.h"):
     128    if conf.CheckCXXHeader('SDL/SDL_gfxPrimitives.h'):
    129129        env.Append(LIBS=["SDL","SDL_gfx"])
    130130
    131131### Leptonica
     
    175175
    176176env.Prepend(CPPPATH=glob("ocr-*"))
    177177env.Prepend(LIBPATH=['.'])
     178env.Append(SHLINKFLAGS = '-dynamiclib -install_name "@@PREFIX@@/lib/libocropus.dylib"')
    178179# libocropus = env.StaticLibrary('libocropus.a',sources)
    179180libocropus = env.SharedLibrary('libocropus',sources)
    180181# env.Prepend(LIBS=[File("libocropus.so")])
     
    204205################################################################
    205206
    206207penv = env.Clone()
    207 penv.Append(LIBS=[File("libocropus.so")])
    208 penv.Append(CCFLAGS=["-Xlinker","-rpath=${iulib}/lib"])
    209 penv.Append(LINKFLAGS=["-Xlinker","-rpath=${iulib}/lib"])
     208penv.Append(LIBS=[File(libocropus)])
    210209
    211210for cmd in glob("commands/*.cc"):
    212     penv.Program(cmd,LIBS=File("libocropus.so"))
     211    penv.Program(cmd,LIBS=File(libocropus))
    213212    penv.Install(destdir+bindir,re.sub('.cc$','',cmd))
    214213
    215214################################################################
     
    221220    test_builder = Builder(action='$SOURCE && touch $TARGET',
    222221        suffix = '.passed',
    223222        src_suffix = '')
    224     env.Append(BUILDERS={'Test':test_builder})
     223    penv.Append(BUILDERS={'Test':test_builder})
    225224    for cmd in Glob("*/test-*.cc")+Glob("*/test*/test-*.cc"):
    226225        cmd = str(cmd)
    227226        penv.Program(cmd)