diff options
author | Yegor Yefremov <yegorslists@googlemail.com> | 2012-01-04 12:30:00 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2012-01-07 20:51:01 +0100 |
commit | d67a67efaa8fb7fd24e0ee0f5b261a8a57583d35 (patch) | |
tree | 74369a0bc258403d502342eeae5eb721875fb712 /package/python-mad | |
parent | 5a6087d62e5c2a272278606ebf1cc62830cf4c68 (diff) | |
download | buildroot-novena-d67a67efaa8fb7fd24e0ee0f5b261a8a57583d35.tar.gz buildroot-novena-d67a67efaa8fb7fd24e0ee0f5b261a8a57583d35.zip |
Python: add external modules option
all external python packages/libraries should reside in
"external python modules" section.
Move existing modules python-serial and python-mad there
Move python-mad from package/multimedia to package
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/python-mad')
-rw-r--r-- | package/python-mad/Config.in | 9 | ||||
-rw-r--r-- | package/python-mad/python-mad.mk | 41 |
2 files changed, 50 insertions, 0 deletions
diff --git a/package/python-mad/Config.in b/package/python-mad/Config.in new file mode 100644 index 000000000..25354213d --- /dev/null +++ b/package/python-mad/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_MAD + bool "python-mad" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_LIBMAD + help + python-mad is a Python binding for the MAD library, a + high-quality integer-only MPEG decoder. + + http://spacepants.org/src/pymad/ diff --git a/package/python-mad/python-mad.mk b/package/python-mad/python-mad.mk new file mode 100644 index 000000000..7d898eddc --- /dev/null +++ b/package/python-mad/python-mad.mk @@ -0,0 +1,41 @@ +############################################################# +# +# python-mad +# +############################################################# + +PYTHON_MAD_VERSION = 0.6 +PYTHON_MAD_SOURCE = pymad-$(PYTHON_MAD_VERSION).tar.gz +PYTHON_MAD_SITE = http://spacepants.org/src/pymad/download/ + +PYTHON_MAD_DEPENDENCIES = python libmad + +ifeq ($(BR2_ENDIAN),"LITTLE") +PYTHON_MAD_ENDIAN=little +else +PYTHON_MAD_ENDIAN=big +endif + +define PYTHON_MAD_CONFIGURE_CMDS + echo "endian = $(PYTHON_MAD_ENDIAN)" > $(@D)/Setup + echo "mad_libs = mad" >> $(@D)/Setup + echo "mad_lib_dir = $(STAGING_DIR)/usr/lib" >> $(@D)/Setup + echo "mad_include_dir = $(STAGING_DIR)/usr/include" >> $(@D)/Setup +endef + +define PYTHON_MAD_BUILD_CMDS + (cd $(@D); \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CC) -shared" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + $(HOST_DIR)/usr/bin/python setup.py build_ext \ + --include-dirs=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)) + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_MAD_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(call GENTARGETS)) |