Re-add wkhtmltox (#9773)

* Revert "Remove wkhtmltox (#9772)"

This reverts commit f35e69ff39.

* fixup package file and update compatibility and deps

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* update activity in packages.yaml

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2024-05-09 22:27:10 -04:00
committed by GitHub
parent f35e69ff39
commit 608ef255c3
4 changed files with 57 additions and 2 deletions

View File

@@ -61,8 +61,7 @@ pkg_update_arr = [
{ pkg_name: 'qtwebsockets', pkg_rename: 'qt5_websockets', pkg_deprecated: nil, comments: nil },
{ pkg_name: 'qtx11extras', pkg_rename: 'qt5_x11extras', pkg_deprecated: nil, comments: nil },
{ pkg_name: 'ruby_debug', pkg_rename: nil, pkg_deprecated: true, comments: 'Integrated into ruby package.' },
{ pkg_name: 'wget', pkg_rename: 'wget2', pkg_deprecated: nil, comments: 'Renamed to better match upstream.' },
{ pkg_name: 'wkhtmltox', pkg_rename: nil, pkg_deprecated: true, comments: 'Deprecated upstream with unpatched CVE-2022-35583.' }
{ pkg_name: 'wget', pkg_rename: 'wget2', pkg_deprecated: nil, comments: 'Renamed to better match upstream.' }
]
pkg_update_arr.each do |pkg|

View File

@@ -0,0 +1,12 @@
/usr/local/bin/wkhtmltoimage
/usr/local/bin/wkhtmltopdf
/usr/local/include/wkhtmltox/dllbegin.inc
/usr/local/include/wkhtmltox/dllend.inc
/usr/local/include/wkhtmltox/image.h
/usr/local/include/wkhtmltox/pdf.h
/usr/local/lib64/libwkhtmltox.so
/usr/local/lib64/libwkhtmltox.so.0
/usr/local/lib64/libwkhtmltox.so.0.12
/usr/local/lib64/libwkhtmltox.so.0.12.4
/usr/local/share/man/man1/wkhtmltoimage.1.zst
/usr/local/share/man/man1/wkhtmltopdf.1.zst

39
packages/wkhtmltox.rb Normal file
View File

@@ -0,0 +1,39 @@
require 'package'
class Wkhtmltox < Package
description 'Convert HTML to PDF using Webkit (QtWebKit)'
homepage 'https://wkhtmltopdf.org/'
version '0.12.4'
license 'LGPL-3'
compatibility 'x86_64'
source_url({
x86_64: 'https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz'
})
source_sha256({
x86_64: '049b2cdec9a8254f0ef8ac273afaf54f7e25459a273e27189591edc7d7cf29db'
})
depends_on 'gcc_lib' # R
depends_on 'glibc' # R
depends_on 'libx11' # R
depends_on 'libxext' # R
depends_on 'libxrender' # R
depends_on 'zlibpkg' # R
def self.install
FileUtils.mkdir_p CREW_DEST_PREFIX
FileUtils.mkdir_p CREW_DEST_LIB_PREFIX
FileUtils.cp_r 'bin/', CREW_DEST_PREFIX
FileUtils.cp_r Dir.glob('lib/*'), CREW_DEST_LIB_PREFIX
FileUtils.cp_r 'share/', CREW_DEST_PREFIX
FileUtils.cp_r 'include/', CREW_DEST_PREFIX
end
def self.postinstall
ExitMessage.add <<~EOT1.lightpurple
Note that the wkkhtmlto{image,pdf} programs are vulnerable as per
CVE-2020-21365 and CVE-2022-35583. As such, please be careful with
html files that you convert with this package.
EOT1
end
end

View File

@@ -9136,6 +9136,11 @@ url: https://github.com/charmbracelet/wishlist/releases
activity: high
---
kind: url
name: wkhtmltox
url: https://github.com/wkhtmltopdf/wkhtmltopdf/releases
activity: none
---
kind: url
name: wl_clipboard
url: https://github.com/bugaevc/wl-clipboard/releases/
activity: medium