Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
90eaa87a
Commit
90eaa87a
authored
Mar 06, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python/build/zlib.py: use autotools to be more portable
Right now, zlib is only built for Windows, but we may eventually changed that, so don't hard-code `win32/Makefile.gcc`.
parent
b09a54b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
zlib.py
python/build/zlib.py
+23
-13
No files found.
python/build/zlib.py
View file @
90eaa87a
import
os.path
,
subprocess
import
subprocess
from
build.
project
import
Project
from
build.
makeproject
import
Make
Project
class
ZlibProject
(
Project
):
class
ZlibProject
(
Make
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
MakeProject
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
def
get_make_args
(
self
,
toolchain
):
return
MakeProject
.
get_make_args
(
self
,
toolchain
)
+
[
'CC='
+
toolchain
.
cc
+
' '
+
toolchain
.
cppflags
+
' '
+
toolchain
.
cflags
,
'CPP='
+
toolchain
.
cc
+
' -E '
+
toolchain
.
cppflags
,
'AR='
+
toolchain
.
ar
,
'ARFLAGS='
+
toolchain
.
arflags
,
'RANLIB='
+
toolchain
.
ranlib
,
'LDSHARED='
+
toolchain
.
cc
+
' -shared'
,
'libz.a'
]
def
get_make_install_args
(
self
,
toolchain
):
return
[
'RANLIB='
+
toolchain
.
ranlib
,
self
.
install_target
]
def
_build
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
,
out_of_tree
=
False
)
subprocess
.
check_call
([
'/usr/bin/make'
,
'--quiet'
,
'-f'
,
'win32/Makefile.gcc'
,
'PREFIX='
+
toolchain
.
arch
+
'-'
,
'-j12'
,
'install'
,
'INCLUDE_PATH='
+
os
.
path
.
join
(
toolchain
.
install_prefix
,
'include'
),
'LIBRARY_PATH='
+
os
.
path
.
join
(
toolchain
.
install_prefix
,
'lib'
),
'BINARY_PATH='
+
os
.
path
.
join
(
toolchain
.
install_prefix
,
'bin'
),
],
subprocess
.
check_call
([
'./configure'
,
'--prefix='
+
toolchain
.
install_prefix
,
'--static'
],
cwd
=
src
,
env
=
toolchain
.
env
)
self
.
build_make
(
toolchain
,
src
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment