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
e70f7141
Commit
e70f7141
authored
Nov 21, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{android,win32}/build.py: move class AutotoolsProject to build/autotools.py
parent
7a08ce7e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
82 deletions
+47
-82
build.py
android/build.py
+1
-40
autotools.py
python/build/autotools.py
+45
-0
build.py
win32/build.py
+1
-42
No files found.
android/build.py
View file @
e70f7141
...
@@ -111,46 +111,7 @@ class AndroidNdkToolchain:
...
@@ -111,46 +111,7 @@ class AndroidNdkToolchain:
self
.
env
[
'PKG_CONFIG_LIBDIR'
]
=
os
.
path
.
join
(
install_prefix
,
'lib/pkgconfig'
)
self
.
env
[
'PKG_CONFIG_LIBDIR'
]
=
os
.
path
.
join
(
install_prefix
,
'lib/pkgconfig'
)
from
build.project
import
Project
from
build.project
import
Project
from
build.autotools
import
AutotoolsProject
class
AutotoolsProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
autogen
=
False
,
cppflags
=
''
,
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
self
.
configure_args
=
configure_args
self
.
autogen
=
autogen
self
.
cppflags
=
cppflags
def
build
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
)
if
self
.
autogen
:
subprocess
.
check_call
([
'/usr/bin/aclocal'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/automake'
,
'--add-missing'
,
'--force-missing'
,
'--foreign'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/autoconf'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/libtoolize'
,
'--force'
],
cwd
=
src
)
build
=
self
.
make_build_path
(
toolchain
)
configure
=
[
os
.
path
.
join
(
src
,
'configure'
),
'CC='
+
toolchain
.
cc
,
'CXX='
+
toolchain
.
cxx
,
'CFLAGS='
+
toolchain
.
cflags
,
'CXXFLAGS='
+
toolchain
.
cxxflags
,
'CPPFLAGS='
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'LDFLAGS='
+
toolchain
.
ldflags
,
'LIBS='
+
toolchain
.
libs
,
'AR='
+
toolchain
.
ar
,
'STRIP='
+
toolchain
.
strip
,
'--host='
+
toolchain
.
arch
,
'--prefix='
+
toolchain
.
install_prefix
,
'--enable-silent-rules'
,
]
+
self
.
configure_args
subprocess
.
check_call
(
configure
,
cwd
=
build
,
env
=
toolchain
.
env
)
subprocess
.
check_call
([
'/usr/bin/make'
,
'--quiet'
,
'-j12'
],
cwd
=
build
,
env
=
toolchain
.
env
)
subprocess
.
check_call
([
'/usr/bin/make'
,
'--quiet'
,
'install'
],
cwd
=
build
,
env
=
toolchain
.
env
)
class
FfmpegProject
(
Project
):
class
FfmpegProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
...
...
python/build/autotools.py
0 → 100644
View file @
e70f7141
import
os.path
,
subprocess
from
build.project
import
Project
class
AutotoolsProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
autogen
=
False
,
cppflags
=
''
,
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
self
.
configure_args
=
configure_args
self
.
autogen
=
autogen
self
.
cppflags
=
cppflags
def
build
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
)
if
self
.
autogen
:
subprocess
.
check_call
([
'/usr/bin/aclocal'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/automake'
,
'--add-missing'
,
'--force-missing'
,
'--foreign'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/autoconf'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/libtoolize'
,
'--force'
],
cwd
=
src
)
build
=
self
.
make_build_path
(
toolchain
)
configure
=
[
os
.
path
.
join
(
src
,
'configure'
),
'CC='
+
toolchain
.
cc
,
'CXX='
+
toolchain
.
cxx
,
'CFLAGS='
+
toolchain
.
cflags
,
'CXXFLAGS='
+
toolchain
.
cxxflags
,
'CPPFLAGS='
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'LDFLAGS='
+
toolchain
.
ldflags
,
'LIBS='
+
toolchain
.
libs
,
'AR='
+
toolchain
.
ar
,
'STRIP='
+
toolchain
.
strip
,
'--host='
+
toolchain
.
arch
,
'--prefix='
+
toolchain
.
install_prefix
,
'--enable-silent-rules'
,
]
+
self
.
configure_args
subprocess
.
check_call
(
configure
,
cwd
=
build
,
env
=
toolchain
.
env
)
subprocess
.
check_call
([
'/usr/bin/make'
,
'--quiet'
,
'-j12'
],
cwd
=
build
,
env
=
toolchain
.
env
)
subprocess
.
check_call
([
'/usr/bin/make'
,
'--quiet'
,
'install'
],
cwd
=
build
,
env
=
toolchain
.
env
)
win32/build.py
View file @
e70f7141
...
@@ -59,48 +59,7 @@ class CrossGccToolchain:
...
@@ -59,48 +59,7 @@ class CrossGccToolchain:
self
.
env
[
'PKG_CONFIG_LIBDIR'
]
=
os
.
path
.
join
(
install_prefix
,
'lib/pkgconfig'
)
self
.
env
[
'PKG_CONFIG_LIBDIR'
]
=
os
.
path
.
join
(
install_prefix
,
'lib/pkgconfig'
)
from
build.project
import
Project
from
build.project
import
Project
from
build.autotools
import
AutotoolsProject
class
AutotoolsProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
autogen
=
False
,
cppflags
=
''
,
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
self
.
configure_args
=
configure_args
self
.
autogen
=
autogen
self
.
cppflags
=
cppflags
def
build
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
)
if
self
.
autogen
:
subprocess
.
check_call
([
'/usr/bin/aclocal'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/automake'
,
'--add-missing'
,
'--force-missing'
,
'--foreign'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/autoconf'
],
cwd
=
src
)
subprocess
.
check_call
([
'/usr/bin/libtoolize'
,
'--force'
],
cwd
=
src
)
build
=
self
.
make_build_path
(
toolchain
)
configure
=
[
os
.
path
.
join
(
src
,
'configure'
),
'CC='
+
toolchain
.
cc
,
'CXX='
+
toolchain
.
cxx
,
'CFLAGS='
+
toolchain
.
cflags
,
'CXXFLAGS='
+
toolchain
.
cxxflags
,
'CPPFLAGS='
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'LDFLAGS='
+
toolchain
.
ldflags
,
'LIBS='
+
toolchain
.
libs
,
'AR='
+
toolchain
.
ar
,
'STRIP='
+
toolchain
.
strip
,
'--host='
+
toolchain
.
arch
,
'--prefix='
+
toolchain
.
install_prefix
,
'--enable-silent-rules'
,
]
+
self
.
configure_args
subprocess
.
check_call
(
configure
,
cwd
=
build
,
env
=
toolchain
.
env
)
subprocess
.
check_call
([
'/usr/bin/make'
,
'--quiet'
,
'-j12'
],
cwd
=
build
,
env
=
toolchain
.
env
)
subprocess
.
check_call
([
'/usr/bin/make'
,
'--quiet'
,
'install'
],
cwd
=
build
,
env
=
toolchain
.
env
)
class
ZlibProject
(
Project
):
class
ZlibProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
def
__init__
(
self
,
url
,
md5
,
installed
,
...
...
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