Skip to content

Commit c3dc261

Browse files
authored
(v1.3.0) jpeg-9f (#4)
* Update libjpeg source to 9f * Update project version and docs * Update CI test matrix and add install test
1 parent 9f4863e commit c3dc261

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+10760
-3219
lines changed

.github/workflows/build-and-test.yml

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,56 @@ name: Build and Test
33
on: [push, workflow_dispatch]
44

55
env:
6-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
76
BUILD_TYPE: Release
87

98
jobs:
109
build:
11-
# The CMake configure and build commands are platform agnostic and should work equally
12-
# well on Windows or Mac. You can convert this to a matrix build if you need
13-
# cross-platform coverage.
14-
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
1510
runs-on: ${{ matrix.os }}
1611
strategy:
1712
fail-fast: false
1813
matrix:
19-
os: [macos-10.15, macos-11, ubuntu-20.04]
14+
os: [macos-11, macos-12, ubuntu-20.04, ubuntu-22.04]
2015

2116
steps:
2217
- uses: actions/checkout@v2
2318

2419
- name: Setup Ubuntu
25-
if: matrix.os == 'ubuntu-20.04'
20+
if: startsWith(matrix.os, 'ubuntu')
2621
run: |
2722
sudo apt-get update
2823
sudo apt-get install -y cmake
2924
30-
- name: Setup macOS 10.15
31-
if: matrix.os == 'macos-10.15'
25+
- name: Setup macOS
26+
if: startsWith(matrix.os, 'macos')
3227
run: |
3328
sudo xcode-select -s /Library/Developer/CommandLineTools/
34-
sudo rm /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
35-
sudo rm -rf /Library/Developer/CommandLineTools/SDKs/MacOSX11*.sdk
36-
sudo ln -sf MacOSX10.15.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
29+
sudo rm -rf /Library/Frameworks/Mono.framework
3730
brew install cmake
3831
39-
- name: Setup macOS 11
40-
if: matrix.os == 'macos-11'
41-
run: |
42-
sudo xcode-select -s /Library/Developer/CommandLineTools/
43-
brew install cmake
44-
45-
- name: Create Build Environment
46-
# Some projects don't allow in-source building, so create a separate build directory
47-
# We'll use this as our working directory for all subsequent commands
48-
run: cmake -E make_directory ${{runner.workspace}}/build
49-
5032
- name: Configure CMake
51-
# Use a bash shell so we can use the same syntax for environment variable
52-
# access regardless of the host operating system
5333
shell: bash
54-
working-directory: ${{runner.workspace}}/build
55-
# Note the current convention is to use the -S and -B options here to specify source
56-
# and build directories, but this is only available with CMake 3.13 and higher.
57-
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
58-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
34+
run: |
35+
cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build \
36+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
37+
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
5938
6039
- name: Build
61-
working-directory: ${{runner.workspace}}/build
6240
shell: bash
6341
# Execute the build. You can specify a specific target with "--target <NAME>"
64-
run: cmake --build . --config $BUILD_TYPE
42+
run: cmake --build ${{runner.workspace}}/build --config $BUILD_TYPE
6543

66-
- name: Test
44+
- name: Test libjpeg
6745
working-directory: ${{runner.workspace}}/build
6846
shell: bash
69-
# Execute tests defined by the CMake configuration.
70-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
7147
run: ctest -V -C $BUILD_TYPE
48+
49+
- name: Test install
50+
shell: bash
51+
run: |
52+
cmake --install ${{runner.workspace}}/build --config $BUILD_TYPE
53+
RESULT=$(cmake --find-package -DNAME=JPEG \
54+
-DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=COMPILE \
55+
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/install | awk '{$1=$1};1')
56+
[[ "$RESULT" != "-I${{runner.workspace}}/install/include" ]] && { echo "libjpeg not found or found at unexpected location: ${RESULT}" ; exit 1; }
57+
exit 0
58+

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cmake_minimum_required(VERSION 3.0)
2-
project(jpeg-cmake VERSION 1.2.1)
1+
cmake_minimum_required(VERSION 3.5)
2+
project(jpeg-cmake VERSION 1.3.0)
33

44
# Use configure_file insted of file(COPY)
55
# to ensure files are updated in src directory

README.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,33 @@
11
# IJG's libjpeg (with CMake)
2-
Current Version: `libjpeg 9e (9.5.0)`
2+
Current Version: `libjpeg 9f (9.6.0)`
33

44
## Usage
55
This project provides drop-in CMake support for the IJG's JPEG library.
66
Simply run CMake as normal:
77

88
```Shell
9-
mkdir build/
10-
cd build/
11-
cmake ..
12-
make
9+
cmake -S . -B build/
10+
cmake --build build/
1311
```
1412

1513
Alternatively, the important CMake files can be copied to any `libjpeg`
1614
source directory:
1715
```Shell
18-
cp resources/* ~/jpeg-9e/
19-
cd ~/jpeg-9e/
20-
mkdir build/
21-
cd build/
22-
cmake ..
23-
make
16+
cp resources/* ~/jpeg-9f/
17+
cmake -S ~/jpeg-9f/ -B ~/jpeg-9f/build/
18+
cmake --build ~/jpeg-9f/build/
2419
```
2520

2621
## Updating libjpeg
2722
```Shell
2823
# Delete the contents of the libjpeg subdirectory
29-
cd libjpeg/
30-
rm -rf *
24+
rm -rf libjpeg/*
3125

3226
# Copy the source files for libjpeg into the libjpeg subdirectory
33-
cp -a ~/jpeg-9e/ .
27+
cp -a ~/jpeg-9f/ libjpeg/
3428

3529
# Rerun the CMake build process
36-
cd ../build/
37-
cmake .
38-
make
30+
cmake --build build/
3931
```
4032

4133
## Advanced Configuration
@@ -67,20 +59,20 @@ The default output format for djpeg can be specified with the `DEFAULT_FMT`
6759
flag. To compile correctly, the flag must be set to one of the enum options
6860
listed in `djpeg.c`:
6961
* FMT_BMP
70-
* FMT_GIF
71-
* FMT_GIF0
72-
* FMT_OS2
73-
* FMT_PPM
74-
* FMT_RLE
75-
* FMT_TARGA
76-
* FMT_TIFF
62+
* FMT_GIF
63+
* FMT_GIF0
64+
* FMT_OS2
65+
* FMT_PPM
66+
* FMT_RLE
67+
* FMT_TARGA
68+
* FMT_TIFF
7769

7870
```Shell
7971
cmake -DDEFAULT_FMT=FMT_BMP ..
8072
```
8173

8274
#### Alternate UI
83-
jpeg-9e provides an alternate command line interface for cjpeg and djpeg. This
75+
jpeg-9e+ provides an alternate command line interface for cjpeg and djpeg. This
8476
interface can be enabled with the `BUILD_ALT_UI` flag:
8577
```Shell
8678
cmake -DBUILD_ALT_UI=ON ..

libjpeg/Makefile.am

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,25 @@ DOCS= README install.txt usage.txt wizard.txt example.c libjpeg.txt \
3333
structure.txt coderules.txt filelist.txt cdaltui.txt change.log
3434

3535
# Makefiles for various systems
36-
MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \
37-
makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \
36+
MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.xc \
37+
makefile.bcc makefile.b32 makefile.c32 makefile.d32 makefile.x32 \
38+
makefile.b64 makefile.mc6 makefile.dj makefile.wat makefile.vc \
3839
makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \
3940
makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \
4041
makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \
4142
makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \
4243
makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \
4344
makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \
4445
maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \
45-
makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \
46-
makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
47-
maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
48-
makvms.opt
46+
makajpeg.bcb makcjpeg.bcb makdjpeg.bcb makljpeg.bcb makrjpeg.bcb \
47+
maktjpeg.bcb makwjpeg.bcb makcjpeg.st makdjpeg.st makljpeg.st \
48+
maktjpeg.st makeproj.mac makefile.manx makefile.sas makefile.mms \
49+
makefile.vms makvms.opt
4950

5051
# Configuration files
51-
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
52-
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
53-
jconfig.vms
52+
CONFIGFILES= jconfig.cfg jconfig.xc jconfig.bcc jconfig.mc6 jconfig.dj \
53+
jconfig.wat jconfig.vc jconfig.mac jconfig.st jconfig.manx \
54+
jconfig.sas jconfig.vms
5455

5556
# Support scripts for configure
5657
CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \

libjpeg/Makefile.in

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ EGREP = @EGREP@
313313
ETAGS = @ETAGS@
314314
EXEEXT = @EXEEXT@
315315
FGREP = @FGREP@
316+
FILECMD = @FILECMD@
316317
GREP = @GREP@
317318
INSTALL = @INSTALL@
318319
INSTALL_DATA = @INSTALL_DATA@
@@ -445,25 +446,26 @@ DOCS = README install.txt usage.txt wizard.txt example.c libjpeg.txt \
445446

446447

447448
# Makefiles for various systems
448-
MKFILES = configure Makefile.in makefile.ansi makefile.unix makefile.b32 \
449-
makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \
449+
MKFILES = configure Makefile.in makefile.ansi makefile.unix makefile.xc \
450+
makefile.bcc makefile.b32 makefile.c32 makefile.d32 makefile.x32 \
451+
makefile.b64 makefile.mc6 makefile.dj makefile.wat makefile.vc \
450452
makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \
451453
makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \
452454
makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \
453455
makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \
454456
makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \
455457
makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \
456458
maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \
457-
makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \
458-
makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
459-
maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
460-
makvms.opt
459+
makajpeg.bcb makcjpeg.bcb makdjpeg.bcb makljpeg.bcb makrjpeg.bcb \
460+
maktjpeg.bcb makwjpeg.bcb makcjpeg.st makdjpeg.st makljpeg.st \
461+
maktjpeg.st makeproj.mac makefile.manx makefile.sas makefile.mms \
462+
makefile.vms makvms.opt
461463

462464

463465
# Configuration files
464-
CONFIGFILES = jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
465-
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
466-
jconfig.vms
466+
CONFIGFILES = jconfig.cfg jconfig.xc jconfig.bcc jconfig.mc6 jconfig.dj \
467+
jconfig.wat jconfig.vc jconfig.mac jconfig.st jconfig.manx \
468+
jconfig.sas jconfig.vms
467469

468470

469471
# Support scripts for configure

libjpeg/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The Independent JPEG Group's JPEG software
22
==========================================
33

4-
README for release 9e of 16-Jan-2022
4+
README for release 9f of 14-Jan-2024
55
====================================
66

77
This distribution contains the ninth public release of the Independent JPEG
@@ -116,7 +116,7 @@ with respect to this software, its quality, accuracy, merchantability, or
116116
fitness for a particular purpose. This software is provided "AS IS", and you,
117117
its user, assume the entire risk as to its quality and accuracy.
118118

119-
This software is copyright (C) 1991-2022, Thomas G. Lane, Guido Vollbeding.
119+
This software is copyright (C) 1991-2024, Thomas G. Lane, Guido Vollbeding.
120120
All Rights Reserved except as specified below.
121121

122122
Permission is hereby granted to use, copy, modify, and distribute this
@@ -240,9 +240,9 @@ The "official" archive site for this software is www.ijg.org.
240240
The most recent released version can always be found there in
241241
directory "files". This particular version will be archived
242242
in Windows-compatible "zip" archive format as
243-
https://www.ijg.org/files/jpegsr9e.zip, and
243+
https://www.ijg.org/files/jpegsr9f.zip, and
244244
in Unix-compatible "tar.gz" archive format as
245-
https://www.ijg.org/files/jpegsrc.v9e.tar.gz.
245+
https://www.ijg.org/files/jpegsrc.v9f.tar.gz.
246246

247247
The JPEG FAQ (Frequently Asked Questions) article is a source of some
248248
general information about JPEG.
@@ -371,4 +371,4 @@ to overcome the limitations of the original JPEG specification,
371371
and is the first true source reference JPEG codec.
372372
More features are being prepared for coming releases...
373373

374-
Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org.
374+
Please send bug reports, offers of help, etc. to jpeg-info@ijg.org.

0 commit comments

Comments
 (0)