Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] libpng16 from pnggroup:libpng16 #70

Open
wants to merge 112 commits into
base: libpng16
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
fb65436
ci: Fix the check of `PNG_LIBPNG_VER_BUILD` in ci_verify_version.sh
ctruta Feb 12, 2024
f74d5ec
ci: Pacify shellcheck version 0.8 and apply other linting improvements
ctruta Feb 15, 2024
42c8fcb
Add a GitHub Action for linting
ctruta Feb 15, 2024
4191872
chore: Update the .editorconfig files and pacify editorconfig-checker
ctruta Feb 15, 2024
0fa3c0f
chore: Clean up the spurious uses of `sizeof(png_byte)`; fix the manual
ctruta Feb 15, 2024
72c4520
ci: Allow the user to force an in-tree cleanup before verification
ctruta Feb 17, 2024
dddaf0c
ci: Fix the reporting in ci_lint.sh
ctruta Feb 17, 2024
6b5a2da
Fix "ci: Fix the reporting in ci_lint.sh"
ctruta Feb 17, 2024
e7ba9c0
build: Fix a CMake build regression introduced in version 1.6.41
danoli3 Feb 19, 2024
aa95dee
build: Update the CMake build options PNG_TOOLS and PNG_FRAMEWORK
ctruta Feb 19, 2024
d165a20
build: Improve the search for an AWK processor in the CMake build
ctruta Feb 19, 2024
29e31f6
build: Add an explicit declaration of the AWK variable to configure.ac
ctruta Feb 20, 2024
14a348d
build: Checking for compiler support of LoongArch LSX should be guarded
ctruta Feb 20, 2024
7b88809
build: Mark the installed libpng headers as system headers in CMake
bebuch Feb 21, 2024
ec2e58c
pngexif: Import pngexifinfo as an externally-contributed project
ctruta Feb 22, 2024
e05ebfb
doc: Update the README file
ctruta Feb 22, 2024
3b9a73e
doc: Review the libpng history and update scripts/cmake/AUTHORS.md
ctruta Feb 22, 2024
8902310
chore: Delete comments and config settings and stuff from here and there
ctruta Feb 22, 2024
80691b9
test: Fix a compiler warning in pngtest.c
ctruta Feb 23, 2024
e1fa61d
ci: Add the libpng release tags to the list of exclusions
ctruta Feb 23, 2024
ed217e3
Release libpng version 1.6.43
ctruta Feb 23, 2024
f1848a3
Bump version to 1.6.44.git
ctruta Feb 24, 2024
ceed2a3
SECURITY: disable build of filter_neon.S on arm
jbowler May 30, 2024
9e53875
arm: Remove obsolete assembler implementation filter_neon.S
rossburton Dec 14, 2023
e4a31f0
arm: Add a placeholder file in lieu of the former `filter_neon.S`
ctruta Jun 17, 2024
532fec0
ci: Fix the verification of the msys2 toolchain on AppVeyor CI
ctruta Sep 3, 2024
33ef48b
cmake: Fix the handling of PNG_HARDWARE_OPTIMIZATIONS on FreeBSD/amd64
ctruta Sep 4, 2024
43d6ad3
cmake: Honor CMAKE_SYSROOT if set
ericriff Sep 4, 2024
7e18d14
ci: Add the targets/ subdirectory to facilitate cross-platform testing
ctruta Sep 5, 2024
20f819c
fix: Remove cHRM check to accomodate ACES AP1
jbowler Sep 4, 2024
40878fd
fix: Restore STDERR in pngtest.c
bungeman Apr 26, 2024
2220865
chore: Pacify editorconfig-checker version 3.0
ctruta Sep 8, 2024
fcdec9c
chore: Delete contrib/tools/chkfmt.sh
ctruta Sep 8, 2024
53a7f4e
ci: Simplify the Travis CI configuration matrix
ctruta Sep 8, 2024
0e204b7
build: Add a CMake config file compatible with the FindPNG module
bebuch Mar 1, 2024
68ba4f1
oss-fuzz: Add fuzzing targets for simplified READ API
tyler92 Jul 2, 2024
1964d56
Deprecate PNGARG and remove all of its remaining uses
ctruta Sep 10, 2024
1d1cc9a
cmake: Fix an error in the declaration of target include directories
Green-Sky Apr 17, 2024
843dbb7
Revert "cmake: Fix an error in the declaration of target include dire…
ctruta Sep 10, 2024
8cc22a8
cmake: Fix an error in the declaration of target include directories
Green-Sky Apr 17, 2024
5a7e87f
fix: Prevent overflow in chromaticity calculations
jbowler Sep 11, 2024
3117b5f
oss-fuzz: Update the README file, the Docker file and the build script
ctruta Sep 12, 2024
88ab4f5
chore: Rerun `./autogen.sh --maintainer`
ctruta Sep 12, 2024
f5e92d7
Release libpng version 1.6.44
ctruta Sep 12, 2024
ef153d5
Bump version to 1.6.45.git
ctruta Sep 14, 2024
b7276ec
oss-fuzz: Transfer to an external repo and remove from this repo
ctruta Sep 14, 2024
e3c7b26
ci: Fix bad (but innocuous) copy pasta in ci_verify_version.sh
ctruta Sep 14, 2024
222dd7c
doc: Make a small correction about branches in the libpng manual
ctruta Sep 14, 2024
c0f3dd4
doc: Update the README and TODO files
ctruta Sep 14, 2024
68d7ce8
ci: Get ready for the upcoming branch 'libpng18'
ctruta Sep 14, 2024
18ab7d0
[libpng16] chore: Reorganize and update .gitignore
ctruta Sep 15, 2024
cb08862
[libpng16] chore: Set the `indent_size` fields in .editorconfig
ctruta Sep 15, 2024
bcb3124
[libpng16] ci: Update ci_lint.sh to recognize .editorconfig-checker.json
ctruta Sep 17, 2024
cd5e582
Revert "oss-fuzz: Transfer to an external repo and remove from this r…
ctruta Sep 19, 2024
529e69e
Revert "oss-fuzz: Update the README file, the Docker file and the bui…
ctruta Sep 19, 2024
b8a0a54
[libpng16] test: Fix "make check" in all branches beyond 'libpng16'
jbowler Sep 15, 2024
b3bcbf9
[libpng16] projects: Adjust settings in the Visual Studio project
ctruta Sep 23, 2024
d161ce6
[libpng16] projects: Add a build launcher to the Visual Studio project
ctruta Sep 23, 2024
f3a45ac
[libpng16] chore: Update .gitignore
ctruta Sep 24, 2024
65cd5fa
ci: Fix the configuration for Travis CI and AppVeyor CI
ctruta Sep 24, 2024
0a27b48
[libpng16] mips: Eliminate use of non-ISO-C90 features
jbowler Sep 23, 2024
d288a1d
fix: Adjust colorspace calculations for ACES AP0
jbowler Sep 17, 2024
d3cf9b6
[libpng16] arm: Use `png_aligncastconst` for an upcast in Neon intrin…
jbowler Sep 26, 2024
642b5d8
[libpng16] build: Raise the minimum required CMake version to 3.14
ctruta Sep 14, 2024
9ee8238
[libpng16] test: Tidy up the logging of test program arguments in CTest
ctruta Oct 6, 2024
1bf304c
[libpng16] ci: Use modern CMake command options in ci_verify_cmake.sh
ctruta Oct 6, 2024
7c90057
[libpng16] ci: Verification should pass regardless of autoconf artifacts
ctruta Oct 7, 2024
f14d5fc
[libpng16] fix: Correct the function `png_fp_sub` in png.c
jbowler Oct 10, 2024
d7d950e
[libpng16] chore: Clean up the leading blank lines from all source files
jbowler Oct 10, 2024
a7a8fae
[libpng16] style: Add a cmake-format config file and satisfy cmake-lint
ctruta Oct 11, 2024
8b1d489
[libpng16] style: Resolve the remaining warnings issued by cmake-lint
ctruta Oct 12, 2024
65470ac
fix: Avoid integer overflows in function `png_xy_from_XYZ`
jbowler Oct 12, 2024
76e5ec2
[libpng16] test: Add a compile-time check in pngimage.c to avoid a fa…
jbowler Oct 14, 2024
d9d70e6
[libpng16] refactor: Deduplicate the interlace arrays `png_pass_*`
ctruta Oct 17, 2024
c1cc0f3
[libpng16] build: Rename a private function to benefit C++Builder
ctruta Oct 18, 2024
6f786ff
Update the copyright year
ctruta Jan 2, 2025
75748d9
[libpng16] Add support for reading and writing the cICP chunk
LucasChollet Jun 22, 2024
823c2d8
[libpng16] fix: Update the cICP support for better compliance with PNG-3
ctruta Dec 31, 2024
4599354
[libpng16] test: Move cicp-display-p3_reencoded.png to contrib/testpn…
ctruta Oct 6, 2024
3042f74
[libpng16] fix: Update the cICP implementation yet more
ctruta Jan 2, 2025
0cc367a
[libpng16] fix: Write order of colourspace chunks should conform to P…
jbowler Jan 3, 2025
2a845ff
build: Move portions from the main CMake file to separate modules
ctruta Jan 6, 2025
3714c58
chore: Rerun `./autogen.sh --maintainer`
ctruta Jan 6, 2025
51f5bd6
Release libpng version 1.6.45
ctruta Jan 7, 2025
8ffc967
Bump version to 1.6.46.git
ctruta Jan 8, 2025
92e8581
api(PNGv3): Add support for mDCV and cLLI
jbowler Jan 4, 2025
f753baa
api(PNGv3): Update the generated files and `PNG_EXPORT_LAST_ORDINAL`
jbowler Jan 4, 2025
03660a5
pngminus: Add .editorconfig file; update the CMake file
ctruta Jan 10, 2025
8a28d05
pngminus: Fix a typo in png2pnm.c
ctruta Jan 10, 2025
19a5a5e
pngminus: Remove a workaround for an old printer
ctruta Jan 10, 2025
4d7c993
fix: Restore the build for strictly-conforming standard compilers
jbowler Jan 20, 2025
36a16fd
build: Add scripts/makefile.c89; update other makefiles
ctruta Jan 21, 2025
9cc729b
build: Update scripts/makefile.*
ctruta Jan 21, 2025
deadeea
chore: Fix a typo in Makefile.am; rerun `./autogen.sh --maintainer`
ctruta Jan 22, 2025
fcb0bca
chore: Update the .editorconfig file; add/update README files
ctruta Jan 22, 2025
0024abd
Release libpng version 1.6.46
ctruta Jan 23, 2025
171bdd3
Bump version to 1.6.47.git
ctruta Jan 27, 2025
a8242dd
PNGv3 colourspace precedence rules conformance
jbowler Jan 26, 2025
c4b20d0
test: add configuration tests and fix bugs
jbowler Jan 27, 2025
2519a03
refactor: Clean up the checking of chunk lengths and allocation limits
jbowler Jan 29, 2025
8c7ed2e
fix: Typo in a preprocessor directive
ctruta Jan 30, 2025
68e090e
fix: `png_write_iCCP` check on profile length
jbowler Jan 30, 2025
812c34c
test: add limit configuration tests
jbowler Jan 31, 2025
5356b94
Update man page to latest PNG 3e draft
svgeesus Feb 11, 2025
b20e6fb
pngimage: clean up on user/internal errors
jbowler Feb 13, 2025
bb7e922
ci: Introduce the `CI_NO_BUILD` flag
ctruta Feb 17, 2025
872555f
Release libpng version 1.6.47
ctruta Feb 18, 2025
5d09501
Bump version to 1.6.48.git
ctruta Feb 19, 2025
f20e66a
chore: Apply some of the missed updates to the copyright year
ctruta Feb 19, 2025
738f5e7
ci: Add more checks to ci_verify_version.sh; refactor
ctruta Feb 20, 2025
044536d
[libpng18] chore: Clean up remnants of the long-discontinued Win16 su…
ctruta Feb 21, 2025
44f97f0
[libpng18] chore: Clean up the `FILE *` formulations in code and in d…
ctruta Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: 1.6.x-{build}

branches:
except:
- /libpng[0-1][0-7]/
- /libpng[0-1][0-8]/
- /v[0-1][.][0-8][.][0-9]+/

image:
- Visual Studio 2022
Expand Down Expand Up @@ -47,6 +48,7 @@ install:
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install'
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows'
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe integrate install'
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-ninja'

before_build:
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_GENERATOR=Visual Studio 17 2022'
Expand All @@ -57,11 +59,11 @@ before_build:
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_VARS=-DPNG_TESTS=0'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_GENERATOR=Ninja'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang.exe'
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" set CI_CMAKE_GENERATOR=Unix Makefiles'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set PATH=C:\msys64\mingw32\bin;%PATH%'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set PATH=C:\msys64\mingw64\bin;%PATH%'
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=%ARCH%-w64-mingw32-gcc.exe'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang'
- 'if "%TOOLCHAIN%"=="msys2" set CI_CMAKE_GENERATOR=Ninja'
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=gcc'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set MSYSTEM=MINGW32'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set MSYSTEM=MINGW64'
- 'set CI_CMAKE_BUILD_FLAGS=-j2'
- 'set CI_CTEST_FLAGS=-j2'
- 'set CI_MAKE_FLAGS=-j2'
Expand All @@ -75,4 +77,5 @@ build_script:
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"'

cache:
- C:\tools\vcpkg\installed
- 'C:\tools\vcpkg\installed'
- 'C:\msys64\var\cache\pacman'
94 changes: 94 additions & 0 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# https://pypi.org/project/cmakelang
# https://github.com/cheshirekow/cmake_format

# ----------------------
# Options for formatting
# ----------------------

# How wide to allow formatted cmake files
# TODO: Reflow the CMake files to allow setting the maximum line width to 100.
line_width: 255

# How many spaces to tab for indent
tab_size: 2

# If true, lines are indented using tab characters (utf-8 0x09) instead of
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
# require a fractional tab character, the behavior of the fractional
# indentation is governed by <fractional_tab_policy>
use_tabchars: false

# If <use_tabchars> is True, then the value of this variable indicates how
# fractional indentions are handled during whitespace replacement. If set to
# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
# to `round-up` fractional indentation is replaced with a single tab character
# (utf-8 0x09) effectively shifting the column to the next tabstop
fractional_tab_policy: "use-space"

# Enable comment markup parsing and reflow
enable_markup: false

# -------------------
# Options for linting
# -------------------

# Lint codes to disable
disabled_codes: [
# TODO:
# Reconcile the CMake variable names with the patterns below, then
# re-enable the "invalid variable name XXX" messages.
"C0103",

# A custom command with one output doesn't really need a comment because
# the default "generating XXX" is a good message already.
"C0113",
]

