Advertisement
Guest User

openwrt-zipit mplayer makefile

a guest
Jun 19th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 3.07 KB | None | 0 0
  1. #
  2. # OpenWrt
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. #
  6.  
  7. include $(TOPDIR)/rules.mk
  8.  
  9. PKG_NAME:=mplayer
  10. PKG_REV:=32726
  11. PKG_VERSION:=1.0rc4
  12. PKG_RELEASE:=1
  13.  
  14. #PKG_SOURCE=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. #PKG_SOURCE_URL:=svn://svn.mplayerhq.hu/mplayer/trunk
  16. #PKG_SOURCE_PROTO:=svn
  17. #PKG_SOURCE_VERSION=$(PKG_REV)
  18. #PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_SOURCE:=MPlayer-$(PKG_VERSION).tar.bz2
  20. PKG_SOURCE_URL:=http://www.mplayerhq.hu/MPlayer/releases/
  21. PKG_BUILD_DIR:=$(BUILD_DIR)/MPlayer-$(PKG_VERSION)
  22.  
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/nls.mk
  25.  
  26. define Package/mplayer
  27.   SECTION:=multimedia
  28.   CATEGORY:=Multimedia
  29.   TITLE:=MPlayer, the movie player
  30.   URL:=http://www.mplayerhq.hu
  31.   DEPENDS:=+libjpeg +libpng +zlib +libfreetype +fontconfig $(ICONV_DEPENDS) \
  32.     +giflib +libtheora +alsa-lib +libfaad2 +libmpcdec +libmpg123 \
  33.     +libspeex +libpthread +libncurses
  34. endef
  35.  
  36. define Package/mplayer/description
  37.   MPlayer is a movie player which runs on many systems.
  38. endef
  39.  
  40. # extra-cflags -march=iwmmxt, need to edit pkg_build_dir/config.mak for success
  41.  
  42. CONFIGURE_ARGS := \
  43.         --prefix=/usr \
  44.         --confdir=/etc \
  45.         --target=$(TARGET_CROSS) \
  46.         --host-cc=gcc \
  47.         --cc="$(TARGET_CC)" \
  48.         --as="$(TARGET_AS)" \
  49.         --ar="$(TARGET_AR)" \
  50.         --ranlib="$(TARGET_RANLIB)" \
  51.         --charset=UTF-8 \
  52.         --extra-cflags=" -Wno-error=deprecated-declarations $(TARGET_CFLAGS)" \
  53.         --extra-ldflags="-lsalsa -lmpg123 $(TARGET_LDFLAGS)" \
  54.         --yasm='' \
  55.         --disable-mad \
  56.         --enable-mpg123 \
  57.         --enable-faad-fixed \
  58.         --enable-tremor-low \
  59.         --disable-mp3lib \
  60.         --enable-fbdev \
  61.         --enable-alsa \
  62.         --enable-largefiles \
  63.         --disable-sdl \
  64.         --disable-directfb \
  65.         --enable-mplayer \
  66.         --disable-mencoder \
  67.         --disable-libvorbis \
  68.         --disable-vidix \
  69.         --disable-svga \
  70.         --disable-aa \
  71.         --disable-ggi \
  72.         --enable-armv5te \
  73.         --enable-cross-compile \
  74.         --disable-ivtv \
  75.         --enable-dynamic-plugins \
  76.         --enable-pxa \
  77.         --disable-runtime-cpudetection \
  78.         --enable-iwmmxt
  79.  
  80. # mplayer makefile is soooo broken.  have to specify libs by hand, if
  81. # compileing with --enable-system-ffmpeg
  82. # TARGET_CFLAGS+= -std=c99 -DPATH_MAX=512 -D_GNU_SOURCE
  83. # -lavcore
  84.  
  85. # todo: remove once building correctly
  86. #MAKE_FLAGS = -j4
  87.  
  88. #define Build/Configure
  89. #   $(call Build/Configure/Default)
  90. #endef
  91.  
  92. define Build/Compile
  93.     # Build with iwmmxt first
  94.     sed -i -e 's/march=armv5te/march=iwmmxt/g' $(PKG_BUILD_DIR)/config.mak
  95.     $(call Build/Compile/Default)
  96.     # rebuild h264 and mpegvideo without iwmmxt
  97.     sed -i -e 's/march=iwmmxt/march=armv5te/g' $(PKG_BUILD_DIR)/config.mak
  98.     $(RM) $(PKG_BUILD_DIR)/mplayer
  99.     $(RM) $(PKG_BUILD_DIR)/libavcodec/libavcodec.a
  100.     $(RM) $(PKG_BUILD_DIR)/libavcodec/mpegvideo.o
  101.     $(RM) $(PKG_BUILD_DIR)/libavcodec/h264.o
  102.     $(call Build/Compile/Default)
  103. endef
  104.  
  105. define Package/mplayer/install
  106.     $(INSTALL_DIR) \
  107.         $(1)/usr/bin \
  108.         $(1)/etc
  109.  
  110.     $(INSTALL_BIN) \
  111.         $(PKG_BUILD_DIR)/mplayer \
  112.         $(1)/usr/bin/mplayer
  113.     $(INSTALL_DATA) \
  114.         $(FILES_DIR)/mplayer.conf \
  115.         $(1)/etc/
  116.  
  117. endef
  118.  
  119. $(eval $(call BuildPackage,mplayer))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement