mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
core/gpgme to 1.19.0-3
This commit is contained in:
parent
fdb5c25a76
commit
e480c1ce58
3 changed files with 23 additions and 527 deletions
|
@ -1,332 +0,0 @@
|
|||
diff -upr gpgme-1.16.0.orig/configure gpgme-1.16.0/configure
|
||||
--- gpgme-1.16.0.orig/configure 2021-06-24 20:10:50.000000000 +0300
|
||||
+++ gpgme-1.16.0/configure 2021-12-01 00:12:24.383952330 +0200
|
||||
@@ -19625,7 +19625,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -19666,7 +19666,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -19875,7 +19875,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -19933,7 +19933,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -20255,7 +20255,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -20296,7 +20296,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -20505,7 +20505,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -20563,7 +20563,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -20885,7 +20885,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -20926,7 +20926,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -21135,7 +21135,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -21193,7 +21193,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -21515,7 +21515,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -21556,7 +21556,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -21765,7 +21765,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -21823,7 +21823,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -22145,7 +22145,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -22186,7 +22186,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -22395,7 +22395,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -22453,7 +22453,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -22775,7 +22775,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -22816,7 +22816,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -23025,7 +23025,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -23083,7 +23083,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -23291,13 +23291,13 @@ $as_echo "$as_me: WARNING:
|
||||
|
||||
if test -n "$PYTHON"; then
|
||||
# If the user set $PYTHON, use it and don't search something else.
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.9" >&5
|
||||
-$as_echo_n "checking whether $PYTHON version is >= 3.9... " >&6; }
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.10" >&5
|
||||
+$as_echo_n "checking whether $PYTHON version is >= 3.10... " >&6; }
|
||||
prog="import sys
|
||||
# split strings by '.' and convert to numeric. Append some zeros
|
||||
# because we need at least 4 digits for the hex conversion.
|
||||
# map returns an iterator in Python 3.0 and a list in 2.x
|
||||
-minver = list(map(int, '3.9'.split('.'))) + [0, 0, 0]
|
||||
+minver = list(map(int, '3.10'.split('.'))) + [0, 0, 0]
|
||||
minverhex = 0
|
||||
# xrange is not present in Python 3.0 and range returns an iterator
|
||||
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
|
||||
@@ -23318,19 +23318,19 @@ fi
|
||||
else
|
||||
# Otherwise, try each interpreter until we find one that satisfies
|
||||
# VERSION.
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.9" >&5
|
||||
-$as_echo_n "checking for a Python interpreter with version >= 3.9... " >&6; }
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.10" >&5
|
||||
+$as_echo_n "checking for a Python interpreter with version >= 3.10... " >&6; }
|
||||
if ${am_cv_pathless_PYTHON+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
- for am_cv_pathless_PYTHON in python3.9 none; do
|
||||
+ for am_cv_pathless_PYTHON in python3.10 none; do
|
||||
test "$am_cv_pathless_PYTHON" = none && break
|
||||
prog="import sys
|
||||
# split strings by '.' and convert to numeric. Append some zeros
|
||||
# because we need at least 4 digits for the hex conversion.
|
||||
# map returns an iterator in Python 3.0 and a list in 2.x
|
||||
-minver = list(map(int, '3.9'.split('.'))) + [0, 0, 0]
|
||||
+minver = list(map(int, '3.10'.split('.'))) + [0, 0, 0]
|
||||
minverhex = 0
|
||||
# xrange is not present in Python 3.0 and range returns an iterator
|
||||
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
|
||||
@@ -23405,7 +23405,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -23446,7 +23446,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -23655,7 +23655,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -23713,7 +23713,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -24035,7 +24035,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if ${am_cv_python_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
|
||||
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:4])"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
|
||||
$as_echo "$am_cv_python_version" >&6; }
|
||||
@@ -24076,7 +24076,7 @@ else:
|
||||
# <https://github.com/pypa/virtualenv/issues/118>
|
||||
try:
|
||||
from platform import python_implementation
|
||||
- if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
|
||||
+ if python_implementation() == 'CPython' and sys.version[:4] == '2.7':
|
||||
can_use_sysconfig = 0
|
||||
except ImportError:
|
||||
pass"
|
||||
@@ -24285,7 +24285,7 @@ variable to configure. See \`\`configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
|
||||
$as_echo_n "checking for the distutils Python package... " >&6; }
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
- if test -z "$ac_distutils_result"; then
|
||||
+ if test $? -eq 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
@@ -24343,7 +24343,7 @@ EOD`
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
- print (sys.version[:3])"`
|
||||
+ print (sys.version[:4])"`
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
commit ae9258fbf3b9d434495ef11fc184a91fe7c4ca57
|
||||
Author: NIIBE Yutaka <gniibe@fsij.org>
|
||||
Date: Thu Sep 15 13:46:23 2022 +0900
|
||||
|
||||
build:python: Don't use gpg-error-config/gpgme-config.
|
||||
|
||||
* lang/python/setup.py.in: Use @prefix@, @GPGME_CONFIG_LIBS@,
|
||||
@GPGME_CONFIG_CFLAGS@, and @GPG_ERROR_CFLAGS@ of configure.
|
||||
|
||||
--
|
||||
|
||||
GnuPG-bug-id: 6204
|
||||
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
|
||||
index 9785a282..6741d3c8 100755
|
||||
--- a/lang/python/setup.py.in
|
||||
+++ b/lang/python/setup.py.in
|
||||
@@ -30,9 +30,6 @@ import subprocess
|
||||
import sys
|
||||
|
||||
# Out-of-tree build of the gpg bindings.
|
||||
-gpg_error_config = ['gpg-error-config']
|
||||
-gpgme_config_flags = ['--thread=pthread']
|
||||
-gpgme_config = ['gpgme-config'] + gpgme_config_flags
|
||||
gpgme_h = ''
|
||||
include_dirs = [os.getcwd()]
|
||||
library_dirs = []
|
||||
@@ -44,8 +41,6 @@ top_builddir = os.environ.get('top_builddir')
|
||||
if top_builddir:
|
||||
# In-tree build.
|
||||
in_tree = True
|
||||
- gpgme_config = [os.path.join(top_builddir, 'src/gpgme-config')
|
||||
- ] + gpgme_config_flags
|
||||
gpgme_h = os.path.join(top_builddir, 'src/gpgme.h')
|
||||
library_dirs = [os.path.join(top_builddir,
|
||||
'src/.libs')] # XXX uses libtool internals
|
||||
@@ -60,20 +55,8 @@ if hasattr(subprocess, 'DEVNULL'):
|
||||
else:
|
||||
devnull = open(os.devnull, 'w')
|
||||
|
||||
-try:
|
||||
- subprocess.check_call(gpgme_config + ['--version'], stdout=devnull)
|
||||
-except:
|
||||
- sys.exit('Could not find gpgme-config. ' +
|
||||
- 'Please install the libgpgme development package.')
|
||||
|
||||
-
|
||||
-def getconfig(what, config=gpgme_config):
|
||||
- confdata = subprocess.Popen(
|
||||
- config + ['--%s' % what], stdout=subprocess.PIPE).communicate()[0]
|
||||
- return [x for x in confdata.decode('utf-8').split() if x != '']
|
||||
-
|
||||
-
|
||||
-version = version_raw = getconfig('version')[0]
|
||||
+version = version_raw = "@VERSION@"
|
||||
if '-' in version:
|
||||
version = version.split('-')[0]
|
||||
major, minor, patch = map(int, version.split('.'))
|
||||
@@ -82,17 +65,17 @@ if not (major > 1 or (major == 1 and minor >= 7)):
|
||||
sys.exit('Need at least GPGME version 1.7, found {}.'.format(version_raw))
|
||||
|
||||
if not gpgme_h:
|
||||
- gpgme_h = os.path.join(getconfig('prefix')[0], 'include', 'gpgme.h')
|
||||
+ gpgme_h = os.path.join('@prefix@', 'include', 'gpgme.h')
|
||||
|
||||
define_macros = []
|
||||
-libs = getconfig('libs')
|
||||
+libs = '@GPGME_CONFIG_LIBS@'.split(' ')
|
||||
|
||||
# Define extra_macros for both the SWIG and C code
|
||||
for k, v in extra_macros.items():
|
||||
extra_swig_opts.append('-D{0}={1}'.format(k, v))
|
||||
define_macros.append((k, str(v)))
|
||||
|
||||
-for item in getconfig('cflags'):
|
||||
+for item in '@GPGME_CONFIG_CFLAGS@'.split(' '):
|
||||
if item.startswith('-I'):
|
||||
include_dirs.append(item[2:])
|
||||
elif item.startswith('-D'):
|
||||
@@ -182,15 +165,8 @@ class BuildExtFirstHack(build):
|
||||
|
||||
def _generate_errors_i(self):
|
||||
|
||||
- try:
|
||||
- subprocess.check_call(
|
||||
- gpg_error_config + ['--version'], stdout=devnull)
|
||||
- except:
|
||||
- sys.exit('Could not find gpg-error-config. ' +
|
||||
- 'Please install the libgpg-error development package.')
|
||||
-
|
||||
gpg_error_content = self._read_header(
|
||||
- 'gpg-error.h', getconfig('cflags', config=gpg_error_config))
|
||||
+ 'gpg-error.h', '@GPG_ERROR_CFLAGS@'.split(' '))
|
||||
|
||||
filter_re = re.compile(r'GPG_ERR_[^ ]* =')
|
||||
rewrite_re = re.compile(r' *(.*) = .*')
|
||||
|
||||
commit f1802682c3c8794edaca37966405bd1f070f5e01
|
||||
Author: NIIBE Yutaka <gniibe@fsij.org>
|
||||
Date: Wed Oct 26 11:02:36 2022 +0900
|
||||
|
||||
python: Fix configure generating setup.py.
|
||||
|
||||
* lang/python/setup.py.in: Handle the case, when substitutions
|
||||
may be empty.
|
||||
|
||||
--
|
||||
|
||||
Reported-by: Andreas Metzler
|
||||
Fixes-commit: ae9258fbf3b9d434495ef11fc184a91fe7c4ca57
|
||||
GnuPG-bug-id: 6204
|
||||
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
|
||||
index 6741d3c8..6f36861d 100755
|
||||
--- a/lang/python/setup.py.in
|
||||
+++ b/lang/python/setup.py.in
|
||||
@@ -68,22 +68,26 @@ if not gpgme_h:
|
||||
gpgme_h = os.path.join('@prefix@', 'include', 'gpgme.h')
|
||||
|
||||
define_macros = []
|
||||
-libs = '@GPGME_CONFIG_LIBS@'.split(' ')
|
||||
+if '@GPGME_CONFIG_LIBS@':
|
||||
+ libs = '@GPGME_CONFIG_LIBS@'.split(' ')
|
||||
+else:
|
||||
+ libs = []
|
||||
|
||||
# Define extra_macros for both the SWIG and C code
|
||||
for k, v in extra_macros.items():
|
||||
extra_swig_opts.append('-D{0}={1}'.format(k, v))
|
||||
define_macros.append((k, str(v)))
|
||||
|
||||
-for item in '@GPGME_CONFIG_CFLAGS@'.split(' '):
|
||||
- if item.startswith('-I'):
|
||||
- include_dirs.append(item[2:])
|
||||
- elif item.startswith('-D'):
|
||||
- defitem = item[2:].split('=', 1)
|
||||
- if len(defitem) == 2:
|
||||
- define_macros.append((defitem[0], defitem[1]))
|
||||
- else:
|
||||
- define_macros.append((defitem[0], None))
|
||||
+if '@GPGME_CONFIG_CFLAGS@':
|
||||
+ for item in '@GPGME_CONFIG_CFLAGS@'.split(' '):
|
||||
+ if item.startswith('-I'):
|
||||
+ include_dirs.append(item[2:])
|
||||
+ elif item.startswith('-D'):
|
||||
+ defitem = item[2:].split('=', 1)
|
||||
+ if len(defitem) == 2:
|
||||
+ define_macros.append((defitem[0], defitem[1]))
|
||||
+ else:
|
||||
+ define_macros.append((defitem[0], None))
|
||||
|
||||
# Adjust include and library locations in case of win32
|
||||
uname_s = os.popen('uname -s').read()
|
||||
@@ -165,8 +169,9 @@ class BuildExtFirstHack(build):
|
||||
|
||||
def _generate_errors_i(self):
|
||||
|
||||
+ ge_cflags='@GPG_ERROR_CFLAGS@'
|
||||
gpg_error_content = self._read_header(
|
||||
- 'gpg-error.h', '@GPG_ERROR_CFLAGS@'.split(' '))
|
||||
+ 'gpg-error.h', ge_cflags.split(' ') if ge_cflags else [])
|
||||
|
||||
filter_re = re.compile(r'GPG_ERR_[^ ]* =')
|
||||
rewrite_re = re.compile(r' *(.*) = .*')
|
|
@ -3,35 +3,32 @@
|
|||
# Contributor: Sarah Hay <sarah@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - comment touch on x86 python file
|
||||
# - add -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to v7 CPPFLAGS
|
||||
|
||||
pkgbase=gpgme
|
||||
pkgname=(gpgme qgpgme python-gpgme)
|
||||
pkgver=1.18.0
|
||||
pkgrel=2
|
||||
_python_ver=3.10
|
||||
pkgver=1.19.0
|
||||
pkgrel=3
|
||||
pkgdesc='A C wrapper library for GnuPG'
|
||||
arch=('x86_64')
|
||||
url='https://www.gnupg.org/related_software/gpgme/'
|
||||
license=('LGPL')
|
||||
makedepends=('libgpg-error' 'gnupg' 'qt5-base' 'python' 'swig')
|
||||
makedepends=(
|
||||
'gnupg'
|
||||
'libgpg-error'
|
||||
'python'
|
||||
'python-build'
|
||||
'python-installer'
|
||||
'python-setuptools'
|
||||
'python-wheel'
|
||||
'qt5-base'
|
||||
'swig'
|
||||
)
|
||||
validpgpkeys=('6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020)
|
||||
'AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD') # Niibe Yutaka (GnuPG Release Key)
|
||||
source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig}
|
||||
'0001-python-3-10.patch'
|
||||
'0002-python-setup.patch')
|
||||
sha256sums=('361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e'
|
||||
'SKIP'
|
||||
'5de2f6bcb6b30642d0cbc3fbd86803c9460d732f44a526f44cedee8bb78d291a'
|
||||
'84fb13e9afa549027469e0d1a1bad69bf786b63ef6359a5d65320bd226dcccc7')
|
||||
|
||||
prepare() {
|
||||
cd ${pkgbase}-${pkgver}
|
||||
|
||||
patch -Np1 -i ../0001-python-3-10.patch
|
||||
patch -Np1 -i ../0002-python-setup.patch
|
||||
}
|
||||
source=("https://www.gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"{,.sig})
|
||||
sha256sums=('cb58494dc415fba9eeb12b826550ad3190dc92e265c5bb2ae1a21c92841cfd38'
|
||||
'SKIP')
|
||||
|
||||
build() {
|
||||
cd ${pkgbase}-${pkgver}
|
||||
|
@ -44,12 +41,12 @@ build() {
|
|||
--disable-gpgsm-test
|
||||
make
|
||||
|
||||
# ensure reproducibility of .pyc files
|
||||
touch -d @$SOURCE_DATE_EPOCH lang/python/version.py
|
||||
#touch -d @$SOURCE_DATE_EPOCH lang/python/python${_python_ver}-gpg/lib.linux-x86_64-${_python_ver}/gpg/gpgme.py
|
||||
|
||||
# .pyc files will be created if check() is used - generate them here
|
||||
|
||||
(
|
||||
# use a PEP517 workflow to get a reproducible Python package
|
||||
# NOTE: top_builddir is required so that the build takes place against local gpgme, not system gpgme
|
||||
cd lang/python/
|
||||
top_builddir="$srcdir/$pkgbase-$pkgver" python -m build --wheel --no-isolation
|
||||
)
|
||||
}
|
||||
|
||||
check() {
|
||||
|
@ -59,9 +56,6 @@ check() {
|
|||
sed -i 's#"t-keylist-secret",##' tests/json/t-json.c
|
||||
|
||||
make check
|
||||
|
||||
# ensure reproducibilty whether test-suite is run or not
|
||||
find . -name *.pyc -exec rm {} +
|
||||
}
|
||||
|
||||
package_gpgme() {
|
||||
|
@ -94,5 +88,5 @@ package_python-gpgme() {
|
|||
depends=('gpgme' 'python')
|
||||
|
||||
cd ${pkgbase}-${pkgver}/lang/python
|
||||
make DESTDIR="${pkgdir}" install
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue