Commit Graph

33 Commits

Author SHA1 Message Date
Jan Beich
81181e8612 multimedia/libx264: unbreak on arm* with LLD
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in common/arm/mc-a-8.o
>>> referenced by common/arm/mc-a-8.o:(memcpy_table)
2018-11-11 15:39:57 +00:00
Ed Maste
635e6cc2e3 Hoist LDFLAGS_${ARCH} logic into bsd.port.mk
Approved by:	portmgr (bapt)
Sponsored by:	The FreeBSD Foundation
2018-09-18 14:48:48 +00:00
Ed Maste
fdb2e51c21 multimedia/libx264: add -znotext to LDFLAGS on i386, for lld
Example error:
/usr/bin/ld: error: can't create dynamic relocation R_386_PC32 against
    symbol: gettimeofday in readonly segment; recompile object files
    with -fPIC

This port links some non-PIC code, which fails with lld as it defaults
to disallowing relocations against read-only segments.  For i386 we can
just add -znotext unconditionally: for GNU BFD ld it just affirms BFD's
existing default.

PR:		214864, 230214
Reviewed by:	koobs
Approved by:	koobs
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17201
2018-09-18 14:00:44 +00:00
Ed Maste
46afeb65cb Revert r479024 due to build breakage
PR:             230214
2018-09-05 14:48:12 +00:00
Ed Maste
43daaf5913 multimedia/libx264: set LLD_UNSAFE for i386 and armv7
libx264 has relocations against readonly segment(s) and lld exits with
an error suggesting recompiling with -fPIC.  As this may introduce a
performance impact, for now just fall back to GNU ld.bfd.

PR:		230214
Approved by:	koobs (maintainer)
MFH:		2018Q3
2018-09-05 14:15:28 +00:00
Jan Beich
d6bccda8d9 multimedia/x264: update to 0.155.2917
- HI10P is always built after https://git.videolan.org/?p=x264.git;a=commitdiff;h=71ed44c73124

Changes:	https://git.videolan.org/?p=x264.git;a=shortlog;h=0a84d986e7020f8344f00752e3600b9769cc1e85
ABI:		https://abi-laboratory.pro/tracker/timeline/x264/
2018-08-10 00:55:12 +00:00
Jan Beich
32ea2cb7fc multimedia/{lib,}x264: update to 0.152.2854
Changes:	https://git.videolan.org/?p=x264.git;a=shortlog;h=e9a5903edf8ca59ef20e6f4894c196f135af735e
2017-12-29 02:55:42 +00:00
Jan Beich
2ff3aa5fe4 multimedia/x264: r445837 forgot to move option helpers
PR:		220694
Approved by:	portmgr blanket
MFH:		2017Q3
Differential Revision:	https://reviews.freebsd.org/D11566
2017-07-14 23:58:25 +00:00
Jan Beich
95f2ab1c38 multimedia/x264: enable FFMS, LAVF, SWSCALE by default
Without FFmpeg-based demuxers x264 CLI can only read raw formats as
source. So, enable more options to allow the binary package not only
write but also read mp4/mkv.

PR:		220694
Approved by:	koobs (maintainer)
MFH:		2017Q3 (usability improvement)
Differential Revision:	https://reviews.freebsd.org/D11566
2017-07-14 23:42:13 +00:00
Jan Beich
14b8705527 multimedia/libx264: yasm is only used on x86, other archs use GNU as
PR:		220694
Approved by:	koobs (maintainer)
MFH:		2017Q3 (minor build optimization)
Differential Revision:	https://reviews.freebsd.org/D11566
2017-07-14 23:42:03 +00:00
Jan Beich
d6a0cae988 multimedia/x264: yasm is only used by libx264, so move ASM option there
PR:		220694
Approved by:	koobs (maintainer)
MFH:		2017Q3 (minor build optimization)
Differential Revision:	https://reviews.freebsd.org/D11566
2017-07-14 23:41:54 +00:00
Jan Beich
3e6bec2bb7 multimedia/libx264: clarify slave helper from r413179
Differential Revision:	https://reviews.freebsd.org/D7958
Requested by:	koobs (maintainer)
2016-09-23 13:15:06 +00:00
Jan Beich
56782787db multimedia/x264: switch to _ENABLE option helper
Many opposite switches are not available, so with default options
selected this change incurs the following warnings.

  multimedia/libx264:
    Unknown option --enable-asm, ignored
    Unknown option --disable-debug, ignored
    Unknown option --enable-opencl, ignored

  multimedia/x264:
    Unknown option --enable-asm, ignored
    Unknown option --disable-debug, ignored
    Unknown option --enable-lsmash, ignored

Differential Revision:	https://reviews.freebsd.org/D7958
Requested by:	koobs (maintainer)
2016-09-23 13:14:54 +00:00
Jan Beich
850998762e bsd.options.desc.mk: add common OPENCL option description
Differential Revision:	https://reviews.freebsd.org/D7958
2016-09-23 13:14:43 +00:00
Jan Beich
4d4012b533 multimedia/x264: update to 0.148.2708
Changes:	https://git.videolan.org/?p=x264.git;a=shortlog;h=86b71982e131eaa70125f8d0e725fcade9c4c677
Differential Revision:	https://reviews.freebsd.org/D7958
Approved by:	koobs (maintainer)
2016-09-23 13:14:29 +00:00
Jan Beich
e7577aa20f multimedia/x264: add OPENCL option, enabled by default
Before OpenCL can be used for lookahead install at least one
implementation: devel/freeocl, devel/pocl, lang/beignet or lang/clover.

  $ x264 --fullhelp | fgrep opencl
	--opencl                Enable use of OpenCL
	--opencl-clbin <string> Specify path of compiled OpenCL kernel cache
	--opencl-device <integer> Specify OpenCL device ordinal

where the options also work in other apps e.g.,

  $ ffmpeg -i <input-file> -codec:v libx264 -x264opts opencl:opencl-device=1 <output-file>
  $ mpv --ovc libx264 --ovcopts-add x264opts=opencl:opencl-device=1 -o <output-file> <input-file>

Differential Revision:	https://reviews.freebsd.org/D7958
Approved by:	koobs (maintainer)
2016-09-23 13:14:10 +00:00
Jan Beich
c50fea9186 multimedia/x264: don't require SSE on i386 with ASM=on (default)
Remove "-march=i686 -mfpmath=sse -msse" and "-msse2" on later versions
when building C files. This doesn't affect hand-written assembly which
relies on CPUID but may pessimize compiler (around 2.3 % on Skylake).

Differential Revision:	https://reviews.freebsd.org/D7958
Approved by:	koobs (maintainer)
2016-09-23 13:12:07 +00:00
Jan Beich
3c0234cb16 multimedia/x264: add FFMS and LSMASH options
Switch to LSMASH by default to follow vendor configure behavior.

Approved by:	koobs (maintainer, via private mail)
Differential Revision:	https://reviews.freebsd.org/D5861
2016-04-13 09:53:47 +00:00
Jan Beich
65019b8904 multimedia/{,lib}x264: modernize
- Convert to option helpers
- Convert to USES=localbase + respect CPPFLAGS
- Convert to USES=shebangfix (can be zsh->bash symlink)
- Simplify SLAVE_PORT conditionals into ?=, += and !target()
- Drop unnecessary `cd` before PGO sample
- Drop no longer necessary .include <bsd.port.options.mk>

Approved by:	koobs (maintainer, via private mail)
Differential Revision:	https://reviews.freebsd.org/D5862
2016-04-13 09:52:35 +00:00
Jan Beich
60455dce12 multimedia/libx264: drop unused pkg-descr
$ make -V DESCR
/usr/ports/multimedia/libx264/../x264/pkg-descr

Approved by:	portmgr blanket
2016-04-13 09:52:04 +00:00
Jan Beich
539aa1fa0d multimedia/x264: make options actually affect dependencies
Approved by:	koobs (maintainer, via private mail)
Differential Revision:	https://reviews.freebsd.org/D5860
2016-04-13 09:51:42 +00:00
Kubilay Kocak
ed82601d9e multimedia/libx264: Move libx264 stdin.h patch to x264 port
Move the libx264 patch for stdint.h handling on FreeBSD to the multimedia/x264
port, as FILESDIR is inherited from there, thus causing the patch not to be
applied.

Reported by:		kwm
Reviewed by:		kwm
Tested by:		kwm
Differential Revision:	https://reviews.freebsd.org/D3168
2015-07-23 09:21:44 +00:00
Kubilay Kocak
5e51e3926b multimedia/{lib}x264: Fix distinfo's
Delete distinfo from libx264 since it is s now subordinate to the x264 port.

Also correctly update distinfo for x264, including the example.y4m.bz2 video
file for profile guided optimization (OPTION: PGO).

PR:		201260
Reported by:	Ajtim <lumiwa gmail com> (via email)
2015-07-03 12:14:08 +00:00
Kubilay Kocak
9b08af5e1a multimedia/{lib}x264: Update to 0.144.2533 and major refactor
- Update to 0.144.2533 (from upstream stable branch) [1]
- Switch x264 and libx264 ports to master/slave ports respectively
- Bump PORTREVISION for dependent ports as the shared library version
  has changed.

multimedia/x264:

- Clean up and update "updating instructions" in Makefile header
- Tweak COMMENT
- Only LIB_DEPENDS on libx264 and add PLIST_FILES if this isn't the
  libx264 port.
- Allow COMMENT, USES, OPTIONS_*, CONFIGURE_ARGS to be overriden in
  libx264 port.
- Place common configure arguments in a CONFIGURE_COMMON_ARGS variable
  to make overriding values without duplication easier.
- Use --prefix configure argument over post-patch replacements
- Enable stripping of binaries and libraries if DEBUG is off. Remove
  post-install target STRIP_CMD accordingly.

