Commit Graph

219 Commits

Author SHA1 Message Date
Bradley Sepos 0ba5561880
Revert "make: Print unsupported status of FFmpeg AAC on Darwin/macOS in configure.py."
Actually is supported; I was passing the wrong parameter to configure.

This reverts commit 19088348e2.
2019-10-25 15:16:23 -04:00
Bradley Sepos 1dffbce7bd
make: Reduce pkg-config required version to 0.29.0.
Ubuntu again.
2019-10-14 13:56:56 -04:00
Bradley Sepos 19088348e2
make: Print unsupported status of FFmpeg AAC on Darwin/macOS in configure.py. 2019-10-13 14:35:41 -04:00
Bradley Sepos be83ac213a
make: Reduce automake required version to 1.15.0.
We still support Ubuntu 18.04 which only has 1.15.1.
2019-10-11 19:08:47 -04:00
Bradley Sepos 4e13afcdcb
make: Remove libtool version check in configure.py.
Apple's libtool does not have a version check. All supported systems support current GNU libtool which is four years old, anyway.
2019-10-04 15:19:31 -04:00
Bradley Sepos ead95407cc
make: Revise configure.py tool and version probing.
This improves the tool and version probe actions to more easily retrieve and parse tool version information in various formats, and adds minimum versions to common tools we require.

Partially addresses #1130, additional library checks still needed.
2019-10-04 01:49:58 -04:00
Bradley Sepos c846b02279
make: Add ninja-build as a ninja alias in configure.py. 2019-09-17 20:35:08 -04:00
Justin Bull 01e909bffc
contrib: Use libdav1d for AV1 decoding in FFmpeg. 2019-09-17 17:10:51 -04:00
Bradley Sepos 53d6226c58
make: Check for -Wno-format-truncation in configure.py and record to GNUmakefile.
Makes clang shut up and can be used as a template to test whether the compiler supports other warnings.
2019-09-10 12:06:30 -04:00
Nomis101 44c551cc3d
make: Rearrange the configure.py ordering for GNUmakefile generation. 2019-09-09 16:02:57 -04:00
Bradley Sepos 90853286b4
make: Disable warning for AMD VCE on Linux. 2019-08-31 12:32:29 -04:00
OvchinnikovDmitrii 67bf399b83
VCE: Vulkan support on linux. 2019-08-28 13:10:24 -04:00
Bradley Sepos f674a411ae
make: Rearrange configure.py help output into a more logical order.
Minor content revision.
2019-08-21 23:12:38 -04:00
Bradley Sepos a9a20e08f7
make: Revise security section comments in configure.py. 2019-08-21 22:47:06 -04:00
Nomis101 b710fe5a98
make: Move harden option to the new Security group in configure.py. 2019-08-21 22:47:06 -04:00
Nomis101 a7dc77b030
make: Move sandbox option into new Security group in configure.py. 2019-08-21 22:47:06 -04:00
Nomis101 30db0a9914
make: Add a configure.py option to enable app sandbox.
Currently only implemented for macOS. If it will be implemented on other systems, it can be switched based on the target system, per https://github.com/HandBrake/HandBrake/issues/428#issuecomment-522677832
2019-08-21 22:45:32 -04:00
John Stebbins e666459482
LinGui: make selection of gtk3/gtk4 configure-able 2019-07-31 16:34:07 -07:00
Nomis101 38c3ba1835 Fix some typos (#2202)
Fix some typos
2019-07-31 07:27:27 +02:00
Nomis101 e17eedc1ca
build: Change hardening logic from None to False in configure.py. 2019-07-19 17:24:30 -04:00
Nomis101 9b57d44414 [gardening] Clean up old OS X code pieces
Remove old PPC/i386 related Mac code and stuff < macOS 10.11
2019-06-22 10:57:23 +02:00
Nomis101 5351c1f619
build: Add --enable-hardening flag to enable stack protection and enhanced buffer overflow protection.
Prints the hardening status on global init to the log. Closes #2027. Was #2040.
2019-06-19 14:10:45 -04:00
John Stebbins 97dabfbc19
configure: add fixed option name to ToolProbe
Using the first program name as the option caused breakage under certain
circumstances.

Fixes https://github.com/HandBrake/HandBrake/issues/1797
2019-04-17 16:30:31 -06:00
John Stebbins 184f5bdee8
configure: export FEATURE.* vars to project.h 2019-04-17 11:25:12 -06:00
John Stebbins 8d4870fd11
configure: fix osx build
revert migrateion BUILD.ncpu and BUILD.jobs to HOST. these are build
machine specific values
2019-04-17 11:23:41 -06:00
John Stebbins 046eb043ae
make: finish correcting host/build semantics 2019-04-17 07:27:17 -06:00
John Stebbins e2d88fc3e1
configure: Add comments to make lib checks more readable
With all the quoted code fragments, it is difficult to see indentation
that separates osx, mingw, and linux specific tests.  The comments make
this more clear
2019-04-16 08:02:20 -06:00
John Stebbins 9f575664d3
configure: make separate LDTest and PkgConfigTest functions
Using LDProbe and PkgConfigProbe Actions within ChkLib Action resulted
in somewhat ugly log output.  Moving the work into separate Test
functions allows it to be reused without using the Actions
2019-04-16 07:54:02 -06:00
John Stebbins 9a4790d0fc
configure: fix comments 2019-04-15 17:40:06 -06:00
John Stebbins c2800a6ab3
configure: fix typo 2019-04-15 17:03:27 -06:00
John Stebbins 2e15f10424
configure: move sanitation of options together
and fix some typos
2019-04-15 17:01:45 -06:00
John Stebbins d1ca75b49e
configure: make sure numa is only enabled on linux 2019-04-15 16:04:25 -06:00
John Stebbins 8bd34175fc
configure: move init of HostTuple after parsing cross 2019-04-15 15:50:16 -06:00
John Stebbins 5eb62b92a0
configure: use stricter 'is not None' 2019-04-15 14:43:02 -06:00
John Stebbins a4e47ce22e
configure: initialize host_tuple with cross
Must be done before createCLI
2019-04-15 14:36:26 -06:00
John Stebbins deeb6c241e
configure: Fix host vs build specs
Fixes the notation internally in configure.py.  Does not yet fix the
notation written to GNUMakefile or m4 files since that requires
modification of multiple files.  Save this for the next pass.
2019-04-15 13:55:49 -06:00
John Stebbins dd549866b2
configure: add PkgConfigProbe and ChkLib actions
PkgConfigProbe checks for the existence of a lib using pkg-config.
ChkLib tries to verify a lib with PlkConfigProbe, then tries with
LDProbe.

Use ChkLib to verify existence of libnuma when configured and fail if
not found
2019-04-15 12:12:08 -06:00
John Stebbins a144fd366b
configure: add option to enable/disable libnuma
It is not supported or not useful in some Linux environments, so allow
disabling it.
2019-04-15 10:48:56 -06:00
Bradley Sepos 99e1fdad9a
make: Tweak configure summary language for consistency. 2019-04-13 15:16:04 -04:00
Bradley Sepos 927a8630a7
make: Tweak configure.py output language.
Internally, configure.py may use the terms host and build somewhat inappropriately, but that does not mean we should print such ambiguity.
2019-04-13 14:05:23 -04:00
Bradley Sepos f24c6f3921
make: Reflect FFmpeg AAC required on some platforms in help. 2019-04-13 14:05:23 -04:00
Bradley Sepos 271f22a804
make: Fix initialization of minver in configure.py. 2019-04-13 14:05:22 -04:00
Bradley Sepos 38d47df3ba
make: Remove SelectTool class from configure.py.
Has not been in use for a long time.
2019-04-13 14:05:22 -04:00
Bradley Sepos 1a9c3103e9
make: Remove last optparse import in configure.py.
Now fully transitioned to argparse.
2019-04-13 14:05:22 -04:00
Bradley Sepos 416e86a270
make: Fix configure --minver argument showing for cross. 2019-04-13 14:05:22 -04:00
Bradley Sepos 5cfbe299bb
make: Rerun cross tools probe before creating CLI help. 2019-04-13 14:05:22 -04:00
Bradley Sepos d76f5570c1
make: Improve handling of cross argument in configure.py. 2019-04-13 14:05:22 -04:00
Bradley Sepos e757991183
make: Fix configure.py conf args for reconfigure. 2019-04-13 14:05:21 -04:00
Bradley Sepos 16a4ba113d
make: Tidy up configure help.
Should no longer need to specify platform in the help, since the help now only shows options available for the specified build.
2019-04-13 14:05:21 -04:00
Bradley Sepos 382798169c
make: Fix configure and Xcode where cross compiling. 2019-04-13 14:05:21 -04:00
John Stebbins eb48f814d0
configure: fix argparse callbacks
argparse does not have callbacks like optparse did, but a custom action
can be used to perform the callback.
2019-04-13 14:05:21 -04:00
John Stebbins 118b8a7431
configure: fix parsing debug and optimize options
required and optional arguments to an option requires setting nargs in
add_argument
2019-04-13 14:05:21 -04:00
Bradley Sepos 1f241d8f1a
make: Further improvements to feature enable/disable in configure.py.
Converts most of configure.py from optparse (deprecated) to argparse. Better fixes #1459.
2019-04-13 14:05:17 -04:00
Bradley Sepos 24563ab804
make: Require FFmpeg AAC on Linux and Windows.
FFmpeg AAC was originally disabled when FDK enabled, but this did not seem to work correctly. When I "fixed" the issuein 7b035348b7, WinGUI started throwing exceptions. This should fix the problem for now.
2019-04-12 09:54:56 -04:00
Bradley Sepos 7b035348b7
make: Disable features on unsupported platforms in configure.py.
Fixes #1459.
2019-04-04 20:01:58 -04:00
Bradley Sepos 4daf62b54a
contrib: Remove local pthreads-w32 in favor of winpthreads.
Cross-compiling for Windows now requires winpthreads which is part of the toolchain provided by scripts/mingw-w64-build, and similar packages provided by Linux distros.
2019-03-31 18:10:32 -04:00
Andrew Brezovsky f2ee6cc73f make: decode bytes objects from subprocess stdout in configure.py Launcher class, resolves #2011
Signed-off-by: Andrew Brezovsky <abrezovsky@gmail.com>
2019-03-28 21:28:02 -04:00
Frederick Ding 22ee1a38ea Fix Py3 compat and logic/syntax in handling version.txt
The first fix addresses the problem that readlines() gives back a
list of strings, which do not have the `.decode()` method that bytes do.
But `_parseSession()` is used both for the bytes output by running
`repo-info.sh` and for the strings output by ingesting `version.txt`.
So we still need to handle the bytes case.

The second fix addresses syntax and logic problems. If a string is
not empty, `if self.hash` will check that it's non-empty (I don't think
`is not empty` actually works -- it has given me a NameError). And the
string comparison should be done by value equality, not reference
equality.
2019-02-28 06:25:07 -08:00
Bradley Sepos 5bff83c1da
configure: gtk: make: scripts: Make scripts compatible with Python 3. 2019-02-25 08:47:38 -05:00
Bradley Sepos e563c0d806
configure: Move configured special encoders output before launch output. 2019-02-25 06:12:37 -05:00
Bradley Sepos c7119499f5
configure: Enable hardware encoders by default on suitable platforms.
Print special encoders status at end of configure output, minor cosmetics.
2019-02-24 15:57:06 -05:00
John Stebbins 8c7c73ca5f
configure: fix conftest turds 2019-01-19 11:12:07 -08:00
John Stebbins b09c99829c
configure: fix LDProbe cleanup on mingw
LDProbe tries to delete conftest, but should delete conftest.exe on
mingw.  So delete *both* in a try-catch block.
2019-01-06 12:10:30 -08:00
Yuichiro NAITO e6081d225f
build: Respect CC environment variable on all platforms. 2018-11-26 17:59:40 -05:00
Yuichiro NAITO 9e71ecc647
build: Respect CC environment variable on FreeBSD.
Fixes #1674.

