parent
f4010633d8
commit
9a2a35bf9f
13
ell/PKGBUILD
13
ell/PKGBUILD
|
@ -6,13 +6,13 @@
|
|||
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
||||
|
||||
pkgname=ell
|
||||
pkgver=0.57
|
||||
pkgver=0.58
|
||||
pkgrel=01
|
||||
pkgdesc="Embedded Linux library"
|
||||
url="https://01.org/ell"
|
||||
#url="https://git.kernel.org/pub/scm/libs/ell/ell.git/"
|
||||
depends=('gcc-libs')
|
||||
checkdepends=('dbus')
|
||||
depends=('gcc-libs' 'glibc')
|
||||
checkdepends=('dbus' 'procps-ng')
|
||||
#options=('debug') # uncomment if you want debug pkg produced
|
||||
# https://mirrors.edge.kernel.org/pub/linux/libs/ell/sha256sums.asc
|
||||
source=(https://mirrors.edge.kernel.org/pub/linux/libs/$pkgname/$pkgname-$pkgver.tar.{xz,sign})
|
||||
|
@ -41,7 +41,8 @@ license=('LGPL2.1')
|
|||
|
||||
validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # "Marcel Holtmann <marcel@holtmann.org>"
|
||||
|
||||
sha256sums=(7603928ee584b758ca27c67e4dc513049a09b038d7d28459a9440f8443c91018 # ell-0.57.tar.xz
|
||||
7bdaef3f9f658dbd75868ccc14fc0c60b7804ed0737234a2593d9d5404ad796e) # ell-0.57.tar.sign
|
||||
sha256sums=(531a980589c8954ff12a3110b4d958fa75a74c88ddcc3e2ace4317e76a7c1e9b # ell-0.58.tar.xz
|
||||
a2f3ca9180a1fd4cd01547b13458ced0495efba99c4c527a08de7f6ce0dc9fd9) # ell-0.58.tar.sign
|
||||
|
||||
## a54358fdae3154ceceadffb0fb6b74e8ff8b2420b4d2ece0c395d19b5d339409 ell-0.58-01-x86_64.pkg.tar.lz
|
||||
|
||||
## 2bf8f8b2f4729c4d1e8b22f0719f0365eeede56baa3a767dd31a628805d6fd6f ell-0.57-01-x86_64.pkg.tar.lz
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
# Contributor: Jameson Pugh <imntreal@gmail.com>
|
||||
|
||||
pkgname=ell
|
||||
pkgver=0.57
|
||||
pkgver=0.58
|
||||
pkgrel=1
|
||||
pkgdesc="Embedded Linux library"
|
||||
arch=(x86_64)
|
||||
url="https://01.org/ell"
|
||||
#url="https://git.kernel.org/pub/scm/libs/ell/ell.git/"
|
||||
license=('LGPL2.1')
|
||||
depends=('gcc-libs')
|
||||
checkdepends=('dbus')
|
||||
depends=('gcc-libs' 'glibc')
|
||||
checkdepends=('dbus' 'procps-ng')
|
||||
# https://mirrors.edge.kernel.org/pub/linux/libs/ell/sha256sums.asc
|
||||
source=(https://mirrors.edge.kernel.org/pub/linux/libs/$pkgname/$pkgname-$pkgver.tar.{xz,sign})
|
||||
sha256sums=('7603928ee584b758ca27c67e4dc513049a09b038d7d28459a9440f8443c91018'
|
||||
sha256sums=('531a980589c8954ff12a3110b4d958fa75a74c88ddcc3e2ace4317e76a7c1e9b'
|
||||
'SKIP')
|
||||
validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # "Marcel Holtmann <marcel@holtmann.org>"
|
||||
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
#!/usr/bin/bash
|
||||
# JOBoRun : Jwm OpenBox Obarun RUNit
|
||||
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
||||
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
||||
# Website : https://pozol.eu
|
||||
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
||||
|
||||
pkgname=inxi
|
||||
_pkgver=3.3.29-1
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=01
|
||||
pkgdesc="Full featured CLI system information tool"
|
||||
url="https://smxi.org/docs/inxi.htm"
|
||||
depends=(coreutils pciutils perl procps-ng util-linux net-tools)
|
||||
conflicts=(inxi-git)
|
||||
optdepends=(
|
||||
"bind: -i wlan IP"
|
||||
"binutils: strings: -I sysvinit version"
|
||||
"bluez-tools: bt-adapter: -E bluetooth data (if no hciconfig)"
|
||||
"bluez-utils-compat: hciconfig: -E bluetooth HCI data"
|
||||
"curl: -i (if no dig); -w,-W; -U"
|
||||
"dmidecode: inxi -M if no sys machine data"
|
||||
'doas: -Dx hddtemp-user; -o file-user (alt for sudo)'
|
||||
"file: inxi -o unmounted file system"
|
||||
"freeipmi: ipmi-sensors: -s IPMI sensors"
|
||||
"hddtemp: inxi -Dx show hdd temp"
|
||||
"iproute2: inxi -i ip lan"
|
||||
"kmod: modinfo: Ax; -Nx module version"
|
||||
"ipmitool: -s IPMI sensors"
|
||||
"lvm2: lvs: -L LVM data"
|
||||
"kmod: inxi -Ax,-Nx module version"
|
||||
"lm_sensors: inxi -s sensors output"
|
||||
"mdadm: -Ra advanced mdraid data"
|
||||
"mesa-utils: inxi -G glx info"
|
||||
"perl-io-socket-ssl: -U; -w,-W; -i (if dig not installed)"
|
||||
"perl-cpanel-json-xs: --output json - required for export"
|
||||
"perl-json-xs: JSON::XS: --output json (legacy)"
|
||||
"perl-xml-dumper: --output xml - Crude and raw"
|
||||
"sudo: inxi -Dx hddtemp-user;-o file-user"
|
||||
"tree: --debugger 20,21 /sys tree"
|
||||
"upower: -sx attached device battery info"
|
||||
"usbutils: inxi -A usb audio;-N usb networking"
|
||||
"wget: -i (if no dig); -w,-W; -U"
|
||||
"wmctrl: -S active window manager (not all wm)"
|
||||
"xorg-xdpyinfo: inxi -G multi screen resolution"
|
||||
"xorg-xdriinfo: xdriinfo: -G (X) DRI driver (if missing, fallback to Xorg log)"
|
||||
"xorg-xprop: inxi -S desktop data"
|
||||
"xorg-xrandr: inxi -G single screen resolution"
|
||||
)
|
||||
#source=("git+https://github.com/smxi/inxi.git#tag=${_pkgver}")
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/smxi/inxi/archive/refs/tags/${_pkgver}.tar.gz")
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$_pkgver"
|
||||
|
||||
install -Dm755 $pkgname "${pkgdir}/usr/bin/$pkgname"
|
||||
install -Dm644 $pkgname.1 "${pkgdir}/usr/share/man/man1/$pkgname.1"
|
||||
}
|
||||
|
||||
#---- arch license gpg-key & sha256sums ----
|
||||
|
||||
arch=(x86_64)
|
||||
|
||||
license=(GPL3)
|
||||
|
||||
sha256sums=(5802cc6fe780fb9f24a097c326ffce9b31abe2f5b70957e21c6973e008bbf44b) # inxi-3.3.29.1.tar.gz
|
||||
|
||||
## d710450486ecf04a7188d7a1dccffd6dcd155f6e86290abef4d2cdd7aa46d995 inxi-3.3.29.1-01-x86_64.pkg.tar.lz
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
# Maintainer: Campbell Jones <arch at serebit dot com>
|
||||
# Contributor: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
|
||||
# Contributor: Stefano Capitani <stefanoatmanjarodotorg>
|
||||
# Contributor: Florian Pritz <f-p@gmx.at>
|
||||
|
||||
pkgname=inxi
|
||||
_pkgver=3.3.29-1
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc="Full featured CLI system information tool"
|
||||
arch=(any)
|
||||
url="https://smxi.org/docs/inxi.htm"
|
||||
license=(GPL3)
|
||||
depends=(coreutils pciutils perl procps-ng util-linux)
|
||||
optdepends=(
|
||||
"bind: dig: -i wlan IP"
|
||||
"binutils: strings: -I sysvinit version"
|
||||
"bluez-tools: bt-adapter: -E bluetooth data (if no hciconfig)"
|
||||
"curl: -i (if no dig); -w,-W; -U"
|
||||
"dmidecode: -M if no sys machine data; -m"
|
||||
'doas: -Dx hddtemp-user; -o file-user (alt for sudo)'
|
||||
"file: -o unmounted file system (if no lsblk)"
|
||||
"freeipmi: ipmi-sensors: -s IPMI sensors (servers)"
|
||||
"hddtemp: -Dx show hdd temp, if no drivetemp module"
|
||||
"iproute2: ip: -i ip LAN"
|
||||
"kmod: modinfo: Ax; -Nx module version"
|
||||
"ipmitool: -s IPMI sensors (servers)"
|
||||
"lvm2: lvs: -L LVM data"
|
||||
"lm_sensors: sensors: -s sensors output"
|
||||
"mdadm: -Ra advanced mdraid data"
|
||||
"mesa-utils: glxinfo: -G (X) glx info"
|
||||
"net-tools: ifconfig: -i ip LAN (deprecated)"
|
||||
"perl-cpanel-json-xs: Cpanel::JSON::XS: --output json (faster than JSON::PP)"
|
||||
"perl-json-xs: JSON::XS: --output json (legacy)"
|
||||
"perl-io-socket-ssl: IO::Socket::SSL: -U; -w,-W; -i (if dig not installed)"
|
||||
"smartmontools: smartctl: -Da advanced data"
|
||||
"systemd-sysvcompat: -I runlevel"
|
||||
"sudo: -Dx hddtemp-user; -o file-user"
|
||||
"tree: --debugger 20,21 /sys tree"
|
||||
"upower: -sx attached device battery info"
|
||||
"usbutils: lsusb: -A usb audio; -J (optional); -N usb networking"
|
||||
"wget: -i (if no dig); -w,-W; -U"
|
||||
"wmctrl: -S active window manager (fallback)"
|
||||
"xorg-xdpyinfo: xdpyinfo: -G (X) Screen resolution, dpi; -Ga Screen size"
|
||||
"xorg-xdriinfo: xdriinfo: -G (X) DRI driver (if missing, fallback to Xorg log)"
|
||||
"xorg-xprop: xprop: -S (X) desktop data"
|
||||
"xorg-xrandr: xrandr: -G (X) monitors(s) resolution; -Ga monitor data"
|
||||
)
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/smxi/$pkgname/archive/refs/tags/${_pkgver}.tar.gz")
|
||||
b2sums=('176b20b113b3339f27d2ec16681d652e8ccaefed80c220078fa4e625ad7191cd6ebc9ada049197a858475e5c656b5f74f599ca202e1e47d6682e4cd9049eb763')
|
||||
|
||||
package() {
|
||||
cd "$pkgname-${_pkgver}"
|
||||
|
||||
install -Dm 00755 $pkgname "${pkgdir}/usr/bin/$pkgname"
|
||||
install -Dm 00644 $pkgname.1 "${pkgdir}/usr/share/man/man1/$pkgname.1"
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
|
||||
# Contributor: Stefano Capitani <stefanoatmanjarodotorg>
|
||||
# Contributor: Florian Pritz <f-p@gmx.at>
|
||||
|
||||
pkgname=inxi
|
||||
_pkgver=3.3.22-1
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc="Full featured CLI system information tool"
|
||||
arch=(any)
|
||||
url="https://smxi.org/docs/inxi.htm"
|
||||
license=(GPL3)
|
||||
depends=(coreutils pciutils perl procps-ng)
|
||||
makedepends=(git)
|
||||
optdepends=(
|
||||
"bluez-tools: bt-adapter: -E bluetooth data (if no hciconfig)"
|
||||
"bluez-utils-compat: hciconfig: -E bluetooth HCI data"
|
||||
"bind: -i wlan IP"
|
||||
"dmidecode: inxi -M if no sys machine data"
|
||||
"file: inxi -o unmounted file system"
|
||||
"freeipmi: ipmi-sensors: -s IPMI sensors"
|
||||
"hddtemp: inxi -Dx show hdd temp"
|
||||
"iproute2: inxi -i ip lan"
|
||||
"ipmitool: -s IPMI sensors"
|
||||
"kmod: inxi -Ax,-Nx module version"
|
||||
"lm_sensors: inxi -s sensors output"
|
||||
"mesa-utils: inxi -G glx info"
|
||||
"net-tools: inxi -i ip lan-deprecated"
|
||||
"perl-io-socket-ssl: -U; -w,-W; -i (if dig not installed)"
|
||||
"perl-cpanel-json-xs: --output json - required for export"
|
||||
"perl-json-xs: --output json - required for export (legacy)"
|
||||
"perl-xml-dumper: --output xml - Crude and raw"
|
||||
"systemd-sysvcompat: inxi -I runlevel"
|
||||
"sudo: inxi -Dx hddtemp-user;-o file-user"
|
||||
"tree: --debugger 20,21 /sys tree"
|
||||
"upower: -sx attached device battery info"
|
||||
"usbutils: inxi -A usb audio;-N usb networking"
|
||||
"wmctrl: -S active window manager (not all wm)"
|
||||
"xorg-xdpyinfo: inxi -G multi screen resolution"
|
||||
"xorg-xprop: inxi -S desktop data"
|
||||
"xorg-xrandr: inxi -G single screen resolution"
|
||||
)
|
||||
source=("git+https://github.com/smxi/inxi.git#tag=${_pkgver}")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
package() {
|
||||
cd "${pkgname}"
|
||||
install -D -m755 $pkgname "${pkgdir}/usr/bin/$pkgname"
|
||||
install -D -m644 $pkgname.1 "${pkgdir}/usr/share/man/man1/$pkgname.1"
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
rm -rf {src,pkg,inxi,inxi-git,inxi*tar.gz}
|
|
@ -6,7 +6,7 @@
|
|||
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
||||
|
||||
pkgname=iwd
|
||||
pkgver=2.7
|
||||
pkgver=2.8
|
||||
pkgrel=01
|
||||
pkgdesc='Internet Wireless Daemon w/o systemd'
|
||||
url='https://git.kernel.org/cgit/network/wireless/iwd.git/'
|
||||
|
@ -59,7 +59,7 @@ license=('LGPL')
|
|||
|
||||
validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659')
|
||||
|
||||
sha256sums=(289ff47a76fb854e7789c45c5e3e0f15de4adc5fd2e82e47ab08e3564d8961d9 # iwd-2.7.tar.xz
|
||||
74808d6197301511beb09adf1cdfa933f5d5a1b889ccf9b42222aca18ed7d265) # iwd-2.7.tar.sign
|
||||
sha256sums=(a90e621f45b9c2f9021beea0fa6477ee0334fcd2ee34beaab42e31ea0fd3be29 # iwd-2.8.tar.xz
|
||||
f3f694faca784549ed55228f01a8f91e15e06a3cf70aa0469f73955747ba6587) # iwd-2.8.tar.sign
|
||||
|
||||
## 7b5293c5e3896eca5623ceff209ac28c8b176e3587a4c74fc8539f167b33063f iwd-2.7-01-x86_64.pkg.tar.lz
|
||||
## 0d06eb283f6906cc514298a72e0e2fb3f1007a2245b436f4ef6a4eb64089b266 iwd-2.8-01-x86_64.pkg.tar.lz
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Contributor: AndyRTR <andyrtr at archlinux.org>
|
||||
|
||||
pkgname=iwd
|
||||
pkgver=2.7
|
||||
pkgver=2.8
|
||||
pkgrel=1
|
||||
pkgdesc='Internet Wireless Daemon'
|
||||
arch=('x86_64')
|
||||
|
@ -14,7 +14,7 @@ makedepends=('python-docutils' 'dbus' 'systemd')
|
|||
optdepends=('qrencode: for displaying QR code after DPP is started')
|
||||
source=("https://www.kernel.org/pub/linux/network/wireless/iwd-${pkgver}.tar"{.xz,.sign})
|
||||
# https://mirrors.edge.kernel.org/pub/linux/network/wireless/sha256sums.asc
|
||||
sha256sums=('289ff47a76fb854e7789c45c5e3e0f15de4adc5fd2e82e47ab08e3564d8961d9'
|
||||
sha256sums=('a90e621f45b9c2f9021beea0fa6477ee0334fcd2ee34beaab42e31ea0fd3be29'
|
||||
'SKIP')
|
||||
validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659')
|
||||
changelog=ChangeLog
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
#!/usr/bin/bash
|
||||
# JOBoRun : Jwm OpenBox Obarun RUNit
|
||||
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
||||
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
||||
# Website : https://pozol.eu
|
||||
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
||||
|
||||
pkgname=libtiff
|
||||
_pkgname=tiff
|
||||
pkgver=4.5.1
|
||||
pkgrel=01
|
||||
pkgdesc='Library for manipulation of TIFF images with zstd disabled'
|
||||
url="http://www.simplesystems.org/libtiff"
|
||||
depends=('glibc' 'libjpeg-turbo' 'xz' 'zlib')
|
||||
makedepends=('freeglut' 'glu' 'mesa' 'jbigkit')
|
||||
optdepends=('freeglut: for using tiffgt')
|
||||
provides=('libtiff.so' 'libtiffxx.so')
|
||||
source=("https://download.osgeo.org/libtiff/tiff-${pkgver}.tar.gz"{,.sig})
|
||||
|
||||
prepare() {
|
||||
cd tiff-${pkgver//rc*/}
|
||||
|
||||
# apply patch from the source array (should be a pacman feature)
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
echo "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${_pkgname}-${pkgver}
|
||||
|
||||
./configure \
|
||||
--prefix='/usr' \
|
||||
--bindir='/usr/bin' \
|
||||
--libdir='/usr/lib' \
|
||||
--sysconfdir=/etc \
|
||||
--enable-ld-version-script \
|
||||
--mandir=/usr/share/man \
|
||||
--with-docdir=/usr/share/doc/${pkgname} \
|
||||
--disable-zstd
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd tiff-${pkgver//rc*/}
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd tiff-${pkgver//rc*/}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dm644 LICENSE.md -t "${pkgdir}"/usr/share/licenses/${pkgname}
|
||||
}
|
||||
|
||||
#---- arch license gpg-key & sha256sums ----
|
||||
|
||||
arch=(x86_64)
|
||||
|
||||
license=('custom')
|
||||
|
||||
validpgpkeys=(EBDFDB21B020EE8FD151A88DE301047DE1198975 # Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||
B1FA7D81EEB8E66399178B9733EBBFC47B3DD87D) # Even Rouault <even.rouault@spatialys.com>
|
||||
|
||||
sha256sums=(d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b # tiff-4.5.1.tar.gz
|
||||
f547eb5337962f60699f6494be1d6ed89b3b26c95b164d170825d1b17277923a) # tiff-4.5.1.tar.gz.sig
|
||||
|
||||
## 91005cf33b2f99c79724cc702924cd0a4ababfd6fbd2ad73fdac1a0633eb5944 libtiff-4.5.1-01-x86_64.pkg.tar.lz
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
||||
# Contributor: Eric Bélanger <eric@archlinux.org>
|
||||
|
||||
pkgname=libtiff
|
||||
pkgver=4.5.1
|
||||
pkgrel=1
|
||||
pkgdesc='Library for manipulation of TIFF images'
|
||||
url='http://www.simplesystems.org/libtiff/'
|
||||
arch=('x86_64')
|
||||
license=('custom')
|
||||
depends=('glibc' 'libjpeg-turbo' 'libjpeg.so' 'zlib' 'xz' 'zstd')
|
||||
makedepends=('freeglut' 'glu' 'mesa' 'jbigkit')
|
||||
optdepends=('freeglut: for using tiffgt')
|
||||
provides=('libtiff.so' 'libtiffxx.so')
|
||||
source=(
|
||||
"https://download.osgeo.org/libtiff/tiff-${pkgver}.tar.gz"{,.sig}
|
||||
)
|
||||
sha256sums=('d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b'
|
||||
'SKIP')
|
||||
b2sums=('ee496a5deeb49b6c4f866dbac0736c4bb84c29f45ae07cea52297679269a835761a3e54eeca5d75903e3d65f8117d4bbd16abdf1487813a31f9c9eb8d03e04c4'
|
||||
'SKIP')
|
||||
validpgpkeys=(
|
||||
'EBDFDB21B020EE8FD151A88DE301047DE1198975' # Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||
'B1FA7D81EEB8E66399178B9733EBBFC47B3DD87D' # Even Rouault <even.rouault@spatialys.com>
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd tiff-${pkgver//rc*/}
|
||||
# apply patch from the source array (should be a pacman feature)
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
echo "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
local configure_options=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--enable-ld-version-script
|
||||
--mandir=/usr/share/man
|
||||
--with-docdir=/usr/share/doc/${pkgname}
|
||||
)
|
||||
|
||||
cd tiff-${pkgver//rc*/}
|
||||
./configure "${configure_options[@]}"
|
||||
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd tiff-${pkgver//rc*/}
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd tiff-${pkgver//rc*/}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
|
||||
}
|
||||
|
||||
# vim: ts=2 sw=2 et:
|
|
@ -0,0 +1,55 @@
|
|||
# Maintainer: Astro Benzene <universebenzene at sina dot com>
|
||||
# Maintainer: TimeTrap <844177178 at qq dot com>
|
||||
# Maintainer: Levente Polyak <anthraxx at archlinux dot org>
|
||||
# Contributor: Eric Bélanger <eric at archlinux dot org>
|
||||
|
||||
pkgname=libtiff5
|
||||
_pkgname=tiff
|
||||
pkgver=4.4.0
|
||||
pkgrel=2
|
||||
pkgdesc='Library for manipulation of TIFF images'
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="http://www.simplesystems.org/libtiff"
|
||||
license=('custom')
|
||||
depends=('glibc'
|
||||
'libjpeg-turbo'
|
||||
'xz'
|
||||
'zlib'
|
||||
'zstd')
|
||||
source=("https://download.osgeo.org/libtiff/tiff-${pkgver}.tar.gz"
|
||||
# fix CVE-2022-2056 / CVE-2022-2057 / CVE-2022-2058: https://bugs.archlinux.org/task/75360
|
||||
"${pkgname}-4.4.0-fpe_tiffcrop.patch::https://gitlab.com/libtiff/libtiff/-/commit/dd1bcc7abb26094e93636e85520f0d8f81ab0fab.patch"
|
||||
# fix CVE-2022-34526: https://bugs.archlinux.org/task/75608
|
||||
"${pkgname}-4.4.0-CVE-2022-34526.patch::https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990.patch")
|
||||
sha256sums=('917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed'
|
||||
'049875c6eddef8d0d653ad069fea7483f7b9b1dc2aad8780784301fb3e34b561'
|
||||
'10220d1eecc00f830a1814c0b74388e68c4f0a38ec173038d6e5e8a6ad3cc97f')
|
||||
|
||||
prepare() {
|
||||
cd ${_pkgname}-${pkgver}
|
||||
|
||||
# apply patch from the source array (should be a pacman feature)
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
echo "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${_pkgname}-${pkgver}
|
||||
|
||||
./configure \
|
||||
--prefix='/usr'
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${_pkgname}-${pkgver}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
rm -rf "${pkgdir}"/usr/{bin,include,lib/{pkgconfig,libtiff{,xx}.{a,so}},share}
|
||||
install -Dm644 COPYRIGHT -t "${pkgdir}"/usr/share/licenses/${pkgname}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
rm -rf {src,pkg,tiff*.tar.gz*}
|
|
@ -0,0 +1,210 @@
|
|||
`configure' configures LibTIFF Software 4.4.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: src/tiff-4.4.0/configure [OPTION]... [VAR=VALUE]...
|
||||
|
||||
To assign environment variables (e.g., CC, CFLAGS...), specify them as
|
||||
VAR=VALUE. See below for descriptions of some of the useful variables.
|
||||
|
||||
Defaults for the options are specified in brackets.
|
||||
|
||||
Configuration:
|
||||
-h, --help display this help and exit
|
||||
--help=short display options specific to this package
|
||||
--help=recursive display the short help of all the included packages
|
||||
-V, --version display version information and exit
|
||||
-q, --quiet, --silent do not print `checking ...' messages
|
||||
--cache-file=FILE cache test results in FILE [disabled]
|
||||
-C, --config-cache alias for `--cache-file=config.cache'
|
||||
-n, --no-create do not create output files
|
||||
--srcdir=DIR find the sources in DIR [configure dir or `..']
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[/usr/local]
|
||||
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||
[PREFIX]
|
||||
|
||||
By default, `make install' will install all the files in
|
||||
`/usr/local/bin', `/usr/local/lib' etc. You can specify
|
||||
an installation prefix other than `/usr/local' using `--prefix',
|
||||
for instance `--prefix=$HOME'.
|
||||
|
||||
For better control, use the options below.
|
||||
|
||||
Fine tuning of the installation directories:
|
||||
--bindir=DIR user executables [EPREFIX/bin]
|
||||
--sbindir=DIR system admin executables [EPREFIX/sbin]
|
||||
--libexecdir=DIR program executables [EPREFIX/libexec]
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
|
||||
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
|
||||
--infodir=DIR info documentation [DATAROOTDIR/info]
|
||||
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
|
||||
--mandir=DIR man documentation [DATAROOTDIR/man]
|
||||
--docdir=DIR documentation root [DATAROOTDIR/doc/tiff]
|
||||
--htmldir=DIR html documentation [DOCDIR]
|
||||
--dvidir=DIR dvi documentation [DOCDIR]
|
||||
--pdfdir=DIR pdf documentation [DOCDIR]
|
||||
--psdir=DIR ps documentation [DOCDIR]
|
||||
|
||||
Program names:
|
||||
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
|
||||
|
||||
X features:
|
||||
--x-includes=DIR X include files are in DIR
|
||||
--x-libraries=DIR X library files are in DIR
|
||||
|
||||
System types:
|
||||
--build=BUILD configure for building on BUILD [guessed]
|
||||
--host=HOST cross-compile to build programs to run on HOST [BUILD]
|
||||
|
||||
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]
|
||||
--enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
--disable-silent-rules verbose build output (undo: "make V=0")
|
||||
--enable-maintainer-mode
|
||||
enable make rules and dependencies not useful (and
|
||||
sometimes confusing) to the casual installer
|
||||
--enable-dependency-tracking
|
||||
do not reject slow dependency extractors
|
||||
--disable-dependency-tracking
|
||||
speeds up one-time build
|
||||
--enable-ld-version-script
|
||||
enable linker version script (default is disabled)
|
||||
--enable-shared[=PKGS] build shared libraries [default=yes]
|
||||
--enable-static[=PKGS] build static libraries [default=yes]
|
||||
--enable-fast-install[=PKGS]
|
||||
optimize for fast installation [default=yes]
|
||||
--disable-libtool-lock avoid locking (might break parallel builds)
|
||||
--enable-rpath Enable runtime linker paths (-R libtool option)
|
||||
--disable-largefile omit support for large files
|
||||
--disable-ccitt disable support for CCITT Group 3 & 4 algorithms
|
||||
--disable-packbits disable support for Macintosh PackBits algorithm
|
||||
--disable-lzw disable support for LZW algorithm
|
||||
--disable-thunder disable support for ThunderScan 4-bit RLE algorithm
|
||||
--disable-next disable support for NeXT 2-bit RLE algorithm
|
||||
--disable-logluv disable support for LogLuv high dynamic range
|
||||
encoding
|
||||
--disable-mdi disable support for Microsoft Document Imaging
|
||||
--disable-zlib disable Zlib usage (required for Deflate
|
||||
compression, enabled by default)
|
||||
--disable-libdeflate disable libdeflate usage (optional for faster
|
||||
Deflate support (still requires zlib), enabled by
|
||||
default)
|
||||
--disable-pixarlog disable support for Pixar log-format algorithm
|
||||
(requires Zlib)
|
||||
--disable-jpeg disable IJG JPEG library usage (required for JPEG
|
||||
compression, enabled by default)
|
||||
--disable-old-jpeg disable support for Old JPEG compresson (read-only,
|
||||
enabled by default)
|
||||
--disable-jbig disable JBIG-KIT usage (required for ISO JBIG
|
||||
compression, enabled by default)
|
||||
--disable-lerc disable liblerc usage (required for lerc
|
||||
compression, enabled by default)
|
||||
--disable-lzma disable liblzma usage (required for LZMA2
|
||||
compression, enabled by default)
|
||||
--disable-zstd disable libzstd usage (required for zstd
|
||||
compression, enabled by default)
|
||||
--disable-webp disable libwebp usage (required for webp
|
||||
compression, enabled by default)
|
||||
--enable-jpeg12 enable libjpeg 8/12bit dual mode
|
||||
--enable-cxx enable C++ stream API building (requires C++
|
||||
compiler)
|
||||
--disable-win32-io disable Win32 I/O (Windows only, enabled by default
|
||||
except for Cygwin)
|
||||
--disable-strip-chopping
|
||||
disable support for strip chopping (whether or not
|
||||
to convert single-strip uncompressed images to
|
||||
multiple strips of specified size to reduce memory
|
||||
usage)
|
||||
--enable-defer-strile-load
|
||||
enable deferred strip/tile offset/size loading (also
|
||||
available at runtime with the 'D' flag of TIFFOpen()
|
||||
--enable-chunky-strip-read
|
||||
enable reading large strips in chunks for
|
||||
TIFFReadScanline() (experimental)
|
||||
--disable-extrasample-as-alpha
|
||||
the RGBA interface will treat a fourth sample with
|
||||
no EXTRASAMPLE_ value as being ASSOCALPHA. Many
|
||||
packages produce RGBA files but don't mark the alpha
|
||||
properly
|
||||
--disable-check-ycbcr-subsampling
|
||||
disable picking up YCbCr subsampling info from the
|
||||
JPEG data stream to support files lacking the tag
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
|
||||
both]
|
||||
--with-aix-soname=aix|svr4|both
|
||||
shared library versioning (aka "SONAME") variant to
|
||||
provide on AIX, [default=aix].
|
||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
|
||||
compiler's sysroot if not specified).
|
||||
--with-docdir=DIR directory where documentation should be installed
|
||||
--with-zlib-include-dir=DIR
|
||||
location of Zlib headers
|
||||
--with-zlib-lib-dir=DIR location of Zlib library binary
|
||||
--with-libdeflate-include-dir=DIR
|
||||
location of libdeflate headers
|
||||
--with-libdeflate-lib-dir=DIR
|
||||
location of libdeflate library binary
|
||||
--with-jpeg-include-dir=DIR
|
||||
location of IJG JPEG library headers
|
||||
--with-jpeg-lib-dir=DIR location of IJG JPEG library binary
|
||||
--with-jbig-include-dir=DIR
|
||||
location of JBIG-KIT headers
|
||||
--with-jbig-lib-dir=DIR location of JBIG-KIT library binary
|
||||
--with-lerc-include-dir=DIR
|
||||
location of liblerc headers
|
||||
--with-lerc-lib-dir=DIR location of liblerc library binary
|
||||
--with-lzma-include-dir=DIR
|
||||
location of liblzma headers
|
||||
--with-lzma-lib-dir=DIR location of liblzma library binary
|
||||
--with-zstd-include-dir=DIR
|
||||
location of libzstd headers
|
||||
--with-zstd-lib-dir=DIR location of libzstd library binary
|
||||
--with-webp-include-dir=DIR
|
||||
location of libwebp headers
|
||||
--with-webp-lib-dir=DIR location of libwebp library binary
|
||||
--with-jpeg12-include-dir=DIR
|
||||
location of libjpeg 12bit headers
|
||||
--with-jpeg12-lib=LIBRARY
|
||||
path to libjpeg 12bit library
|
||||
--with-x use the X Window System
|
||||
--with-default-strip-size=SIZE
|
||||
default size of the strip in bytes (when strip
|
||||
chopping enabled) [[default=8192]]
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||
nonstandard directory <lib dir>
|
||||
LIBS libraries to pass to the linker, e.g. -l<library>
|
||||
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
||||
you have headers in a nonstandard directory <include dir>
|
||||
LT_SYS_LIBRARY_PATH
|
||||
User-defined run-time library search path.
|
||||
CPP C preprocessor
|
||||
CXX C++ compiler command
|
||||
CXXFLAGS C++ compiler flags
|
||||
CXXCPP C++ preprocessor
|
||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
||||
Report bugs to <tiff@lists.maptools.org>.
|
|
@ -0,0 +1,8 @@
|
|||
libjpeg-turbo
|
||||
|
||||
|
||||
freeglut
|
||||
glu
|
||||
mesa
|
||||
jbigkit
|
||||
|
|
@ -0,0 +1 @@
|
|||
gpg -v --recv-key 33EBBFC47B3DD87D
|
|
@ -0,0 +1,28 @@
|
|||
From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Mon, 27 Jun 2022 16:09:43 +0200
|
||||
Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a
|
||||
codec-specific tag and the codec is not configured (fixes #433)
|
||||
|
||||
This avoids crashes when querying such tags
|
||||
---
|
||||
libtiff/tif_dirinfo.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
|
||||
index c30f569b..3371cb5c 100644
|
||||
--- a/libtiff/tif_dirinfo.c
|
||||
+++ b/libtiff/tif_dirinfo.c
|
||||
@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) {
|
||||
+ return 0;
|
||||
+ }
|
||||
/* Check if codec specific tags are allowed for the current
|
||||
* compression scheme (codec) */
|
||||
switch (tif->tif_dir.td_compression) {
|
||||
--
|
||||
GitLab
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
From dd1bcc7abb26094e93636e85520f0d8f81ab0fab Mon Sep 17 00:00:00 2001
|
||||
From: 4ugustus <wangdw.augustus@qq.com>
|
||||
Date: Sat, 11 Jun 2022 09:31:43 +0000
|
||||
Subject: [PATCH] fix the FPE in tiffcrop (#415, #427, and #428)
|
||||
|
||||
---
|
||||
libtiff/tif_aux.c | 9 +++++++
|
||||
libtiff/tiffiop.h | 1 +
|
||||
tools/tiffcrop.c | 62 ++++++++++++++++++++++++++---------------------
|
||||
3 files changed, 44 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c
|
||||
index 140f26c7..5b88c8d0 100644
|
||||
--- a/libtiff/tif_aux.c
|
||||
+++ b/libtiff/tif_aux.c
|
||||
@@ -402,6 +402,15 @@ float _TIFFClampDoubleToFloat( double val )
|
||||
return (float)val;
|
||||
}
|
||||
|
||||
+uint32_t _TIFFClampDoubleToUInt32(double val)
|
||||
+{
|
||||
+ if( val < 0 )
|
||||
+ return 0;
|
||||
+ if( val > 0xFFFFFFFFU || val != val )
|
||||
+ return 0xFFFFFFFFU;
|
||||
+ return (uint32_t)val;
|
||||
+}
|
||||
+
|
||||
int _TIFFSeekOK(TIFF* tif, toff_t off)
|
||||
{
|
||||
/* Huge offsets, especially -1 / UINT64_MAX, can cause issues */
|
||||
diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h
|
||||
index e3af461d..4e8bdac2 100644
|
||||
--- a/libtiff/tiffiop.h
|
||||
+++ b/libtiff/tiffiop.h
|
||||
@@ -365,6 +365,7 @@ extern double _TIFFUInt64ToDouble(uint64_t);
|
||||
extern float _TIFFUInt64ToFloat(uint64_t);
|
||||
|
||||
extern float _TIFFClampDoubleToFloat(double);
|
||||
+extern uint32_t _TIFFClampDoubleToUInt32(double);
|
||||
|
||||
extern tmsize_t
|
||||
_TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32_t strip,
|
||||
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
|
||||
index 1f827b2b..90286a5e 100644
|
||||
--- a/tools/tiffcrop.c
|
||||
+++ b/tools/tiffcrop.c
|
||||
@@ -5268,17 +5268,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
|
||||
{
|
||||
if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER))
|
||||
{
|
||||
- x1 = (uint32_t) (crop->corners[i].X1 * scale * xres);
|
||||
- x2 = (uint32_t) (crop->corners[i].X2 * scale * xres);
|
||||
- y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres);
|
||||
- y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres);
|
||||
+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres);
|
||||
+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres);
|
||||
+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres);
|
||||
+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres);
|
||||
}
|
||||
else
|
||||
{
|
||||
- x1 = (uint32_t) (crop->corners[i].X1);
|
||||
- x2 = (uint32_t) (crop->corners[i].X2);
|
||||
- y1 = (uint32_t) (crop->corners[i].Y1);
|
||||
- y2 = (uint32_t) (crop->corners[i].Y2);
|
||||
+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1);
|
||||
+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2);
|
||||
+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1);
|
||||
+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2);
|
||||
}
|
||||
/* a) Region needs to be within image sizes 0.. width-1; 0..length-1
|
||||
* b) Corners are expected to be submitted as top-left to bottom-right.
|
||||
@@ -5357,17 +5357,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
|
||||
{
|
||||
if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER)
|
||||
{ /* User has specified pixels as reference unit */
|
||||
- tmargin = (uint32_t)(crop->margins[0]);
|
||||
- lmargin = (uint32_t)(crop->margins[1]);
|
||||
- bmargin = (uint32_t)(crop->margins[2]);
|
||||
- rmargin = (uint32_t)(crop->margins[3]);
|
||||
+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]);
|
||||
+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]);
|
||||
+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]);
|
||||
+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]);
|
||||
}
|
||||
else
|
||||
{ /* inches or centimeters specified */
|
||||
- tmargin = (uint32_t)(crop->margins[0] * scale * yres);
|
||||
- lmargin = (uint32_t)(crop->margins[1] * scale * xres);
|
||||
- bmargin = (uint32_t)(crop->margins[2] * scale * yres);
|
||||
- rmargin = (uint32_t)(crop->margins[3] * scale * xres);
|
||||
+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres);
|
||||
+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres);
|
||||
+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres);
|
||||
+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres);
|
||||
}
|
||||
|
||||
if ((lmargin + rmargin) > image->width)
|
||||
@@ -5397,24 +5397,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
|
||||
if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER)
|
||||
{
|
||||
if (crop->crop_mode & CROP_WIDTH)
|
||||
- width = (uint32_t)crop->width;
|
||||
+ width = _TIFFClampDoubleToUInt32(crop->width);
|
||||
else
|
||||
width = image->width - lmargin - rmargin;
|
||||
|
||||
if (crop->crop_mode & CROP_LENGTH)
|
||||
- length = (uint32_t)crop->length;
|
||||
+ length = _TIFFClampDoubleToUInt32(crop->length);
|
||||
else
|
||||
length = image->length - tmargin - bmargin;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (crop->crop_mode & CROP_WIDTH)
|
||||
- width = (uint32_t)(crop->width * scale * image->xres);
|
||||
+ width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres);
|
||||
else
|
||||
width = image->width - lmargin - rmargin;
|
||||
|
||||
if (crop->crop_mode & CROP_LENGTH)
|
||||
- length = (uint32_t)(crop->length * scale * image->yres);
|
||||
+ length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres);
|
||||
else
|
||||
length = image->length - tmargin - bmargin;
|
||||
}
|
||||
@@ -5868,13 +5868,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
|
||||
{
|
||||
if (page->res_unit == RESUNIT_INCH || page->res_unit == RESUNIT_CENTIMETER)
|
||||
{ /* inches or centimeters specified */
|
||||
- hmargin = (uint32_t)(page->hmargin * scale * page->hres * ((image->bps + 7) / 8));
|
||||
- vmargin = (uint32_t)(page->vmargin * scale * page->vres * ((image->bps + 7) / 8));
|
||||
+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * page->hres * ((image->bps + 7) / 8));
|
||||
+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * page->vres * ((image->bps + 7) / 8));
|
||||
}
|
||||
else
|
||||
{ /* Otherwise user has specified pixels as reference unit */
|
||||
- hmargin = (uint32_t)(page->hmargin * scale * ((image->bps + 7) / 8));
|
||||
- vmargin = (uint32_t)(page->vmargin * scale * ((image->bps + 7) / 8));
|
||||
+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * ((image->bps + 7) / 8));
|
||||
+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * ((image->bps + 7) / 8));
|
||||
}
|
||||
|
||||
if ((hmargin * 2.0) > (pwidth * page->hres))
|
||||
@@ -5912,13 +5912,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
|
||||
{
|
||||
if (page->mode & PAGE_MODE_PAPERSIZE )
|
||||
{
|
||||
- owidth = (uint32_t)((pwidth * page->hres) - (hmargin * 2));
|
||||
- olength = (uint32_t)((plength * page->vres) - (vmargin * 2));
|
||||
+ owidth = _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2));
|
||||
+ olength = _TIFFClampDoubleToUInt32((plength * page->vres) - (vmargin * 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
- owidth = (uint32_t)(iwidth - (hmargin * 2 * page->hres));
|
||||
- olength = (uint32_t)(ilength - (vmargin * 2 * page->vres));
|
||||
+ owidth = _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres));
|
||||
+ olength = _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5927,6 +5927,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
|
||||
if (olength > ilength)
|
||||
olength = ilength;
|
||||
|
||||
+ if (owidth == 0 || olength == 0)
|
||||
+ {
|
||||
+ TIFFError("computeOutputPixelOffsets", "Integer overflow when calculating the number of pages");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
/* Compute the number of pages required for Portrait or Landscape */
|
||||
switch (page->orient)
|
||||
{
|
||||
--
|
||||
GitLab
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
real 0m39.260s
|
||||
user 0m37.746s
|
||||
sys 0m2.800s
|
||||
|
Loading…
Reference in New Issue