nettle: cleanup

remove unnecessary install file
clean up patches
This commit is contained in:
Christoph Reiter 2022-04-18 21:19:36 +02:00
parent 0384436f8f
commit e43d11f01d
5 changed files with 35 additions and 78 deletions

View File

@ -0,0 +1,28 @@
--- nettle-3.7.3/configure.ac.orig 2021-06-06 22:06:29.000000000 +0200
+++ nettle-3.7.3/configure.ac 2022-04-18 21:14:30.819409900 +0200
@@ -666,8 +666,8 @@
LIBHOGWEED_FORLINK='libhogweed-$(LIBHOGWEED_MAJOR).dll'
;;
cygwin*)
- LIBNETTLE_FORLINK='cygnettle-$(LIBNETTLE_MAJOR).dll'
- LIBHOGWEED_FORLINK='cyghogweed-$(LIBHOGWEED_MAJOR).dll'
+ LIBNETTLE_FORLINK='msys-nettle-$(LIBNETTLE_MAJOR).dll'
+ LIBHOGWEED_FORLINK='msys-hogweed-$(LIBHOGWEED_MAJOR).dll'
;;
esac
if test "x$cross_compiling" = xyes ; then
diff -aur nettle-3.2/testsuite/dlopen-test.c.orig nettle-3.2/testsuite/dlopen-test.c > ../3.2-dlopen-test-msys-test.patch
--- nettle-3.2/testsuite/dlopen-test.c.orig 2016-05-17 07:17:36.777183000 -0400
+++ nettle-3.2/testsuite/dlopen-test.c 2016-05-17 07:18:23.983817400 -0400
@@ -9,7 +9,11 @@
main (int argc UNUSED, char **argv UNUSED)
{
#if HAVE_LIBDL
+ #ifdef __MSYS__
+ void *handle = dlopen ("../msys-nettle-8.dll", RTLD_NOW);
+ #else
void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW);
+ #endif
int (*get_version)(void);
if (!handle)
{

View File

@ -1,15 +0,0 @@
diff -aur nettle-3.2/testsuite/dlopen-test.c.orig nettle-3.2/testsuite/dlopen-test.c > ../3.2-dlopen-test-msys-test.patch
--- nettle-3.2/testsuite/dlopen-test.c.orig 2016-05-17 07:17:36.777183000 -0400
+++ nettle-3.2/testsuite/dlopen-test.c 2016-05-17 07:18:23.983817400 -0400
@@ -9,7 +9,11 @@
main (int argc UNUSED, char **argv UNUSED)
{
#if HAVE_LIBDL
+ #ifdef __MSYS__
+ void *handle = dlopen ("../msys-nettle-8.dll", RTLD_NOW);
+ #else
void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW);
+ #endif
int (*get_version)(void);
if (!handle)
{

View File

@ -2,7 +2,7 @@
pkgname=('nettle' 'libnettle' 'libhogweed' 'libnettle-devel') pkgname=('nettle' 'libnettle' 'libhogweed' 'libnettle-devel')
pkgver=3.7.3 pkgver=3.7.3
pkgrel=1 pkgrel=2
pkgdesc="A low-level cryptographic library" pkgdesc="A low-level cryptographic library"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="https://www.lysator.liu.se/~nisse/nettle/" url="https://www.lysator.liu.se/~nisse/nettle/"
@ -11,28 +11,27 @@ groups=('net-utils')
depends=('gmp') depends=('gmp')
makedepends=('gmp-devel' 'autotools' 'gcc') makedepends=('gmp-devel' 'autotools' 'gcc')
source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig} source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig}
nettle-2.6-msys2.patch 001-fix-dll-names.patch)
3.2-dlopen-test-msys-test.patch)
validpgpkeys=('343C2FF0FBEE5EC2EDBEF399F3599FF828C67298') # Niels M├╢ller <nisse@lysator.liu.se> validpgpkeys=('343C2FF0FBEE5EC2EDBEF399F3599FF828C67298') # Niels M├╢ller <nisse@lysator.liu.se>
sha256sums=('661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0' sha256sums=('661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0'
'SKIP' 'SKIP'
'3c83eeb093ae056ba0a583d38ed171891509ab70e39057594ee8f30885db0d99' 'b55a5b742e77215a8290d9adfd12378ff4b55a4e51285ac3662ac8ead9e4bfd3')
'a922cc88086f0f1af1aea5a40ead773c5cc97d6c55bd6870b574f62dde812a51')
prepare() { prepare() {
cd "${srcdir}/${pkgname}-${pkgver}" cd "${srcdir}/${pkgname}-${pkgver}"
patch -p1 -i ${srcdir}/nettle-2.6-msys2.patch patch -p1 -i ${srcdir}/001-fix-dll-names.patch
patch -p1 -i ${srcdir}/3.2-dlopen-test-msys-test.patch
autoreconf -fi autoreconf -fi
} }
build() { build() {
cd "${srcdir}/${pkgname}-${pkgver}" cd "${srcdir}/${pkgname}-${pkgver}"
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
--libdir=/usr/lib \ --libdir=/usr/lib \
--build=${CHOST} \ --build=${CYGWIN_CHOST} \
--enable-shared \ --enable-shared \
--enable-static \ --enable-static \
--disable-assembler --disable-assembler
@ -48,7 +47,6 @@ check() {
package_nettle() { package_nettle() {
depends=('libnettle') depends=('libnettle')
install=$pkgname.install
mkdir -p ${pkgdir}/usr/bin mkdir -p ${pkgdir}/usr/bin
cp -rf ${srcdir}/dest/usr/bin/*.exe ${pkgdir}/usr/bin/ cp -rf ${srcdir}/dest/usr/bin/*.exe ${pkgdir}/usr/bin/

View File

@ -1,34 +0,0 @@
diff -Naur nettle-3.3-orig/aclocal.m4 nettle-3.3/aclocal.m4
--- nettle-3.3-orig/aclocal.m4 2013-01-14 21:44:12.000000000 +0000
+++ nettle-3.3/aclocal.m4 2013-04-24 18:30:00.456054700 +0000
@@ -35,6 +35,7 @@
# Could also use -fpic, depending on the number of symbol references
solaris*) CCPIC="-fPIC" ;;
cygwin*) CCPIC="" ;;
+ msys*) CCPIC="" ;;
mingw32*) CCPIC="" ;;
*) CCPIC="-fpic" ;;
esac
diff -Naur nettle-3.3-orig/configure.ac nettle-3.3/configure.ac
--- nettle-3.3-orig/configure.ac 2013-01-14 21:44:12.000000000 +0000
+++ nettle-3.3/configure.ac 2013-04-24 18:33:10.252929700 +0000
@@ -569,7 +569,7 @@
W64_ABI=no
case "$host_os" in
- mingw32*|cygwin*)
+ mingw32*|cygwin*|msys*)
# The actual DLLs, e.g. libnettle-$major-$minor.dll, are normally
# installed into the bin dir (or more exactly $libdir/../bin, for
# automake), while libnettle.dll.a, which is a stub file for
@@ -583,6 +583,10 @@
LIBNETTLE_FORLINK='cygnettle-$(LIBNETTLE_MAJOR).dll'
LIBHOGWEED_FORLINK='cyghogweed-$(LIBHOGWEED_MAJOR).dll'
;;
+ msys*)
+ LIBNETTLE_FORLINK='msys-nettle-$(LIBNETTLE_MAJOR).dll'
+ LIBHOGWEED_FORLINK='msys-hogweed-$(LIBHOGWEED_MAJOR).dll'
+ ;;
esac
if test "x$cross_compiling" = xyes ; then
case "$ABI" in

View File

@ -1,20 +0,0 @@
infodir=usr/share/info
filelist="nettle.info"
post_install() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist}; do
install-info $infodir/$file.gz $infodir/dir 2> /dev/null
done
}
post_upgrade() {
post_install $1
}
pre_remove() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist}; do
install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
done
}