Skip to content

Commit

Permalink
Merge branch 'michaelrsweet:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankit3002 authored Feb 19, 2024
2 parents 503765c + 528bd54 commit 9ad31c1
Show file tree
Hide file tree
Showing 64 changed files with 1,387 additions and 1,047 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,20 @@ jobs:
run: make test || cat testsuite/test*.log
- name: Run Clang Static Analyzer
run: cd pappl && make "GHA_ERROR=::error::" clang
- name: Run cppcheck
run: cd pappl && make "GHA_ERROR=::error::" cppcheck

build-windows:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: setup-msbuild
uses: microsoft/[email protected]
- name: nuget restore
- name: Checkout PAPPL sources
uses: actions/checkout@v4
- name: Setup msbuild
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
run: cd vcnet; nuget restore pappl.sln
- name: msbuild
- name: Build PAPPL
run: cd vcnet; msbuild pappl.sln
- name: test
- name: Test PAPPL
run: cd vcnet; ./copy-dlls.bat x64\Debug; cd x64\Debug; ./testpappl -c -l testpappl.log -o testpappl.output -t api,client,pwg-raster

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
/pappl/libpappl.dylib
/pappl/libpappl.so
/pappl/libpappl.so.2
/pappl/libpappl2.2.dylib
/pappl/libpappl2.a
/pappl/libpappl2.dylib
/pappl/libpappl2.so
/pappl/libpappl2.so.2
/pappl/pappl.pc
/pappl/parse-lock-log
/Makedefs
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Changes in v2.0b1
(Issue #303)
- Added `papplSystemGet/SetIdleShutdown` APIs to get/set the idle shutdown
time in seconds (Issue #304)
- Added more "finishings" options (Issue #317)
- Added "smi55357-device-uri" and "smi55357-driver" Printer Status attributes
to Get-Printer-Attributes responses.
- Added `papplSystemAddListenerFd` API to add a listener socket from launchd or
Expand All @@ -27,4 +28,5 @@ Changes in v2.0b1
(Issue #305)
- Fixed "printer-settable-attributes-supported" value (Issue #311)
- Fixed `-n` support for setting number of copies (Issue #312)
- Fixed crash in retrofit printer application (Issue #322)
- Fixed default "copies" value with `papplJobCreateWithFile`.
9 changes: 6 additions & 3 deletions Makedefs.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Make definitions for the Printer Application Framework
#
# Copyright © 2019-2022 by Michael R Sweet
# Copyright © 2019-2024 by Michael R Sweet
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.
Expand Down Expand Up @@ -30,26 +30,29 @@ DSOFLAGS = @DSOFLAGS@ $(CFLAGS)
INSTALL = @INSTALL@
LDFLAGS = @LDFLAGS@ $(OPTIM)
LIBS = @LIBS@
LINKPAPPL = @LINKPAPPL@
LINKPAPPL_STATIC = @LINKPAPPL_STATIC@
LN = @LN@
MKDIR = @MKDIR@ -p
OPTIM = @OPTIM@
RANLIB = @RANLIB@
RM = @RM@ -f
RMDIR = @RMDIR@
SHELL = /bin/sh
SYSTEM_STATUS = @SYSTEM_STATUS@
WARNINGS = @WARNINGS@


# Targets
LIBPAPPL = @LIBPAPPL@
LIBPAPPL_STATIC = @LIBPAPPL_STATIC@

PAPPL_PC = @PAPPL_PC@
PAPPL_PREFIX = @PAPPL_PREFIX@

# Directories...
bindir = @bindir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = $(datadir)/doc/@PAPPL_DOCDIR@
exec_prefix = @exec_prefix@
includedir = @includedir@
infodir = @infodir@
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PAPPL - Printer Application Library

Copyright © 2020-2022 by Michael R Sweet.
Copyright © 2020-2024 by Michael R Sweet.
Copyright © 2007-2019 by Apple Inc.
Copyright © 1997-2007 by Easy Software Products.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ C99-compatible C compiler such as GCC or Clang, and the "pkg-config" utility
are required along with the following support libraries:

- Avahi (0.8 or later) or mDNSResponder for mDNS/DNS-SD support
- CUPS (2.2 or later) or libcups (3.0 or later) for the CUPS libraries
- libcups (3.0 or later) for the CUPS libraries
- GNU TLS (3.0 or later), LibreSSL (3.0 or later), or OpenSSL (1.1 or later)
for TLS support
- JPEGLIB (8 or later) or libjpeg-turbo (2.0 or later) for JPEG image support
Expand Down Expand Up @@ -90,7 +90,7 @@ end up as pull requests on Github.
Legal Stuff
-----------

PAPPL is Copyright © 2019-2022 by Michael R Sweet.
PAPPL is Copyright © 2019-2024 by Michael R Sweet.

This software is licensed under the Apache License Version 2.0 with an
(optional) exception to allow linking against GPL2/LGPL2 software (like older
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ starting at 0. A feature release has a "PATCH" value of 0, for example:
1.1.0
2.0.0

Beta releases and release candidates are *not* prodution releases and use
Beta releases and release candidates are *not* production releases and use
semantic version numbers of the form:

MAJOR.MINORbNUMBER
Expand Down
114 changes: 71 additions & 43 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ WARNINGS
CSFLAGS
LIBPAPPL_STATIC
LIBPAPPL
SYSTEM_STATUS
PKGCONFIG_LIBUSB
PKGCONFIG_LIBPNG
PKGCONFIG_LIBJPEG
Expand All @@ -663,6 +662,11 @@ PKGCONFIG_LIBS_PRIVATE
PKGCONFIG_LIBS
PKGCONFIG_CFLAGS
PKGCONFIG
PAPPL_PREFIX
PAPPL_PC
PAPPL_DOCDIR
LINKPAPPL_STATIC
LINKPAPPL
INSTALL
ARFLAGS
LN
Expand Down Expand Up @@ -734,10 +738,11 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_libpappl2_prefix
enable_libjpeg
enable_libpng
enable_libusb
enable_pam
enable_libpam
enable_static
enable_shared
enable_debug
Expand Down Expand Up @@ -1380,10 +1385,12 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-libpappl2-prefix
do not add libpappl2 prefix to header/library files
--enable-libjpeg use libjpeg for JPEG printing, default=auto
--enable-libpng use libpng for PNG printing, default=auto
--enable-libusb use libusb for USB printing, default=auto
--enable-libpam use libpam for authentication, default=auto
--disable-libpam do not use libpam for authentication, default=auto
--disable-static do not install static library
--disable-shared do not install shared library
--enable-debug turn on debugging, default=no
Expand Down Expand Up @@ -3908,6 +3915,42 @@ INSTALL="$(pwd)/install-sh"
printf "%s\n" "using $INSTALL" >&6; }
# Check whether --enable-libpappl2-prefix was given.
if test ${enable_libpappl2_prefix+y}
then :
enableval=$enable_libpappl2_prefix;
fi
if test x$enable_libpappl2_prefix != xno
then :
INCLUDE_PREFIX="/pappl2"
LIBPAPPL_BASE="libpappl2"
LINKPAPPL="-lpappl2"
LINKPAPPL_STATIC="libpappl2.a"
PAPPL_DOCDIR="pappl2"
PAPPL_PC="pappl2.pc"
PAPPL_PREFIX="pappl2"
else $as_nop
INCLUDE_PREFIX=""
LIBPAPPL_BASE="libpappl"
LINKPAPPL="-lpappl"
LINKPAPPL_STATIC="libpappl.a"
PAPPL_DOCDIR="pappl"
PAPPL_PC="pappl.pc"
PAPPL_PREFIX="pappl"
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Expand Down Expand Up @@ -4018,7 +4061,7 @@ fi
PKGCONFIG_CFLAGS="-I\${includedir}"
PKGCONFIG_LIBS="-L\${libdir} -lpappl"
PKGCONFIG_LIBS="-L\${libdir} $LINKPAPPL"
PKGCONFIG_LIBS_PRIVATE="-lm"
PKGCONFIG_REQUIRES=""
Expand Down Expand Up @@ -4144,10 +4187,10 @@ then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, v$CUPS_VERSION" >&5
printf "%s\n" "yes, v$CUPS_VERSION" >&6; }
CPPFLAGS="$CPPFLAGS $($PKGCONFIG --cflags cups3)"
LIBS="$LIBS $($PKGCONFIG --libs cups3)"
PKGCONFIG_CFLAGS="$($PKGCONFIG --cflags cups3) $PKGCONFIG_CFLAGS"
PKGCONFIG_LIBS="$($PKGCONFIG --libs cups3) $PKGCONFIG_LIBS"
CPPFLAGS="$($PKGCONFIG --cflags cups3) $CPPFLAGS"
LIBS="$($PKGCONFIG --libs cups3) $LIBS"
PKGCONFIG_CFLAGS="$PKGCONFIG_CFLAGS $($PKGCONFIG --cflags cups3)"
PKGCONFIG_LIBS="$PKGCONFIG_LIBS $($PKGCONFIG --libs cups3)"
if test x$host_os_name = xdarwin
then :
Expand Down Expand Up @@ -4305,8 +4348,8 @@ printf "%s\n" "yes" >&6; };
printf "%s\n" "#define HAVE_LIBJPEG 1" >>confdefs.h
CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libjpeg`"
LIBS="$LIBS `$PKGCONFIG --libs libjpeg`"
CPPFLAGS="$($PKGCONFIG --cflags libjpeg) $CPPFLAGS"
LIBS="$($PKGCONFIG --libs libjpeg) $LIBS"
PKGCONFIG_LIBJPEG="libjpeg,"
PKGCONFIG_LIBS_PRIVATE="$($PKGCONFIG --libs libjpeg) $PKGCONFIG_LIBS_PRIVATE"
have_jpeg=yes
Expand Down Expand Up @@ -4424,8 +4467,8 @@ printf "%s\n" "yes" >&6; };
printf "%s\n" "#define HAVE_LIBPNG 1" >>confdefs.h
CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libpng16`"
LIBS="$LIBS `$PKGCONFIG --libs libpng16` -lz"
CPPFLAGS="$($PKGCONFIG --cflags libpng16) $CPPFLAGS"
LIBS="$($PKGCONFIG --libs libpng16) -lz $LIBS"
PKGCONFIG_LIBPNG="libpng >= 1.6,"
PKGCONFIG_LIBS_PRIVATE="$($PKGCONFIG --libs libpng16) $PKGCONFIG_LIBS_PRIVATE"
Expand Down Expand Up @@ -4474,7 +4517,7 @@ printf "%s\n" "yes" >&6; }
printf "%s\n" "#define HAVE_LIBUSB 1" >>confdefs.h
CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libusb-1.0`"
LIBS="$LIBS `$PKGCONFIG --libs libusb-1.0`"
LIBS="$($PKGCONFIG --libs libusb-1.0) $LIBS"
if test "x$host_os_name" = xdarwin
then :
Expand Down Expand Up @@ -4506,10 +4549,10 @@ then :
fi
# Check whether --enable-pam was given.
if test ${enable_pam+y}
# Check whether --enable-libpam was given.
if test ${enable_libpam+y}
then :
enableval=$enable_pam;
enableval=$enable_libpam;
fi
Expand Down Expand Up @@ -4601,7 +4644,7 @@ then :
printf "%s\n" "#define HAVE_LIBPAM 1" >>confdefs.h
LIBS="$LIBS -lpam"
PKGCONFIG_LIBS_PRIVATE="$PKGCONFIG_LIBS_PRIVATE -lpam"
PKGCONFIG_LIBS_PRIVATE="-lpam $PKGCONFIG_LIBS_PRIVATE"
fi
Expand Down Expand Up @@ -4633,28 +4676,6 @@ fi
fi
if test "$host_os_name" = darwin
then :
LIBS="-framework AppKit $LIBS"
PKGCONFIG_LIBS_PRIVATE="-framework AppKit $PKGCONFIG_LIBS_PRIVATE"
SYSTEM_STATUS="system-status-macos.o"
#
else $as_nop
# AS_IF([$PKGCONFIG --exists gnome-desktop-3.0], [
# CPPFLAGS="$($PKGCONFIG --cflags gnome-desktop-3.0) $CPPFLAGS"
# LIBS="$($PKGCONFIG --libs gnome-desktop-3.0) $LIBS"
# PKGCONFIG_LIBS_PRIVATE="$($PKGCONFIG --libs gnome-desktop-3.0) $PKGCONFIG_LIBS_PRIVATE"
# SYSTEM_STATUS="system-status-gnome.o"
# ], [
# SYSTEM_STATUS="system-status-dummy.o"
# ])
fi
# Check whether --enable-static was given.
if test ${enable_static+y}
then :
Expand All @@ -4674,18 +4695,18 @@ then :
if test "$host_os_name" = darwin
then :
LIBPAPPL="libpappl.2.dylib"
LIBPAPPL="$LIBPAPPL_BASE.2.dylib"
else $as_nop
LIBPAPPL="libpappl.so.2"
LIBPAPPL="$LIBPAPPL_BASE.so.2"
fi
if test x$enable_static != xno
then :
LIBPAPPL_STATIC="libpappl.a"
LIBPAPPL_STATIC="$LIBPAPPL_BASE.a"
else $as_nop
Expand All @@ -4695,7 +4716,7 @@ fi
else $as_nop
LIBPAPPL="libpappl.a"
LIBPAPPL="$LIBPAPPL_BASE.a"
LIBPAPPL_STATIC=""
PKGCONFIG_LIBS="$PKGCONFIG_LIBS $PKGCONFIG_LIBS_PRIVATE"
PKGCONFIG_LIBS_PRIVATE=""
Expand Down Expand Up @@ -4996,6 +5017,13 @@ else $as_nop
fi
if test "$includedir" = NONE -o "$includedir" = "\${prefix}/include"
then :
includedir="\${prefix}/include$INCLUDE_PREFIX"
fi
if test "$localstatedir" = "\${prefix}/var"
then :
Expand Down
Loading

0 comments on commit 9ad31c1

Please sign in to comment.