summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 12:47:45 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 12:47:45 +0100
commit30b734b4fc70876e2f5860119f684bd69c4f3779 (patch)
tree43bae9a3d7698385184dd96d6149ba6eaf2bc3e7
parentcb0ebbaacdd5dec2c137c13383779d23b9f967e9 (diff)
downloadmidipix_build-30b734b4fc70876e2f5860119f684bd69c4f3779.tar.bz2
midipix_build-30b734b4fc70876e2f5860119f684bd69c4f3779.tar.xz
subr/pkg_configure_patch.subr: infer -pnum from whether only one or both of ${PKG_{URL,URLS_GIT}} are present.
patches/python2_host-2.7.15.local.patch: updated. patches/python3_host-3.6.3.local.patch: updated.
-rw-r--r--patches/python2_host-2.7.15.local.patch8
-rw-r--r--patches/python3_host-3.6.3.local.patch16
-rw-r--r--subr/pkg_configure_patch.subr9
3 files changed, 17 insertions, 16 deletions
diff --git a/patches/python2_host-2.7.15.local.patch b/patches/python2_host-2.7.15.local.patch
index c237daa8..d432aecb 100644
--- a/patches/python2_host-2.7.15.local.patch
+++ b/patches/python2_host-2.7.15.local.patch
@@ -1,5 +1,5 @@
---- ./build/sbpython2/project/config/cfgdefs.sh.orig 2021-04-06 10:42:07.823432394 +0100
-+++ ./build/sbpython2/project/config/cfgdefs.sh 2021-04-06 10:46:44.345427809 +0100
+--- build/sbpython2/project/config/cfgdefs.sh.orig 2021-04-06 10:42:07.823432394 +0100
++++ build/sbpython2/project/config/cfgdefs.sh 2021-04-06 10:46:44.345427809 +0100
@@ -106,6 +106,7 @@
if [ -n "$pycfg_pymalloc" ]; then
cfgtest_cflags_append '-DWITH_PYMALLOC'
@@ -19,8 +19,8 @@
if cfgtest_library_presence $mb_ncurses_tinfo; then
mb_ncurses_libs="$mb_ncurses_libs $mb_ncurses_tinfo"
---- ./build/sbpython2/project/pyexts.mk.orig 2021-04-06 10:42:07.827432250 +0100
-+++ ./build/sbpython2/project/pyexts.mk 2021-04-06 10:49:55.946499708 +0100
+--- build/sbpython2/project/pyexts.mk.orig 2021-04-06 10:42:07.827432250 +0100
++++ build/sbpython2/project/pyexts.mk 2021-04-06 10:49:55.946499708 +0100
@@ -1017,7 +1017,7 @@
PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo)
PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o)
diff --git a/patches/python3_host-3.6.3.local.patch b/patches/python3_host-3.6.3.local.patch
index cd0bb169..7ec6deea 100644
--- a/patches/python3_host-3.6.3.local.patch
+++ b/patches/python3_host-3.6.3.local.patch
@@ -1,5 +1,5 @@
---- ./build/sbpython3/project/config/cfgdefs.sh.orig 2021-04-05 11:17:27.238909690 +0100
-+++ ./build/sbpython3/project/config/cfgdefs.sh 2021-04-06 10:51:52.866273106 +0100
+--- build/sbpython3/project/config/cfgdefs.sh.orig 2021-04-05 11:17:27.238909690 +0100
++++ build/sbpython3/project/config/cfgdefs.sh 2021-04-06 10:51:52.866273106 +0100
@@ -106,6 +106,7 @@
if [ -n "$pycfg_pymalloc" ]; then
cfgtest_cflags_append '-DWITH_PYMALLOC'
@@ -19,8 +19,8 @@
if cfgtest_library_presence $mb_ncurses_tinfo; then
mb_ncurses_libs="$mb_ncurses_libs $mb_ncurses_tinfo"
---- ./build/sbpython3/project/variants/3.6.3/pyexts.mk.orig 2021-04-05 11:17:27.246909408 +0100
-+++ ./build/sbpython3/project/variants/3.6.3/pyexts.mk 2021-04-06 10:51:52.898271950 +0100
+--- build/sbpython3/project/variants/3.6.3/pyexts.mk.orig 2021-04-05 11:17:27.246909408 +0100
++++ build/sbpython3/project/variants/3.6.3/pyexts.mk 2021-04-06 10:51:52.898271950 +0100
@@ -1012,7 +1012,7 @@
PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo)
PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o)
@@ -30,8 +30,8 @@
PYEXT_OSSAUDIODEV_STATIC = pyext/ossaudiodev$(OS_ARCHIVE_EXT)
$(PYEXT_OSSAUDIODEV_SHARED): $(PYEXT_OSSAUDIODEV_LOBJS)
---- ./build/sbpython3/project/variants/3.7.1/pyexts.mk.orig 2021-04-05 11:17:27.246909408 +0100
-+++ ./build/sbpython3/project/variants/3.7.1/pyexts.mk 2021-04-06 10:51:52.930270793 +0100
+--- build/sbpython3/project/variants/3.7.1/pyexts.mk.orig 2021-04-05 11:17:27.246909408 +0100
++++ build/sbpython3/project/variants/3.7.1/pyexts.mk 2021-04-06 10:51:52.930270793 +0100
@@ -1068,7 +1068,7 @@
PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo)
PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o)
@@ -41,8 +41,8 @@
PYEXT_OSSAUDIODEV_STATIC = pyext/ossaudiodev$(OS_ARCHIVE_EXT)
$(PYEXT_OSSAUDIODEV_SHARED): $(PYEXT_OSSAUDIODEV_LOBJS)
---- ./build/sbpython3/project/variants/3.7.2/pyexts.mk.orig 2021-04-05 11:17:27.250909267 +0100
-+++ ./build/sbpython3/project/variants/3.7.2/pyexts.mk 2021-04-06 10:51:52.958269781 +0100
+--- build/sbpython3/project/variants/3.7.2/pyexts.mk.orig 2021-04-05 11:17:27.250909267 +0100
++++ build/sbpython3/project/variants/3.7.2/pyexts.mk 2021-04-06 10:51:52.958269781 +0100
@@ -1068,7 +1068,7 @@
PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo)
PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o)
diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr
index 7569c6ac..d7c84011 100644
--- a/subr/pkg_configure_patch.subr
+++ b/subr/pkg_configure_patch.subr
@@ -4,13 +4,14 @@
pkg_configure_patch() {
local _patch_cwd="" _patch_dir="${MIDIPIX_BUILD_PWD}/patches" _patch_fname=""\
- _patches_done="" _pkg_name_full="${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}";
+ _patches_done="" _pkg_name_full="${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}"\
+ _strip_count=0;
if [ -n "${PKG_FNAME:-}" ]\
&& [ -n "${PKG_URLS_GIT:-}" ]; then
- _patch_cwd="${PKG_BASE_DIR}";
+ _patch_cwd="${PKG_BASE_DIR}"; _strip_count=0;
else
- _patch_cwd="${PKG_BASE_DIR}/${PKG_SUBDIR}";
+ _patch_cwd="${PKG_BASE_DIR}/${PKG_SUBDIR}"; _strip_count=1;
fi;
set +o noglob;
for _patch_fname in \
@@ -20,7 +21,7 @@ pkg_configure_patch() {
${PKG_PATCHES_EXTRA:-}; do
if [ -r "${_patch_fname}" ]\
&& ! rtl_lmatch "${_patches_done}" "${_patch_fname}"; then
- if ! patch -b -d "${_patch_cwd}" -p1 < "${_patch_fname}"; then
+ if ! patch -b -d "${_patch_cwd}" "-p${_strip_count}" < "${_patch_fname}"; then
set -o noglob; return 1;
else
_patches_done="$(rtl_lconcat "${_patches_done}" "${_patch_fname}")";