Python: add external modules option
authorYegor Yefremov <yegorslists@googlemail.com>
Wed, 4 Jan 2012 11:30:00 +0000 (12:30 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 7 Jan 2012 19:51:01 +0000 (20:51 +0100)
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>
package/Config.in
package/multimedia/Config.in
package/multimedia/python-mad/Config.in [deleted file]
package/multimedia/python-mad/python-mad.mk [deleted file]
package/python-mad/Config.in [new file with mode: 0644]
package/python-mad/python-mad.mk [new file with mode: 0644]

index 92b80e66c18716ecef89e2884d48e74056afa5c2..78174e5acd75d488e3d63c1a8024ed2638d2c2d0 100644 (file)
@@ -237,6 +237,12 @@ endif
 source "package/microperl/Config.in"
 source "package/php/Config.in"
 source "package/python/Config.in"
+if BR2_PACKAGE_PYTHON
+menu "external python modules"
+source "package/python-mad/Config.in"
+source "package/python-serial/Config.in"
+endmenu
+endif
 source "package/ruby/Config.in"
 source "package/tcl/Config.in"
 endmenu
@@ -313,7 +319,6 @@ source "package/libhid/Config.in"
 source "package/libiqrf/Config.in"
 source "package/libusb/Config.in"
 source "package/libusb-compat/Config.in"
-source "package/python-serial/Config.in"
 endmenu
 
 if BROKEN
index d50e4fc326c034b0db86c896d80ff0ac5dc3e8cb..a05d1d983a7e641daf27bc0886fddb279571b142 100644 (file)
@@ -40,7 +40,6 @@ source "package/multimedia/mplayer/Config.in"
 source "package/multimedia/musepack/Config.in"
 source "package/multimedia/portaudio/Config.in"
 source "package/multimedia/pulseaudio/Config.in"
-source "package/multimedia/python-mad/Config.in"
 source "package/multimedia/speex/Config.in"
 source "package/multimedia/tidsp-binaries/Config.in"
 source "package/multimedia/taglib/Config.in"
diff --git a/package/multimedia/python-mad/Config.in b/package/multimedia/python-mad/Config.in
deleted file mode 100644 (file)
index 2535421..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-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/multimedia/python-mad/python-mad.mk b/package/multimedia/python-mad/python-mad.mk
deleted file mode 100644 (file)
index 7d898ed..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#############################################################
-#
-# 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))
diff --git a/package/python-mad/Config.in b/package/python-mad/Config.in
new file mode 100644 (file)
index 0000000..2535421
--- /dev/null
@@ -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 (file)
index 0000000..7d898ed
--- /dev/null
@@ -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))