We use the compiler that CC environment variable indicates.
If CC is ommited, use gcc or clang which is installed.
If gcc is chosen, we need to add `-Wl,-rpath` option to make runtime linker
linking gcc's runtime libraries from installed path. For example, gcc7's
runtime libraries are installed in `/usr/local/lib/gcc7` by default.
And we also need to link libc++ first to make libc++ initializer is called
on runtime.
2018-11-26 17:59:40 -05:00
John Stebbins da8a76a46e build: add 'PYTON.exe' to probed tools
This records in GNUmakefile what python executable was found by
configure.
2018-11-14 08:26:37 -08:00
Yuichiro NAITO 7767d0f28d
build: Allows to use clang/clang++ compiler on FreeBSD.
LOCALBASE variable is used to indicate where FreeBSD ports are installed.
default is /usr/local.
2018-08-22 06:10:32 -04:00
Yuichiro NAITO f12ebd45ef
build: Fix to not pass --enable-nvenc to FFmpeg configure on FreeBSD.
Nvenc is not currently supported by Nvidia on FreeBSD. If it becomes supported on FreeBSD, please check nvidia-driver and FFmpeg.
2018-07-02 15:04:06 -04:00
Scott dbf898635d
Add NVEnc encoder. (Round 3) (#1437)
Adding the Nvidia NVEnc H.264 and H.265 encoders.
Based on Initial work by sgothel

--enable-nvenc is the new compile time configure option to enable for builds.
2018-06-29 19:48:26 +01:00
Bradley Sepos a426369977
contrib: make: Remove CMake contrib.
Still required, only HandBrake will not build it anymore.
2018-06-17 00:23:34 -04:00
Bradley Sepos 517ed0030f
contrib: make: Remove --enable-local-autotools and --enable-local-pkgconfig.
Closes #549.
2018-06-17 00:23:34 -04:00
Bradley Sepos ca57c61aab
contrib: gtk: libhb: make: scripts: Remove yasm contrib. 2018-06-17 00:23:34 -04:00
John Stebbins f33dc20059
build: move --flatpak option into configure "Build Options" 2018-06-07 15:01:33 -07:00
Bradley Sepos 0465678fff
contrib: build: Add AMF headers and --enable-vce.
#1144.
2018-06-03 16:24:43 -04:00
Bradley Sepos 1fb82b1a47
libhb: build: README: Replace instances of Libav with FFmpeg. 2018-05-29 19:09:16 -04:00
John Stebbins e52abd8813 contrib: add lzma support
lzma may be used by the ffmpeg tiff decoder which can be used in
matroska files.
2018-05-29 14:29:29 -07:00
sr55 e449a63fd0
Build: Make --enable-qsv MinGW and Linux only. #1060 2018-01-23 16:52:10 +00:00
Yuichiro NAITO 560decf6c7
build: Add FreeBSD support.
Closes #1076.
2018-01-13 00:03:39 -05:00
Bradley Sepos 697da25ef3
build: More robust failure on missing or old nasm.
Since Linux and similar use system x264, avoid failure on missing/old nasm, since it should not be needed.
2018-01-10 02:43:36 -05:00
Bradley Sepos 680474d4df
build: Update configure.py to check for nasm >= 2.13.
Required for recent x264. Better to fail here than part-way through a build.
2018-01-10 01:39:54 -05:00
Bradley Sepos c987dedc12
build: Fix configure to report success when REV=0 in version.txt.
Instead make sure we have a possibly sane HASH value.
2017-11-04 06:14:22 -04:00
Bradley Sepos 5e00431bd8 build: Configure options cosmetics. 2017-06-21 02:08:47 -04:00
Bradley Sepos 25baa3678c build: Always enable Libav AAC when building with mingw-w64. 2017-06-21 00:49:16 -04:00
cclauss df8a5e76a3 configure: Modernize Python in configure.py.
file is a Python built-in (https://docs.python.org/2/library/functions.html?highlight=file#file) so it should be avoided as a variable name.
Use "with open" syntax to automate file close where possible.
os.getenv() will return None if the key is not in os.environ.
Use ternary if to simplify conditional assignment where it improves, not hinders, readability.

Closes #500.
2017-03-04 09:38:32 -05:00
Wouter van Kesteren 8c9400b676 Unbreak non-mingw cross.
Strings in python are immutable and it results in:

Traceback (most recent call last):
  File "make/configure.py", line 1592, in <module>
    action.run()
  File "make/configure.py", line 287, in run
    self._action()
  File "make/configure.py", line 506, in _action
    self.systemf[0] = self.systemf[0].upper()
TypeError: 'str' object does not support item assignment
2017-03-04 04:15:01 -05:00
Bradley Sepos b60c0bf54e build: Gracefully exit configure where version info is not present.
configure.py fails hard when .git or version.txt are not present, usually when downloading a source archive from GitHub or other git-archive use. This allows configure to fail gracefully, printing instructions to work from a git clone or download a proper source archive.
2016-12-27 16:16:46 -05:00
Bradley Sepos 6ccbfa43e0 build: Add install, install-strip, and uninstall targets for Darwin/Mac.
Also refactor test.* convenience targets for Darwin/Mac.

Configure parameter --prefix now sets HandBrakeCLI install directory [/usr/local] like on other systems.
New configure parameter --xcode-prefix sets HandBrake.app install directory [/Applications]. Not used on other systems.
2016-12-22 02:55:27 -05:00
Bradley Sepos 061c7af8ba build: Really ensure tag suffix is not None in configure.py. 2016-12-18 16:37:27 -05:00
Bradley Sepos 90f66b178a build: Ensure tag suffix is not None in configure.py. 2016-12-18 16:27:02 -05:00
Chris Lamb fc267da0fe build: Use UTC datetime for build info.
Makes build reproducible per https://wiki.debian.org/ReproducibleBuilds

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2016-09-09 11:47:12 -04:00
John Stebbins e7a320cb62 build: fix configure error created by flatpak commit 2016-08-31 08:56:28 -07:00
John Stebbins a464833a79 LinGui: Add flatpak support (#231)
* LinGui: add --flatpak configure option

For building a linux flatpak bundle

* LinGui: add rules to build flatpak repo and bundles

* LinGui: add flatpak compatible icon

* LinGui: add flatpak compatible desktop file

* LinGui: add flatpak appdata xml

* pkg: disable building LinGui when creating cli flatpak

* pkg: clean flatpak build cache when updating source package

* pkg: fix source package build dependencies

Fixes errors when the git ref being packaged changes and you have not
manually deleted stage and pkg build directories.
2016-08-30 09:51:05 -07:00
Sean McGovern e44e48382e configure: check for strerror_r() 2016-07-10 16:24:32 -04:00
Bradley Sepos 3bf86382ab build: Add download jobs option and progress display. 2016-05-25 15:45:05 -04:00
KonaBlend 12a591af07 Build: fix configure to escape $ for xcode 2016-05-25 15:45:05 -04:00
KonaBlend abfbb15ef0 Build: add target contrib.fetch.test
- remove configure --df-exhaust-url
2016-05-25 15:45:04 -04:00
KonaBlend 4de3e38af5 Build: add configure --df-exhaust-url
Specifying this option will cause fetching to run through all
active URLs. Decent way to test all URLs.
2016-05-25 15:45:04 -04:00
KonaBlend 8a3e309341 Build: split fetch into df-fetch and df-verify
- moved common python code to lib/hb_distfile.py
- beautified tmpfile creation
- added stack-style resource management to df-fetch
- fixed contrib assumptions about single URL
2016-05-25 15:45:04 -04:00
KonaBlend 0310fab56d Build: add configure --verbose-fetch 2016-05-25 15:45:04 -04:00
KonaBlend 24d3dc934d Build: refactor fetch for contrib tarballs
Fetch is now python-based and runs on the same version as does
configure. The source script is make/fetch.py. New features:

MD5 hash tracking for tarballs. Data values for all contribs added.
Upon download, the file will be verified, and only then will it be moved
into place inside downloads/ . Files that exist before the build system
does a fetch will not be md5-checked.

Multiple URLs for tarballs. Each module may specify one or more URLs and
by convention the official HandBrake should be first when possible. Each
URL is tried in sequence, and if it fails for any reason, the next URL
is tried. If no URL succeeds, a hard-error is reported.

Network fetching may be disabled via configure options. --disable-fetch
will hard-error if a fetch is attempted. --accept-fetch-url=SPEC and
--deny-fetch-url=SPEC offer an ACL-style mechanism using regex to match
against URLs. For example, --accept-fecth-url='.*/download.handbrake.fr/.*'
would skip any non-matching URLs.

Build dependencies have been lightened. wget and curl are no longer
required. TODO: GTK packaging should also be able to remove those deps.
2016-05-25 15:45:03 -04:00