libcuefile: new package
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 18 Jan 2011 16:54:36 +0000 (13:54 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 20 Jan 2011 20:28:31 +0000 (21:28 +0100)
[Peter: fix build with ccache]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/multimedia/Config.in
package/multimedia/libcuefile/Config.in [new file with mode: 0644]
package/multimedia/libcuefile/libcuefile.mk [new file with mode: 0644]

index 14057e9d3ce42f150e82a66b54c49bb99e5b5099..16d747166553dbbbc9438d05da8ffa708adbf5b3 100644 (file)
@@ -13,6 +13,7 @@ source "package/multimedia/gst-plugins-bad/Config.in"
 source "package/multimedia/gst-plugins-ugly/Config.in"
 source "package/multimedia/libao/Config.in"
 source "package/multimedia/libcdaudio/Config.in"
+source "package/multimedia/libcuefile/Config.in"
 source "package/multimedia/libdvdread/Config.in"
 source "package/multimedia/libdvdnav/Config.in"
 source "package/multimedia/libid3tag/Config.in"
diff --git a/package/multimedia/libcuefile/Config.in b/package/multimedia/libcuefile/Config.in
new file mode 100644 (file)
index 0000000..416b3e1
--- /dev/null
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBCUEFILE
+       bool "libcuefile"
+       help
+         Cue File library from Musepack
+
+         http://www.musepack.net/
diff --git a/package/multimedia/libcuefile/libcuefile.mk b/package/multimedia/libcuefile/libcuefile.mk
new file mode 100644 (file)
index 0000000..934113b
--- /dev/null
@@ -0,0 +1,42 @@
+################################################################################
+#
+# libcuefile
+#
+################################################################################
+
+LIBCUEFILE_VERSION = r453
+LIBCUEFILE_SITE = http://files.musepack.net/source
+LIBCUEFILE_SOURCE = libcuefile_$(LIBCUEFILE_VERSION).tar.gz
+LIBCUEFILE_DEPENDENCIES = host-cmake
+LIBCUEFILE_INSTALL_STAGING = YES
+
+# CMake doesn't support having the --sysroot option directly in the
+# compiler path, so move this option to the CFLAGS/CXXFLAGS variables.
+# It also gets confused by ccache, so don't use ccache here.
+LIBCUEFILE_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC_NOCCACHE))
+LIBCUEFILE_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC)) $(TARGET_CFLAGS)
+
+define LIBCUEFILE_CONFIGURE_CMDS
+       (cd $(@D) ; \
+               $(HOST_DIR)/usr/bin/cmake . \
+               -DCMAKE_C_COMPILER:FILEPATH="$(LIBCUEFILE_TARGET_CC)" \
+               -DCMAKE_C_FLAGS:STRING="$(LIBCUEFILE_TARGET_CFLAGS)" \
+               -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
+       )
+endef
+
+define LIBCUEFILE_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define LIBCUEFILE_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
+       cp -r $(@D)/include $(STAGING_DIR)/usr
+endef
+
+define LIBCUEFILE_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
+       cp -r $(@D)/include $(TARGET_DIR)/usr
+endef
+
+$(eval $(call GENTARGETS,package/multimedia,libcuefile))