# Regular expression pattern describing valid function names
function_pattern: "[0-9a-z_]+"

# Regular expression pattern describing valid macro names
macro_pattern: "[0-9A-Z_]+"

# Regular expression pattern describing valid names for variables with global
# (cache) scope
global_var_pattern: "[A-Z][0-9A-Z_]+"

# Regular expression pattern describing valid names for variables with global
# scope (but internal semantic)
internal_var_pattern: "_[A-Z][0-9A-Z_]+"

# Regular expression pattern describing valid names for variables with local
# scope
local_var_pattern: "[a-z][a-z0-9_]+"

# Regular expression pattern describing valid names for privatedirectory
# variables
private_var_pattern: "_[0-9a-z_]+"

# Regular expression pattern describing valid names for public directory
# variables
public_var_pattern: "[A-Z][0-9A-Z_]+"

# Regular expression pattern describing valid names for function/macro
# arguments and loop variables.
argument_var_pattern: "[a-z][a-z0-9_]+"

# Regular expression pattern describing valid names for keywords used in
# functions or macros
keyword_pattern: "[A-Z][0-9A-Z_]+"

# In the heuristic for C0201, how many conditionals to match within a loop in
# before considering the loop a parser
max_conditionals_custom_parser: 2

# Require at least this many newlines between statements
min_statement_spacing: 1

# Require no more than this many newlines between statements
max_statement_spacing: 2
max_returns: 6
max_branches: 12
max_arguments: 5
max_localvars: 15
max_statements: 50
41 changes: 29 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,49 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

