mlt: really build and install python bindings

Add cross build support for python bindings too.

Close #3752.
This commit is contained in:
Alessio Sergi 2016-03-15 06:46:46 +01:00
parent 37a2dfef22
commit 5a0e3b6836
2 changed files with 27 additions and 16 deletions

1
srcpkgs/mlt-python Symbolic link
View File

@ -0,0 +1 @@
mlt

View File

@ -1,14 +1,16 @@
# Template file for 'mlt' # Template file for 'mlt'
pkgname=mlt pkgname=mlt
version=0.9.8 version=0.9.8
revision=3 revision=4
build_style=gnu-configure build_style=gnu-configure
configure_args="--enable-gpl --enable-gpl3" configure_args="--enable-gpl --enable-gpl3 --disable-swfdec --without-kde
hostmakedepends="doxygen pkg-config ladspa-sdk swig" --swig-languages=python"
# XXX: frei0r movit swfdec vid.stab hostmakedepends="doxygen pkg-config ladspa-sdk swig python"
# XXX: movit vid.stab
makedepends="alsa-lib-devel ffmpeg-devel gtk+-devel jack-devel ladspa-sdk makedepends="alsa-lib-devel ffmpeg-devel gtk+-devel jack-devel ladspa-sdk
libexif-devel libsamplerate-devel libxml2-devel sox-devel SDL_image-devel" libexif-devel libsamplerate-devel libxml2-devel sox-devel SDL_image-devel
depends="mlt-data ladspa-sdk-example-plugins" fftw-devel frei0r-plugins python-devel"
depends="mlt-data>=${version}_${revision} ladspa-sdk-example-plugins"
short_desc="Multimedia framework, designed for television broadcasting" short_desc="Multimedia framework, designed for television broadcasting"
maintainer="Diogo Leal <diogo@diogoleal.com>" maintainer="Diogo Leal <diogo@diogoleal.com>"
license="GPL-3" license="GPL-3"
@ -19,14 +21,14 @@ checksum=1214d6ad7fd1c3d36f0b1e64fd1c8d8a7ab6290e8452396003e79d58c0d21074
if [ -n "$CROSS_BUILD" ]; then if [ -n "$CROSS_BUILD" ]; then
make_build_args="CROSS=${XBPS_CROSS_TRIPLET}-" make_build_args="CROSS=${XBPS_CROSS_TRIPLET}-"
else else
makedepends+=" qt5-devel qt5-svg-devel python-devel" makedepends+=" qt5-svg-devel"
configure_args+=" --qt-libdir=${XBPS_CROSS_BASE}/usr/lib"
configure_args+=" --qt-includedir=${XBPS_CROSS_BASE}/usr/include/qt5"
configure_args+=" --without-kde"
configure_args+=" --swig-languages=python"
fi fi
do_configure() { do_configure() {
sed -i src/swig/python/build \
-e "s,PYTHON_INCLUDE=.*,PYTHON_INCLUDE=${XBPS_CROSS_BASE}/usr/include/python2.7," \
-e "s,python-config,${XBPS_CROSS_BASE}/usr/bin/python-config,"
# Enable or disable mmx, sse, sse2 # Enable or disable mmx, sse, sse2
case "${XBPS_TARGET_MACHINE}" in case "${XBPS_TARGET_MACHINE}" in
x86_64*|i686*) x86_64*|i686*)
@ -38,8 +40,7 @@ do_configure() {
esac esac
./configure ${configure_args} ./configure ${configure_args}
} }
post_install() {
post_build() {
vman docs/melt.1 vman docs/melt.1
doxygen -u && doxygen doxygen -u && doxygen
vmkdir usr/share/doc/mlt/html vmkdir usr/share/doc/mlt/html
@ -54,7 +55,6 @@ mlt-data_package() {
vmove usr/share/mlt vmove usr/share/mlt
} }
} }
mlt-doc_package() { mlt-doc_package() {
short_desc+=" - documentation" short_desc+=" - documentation"
noarch=yes noarch=yes
@ -62,13 +62,23 @@ mlt-doc_package() {
vmove usr/share/doc vmove usr/share/doc
} }
} }
mlt-devel_package() { mlt-devel_package() {
short_desc+=" - development files" short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}" depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() { pkg_install() {
vmove usr/include vmove usr/include
vmove usr/lib/pkgconfig vmove usr/lib/pkgconfig
vmove "usr/lib/*.so" vmove usr/lib/*.so
}
}
mlt-python_package() {
lib32disabled=yes
short_desc+=" - Python bindings"
depends="${sourcepkg}>=${version}_${revision}"
pycompile_module="mlt.py"
pkg_install() {
cd src/swig/python
vinstall mlt.py 644 usr/lib/python2.7
vinstall _mlt.so 755 usr/lib/python2.7
} }
} }