enscript: add patch, update url, use libintl/gettext.

Build as cygwin.

Based on a review of Cygwin's source package.

Note that there is a .sig file, but the signing key has been revoked
(possibly because it is a dsa1024 key?)
This commit is contained in:
Jeremy Drake 2025-03-05 13:52:26 -08:00
parent 535bac9af6
commit 5254e34ece
2 changed files with 29 additions and 9 deletions

View File

@ -3,25 +3,27 @@
pkgname=enscript
pkgver=1.6.6
pkgrel=1
pkgrel=2
pkgdesc="Convert ASCII files to PostScript suitable for printing"
arch=('i686' 'x86_64')
url="https://git.savannah.gnu.org/cgit/enscript.git"
url="https://www.gnu.org/software/enscript/"
msys2_references=(
"anitya: 699"
"cpe: cpe:/a:gnu:enscript"
)
license=('sdpx:GPL-3.0-or-later')
depends=('perl')
makedepends=('autotools' 'gcc' 'perl')
depends=('perl' 'libintl' 'libiconv')
makedepends=('autotools' 'gcc' 'gettext-devel' 'libiconv-devel')
optdepends=('cygutils: Send the output to a physical printer instead of stdout.')
source=(
"https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
"300ecf85a8fe166a39f9dd818945c7b8a970db39.patch"::"https://git.savannah.gnu.org/cgit/enscript.git/patch/?id=300ecf85a8fe166a39f9dd818945c7b8a970db39"
)
"enscript-EXEEXT.patch")
sha256sums=('6d56bada6934d055b34b6c90399aa85975e66457ac5bf513427ae7fc77f5c0bb'
'53705eb99a11fbc4277140534331813fff526e5380f5d5a2046484ae92900186')
'53705eb99a11fbc4277140534331813fff526e5380f5d5a2046484ae92900186'
'adba69a58e184c63fe3ac6dc7487967ce019af4bfb0313325a8a8765eee09b1a')
#public key 38734D7787901452 has been revoked
#validpgpkeys=('0862E74AAD81B2F26170064438734D7787901452')
# To avoid a mess with lpr, the config file will be patched to send to stdout by default.
prepare() {
@ -30,11 +32,18 @@ prepare() {
# Also, tiny additional modification to fix issue with compilation warning fixed in the upstream git, but not stable tarball yet.
patch -Nbp1 -i "${srcdir}/300ecf85a8fe166a39f9dd818945c7b8a970db39.patch"
# Patch tests for .exe extension, from Cygwin
patch -Nbp2 -i "${srcdir}/enscript-EXEEXT.patch"
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc/enscript
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
./configure \
--prefix=/usr \
--sysconfdir=/etc/enscript \
--build=${CYGWIN_CHOST}
make
}
@ -46,7 +55,7 @@ check() {
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
# There is a conflict between the gettext locale.alias and the encsript supplied one.
# There is a conflict between the gettext locale.alias and the enscript supplied one.
# The elinks PKGBUILD script for example, removes the installed one from the tarball, I'll do the same.
rm -f "$pkgdir/usr/share/locale/locale.alias"
# Also this one as well, can't hurt.

View File

@ -0,0 +1,11 @@
--- origsrc/enscript-1.6.4/src/tests/defs 2003-03-05 08:26:33.000000000 +0100
+++ src/enscript-1.6.4/src/tests/defs 2013-04-28 19:59:44.237652400 +0200
@@ -10,7 +10,7 @@ export ENSCRIPT_LIBRARY
output=testout.ps
asciifiles="$srcdir/defs $srcdir/ascii.test $srcdir/../psgen.c"
-binaryfiles="../enscript ../mkafmmap"
+binaryfiles="../enscript.exe ../mkafmmap.exe"
enscript="../enscript"