mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
successful build of openjpeg -- unsuccessful linking
This commit is contained in:
parent
64efea9ed8
commit
81af4bf9d7
|
@ -46,8 +46,16 @@ def extract(src, dest):
|
||||||
return untar(src, dest)
|
return untar(src, dest)
|
||||||
|
|
||||||
def fetch_libs():
|
def fetch_libs():
|
||||||
for lib in libs.values():
|
for name,lib in libs.items():
|
||||||
extract(check_hash(fetch(lib['url']),lib['hash']),build_dir)
|
if name == 'openjpeg':
|
||||||
|
filename = check_hash(fetch(lib['url']),lib['hash'])
|
||||||
|
for compiler in compilers.values():
|
||||||
|
if not os.path.exists(os.path.join(build_dir,lib['dir']+compiler['inc_dir'])):
|
||||||
|
extract(filename, build_dir)
|
||||||
|
os.rename(os.path.join(build_dir,lib['dir']),
|
||||||
|
os.path.join(build_dir,lib['dir']+compiler['inc_dir']))
|
||||||
|
else:
|
||||||
|
extract(check_hash(fetch(lib['url']),lib['hash']),build_dir)
|
||||||
|
|
||||||
def cp_tk():
|
def cp_tk():
|
||||||
return r"""
|
return r"""
|
||||||
|
@ -78,6 +86,21 @@ def end_compiler():
|
||||||
endlocal
|
endlocal
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def nmake_openjpeg(compiler):
|
||||||
|
return r"""
|
||||||
|
rem build openjpeg
|
||||||
|
setlocal
|
||||||
|
@echo on
|
||||||
|
cd /D %%OPENJPEG%%%(inc_dir)s
|
||||||
|
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON -G "NMake Makefiles" .
|
||||||
|
nmake -f Makefile clean
|
||||||
|
nmake -f Makefile
|
||||||
|
copy /Y /B bin\* %%INCLIB%%
|
||||||
|
mkdir %%INCLIB%%\openjpeg-2.0
|
||||||
|
copy /Y /B src\lib\openjp2\*.h %%INCLIB%%\openjpeg-2.0
|
||||||
|
endlocal
|
||||||
|
""" % compiler
|
||||||
|
|
||||||
def nmake_libs(compiler):
|
def nmake_libs(compiler):
|
||||||
# undone -- pre, makes, headers, libs
|
# undone -- pre, makes, headers, libs
|
||||||
return r"""
|
return r"""
|
||||||
|
@ -115,13 +138,13 @@ endlocal
|
||||||
|
|
||||||
rem build openjpeg
|
rem build openjpeg
|
||||||
setlocal
|
setlocal
|
||||||
cd /D %%OPENJPEG%%
|
cd /D %%OPENJPEG%%%(inc_dir)s
|
||||||
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON .
|
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON -G "NMake Makefiles" .
|
||||||
nmake -f Makefile.vc clean
|
nmake -f Makefile clean
|
||||||
nmake -f Makefile.vc
|
nmake -f Makefile
|
||||||
copy /Y /B bin/* %%INCLIB%%
|
copy /Y /B bin\* %%INCLIB%%
|
||||||
copy /Y /B src/lib/openjp2/openjpeg.h %%INCLIB%%
|
mkdir %%INCLIB%%\openjpeg-2.0
|
||||||
copy /Y /B src/lib/openjp2/opj_stdint.h %%INCLIB%%
|
copy /Y /B src\lib\openjp2\*.h %%INCLIB%%\openjpeg-2.0
|
||||||
endlocal
|
endlocal
|
||||||
|
|
||||||
rem Build libtiff
|
rem Build libtiff
|
||||||
|
@ -169,13 +192,14 @@ endlocal
|
||||||
mkdirs()
|
mkdirs()
|
||||||
fetch_libs()
|
fetch_libs()
|
||||||
|
|
||||||
script = [header(), cp_tk()]
|
script = [header()] #, cp_tk()]
|
||||||
|
|
||||||
for compiler in compilers.values():
|
for compiler in compilers.values():
|
||||||
#if True:
|
#if True:
|
||||||
# compiler = compilers[(7,64)]
|
# compiler = compilers[(7,64)]
|
||||||
script.append(setup_compiler(compiler))
|
script.append(setup_compiler(compiler))
|
||||||
script.append(nmake_libs(compiler))
|
script.append(nmake_libs(compiler))
|
||||||
|
# script.append(nmake_openjpeg(compiler))
|
||||||
script.append(msbuild_libs(compiler))
|
script.append(msbuild_libs(compiler))
|
||||||
script.append(end_compiler())
|
script.append(end_compiler())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user