# Traditionally, the end-of-line character has been platform-specific.
end_of_line = unset
[*.txt]
indent_size = unset
indent_style = space

[*.[chS]]
indent_size = 3
indent_style = space
max_doc_length = 80
max_line_length = 80

[*.dfa]
indent_size = 3
indent_style = space
max_line_length = 81
max_doc_length = 80
max_line_length = 80

[*.{awk,cmake,dfa,in,sh}]
[*.awk]
indent_size = 3
indent_style = space
max_doc_length = 80
max_line_length = 100

[*.txt]
[*.cmake]
indent_size = 2
indent_style = space
max_line_length = unset
max_doc_length = 80
max_line_length = 100

[{Makefile.in,ltmain.sh}]
indent_style = unset
insert_final_newline = unset
max_line_length = unset
trim_trailing_whitespace = unset
[*.sh]
indent_size = 4
indent_style = space
max_doc_length = 100
max_line_length = 100

[*~]
[{Makefile.in,aclocal.m4,ltmain.sh}]
indent_size = unset
indent_style = unset
insert_final_newline = unset
max_doc_length = unset
max_line_length = unset
trim_trailing_whitespace = unset

[COMMIT_EDITMSG]
indent_style = space
max_doc_length = unset
max_line_length = 72
9 changes: 9 additions & 0 deletions .editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Disable": {
"IndentSize": true
},
"Exclude": [
".git/",
"out/"
]
}
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Linting libpng

on:
push:
branches:
- libpng16
- libpng18
pull_request:
branches:
- libpng16
- libpng18

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up the cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pip.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install yamllint
run: pip install yamllint
- name: Check out the code
uses: actions/checkout@v4
- name: Run the linting script
run: bash ./ci/ci_lint.sh
108 changes: 92 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,119 @@
# Compiled executables
*.app/
*.exe
a.out

# Debug files
*.dSYM/
*.idb
*.pdb
*.su

# Libpng configuration and build artifacts
# Tag files
TAGS
.TAGS
!TAGS/
tags
.tags
!tags/
gtags.files
GTAGS
GRTAGS
GPATH
GSYMS
cscope.files
cscope.out
cscope.*.out

# Text editing and text processing artifacts
\#*\#
.\#*
[._]*.sw[a-p]
[._]sw[a-p]
*.bak
*.orig
*.rej
*.tmp
*~

# IDE files and directories
## Eclipse
.cproject/
.project/
.settings/
## Embarcadero RAD Studio
*.cbproj.*
__recovery/
## JetBrains
.idea/
## NetBeans
nbbuild/
nbdist/
nbproject/
## Visual Studio
.vs/
### Visual Studio user files
*.rsuser
*.sln.docstates
*.suo
*.user
*.userprefs
### Visual Studio cache files (for older versions)
*.aps
*.ncb
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
ipch/
## Visual Studio Code
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json
## (Various)
*.*cache
*.cache*
[._]*_history
.history/
[Bb]ackup*/

# Build, test and CI output directories
*[Dd]ebug/
[Dd]ebug*/
*[Rr]elease/
[Rr]elease*/
[._]build*/
/[Bb]uild*/
/[Oo]ut/

# Libpng configuration and auxiliary build artifacts
*.out
.deps/
*out.png
[._]deps/
.dirstamp
/Makefile
/autom4te.cache/
/config.guess~
/config.h.in~
/config*~
/config.h
/config.log
/config.status
/config.sub~
/configure~
/install-sh~
/libpng-config
/libpng.pc
/install*~
/libpng*-config
/libpng*.pc
/libpng.vers
/libpng16-config
/libpng16.pc
/libtool
/stamp-h1
CMake*.json
!CMakePresets.json
CMakeLists.txt.*
pnglibconf.[ch]
pnglibconf.dfn
pnglibconf.pre
pngprefix.h

# Libpng test artifacts
# Libpng test programs
png-fix-itxt
pngcp
pngfix
Expand All @@ -73,7 +153,3 @@ pngtest
pngunknown
pngvalid
timepng
pngout.png

# Libpng CI artifacts
out/
Loading