← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2241: build fixes for the mingw64 in Cygwin

 

------------------------------------------------------------
revno: 2241
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Tue 2010-09-14 22:38:28 +0200
message:
  build fixes for the mingw64 in Cygwin
modified:
  64.bat
  Compile.txt
  build_util.py
  intl/SConscript


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file '64.bat'
--- 64.bat	2009-03-11 09:18:01 +0000
+++ 64.bat	2010-09-14 20:38:28 +0000
@@ -1,1 +1,2 @@
-scons prefix=x86_64-pc-mingw32- arch=x64
+call scons prefix=x86_64-w64-mingw32- arch=x64
+pause

=== modified file 'Compile.txt'
--- Compile.txt	2010-09-02 18:16:12 +0000
+++ Compile.txt	2010-09-14 20:38:28 +0000
@@ -52,7 +52,7 @@
 		MinGW and add MinGW\bin to my PATH.
 		Note; the sjlj variant is slower than the dwarf variant; the latter is recommended.
 
-		Also grab natupnp.h and move it to MinGW\include (needs to be obtained from the .Net 1.1 SDK)
+		Also grab natupnp.h from the .Net 1.1 SDK and place it in the root of the repository.
 		<http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&DisplayLang=en>
 
 	b. Microsoft Visual C++ 10 (2010):

=== modified file 'build_util.py'
--- build_util.py	2010-07-01 17:43:48 +0000
+++ build_util.py	2010-09-14 20:38:28 +0000
@@ -4,7 +4,7 @@
 
 class Dev:
 	def __init__(self, mode, tools, env):
-		
+
 		self.mode = mode
 		self.tools = tools
 		self.env = env
@@ -13,7 +13,7 @@
 		if env['arch'] != 'x86':
 			self.build_root += '-' + env['arch']
 		self.build_root += '/'
-	
+
 	def prepare(self):
 		if not self.env['verbose']:
 			self.env['CCCOMSTR'] = "Compiling $TARGET (static)"
@@ -27,7 +27,7 @@
 			self.env['LINKCOMSTR'] = "Linking $TARGET (static)"
 			self.env['ARCOMSTR'] = "Archiving $TARGET"
 			self.env['RCCOMSTR'] = "Resource $TARGET"
-		
+
 		self.env.SConsignFile()
 		self.env.SetOption('implicit_cache', '1')
 		self.env.SetOption('max_drift', 60*10)
@@ -35,26 +35,29 @@
 
 		if 'mingw' in self.env['TOOLS']:
 			self.env.Append(LINKFLAGS=["-Wl,--enable-runtime-pseudo-reloc"])
-			
+
 			prefix = ''
 			if self.env.get('prefix') is not None:
 				prefix = self.env['prefix']
 			elif sys.platform != 'win32':
 				prefix = 'i386-mingw32-'
-			
+
 			self.env['CC'] = prefix + 'gcc'
 			self.env['CXX'] = prefix + 'g++'
 			self.env['LINK'] = prefix + 'g++'
 			self.env['AR'] = prefix + 'ar'
 			self.env['RANLIB'] = prefix + 'ranlib'
 			self.env['RC'] = prefix + 'windres'
-			
+
 			if sys.platform != 'win32':
 				self.env['PROGSUFFIX'] = '.exe'
 				self.env['LIBPREFIX'] = 'lib'
 				self.env['LIBSUFFIX'] = '.a'
 				self.env['SHLIBSUFFIX'] = '.dll'
-				
+
+			# some distros of windres fail when they receive Win paths as input, so convert...
+			self.env['RCCOM'] = self.env['RCCOM'].replace('-i $SOURCE', '-i ${SOURCE.posix}', 1)
+
 	def is_win32(self):
 		return sys.platform == 'win32' or 'mingw' in self.env['TOOLS']
 
@@ -63,16 +66,16 @@
 
 	def get_build_path(self, source_path):
 		return self.get_build_root() + source_path
-	
+
 	def get_target(self, source_path, name, in_bin = True):
 		if in_bin:
 			return self.get_build_root() + 'bin/' + name
 		else:
 			return self.get_build_root() + source_path + name
-		
+
 	def get_sources(self, source_path, source_glob):
 		return map(lambda x: self.get_build_path(source_path) + x, glob.glob(source_glob))
-		
+
 	def prepare_build(self, source_path, name, source_glob = '*.cpp', in_bin = True, precompiled_header = None):
 		env = self.env.Clone()
 		env.BuildDir(self.get_build_path(source_path), '.', duplicate = 0)
@@ -157,13 +160,12 @@
 	ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
 	context.Result( ret )
 	return ret
-	
+
 def CheckPKG(context, name):
 	context.Message( 'Checking for %s... ' % name )
 	ret = context.TryAction('pkg-config --exists "%s"' % name)[0]
 	if ret:
 		context.env.ParseConfig('pkg-config --cflags --libs "%s"' % name)
-		
+
 	context.Result( ret )
 	return ret
-	   

=== modified file 'intl/SConscript'
--- intl/SConscript	2008-06-25 17:44:34 +0000
+++ intl/SConscript	2010-09-14 20:38:28 +0000
@@ -3,7 +3,7 @@
 if dev.is_win32():
 	env, target, sources = dev.prepare_build(source_path, 'aintl', '*.c', in_bin=False)
 
-	env.Append(CPPDEFINES=['LOCALEDIR=\\"\\"', 'LOCALE_ALIAS_PATH=\\"\\"', 'INSTALLDIR=\\"\\"', 'LIBDIR=\\"\\"',
+	env.Append(CPPDEFINES=['LOCALEDIR=\'""\'', 'LOCALE_ALIAS_PATH=\'""\'', 'INSTALLDIR=\'""\'', 'LIBDIR=\'""\'',
 		'IN_LIBINTL', 'ENABLE_RELOCATABLE=1', 'NO_XMALLOC', 'HAVE_CONFIG_H',
 		'set_relocation_prefix=libintl_set_relocation_prefix', 'relocate=libintl_relocate'])
 	env.Append(CPPPATH='#/intl')