From: David du Colombier <0intro@gmail.com> Date: Fri, 3 Oct 2014 10:53:58 +0200 Subject: [Buildroot] [PATCH v3 1/2] x264: new package Message-ID: <1412326439-12230-1-git-send-email-0intro@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net This package is based on an earlier package proposed by Ayaka in December 2013. Signed-off-by: David du Colombier <0intro@gmail.com> --- Changes v2 -> v3: - suggestions by Peter Korsgaard Changes v1 -> v2: - suggestions by Thomas Petazzoni --- package/Config.in | 1 + package/x264/Config.in | 23 +++++++++++++++++++++ package/x264/x264.mk | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 package/x264/Config.in create mode 100644 package/x264/x264.mk diff --git a/package/Config.in b/package/Config.in index 1021d4c..4d8a0c4 100644 --- a/package/Config.in +++ b/package/Config.in @@ -755,6 +755,7 @@ menu "Multimedia" source "package/libtheora/Config.in" source "package/live555/Config.in" source "package/mediastreamer/Config.in" + source "package/x264/Config.in" endmenu menu "Networking" diff --git a/package/x264/Config.in b/package/x264/Config.in new file mode 100644 index 0000000..93e6ed0 --- /dev/null +++ b/package/x264/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_X264 + bool "x264" + depends on BR2_LARGEFILE + help + x264 is a free software library and application for + encoding video streams into the H.264/MPEG-4 AVC + compression format, and is released under the terms + of the GNU GPL. + + https://www.videolan.org/developers/x264.html + +if BR2_PACKAGE_X264 + +config BR2_PACKAGE_X264_CLI + bool "CLI" + default n + help + Command Line Interface + +endif + +comment "x264 needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/x264/x264.mk b/package/x264/x264.mk new file mode 100644 index 0000000..5c0aaf9 --- /dev/null +++ b/package/x264/x264.mk @@ -0,0 +1,55 @@ +############################################################### +# +# x264 +# +############################################################### + +X264_VERSION = 20140930-2245-stable +X264_SOURCE = x264-snapshot-$(X264_VERSION).tar.bz2 +X264_SITE = ftp://ftp.videolan.org/pub/videolan/x264/snapshots +X264_LICENSE = GPLv2+ +X264_DEPENDENCIES = host-pkgconf +X264_LICENSE_FILES = COPYING +X264_INSTALL_STAGING = YES + +ifeq ($(BR2_PREFER_STATIC_LIB),) + X264_CONF_OPTS += --enable-pic --enable-shared +endif + +ifeq ($(BR2_PACKAGE_X264_CLI),) + X264_CONF_OPTS += --disable-cli +endif + +ifeq ($(BR2_arm)$(BR2_i386)$(BR2_powerpc)$(BR2_x86_64),) + X264_CONF_OPTS += --disable-asm +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) + X264_CONF_OPTS += --disable-thread +endif + +# the configure script is not generated by autoconf +define X264_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure \ + --prefix=/usr \ + --host="$(GNU_TARGET_NAME)" \ + --cross-prefix="$(TARGET_CROSS)" \ + --disable-ffms \ + --enable-static \ + $(X264_CONF_OPTS) \ + ) +endef + +define X264_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define X264_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install +endef + +define X264_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) -- 1.9.3