sync with OpenBSD -current

This commit is contained in:
purplerain 2024-07-20 20:41:33 +00:00
parent b5b25afdb8
commit 2c72e27ed2
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
147 changed files with 41128 additions and 10 deletions

2470
lib/libva/doc/Doxyfile.in Normal file

File diff suppressed because it is too large Load diff

86
lib/libva/doc/Makefile.am Normal file
View file

@ -0,0 +1,86 @@
# Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sub license, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice (including the
# next paragraph) shall be included in all copies or substantial portions
# of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
all: html
install-data-local: install-html
EXTRA_DIST = \
Doxyfile.in \
meson.build \
$(NULL)
VA_HEADER_DIR = $(top_srcdir)/va
VA_HEADER_FILES = \
$(VA_HEADER_DIR)/va.h \
$(VA_HEADER_DIR)/va_enc_h264.h \
$(VA_HEADER_DIR)/va_enc_mpeg2.h \
$(VA_HEADER_DIR)/va_enc_jpeg.h \
$(VA_HEADER_DIR)/va_enc_hevc.h \
$(VA_HEADER_DIR)/va_enc_vp8.h \
$(VA_HEADER_DIR)/va_enc_vp9.h \
$(VA_HEADER_DIR)/va_fei.h \
$(VA_HEADER_DIR)/va_fei_h264.h \
$(VA_HEADER_DIR)/va_fei_hevc.h \
$(VA_HEADER_DIR)/va_dec_hevc.h \
$(VA_HEADER_DIR)/va_dec_jpeg.h \
$(VA_HEADER_DIR)/va_dec_vp8.h \
$(VA_HEADER_DIR)/va_dec_vp9.h \
$(VA_HEADER_DIR)/va_dec_av1.h \
$(VA_HEADER_DIR)/va_prot.h \
$(VA_HEADER_DIR)/va_vpp.h \
$(NULL)
VA_HTML_FOOTER = $(top_srcdir)/doc/va_footer.html
Doxyfile: Doxyfile.in $(VA_HEADER_FILES) $(VA_HTML_FOOTER)
$(AM_V_GEN) $(SED) \
-e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
-e "s:\@VA_HEADER_DIR\@:$(VA_HEADER_DIR):" \
-e "s:\@VA_HEADER_FILES\@:$(VA_HEADER_FILES):" \
-e "s:\@VA_HTML_FOOTER\@:$(VA_HTML_FOOTER):" \
-e "s:\@OUTDIR\@::" \
$< > $@
html-out/index.html: Doxyfile
$(AM_V_GEN) $(DOXYGEN)
html: html-out/index.html
install-html-local:
install -d $(DESTDIR)$(docdir)/html
for file in `ls html-out/` ; do \
if test -f html-out/$$file ; then \
install -m 0644 html-out/$$file $(DESTDIR)$(docdir)/html ; \
else \
install -d $(DESTDIR)$(docdir)/html/$$file ; \
install -m 0644 html-out/$$file/* $(DESTDIR)$(docdir)/html/$$file; \
fi ; \
done
uninstall-local:
$(RM) -rf $(DESTDIR)$(docdir)/html
clean-local:
$(RM) -rf html-out latex
# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = Makefile.in Doxyfile

View file

@ -0,0 +1,131 @@
#!/bin/bash
################################################################################
# Notes :
# Preconditions:
# - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
# must be installed.
# - Doxygen configuration file must have the destination directory empty and
# source code directory.
# - A gh-pages branch should already exist.
#
# Required global variables:
# - DOXYFILE : The Doxygen configuration file.
# - GH_REPO_NAME : The name of the repository.
# - GH_REPO_REF : The GitHub reference to the repository.
# - GH_REPO_TOKEN : The GitHub application token.
#
# This script will generate Doxygen documentation and push the documentation to
# the gh-pages branch of a repository specified by GH_REPO_REF.
# Before this script is used there should already be a gh-pages branch in the
# repository.
#
################################################################################
################################################################################
##### Setup this script and get the current gh-pages branch. #####
echo 'Setting up the script...'
# Exit with nonzero exit code if anything fails
set -e
GH_REPO_NAME=
GH_REPO_REF=
GH_REPO_TOKEN=
usage() { echo "Usage: `basename $0` options (-n value) (-r value) (-t value)" 1>&2; exit 1; }
if ( ! getopts ":n:r:t:" opt); then
usage
fi
while getopts :n:r:t: opt; do
case $opt in
n)
GH_REPO_NAME=$OPTARG
;;
r)
GH_REPO_REF=$OPTARG
;;
t)
GH_REPO_TOKEN=$OPTARG
;;
*)
usage
;;
esac
done
shift $((OPTIND - 1))
[ -n "$GH_REPO_NAME" ] || {
echo "ERROR: -n GH_REPO_NAME is not defined" >/dev/stderr
exit 1
}
[ -n "$GH_REPO_REF" ] || {
echo "ERROR: -r GH_REPO_REF is not defined" >/dev/stderr
exit 1
}
[ -n "$GH_REPO_TOKEN" ] || {
echo "ERROR: -t GH_REPO_TOKEN is not defined" >/dev/stderr
exit 1
}
################################################################################
##### Upload the documentation to the gh-pages branch of the repository. #####
# Only upload if Doxygen successfully created the documentation.
# Check this by verifying that the html directory and the file html/index.html
# both exist. This is a good indication that Doxygen did it's work.
if [ -d "html-out" ] && [ -f "html-out/index.html" ]; then
# Create a clean working directory for this script.
mkdir code_docs
cd code_docs
# Get the current gh-pages branch
git clone -b gh-pages https://git@$GH_REPO_REF
cd $GH_REPO_NAME
##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Remove everything currently in the gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files. So the gh-pages branch
# can be safely cleaned, and it is sure that everything pushed later is the new
# documentation.
CURRENTCOMMIT=`git rev-parse HEAD`
git reset --hard `git rev-list HEAD | tail -n 1` # Reset working tree to initial commit
git reset --soft $CURRENTCOMMIT # Move HEAD back to where it was
# Move doxy files into local gh-pages branch folder
mv ../../html-out/* .
# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
# Presumably this is only needed when the SHORT_NAMES option in Doxygen is set
# to NO, which it is by default. So creating the file just in case.
echo "" > .nojekyll
echo 'Uploading documentation to the gh-pages branch...'
# Add everything in this directory (the Doxygen code documentation) to the
# gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files.
git add --all
# Commit the added files with a title and description containing the Travis CI
# build number and the GitHub commit reference that issued this build.
git commit -m "Deploy code docs to GitHub Pages"
# Force push to the remote gh-pages branch.
# The ouput is redirected to /dev/null to hide any sensitive credential data
# that might otherwise be exposed.
git push --force "https://${GH_REPO_TOKEN}@${GH_REPO_REF}" > /dev/null 2>&1
else
echo '' >&2
echo 'Warning: No documentation (html) files have been found!' >&2
echo 'Warning: Not going to push the documentation to GitHub!' >&2
exit 1
fi

56
lib/libva/doc/meson.build Normal file
View file

@ -0,0 +1,56 @@
if meson.version().version_compare('>= 0.56')
headerdir = join_paths(meson.project_source_root(), 'va')
else
headerdir = join_paths(meson.source_root(), 'va')
endif
footer = join_paths(meson.current_source_dir(), 'va_footer.html')
libva_headers_doc = [
'va.h',
'va_enc_h264.h',
'va_enc_mpeg2.h',
'va_enc_jpeg.h',
'va_enc_hevc.h',
'va_enc_vp8.h',
'va_enc_vp9.h',
'va_enc_av1.h',
'va_fei.h',
'va_fei_h264.h',
'va_fei_hevc.h',
'va_dec_hevc.h',
'va_dec_jpeg.h',
'va_dec_vp8.h',
'va_dec_vp9.h',
'va_dec_av1.h',
'va_prot.h',
'va_vpp.h'
]
libva_doc_files = []
headers = ''
foreach h : libva_headers_doc
libva_doc_files += join_paths (headerdir, h)
headers += ' ' + join_paths (headerdir, h)
endforeach
config = configuration_data()
config.set('PACKAGE_VERSION', libva_version)
config.set('VA_HEADER_DIR', headerdir)
config.set('VA_HEADER_FILES', headers)
config.set('VA_HTML_FOOTER', footer)
config.set('OUTDIR', meson.current_build_dir())
doxyfile = configure_file(
input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: config)
doc_install_dir = join_paths(get_option('datadir'), 'doc', meson.project_name())
custom_target(
'doc',
command: [ doxygen, doxyfile ],
depend_files: libva_doc_files,
input: doxyfile,
output: 'html-out',
install: true,
install_dir: doc_install_dir)

View file

@ -0,0 +1,4 @@
<hr class="footer"/><address class="footer"><small>
Generated for $projectname by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion</small></address>
</body>
</html>