[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:45:18 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=01e9e63
The following commit has been merged in the master branch:
commit 01e9e6345284f1776b40d3be5f6c84b83129dd35
Author: Robin Mills <robin at clanmills.com>
Date: Wed May 6 23:39:45 2015 +0000
msvc2005/configure.py Work in progress. Simplification.
---
msvc2005/configure.py | 83 +++++++++++++++++++++++++--------------------------
1 file changed, 40 insertions(+), 43 deletions(-)
diff --git a/msvc2005/configure.py b/msvc2005/configure.py
index 5f13f39..51a8400 100755
--- a/msvc2005/configure.py
+++ b/msvc2005/configure.py
@@ -58,7 +58,8 @@ for p in uid:
remove[p]=empty
remove['zlib'] = set([ 'pngimage' ])
-
+##
+# MSVC strings
strings = {}
strings['UID'] = str(uuid.uuid1())
@@ -82,15 +83,16 @@ strings['platforms'] = '''
ReleaseDLL|x64 = ReleaseDLL|x64
EndGlobalSection
'''
-strings['postSolutionBegin'] = ' GlobalSection(ProjectConfigurationPlatforms) = postSolution
'
-strings['postSolutionEnd' ] = ' EndGlobalSection
'
+strings['postSolutionBegin'] = ' GlobalSection(ProjectConfigurationPlatforms) = postSolution
'
+strings['postSolutionEnd' ] = ' EndGlobalSection
'
+
+strings['postProjectBegin' ] = ' ProjectSection(ProjectDependencies) = postProject
'
+strings['postProjectEnd' ] = ' ProjectSectionEnd
'
strings['preSolution'] = ''' GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
'''
-
-
##
# {831EF580-92C8-4CA8-B0CE-3D906280A54D}.Debug|Win32.ActiveCfg = Debug|Win32
def compilationForProject(uid):
@@ -115,48 +117,49 @@ def compilationTable():
# ...
# EndProjectSection
# EndProject
-# Filter proj\proj.vcproj -> proj\proj_configure.vcproj
-# 1) Remove unwanted files (using remove[project] set)
-# 2) Add a preprocessor symbol to ask config.h to read exv_msvc_configure.h
##
def projectRecord(project,projects):
print( 'Project %-18s uid = %s' % (project, uid[project]) )
- UID = strings['UID']
+ UID = strings['UID']
vcnew = "%s\%s_configure.vcproj" % (project,project) # write in DOS notation for Visual Studio
result = 'Project("{%s}") = "%s", "%s", "{%s}"
' % (UID,project,vcnew,uid[project])
count = 0
- out = ' ProjectSection(ProjectDependencies) = postProject
'
+ out = strings['postProjectBegin']
for p in projects:
if not p in ignore:
count=count+1
out = out + ' {%s} = {%s}
' % (uid[p],uid[p])
- out = out + ' EndProjectSection
'
+ out = out + strings['postProjectEnd']
if count > 0:
result = result + out
result = result + 'EndProject
'
+ return result
- # Filter foo
oo.vcproj -> foo
oo_configure.vcproj and remove files we do not want
- vcold = os.path.join(project,("%s.vcproj" % project) ) # path to old file
- vcnew = os.path.join(project,("%s_configure.vcproj" % project) ) # path to new file
+##
+# Filter proj\proj.vcproj -> proj\proj_configure.vcproj
+def writeVCproj(project,projects):
+ vcold = os.path.join(project,("%s.vcproj" % project) ) # path to old file
+ vcnew = os.path.join(project,("%s_configure.vcproj" % project) ) # path to new file
xmllines = xml.dom.minidom.parse(vcold).toprettyxml().split('
')
- out = ""
- projectGUID='ProjectGUID="{'
+ out = ""
for line in xmllines:
+ # 1) Update the project GUID
+ projectGUID='ProjectGUID="{'
if line.find( projectGUID) > 0:
start = line.find(projectGUID) + len(projectGUID)
olduid=line[start:line.find('}',start)-1]
line=line.replace(olduid,uid[project]);
- # remove files
+ # 2) Remove unwanted files (using remove[project] set)
if line.find( 'File RelativePath=' ) >= 0:
for r in remove[project]:
for stub in r:
if ( line.find(stub) > 0 ):
line =''
- # add a preprocessor define to help config.h to read exv_conf_configure.h
- ppold= 'PreprocessorDefinitions="'
+ # 3) Add a preprocessor symbol to ask config.h to read exv_msvc_configure.h
+ ppold= 'PreprocessorDefinitions="'
ppnew=ppold+'EXV_MSVC_CONFIGURE;'
if line.find( ppold ) > 0:
line=line.replace(ppold,ppnew)
@@ -164,8 +167,6 @@ def projectRecord(project,projects):
out = out + line + '
'
open(vcnew,'w').write(out)
- return result
-
##
# not assert!
def cantHappen(condition,message):
@@ -207,7 +208,7 @@ def main():
parser.add_option('-o', '--disable-openssl' , action='store_false', dest='openssl' ,help='disable openssl' )
parser.add_option('-E', '--enable-expat' , action='store_true' , dest='expat' ,help='enable expat' ,default=True)
parser.add_option('-e', '--disable-expat' , action='store_false', dest='expat' ,help='disable expat' )
- parser.add_option('-d', '--default' , action='store_true' , dest='defolt' ,help='default' ,default=True)
+ parser.add_option('-d', '--default' , action='store_true' , dest='defolt' ,help='default' ,default=False)
##
# no arguments, report and quit
@@ -218,10 +219,6 @@ def main():
##
# parse and test for errors
(options, args) = parser.parse_args()
- if options.defolt == True:
- options.xmp=True
- options.zlib=True
- options.expat=True
cantHappen(options.curl & (not options.webready),'cannot use curl without webready' );
cantHappen(options.openssl & (not options.webready),'cannot use openssl without webready');
cantHappen(options.ssh & (not options.webready),'cannot use libssh without webready');
@@ -246,40 +243,40 @@ def main():
cleanProjectSet(options.zlib ,'zlib' )
##
- # open the solution file
+ # write solution file
sln='exiv2-configure.sln'
s = open(sln,'w')
s.write(strings['Begin'])
- ##
# write projects
for p in sorted(project):
- if not p in ignore:
- # print(p,end=' ')
- projects=project[p]
-
- zap = False
- zap = zap | ((not options.webready) & ('webready' in projects))
- zap = zap | ((not options.zlib ) & ('zlib' in projects))
- zap = zap | ((not options.xmp ) & ('xmp' in projects))
- if zap:
- project[p]=0
- else:
- s.write(projectRecord(p,projects))
+ projects=project[p]
+
+ zap = False
+ zap = zap | ((not options.webready) & ('webready' in projects))
+ zap = zap | ((not options.zlib ) & ('zlib' in projects))
+ zap = zap | ((not options.xmp ) & ('xmp' in projects))
+ if zap:
+ project.pop(p)
+ else:
+ s.write(projectRecord(p,projects))
- ##
# write compilation table
s.write(strings['globalBegin'])
s.write(strings['platforms' ])
s.write(compilationTable())
s.write(strings['preSolution'])
- s.write(strings['globalEnd' ])
+ s.write(strings['globalEnd' ])
- ##
# finish
s.write(strings['End'])
s.close()
+ ##
+ # write project files
+ for p in sorted(project):
+ writeVCproj(p,project[p])
+
print()
print('MSVC 2005 Solution file created: ' + sln)
print()
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list