build,travis: fix gpg verification warning
[feed/packages.git] / libs / libx264 / Makefile
1 #
2 # Copyright (C) 2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=x264
11 PKG_VERSION:=snapshot-20170623-2245-stable
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://download.videolan.org/x264/snapshots/
16 PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>
17 PKG_HASH:=e8af5d199b6af8124b6e54631ab7b2ff20f1ce86bbcc2f58bd800bc85bee6b2f
18
19 PKG_LICENSE:=GPL-2.0
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 TARGET_CFLAGS+=-std=gnu99 -fPIC -O3 -ffast-math -I.
28 MAKE_FLAGS+= LD="$(TARGET_CC) -o"
29
30 # ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores
31 # AMD Geode LX and i486 do not have SSE
32 CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale \
33 mips32 24kc 34kc 74kc octeon mips64
34
35 ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
36 CONFIGURE_VARS+= AS=
37 MAKE_FLAGS+= AS=
38 CONFIGURE_ARGS += --disable-asm
39 else
40 ifneq ($(CONFIG_TARGET_x86),)
41 ifeq ($(CONFIG_YASM),y)
42 CONFIGURE_VARS+= AS=yasm
43 MAKE_FLAGS+= AS=yasm
44 else
45 CONFIGURE_VARS+= AS=
46 MAKE_FLAGS+= AS=
47 CONFIGURE_ARGS += --disable-asm
48 endif
49 endif
50 endif
51
52 CONFIGURE_ARGS += \
53 --enable-shared \
54 --enable-pic \
55 --enable-strip \
56 --disable-cli \
57 --disable-avs \
58 --disable-ffms \
59 --disable-lsmash
60
61 define Package/libx264
62 SECTION:=libs
63 CATEGORY:=Libraries
64 TITLE:=H264/AVC free codec library.
65 DEPENDS:=+libpthread @BUILD_PATENTED
66 URL:=http://www.videolan.org/developers/x264.html
67 endef
68
69 define Package/libx264/description
70 x264 is a free software library for encoding
71 video streams into the H.264/MPEG-4 AVC compression format.
72 endef
73
74 define Build/InstallDev
75 $(INSTALL_DIR) $(1)/usr/include/x264/
76 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
77 $(INSTALL_DIR) $(1)/usr/lib/
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
79 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
80 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
81 endef
82
83 define Package/libx264/install
84 $(INSTALL_DIR) $(1)/usr/lib/
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
86 endef
87
88 $(eval $(call BuildPackage,libx264))