#NEWLINE# @ feature ( 'cshlib' ) #NEWLINE# @ after ( 'apply_link' ) #NEWLINE# @ before ( 'apply_lib_vars' , 'default_link_install' ) #NEWLINE# def apply_vnum( self ) : #NEWLINE# #INDENT# '\n\tlibfoo.so is installed as libfoo.so.1.2.3\n\t' #NEWLINE# if ( ( not getattr ( self , 'vnum' , '' ) ) or ( not ( 'cshlib' in self . features ) ) or ( os . name != 'posix' ) or ( self . env . DEST_BINFMT not in ( 'elf' , 'mac-o' ) ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . meths . remove ( 'default_link_install' ) #NEWLINE# link = self . link_task #NEWLINE# nums = self . vnum . split ( '.' ) #NEWLINE# node = link . outputs [ 0 ] #NEWLINE# libname = node . name #NEWLINE# if libname . endswith ( '.dylib' ) : #NEWLINE# #INDENT# name3 = libname . replace ( '.dylib' , ( '.%s.dylib' % self . vnum ) ) #NEWLINE# name2 = libname . replace ( '.dylib' , ( '.%s.dylib' % nums [ 0 ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name3 = ( ( libname + '.' ) + self . vnum ) #NEWLINE# name2 = ( ( libname + '.' ) + nums [ 0 ] ) #NEWLINE# #UNINDENT# if self . env . SONAME_ST : #NEWLINE# #INDENT# v = ( self . env . SONAME_ST % name2 ) #NEWLINE# self . env . append_value ( 'LINKFLAGS' , v . split ( ) ) #NEWLINE# #UNINDENT# bld = self . bld #NEWLINE# nums = self . vnum . split ( '.' ) #NEWLINE# path = self . install_path #NEWLINE# if ( not nums ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# bld . install_as ( ( ( path + os . sep ) + name3 ) , node , env = self . env ) #NEWLINE# bld . symlink_as ( ( ( path + os . sep ) + name2 ) , name3 ) #NEWLINE# bld . symlink_as ( ( ( path + os . sep ) + libname ) , name3 ) #NEWLINE# tsk = self . create_task ( 'vnum' ) #NEWLINE# tsk . set_inputs ( [ node ] ) #NEWLINE# tsk . set_outputs ( node . parent . find_or_declare ( name2 ) )