sunpinyin-2.0.3-force-switch.patch 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. diff --git a/SConstruct b/SConstruct
  2. index 68cd365..9bb6ebc 100644
  3. --- a/SConstruct
  4. +++ b/SConstruct
  5. @@ -180,12 +180,6 @@ libdir = env['LIBDIR']
  6. libdatadir = env['LIBDATADIR'] + '/sunpinyin/data'
  7. headersdir = env['PREFIX'] + '/include/sunpinyin-2.0'
  8. -if GetOS() != 'Darwin':
  9. - env.Append(LINKFLAGS=['-Wl,-soname=libsunpinyin.so.%d' % abi_major])
  10. -
  11. -if GetOption('rpath') is not None and GetOS() != 'Darwin':
  12. - env.Append(LINKFLAGS='-Wl,-R -Wl,%s' % GetOption('rpath'))
  13. -
  14. # pass through environmental variables
  15. envvar = [('CC', 'CC'),
  16. ('CXX', 'CXX'),
  17. @@ -202,6 +196,12 @@ extra_cflags=' -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR=\'"%s"\'' % libdatadir
  18. env.Append(CFLAGS=extra_cflags)
  19. env.Append(CXXFLAGS=extra_cflags)
  20. +if GetOS() != 'Darwin':
  21. + env.Append(LINKFLAGS=' -Wl,-soname=libsunpinyin.so.%d' % abi_major)
  22. +
  23. +if GetOption('rpath') is not None and GetOS() != 'Darwin':
  24. + env.Append(LINKFLAGS=' -Wl,-R -Wl,%s' % GetOption('rpath'))
  25. +
  26. #
  27. #==============================configure================================
  28. #