Makefile 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. # $OpenBSD: Makefile,v 1.162 2017/06/15 11:33:18 ajacoutot Exp $
  2. COMMENT= audio/video converter and streamer
  3. V= 20170610
  4. DISTNAME= ffmpeg-git-${V}
  5. PKGNAME= ffmpeg-${V}
  6. CATEGORIES= graphics multimedia
  7. MASTER_SITES= http://comstyle.com/source/
  8. EXTRACT_SUFX= .tar.xz
  9. SHARED_LIBS= avcodec 22.2 \
  10. avdevice 10.0 \
  11. avfilter 7.3 \
  12. avformat 19.4 \
  13. avresample 1.0 \
  14. avutil 12.4 \
  15. postproc 16.1 \
  16. swresample 1.2 \
  17. swscale 6.1
  18. HOMEPAGE= http://ffmpeg.org/
  19. MAINTAINER= Brad Smith <brad@comstyle.com>
  20. # LGPLv2.1 and GPLv2
  21. PERMIT_PACKAGE_CDROM= patents
  22. PERMIT_PACKAGE_FTP= Yes
  23. WANTLIB= SDL X11 Xext Xv ass bz2 c crypto fontconfig freetype fribidi \
  24. gsm m mp3lame opus pthread sndio speex ssl v4l2 vorbis \
  25. vorbisenc vpx>=5 x264 x265>=2 xcb xcb-shape xcb-shm xcb-xfixes \
  26. xvidcore z
  27. COMPILER = clang
  28. MODCLANG_ARCHS= amd64
  29. COMPILER_LANGS = c
  30. BUILD_DEPENDS= textproc/texi2html
  31. .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
  32. BUILD_DEPENDS+= devel/yasm
  33. .endif
  34. LIB_DEPENDS= archivers/bzip2 \
  35. audio/lame \
  36. audio/libvorbis \
  37. audio/opus \
  38. audio/speex \
  39. audio/gsm \
  40. devel/sdl \
  41. multimedia/libass \
  42. multimedia/libv4l \
  43. multimedia/libvpx>=1.3.0 \
  44. multimedia/x264 \
  45. multimedia/x265>=1.5 \
  46. multimedia/xvidcore
  47. # inter-library dependencies for the current configuration
  48. LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -lgsm -lmp3lame -lopus -lspeex -lvorbis -lvorbisenc -lvpx -lx264 -lx265 -lxvidcore -lz -pthread
  49. LIBavdevice_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lX11 -lXext -lXv -lxcb-render -lxcb-shape -lxcb-shm -lxcb-xfixes -lxcb -lsndio -lv4l2
  50. LIBavfilter_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lass -lfontconfig -lfreetype -lfribidi
  51. LIBavformat_EXTRALIBS=-L${LOCALBASE}/lib -lbz2 -lssl -lcrypto -pthread
  52. LIBavresample_EXTRALIBS=
  53. LIBavutil_EXTRALIBS=-lm -pthread
  54. LIBpostproc_EXTRALIBS=
  55. LIBswresample_EXTRALIBS=-lm
  56. LIBswscale_EXTRALIBS=-lm
  57. .if ${MACHINE_ARCH:Marm}
  58. # uses ARM EABI
  59. FFMPEG_ARCH= generic
  60. .else
  61. FFMPEG_ARCH= ${MACHINE_ARCH}
  62. .endif
  63. OPTFLAGS= ${CFLAGS}
  64. # until the system headers are fixed properly.
  65. OPTFLAGS+= -Wno-redundant-decls
  66. USE_GMAKE= Yes
  67. CONFIGURE_STYLE= simple
  68. CONFIGURE_ARGS+= --enable-shared \
  69. --arch=${FFMPEG_ARCH} \
  70. --cc=${CC} \
  71. --disable-altivec \
  72. --disable-armv5te \
  73. --disable-armv6 \
  74. --disable-armv6t2 \
  75. --disable-debug \
  76. --disable-iconv \
  77. --disable-indev=jack \
  78. --disable-indev=oss \
  79. --disable-lzma \
  80. --disable-mips32r5 \
  81. --disable-mips64r6 \
  82. --disable-mipsdspr1 \
  83. --disable-mipsdspr2 \
  84. --disable-mipsfpu \
  85. --disable-mmi \
  86. --disable-msa \
  87. --disable-neon \
  88. --disable-outdev=oss \
  89. --disable-outdev=sdl \
  90. --disable-vfp \
  91. --enable-avresample \
  92. --enable-fontconfig \
  93. --enable-gpl \
  94. --enable-libass \
  95. --enable-libfreetype \
  96. --enable-libfribidi \
  97. --enable-libgsm \
  98. --enable-libmp3lame \
  99. --enable-libopus \
  100. --enable-libspeex \
  101. --enable-libv4l2 \
  102. --enable-libvorbis \
  103. --enable-libvpx \
  104. --enable-libx264 \
  105. --enable-libx265 \
  106. --enable-libxvid \
  107. --enable-nonfree \
  108. --enable-openssl \
  109. --extra-cflags="-I${LOCALBASE}/include -I${X11BASE}/include" \
  110. --extra-libs="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
  111. --mandir=${PREFIX}/man \
  112. --optflags="${OPTFLAGS}"
  113. CONFIGURE_ENV+= LIBavcodec_EXTRALIBS="${LIBavcodec_EXTRALIBS}" \
  114. LIBavdevice_EXTRALIBS="${LIBavdevice_EXTRALIBS}" \
  115. LIBavfilter_EXTRALIBS="${LIBavfilter_EXTRALIBS}" \
  116. LIBavformat_EXTRALIBS="${LIBavformat_EXTRALIBS}" \
  117. LIBavresample_EXTRALIBS="${LIBavresample_EXTRALIBS}" \
  118. LIBavutil_EXTRALIBS="${LIBavutil_EXTRALIBS}" \
  119. LIBpostproc_EXTRALIBS="${LIBpostproc_EXTRALIBS}" \
  120. LIBswresample_EXTRALIBS="${LIBswresample_EXTRALIBS}" \
  121. LIBswscale_EXTRALIBS="${LIBswscale_EXTRALIBS}" \
  122. LIBavcodec_LINKFLAGS="-Wl,-rpath-link,${LOCALBASE}/lib" \
  123. LIBavdevice_LINKFLAGS="-Wl,-rpath-link,${LOCALBASE}/lib:${X11BASE}/lib" \
  124. LIBavfilter_LINKFLAGS="-Wl,-rpath-link,${LOCALBASE}/lib:${X11BASE}/lib" \
  125. LIBavformat_LINKFLAGS="-Wl,-rpath-link,${LOCALBASE}/lib" \
  126. LIBavresample_LINKFLAGS="" \
  127. LIBavutil_LINKFLAGS="" \
  128. LIBpostproc_LINKFLAGS="" \
  129. LIBswresample_LINKFLAGS="" \
  130. LIBswscale_LINKFLAGS="" \
  131. LIBavcodec_REQUIRES="libavutil libswresample opus speex vpx x264 x265" \
  132. LIBavdevice_REQUIRES="libavcodec libavfilter libavformat libavutil libpostproc libswresample libswscale" \
  133. LIBavfilter_REQUIRES="libavcodec libavformat libavresample libavutil libpostproc libswresample libswscale" \
  134. LIBavformat_REQUIRES="libavcodec libavutil libswresample" \
  135. LIBavresample_REQUIRES="libavutil" \
  136. LIBavutil_REQUIRES="" \
  137. LIBpostproc_REQUIRES="libavutil" \
  138. LIBswresample_REQUIRES="libavutil" \
  139. LIBswscale_REQUIRES="libavutil" \
  140. TMPDIR=${WRKBUILD}
  141. VERSION_FLAGS= libavcodec_VERSION=${LIBavcodec_VERSION} \
  142. libavdevice_VERSION=${LIBavdevice_VERSION} \
  143. libavfilter_VERSION=${LIBavfilter_VERSION} \
  144. libavformat_VERSION=${LIBavformat_VERSION} \
  145. libavresample_VERSION=${LIBavresample_VERSION} \
  146. libavutil_VERSION=${LIBavutil_VERSION} \
  147. libpostproc_VERSION=${LIBpostproc_VERSION} \
  148. libswresample_VERSION=${LIBswresample_VERSION} \
  149. libswscale_VERSION=${LIBswscale_VERSION}
  150. MAKE_ENV= V=1
  151. MAKE_FLAGS= ${VERSION_FLAGS} \
  152. LIBavcodec_EXTRALIBS="-lavutil -lswresample ${LIBavcodec_EXTRALIBS}" \
  153. LIBavdevice_EXTRALIBS="-lavcodec -lavfilter -lavformat -lavutil -lpostproc -lswresample -lswscale ${LIBavdevice_EXTRALIBS}" \
  154. LIBavfilter_EXTRALIBS="-lavcodec -lavformat -lavresample -lavutil -lpostproc -lswresample -lswscale ${LIBavfilter_EXTRALIBS}" \
  155. LIBavformat_EXTRALIBS="-lavcodec -lavutil -lswresample ${LIBavformat_EXTRALIBS}" \
  156. LIBavresample_EXTRALIBS="-lavutil ${LIBavresample_EXTRALIBS}" \
  157. LIBavutil_EXTRALIBS="${LIBavutil_EXTRALIBS}" \
  158. LIBpostproc_EXTRALIBS="-lavutil ${LIBpostproc_EXTRALIBS}" \
  159. LIBswresample_EXTRALIBS="-lavutil ${LIBswresample_EXTRALIBS}" \
  160. LIBswscale_EXTRALIBS="-lavutil ${LIBswscale_EXTRALIBS}"
  161. FAKE_FLAGS= ${VERSION_FLAGS} \
  162. LDCONFIG=true
  163. .ifdef DEBUG
  164. CONFIGURE_ARGS+=--disable-stripping
  165. .endif
  166. ALL_TARGET= all tools/qt-faststart
  167. TEST_TARGET= check
  168. HTML_DOCS= developer faq ffmpeg ffplay ffprobe ffserver general libavfilter
  169. post-install:
  170. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ffmpeg
  171. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ffmpeg
  172. ${INSTALL_PROGRAM} ${WRKBUILD}/tools/qt-faststart ${PREFIX}/bin
  173. .for doc in ${HTML_DOCS}
  174. ${INSTALL_DATA} ${WRKBUILD}/doc/${doc}.html ${PREFIX}/share/doc/ffmpeg
  175. .endfor
  176. ${INSTALL_DATA} ${WRKBUILD}/doc/ffserver.conf \
  177. ${PREFIX}/share/examples/ffmpeg
  178. .include <bsd.port.mk>