mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
libgcrypt: fix gcc2 build of version 1.11, remove old version
This commit is contained in:
@@ -1,96 +0,0 @@
|
||||
SUMMARY="GNU's basic cryptographic library"
|
||||
DESCRIPTION="Libgcrypt is a general purpose crypto library based on the code \
|
||||
used in GnuPG."
|
||||
HOMEPAGE="https://gnupg.org/related_software/libgcrypt/"
|
||||
COPYRIGHT="2000-2018 Free Software Foundation, Inc."
|
||||
LICENSE="GNU LGPL v3"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="3b9c02a004b68c256add99701de00b383accccf37177e0d6c58289664cce0c03"
|
||||
PATCHES="libgcrypt-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
libVersion="20.4.2"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libgcrypt$secondaryArchSuffix = $portVersion
|
||||
lib:libgcrypt$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libgcrypt${secondaryArchSuffix}_devel = $portVersion
|
||||
cmd:dumpsexp$secondaryArchSuffix = $portVersion
|
||||
cmd:hmac256$secondaryArchSuffix = $portVersion
|
||||
cmd:libgcrypt_config$secondaryArchSuffix = $portVersion
|
||||
cmd:mpicalc$secondaryArchSuffix = $portVersion
|
||||
devel:libgcrypt$secondaryArchSuffix = $libVersion
|
||||
"
|
||||
REQUIRES_devel="
|
||||
haiku$secondaryArchSuffix
|
||||
libgcrypt$secondaryArchSuffix == $portVersion base
|
||||
devel:libgpg_error$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgpg_error$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
defineDebugInfoPackage libgcrypt$secondaryArchSuffix \
|
||||
$libDir/libgcrypt.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure \
|
||||
--disable-jent-support
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
#remove libtool file
|
||||
rm -f $libDir/*.la
|
||||
|
||||
prepareInstalledDevelLib libgcrypt
|
||||
fixPkgconfig
|
||||
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
maybe_infoDir=$infoDir
|
||||
maybe_manDir=$manDir
|
||||
else
|
||||
maybe_infoDir=
|
||||
maybe_manDir=
|
||||
rm -rf $documentationDir
|
||||
fi
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$binDir \
|
||||
$dataDir \
|
||||
$maybe_infoDir \
|
||||
$maybe_manDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
LIBRARY_PATH="$sourceDir/src/.libs${LIBRARY_PATH:+:$LIBRARY_PATH}" \
|
||||
make check
|
||||
}
|
||||
@@ -9,7 +9,7 @@ SOURCE_URI="https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$portVersion.tar.bz
|
||||
CHECKSUM_SHA256="09120c9867ce7f2081d6aaa1775386b98c2f2f246135761aae47d81f58685b9c"
|
||||
PATCHES="libgcrypt-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
ARCHITECTURES="all"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="20.5.0"
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
From 756a1b3afa8ca02929a720c6370c21db8377a4b8 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 5 Aug 2014 16:50:29 +0000
|
||||
Subject: haiku patch
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 24ec2eb..374057a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -839,6 +839,7 @@ fi
|
||||
AC_SEARCH_LIBS(setsockopt, [socket], ,
|
||||
[AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])])
|
||||
AC_SEARCH_LIBS(setsockopt, [nsl])
|
||||
+AC_SEARCH_LIBS(socket, [network])
|
||||
|
||||
##################################
|
||||
#### Checks for header files. ####
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From bf6eba3e9ede042647160c8fb7e6f963b877ad4c Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 6 Aug 2014 22:08:04 +0000
|
||||
Subject: gcc2 patch
|
||||
|
||||
|
||||
diff --git a/src/hwf-x86.c b/src/hwf-x86.c
|
||||
index a1aa02e..ae73360 100644
|
||||
--- a/src/hwf-x86.c
|
||||
+++ b/src/hwf-x86.c
|
||||
@@ -108,7 +108,7 @@ get_xgetbv(void)
|
||||
unsigned int t_eax, t_edx;
|
||||
|
||||
asm volatile
|
||||
- ("xgetbv\n\t"
|
||||
+ (".byte 0x0f, 0x01, 0xd0\n\t"
|
||||
: "=a" (t_eax), "=d" (t_edx)
|
||||
: "c" (0)
|
||||
);
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From f06c46d95f61278d43cc2377de531e67d63a55e1 Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Wed, 17 Jan 2018 22:03:45 +0000
|
||||
Subject: Do not use __GNUC_PATCHLEVEL__ if it's not defined.
|
||||
|
||||
|
||||
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
|
||||
index 58581da..d744765 100644
|
||||
--- a/src/gcrypt.h.in
|
||||
+++ b/src/gcrypt.h.in
|
||||
@@ -74,9 +74,14 @@ extern "C" {
|
||||
underscore they are subject to change without notice. */
|
||||
#ifdef __GNUC__
|
||||
|
||||
+#ifdef __GNUC_PATCHLEVEL__
|
||||
#define _GCRY_GCC_VERSION (__GNUC__ * 10000 \
|
||||
+ __GNUC_MINOR__ * 100 \
|
||||
+ __GNUC_PATCHLEVEL__)
|
||||
+#else
|
||||
+#define _GCRY_GCC_VERSION (__GNUC__ * 10000 \
|
||||
+ + __GNUC_MINOR__ * 100)
|
||||
+#endif
|
||||
|
||||
#if _GCRY_GCC_VERSION >= 30100
|
||||
#define _GCRY_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 131cb12cb258cc37f28ea2b655091469c67488ae Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Wed, 23 Aug 2023 11:57:20 +0200
|
||||
Subject: Fixes: field `area' has incomplete type with gcc2
|
||||
|
||||
|
||||
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
|
||||
index 2341c86..2885c82 100644
|
||||
--- a/cipher/pubkey.c
|
||||
+++ b/cipher/pubkey.c
|
||||
@@ -1275,7 +1275,7 @@ _gcry_pk_selftest (int algo, int extended, selftest_report_func_t report)
|
||||
|
||||
struct pk_random_override {
|
||||
size_t len;
|
||||
- unsigned char area[];
|
||||
+ unsigned char area[1];
|
||||
};
|
||||
|
||||
gpg_err_code_t
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 19dd46e141c1827529ef95ca11b215e9ec025aab Mon Sep 17 00:00:00 2001
|
||||
From: Schrijvers Luc <begasus@gmail.com>
|
||||
Date: Wed, 21 Aug 2024 16:28:23 +0200
|
||||
Subject: random: Use getrandom only when it's appropriate
|
||||
|
||||
|
||||
diff --git a/random/rndgetentropy.c b/random/rndgetentropy.c
|
||||
index 513da0b..a6f3c4a 100644
|
||||
--- a/random/rndgetentropy.c
|
||||
+++ b/random/rndgetentropy.c
|
||||
@@ -81,6 +81,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t,
|
||||
do
|
||||
{
|
||||
_gcry_pre_syscall ();
|
||||
+#ifdef GRND_RANDOM
|
||||
if (fips_mode ())
|
||||
{
|
||||
/* DRBG chaining defined in SP 800-90A (rev 1) specify
|
||||
@@ -98,6 +99,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t,
|
||||
ret = getrandom (buffer, nbytes, GRND_RANDOM);
|
||||
}
|
||||
else
|
||||
+#endif
|
||||
{
|
||||
nbytes = length < sizeof (buffer) ? length : sizeof (buffer);
|
||||
ret = getentropy (buffer, nbytes);
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From f165b382904c0be1d03f10810f42a8337bc98adc Mon Sep 17 00:00:00 2001
|
||||
From 288a82df8b678a92b28e75815932cbfee02a7a20 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 5 Aug 2014 16:50:29 +0000
|
||||
Subject: haiku patch
|
||||
@@ -20,7 +20,30 @@ index 1d06ca3..25ae69a 100644
|
||||
2.48.1
|
||||
|
||||
|
||||
From f7bed951366132f8f8674725c9a043093b30a856 Mon Sep 17 00:00:00 2001
|
||||
From 809bab59453f74930e004c6d478990520c10c810 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 6 Aug 2014 22:08:04 +0000
|
||||
Subject: gcc2 patch
|
||||
|
||||
|
||||
diff --git a/src/hwf-x86.c b/src/hwf-x86.c
|
||||
index bda14d9..6ea19ff 100644
|
||||
--- a/src/hwf-x86.c
|
||||
+++ b/src/hwf-x86.c
|
||||
@@ -119,7 +119,7 @@ get_xgetbv(void)
|
||||
unsigned int t_eax, t_edx;
|
||||
|
||||
asm volatile
|
||||
- ("xgetbv\n\t"
|
||||
+ (".byte 0x0f, 0x01, 0xd0\n\t"
|
||||
: "=a" (t_eax), "=d" (t_edx)
|
||||
: "c" (0)
|
||||
);
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 707eddf4f2f635a57b54e66302edbc6bf8ec5d4a Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Wed, 17 Jan 2018 22:03:45 +0000
|
||||
Subject: Do not use __GNUC_PATCHLEVEL__ if it's not defined.
|
||||
@@ -48,3 +71,53 @@ index 9cad7a4..d9a8ba8 100644
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From bb8505c7e4fe33fe50ee1282e6f5138ee3ba87ff Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
||||
Date: Tue, 6 May 2025 20:54:37 +0200
|
||||
Subject: more gcc2 fixes
|
||||
|
||||
|
||||
diff --git a/cipher/asm-common-i386.h b/cipher/asm-common-i386.h
|
||||
index d746ebc..9d148f7 100644
|
||||
--- a/cipher/asm-common-i386.h
|
||||
+++ b/cipher/asm-common-i386.h
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_COMPATIBLE_GCC_I386_PLATFORM_AS
|
||||
-# define ELF(...) __VA_ARGS__
|
||||
+# define ELF(args...) args
|
||||
#else
|
||||
# define ELF(...) /*_*/
|
||||
#endif
|
||||
diff --git a/src/hwf-x86.c b/src/hwf-x86.c
|
||||
index 6ea19ff..a3d05f1 100644
|
||||
--- a/src/hwf-x86.c
|
||||
+++ b/src/hwf-x86.c
|
||||
@@ -57,7 +57,11 @@ is_cpuid_available(void)
|
||||
/* Detect the CPUID feature by testing some undefined behaviour (16
|
||||
vs 32 bit pushf/popf). */
|
||||
asm volatile
|
||||
- ("pushf\n\t" /* Copy flags to EAX. */
|
||||
+ (
|
||||
+#if defined(HAVE_GCC_ASM_CFI_DIRECTIVES) && __GNUC__ == 2
|
||||
+ ".cfi_startproc\n\t"
|
||||
+#endif
|
||||
+ "pushf\n\t" /* Copy flags to EAX. */
|
||||
CFI_PUSH4
|
||||
"popl %%eax\n\t"
|
||||
CFI_POP4
|
||||
@@ -79,6 +83,9 @@ is_cpuid_available(void)
|
||||
"jz .Lno_cpuid%=\n\t" /* Toggling did not work, thus no CPUID. */
|
||||
"movl $1, %0\n" /* Worked. true -> HAS_CPUID. */
|
||||
".Lno_cpuid%=:\n\t"
|
||||
+#if defined(HAVE_GCC_ASM_CFI_DIRECTIVES) && __GNUC__ == 2
|
||||
+ ".cfi_endproc\n\t"
|
||||
+#endif
|
||||
: "+r" (has_cpuid)
|
||||
:
|
||||
: "%eax", "%ecx", "cc", "memory"
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user