From: Thomas Nagy Date: Mon, 16 Sep 2013 22:00:40 +0000 (+0200) Subject: backported the openbsd fixes from waf 1.7 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=64d00de9334b6c0fcb0bc3fed0951562519185a2;p=third_party%2Fwaf.waf15 backported the openbsd fixes from waf 1.7 --- diff --git a/wafadmin/Tools/ccroot.py b/wafadmin/Tools/ccroot.py index 264bdc7..d59cf26 100644 --- a/wafadmin/Tools/ccroot.py +++ b/wafadmin/Tools/ccroot.py @@ -177,10 +177,14 @@ def get_target_name(self): dir, name = os.path.split(self.target) - if self.env.DEST_BINFMT == 'pe' and getattr(self, 'vnum', None) and 'cshlib' in self.features: - # include the version in the dll file name, - # the import lib file name stays unversionned. - name = name + '-' + self.vnum.split('.')[0] + if 'cshlib' in self.features and getattr(self, 'vnum', None): + nums = self.vnum.split('.') + if self.env.DEST_BINFMT == 'pe': + # include the version in the dll file name, + # the import lib file name stays unversionned. + name = name + '-' + nums[0] + elif self.env.DEST_OS == 'openbsd': + pattern = '%s.%s.%s' % (pattern, nums[0], nums[1]) return os.path.join(dir, pattern % name) @@ -598,14 +602,16 @@ def apply_vnum(self): if not path: return if self.env.DEST_OS == 'openbsd': - bld.install_as(path + os.sep + name2, node, env=self.env, chmod=self.link_task.chmod) + libname = self.link_task.outputs[0].name + bld.install_as('%s%s%s' % (path, os.sep, libname), node, env=self.env) else: bld.install_as(path + os.sep + name3, node, env=self.env) bld.symlink_as(path + os.sep + name2, name3) bld.symlink_as(path + os.sep + libname, name3) # the following task is just to enable execution from the build dir :-/ - self.create_task('vnum', node, [node.parent.find_or_declare(name2), node.parent.find_or_declare(name3)]) + if self.env.DEST_OS != 'openbsd': + self.create_task('vnum', node, [node.parent.find_or_declare(name2), node.parent.find_or_declare(name3)]) def exec_vnum_link(self): for x in self.outputs: diff --git a/wafadmin/Tools/gcc.py b/wafadmin/Tools/gcc.py index 420b44f..a6be0b2 100644 --- a/wafadmin/Tools/gcc.py +++ b/wafadmin/Tools/gcc.py @@ -113,6 +113,10 @@ def gcc_modifier_aix(conf): v['SHLIB_MARKER'] = '' +@conftest +def gcc_modifier_openbsd(conf): + conf.env['SONAME_ST'] = [] + @conftest def gcc_modifier_platform(conf): # * set configurations specific for a platform. diff --git a/wafadmin/Tools/gxx.py b/wafadmin/Tools/gxx.py index 8f4a0bf..4984122 100644 --- a/wafadmin/Tools/gxx.py +++ b/wafadmin/Tools/gxx.py @@ -111,6 +111,10 @@ def gxx_modifier_aix(conf): v['SHLIB_MARKER'] = '' +@conftest +def gxx_modifier_openbsd(conf): + conf.env['SONAME_ST'] = [] + @conftest def gxx_modifier_platform(conf): # * set configurations specific for a platform.