- Delete patch-Makefile in favour of patching WRKSRC/configure to
  identify amd64, arm64 and mipsn32. powerpc and powerpc64 are now
  covered upstream without needing patches.

- Patch out a bogus compiler argument check (cc_check) that results
  in -Wno-maybe-uninitialized being added to CFLAGS causing causes
  warnings when clang is cc. The cc_check function checks for basename
  $CC to identify compiler type (icl, clang, gcc, etc).

multimedia/libx264:

- Remove all Makefile entries that are duplicated or common and found
  in the master port (x264).
- Set lib as the PKGNAMEPREFIX
- Tweak COMMENT
- Delete upstreamed ARM patches [1]
- Delete all but one patch, as they duplicate those in x264.
- Dont remove pkgconfig/libdata directory

Changes:

  https://git.videolan.org/?p=x264.git;a=shortlog;h=refs/heads/stable

Based on:

PR:		201260 [1]
Submitted by:	Andrey Cherkashin <andoriyu gmail com> [1]
2015-07-03 07:02:44 +00:00
Koop Mast
3af6877efd Our stdint.h is a symlink to sys/stdint.h so we need to teach x264 the
header guard of the sys/stdint.h file. Otherwise compiling software with the
x264.h header will generate a warning about the mismatch header guard.

Approved by:	maintainer (koobs@)
Differential Revision:	https://reviews.freebsd.org/D2863
2015-06-19 13:12:21 +00:00
John Marino
798eb9e9cb multimedia category: Remove $PTHREAD_LIBS
approved by:	PTHREAD blanket
2015-03-25 17:36:47 +00:00
Kubilay Kocak
2d2f4b45f0 multimedia/{lib}x264: Update minimum yasm version
Update the minimum version of yasm required in BUILD_DEPENDS.

PR:		196991
Submitted by:	takefu airport.fm
2015-01-27 04:38:11 +00:00
Sean Bruno
99a42b0dad Pull in upstream commits to our libx264 to deal with the clang 3.5
-integrated-as defaults for ARMv6 compilation.

Handling for koobs@ while he's on vacation.

PR:		196591
Submitted by:	mikael.urankar@gmail.com
Approved by:	mentor (implicit)
2015-01-07 18:54:54 +00:00
Kubilay Kocak
23384aba46 multimedia/{lib}x264: Fix build on ARMv6
- Fix build for missing symbols on ARMv6 [1]
- Backport upstream 9463ec00 to fix default AS on ARM [2]
- Remove unecessary WRKSRC override (x264)
- Whitespace alignment

[2] http://git.videolan.org/?p=x264.git;a=patch;h=9463ec

PR:		196033 [1]
Submitted by:	Mikael Urandar <mikael.urankar at gmail com> [1]
Tested by:	sbruno
2014-12-31 06:20:13 +00:00
Kubilay Kocak
cf001aa9df multimedia/libx264: Fix PGO/GCC options
- Revert options helpers for PGO and GCC .. *shakes fist*. We end up
  setting USE_GCC=yes yes otherwise, and that's not valid.
- libx264 and x264 share the same distfiles, use the same DIST_SUBDIR
2014-12-28 04:59:36 +00:00
Kubilay Kocak
ab3919596a multimedia/libx264: Fix spaces to tab 2014-12-24 22:30:42 +00:00
Kubilay Kocak
b504f4927f multimedia/libx264: Merry Modernized Port Christmas
- Update COMMENT (library only)
- Add LICENSE_FILE
- Use pathfix for pkgconfig
- Remove unecessary WRKSRC override
- Use OPTIONS helpers
- Restore PGO option to OPTIONS_DEFINE
- Don't disable CLI so PGO can run. Remove it in post-install:
- Whitespace alignment
- Sort OPTIONS
- Remove -fstack-protector conditional (framework handles this now)
- Strip shared library
2014-12-24 22:28:06 +00:00
Johannes Jost Meixner
4f12f3b178 multimedia/x264: General overhaul
- Split x264 into two ports: the CLI application (x264), and the library
  (libx264). This will allow x264 to use lavf and friends from ffmpeg for
  decoding and demuxing while preventing a circular dependency between the
  two: x264 can depend on ffmpeg, but ffmpeg will depend on libx264 rather
  than x264.
- Add the LAVF option to the CLI port, making the dependency on ffmpeg
  optional.
- Update to 0.142.2455.
- Amend fixes to local patches so that they can apply to the new upstream
  files.
- Provide the git revision and other version information to the build
  environment, allowing the CLI binary to display this information (like the
  Windows builds).
- Remove unsupported build options (X11_OUTPUT).
- Ensure that the library and CLI ports each have the appropriate options.
- Add notes for future contributors who wish to update the ports.
- Bump PORTREVISION for all dependent ports.

PR:           187805
Differential Revision:	https://reviews.freebsd.org/D1159
Submitted by: Andrew Berg <aberg010@my.hennepintech.edu>
Approved by:  koobs (maintainer, mentor)
2014-11-22 16:23:34 +00:00