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
89d5d480
Commit
89d5d480
authored
Nov 21, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{android,win32}/build.py: move class FfmpegProject to build/ffmpeg.py
parent
fbcacb59
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
93 deletions
+50
-93
build.py
android/build.py
+1
-45
ffmpeg.py
python/build/ffmpeg.py
+48
-0
build.py
win32/build.py
+1
-48
No files found.
android/build.py
View file @
89d5d480
...
...
@@ -115,53 +115,9 @@ class AndroidNdkToolchain:
from
build.project
import
Project
from
build.autotools
import
AutotoolsProject
from
build.ffmpeg
import
FfmpegProject
from
build.boost
import
BoostProject
class
FfmpegProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
cppflags
=
''
,
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
self
.
configure_args
=
configure_args
self
.
cppflags
=
cppflags
def
build
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
)
build
=
self
.
make_build_path
(
toolchain
)
if
toolchain
.
is_arm
:
arch
=
'arm'
else
:
arch
=
'x86'
if
toolchain
.
is_windows
:
target_os
=
'mingw32'
else
:
target_os
=
'linux'
configure
=
[
os
.
path
.
join
(
src
,
'configure'
),
'--cc='
+
toolchain
.
cc
,
'--cxx='
+
toolchain
.
cxx
,
'--nm='
+
toolchain
.
nm
,
'--extra-cflags='
+
toolchain
.
cflags
+
' '
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'--extra-cxxflags='
+
toolchain
.
cxxflags
+
' '
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'--extra-ldflags='
+
toolchain
.
ldflags
,
'--extra-libs='
+
toolchain
.
libs
,
'--ar='
+
toolchain
.
ar
,
'--enable-cross-compile'
,
'--arch='
+
arch
,
'--target-os='
+
target_os
,
'--prefix='
+
toolchain
.
install_prefix
,
]
+
self
.
configure_args
if
toolchain
.
is_armv7
:
configure
.
append
(
'--cpu=cortex-a8'
)
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
)
# a list of third-party libraries to be used by MPD on Android
thirdparty_libs
=
[
AutotoolsProject
(
...
...
python/build/ffmpeg.py
0 → 100644
View file @
89d5d480
import
os.path
,
subprocess
from
build.project
import
Project
class
FfmpegProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
cppflags
=
''
,
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
self
.
configure_args
=
configure_args
self
.
cppflags
=
cppflags
def
build
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
)
build
=
self
.
make_build_path
(
toolchain
)
if
toolchain
.
is_arm
:
arch
=
'arm'
else
:
arch
=
'x86'
if
toolchain
.
is_windows
:
target_os
=
'mingw32'
else
:
target_os
=
'linux'
configure
=
[
os
.
path
.
join
(
src
,
'configure'
),
'--cc='
+
toolchain
.
cc
,
'--cxx='
+
toolchain
.
cxx
,
'--nm='
+
toolchain
.
nm
,
'--extra-cflags='
+
toolchain
.
cflags
+
' '
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'--extra-cxxflags='
+
toolchain
.
cxxflags
+
' '
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'--extra-ldflags='
+
toolchain
.
ldflags
,
'--extra-libs='
+
toolchain
.
libs
,
'--ar='
+
toolchain
.
ar
,
'--enable-cross-compile'
,
'--arch='
+
arch
,
'--target-os='
+
target_os
,
'--prefix='
+
toolchain
.
install_prefix
,
]
+
self
.
configure_args
if
toolchain
.
is_armv7
:
configure
.
append
(
'--cpu=cortex-a8'
)
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 @
89d5d480
...
...
@@ -63,6 +63,7 @@ class CrossGccToolchain:
from
build.project
import
Project
from
build.autotools
import
AutotoolsProject
from
build.ffmpeg
import
FfmpegProject
from
build.boost
import
BoostProject
class
ZlibProject
(
Project
):
...
...
@@ -84,54 +85,6 @@ class ZlibProject(Project):
'BINARY_PATH=bin'
,
'SHARED_MODE=1'
],
cwd
=
src
,
env
=
toolchain
.
env
)
class
FfmpegProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
cppflags
=
''
,
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
self
.
configure_args
=
configure_args
self
.
cppflags
=
cppflags
def
build
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
)
build
=
self
.
make_build_path
(
toolchain
)
if
toolchain
.
is_arm
:
arch
=
'arm'
else
:
arch
=
'x86'
if
toolchain
.
is_windows
:
target_os
=
'mingw32'
else
:
target_os
=
'linux'
configure
=
[
os
.
path
.
join
(
src
,
'configure'
),
'--cc='
+
toolchain
.
cc
,
'--cxx='
+
toolchain
.
cxx
,
'--nm='
+
toolchain
.
nm
,
'--extra-cflags='
+
toolchain
.
cflags
+
' '
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'--extra-cxxflags='
+
toolchain
.
cxxflags
+
' '
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'--extra-ldflags='
+
toolchain
.
ldflags
,
'--extra-libs='
+
toolchain
.
libs
,
'--ar='
+
toolchain
.
ar
,
'--enable-cross-compile'
,
'--arch='
+
arch
,
'--target-os='
+
target_os
,
'--cross-prefix='
+
toolchain
.
arch
+
'-'
,
'--prefix='
+
toolchain
.
install_prefix
,
]
+
self
.
configure_args
if
toolchain
.
is_armv7
:
configure
.
append
(
'--cpu=cortex-a8'
)
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
)
# a list of third-party libraries to be used by MPD on Android
thirdparty_libs
=
[
AutotoolsProject
(
...
...
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