summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-26 22:59:11 +0800
committerruki <[email protected]>2020-02-26 11:55:08 +0800
commit0c31cf19ba5cee16674e4141c51d95573553199f (patch)
treecb9a6b29c2ffc6e0a31a58f8639652d78cb90b68
parente08401afa95c6217bb04ee188f3d3337abbe9ca2 (diff)
improve to detect arch for msys/ci
-rw-r--r--core/makefile3
-rw-r--r--makefile3
-rw-r--r--scripts/msys/PKGBUILD2
3 files changed, 3 insertions, 5 deletions
diff --git a/core/makefile b/core/makefile
index 94a9d60a4..5105a95d3 100644
--- a/core/makefile
+++ b/core/makefile
@@ -159,7 +159,7 @@ PLAT :=$(if $(PLAT),$(PLAT),linux)
# architecture
ifeq ($(ARCH),)
ifneq ($(MSYSTEM_CARCH),)
-MSYSARCH := $(MSYSTEM_CARCH)
+MSYSARCH := $(if $(findstring mingw32,$(shell which gcc)),i386,$(MSYSTEM_CARCH))
else
MSYSARCH := x$(shell getconf LONG_BIT)
endif
@@ -170,7 +170,6 @@ ARCH :=$(if $(findstring macosx,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
ARCH :=$(if $(findstring linux,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
ARCH :=$(if $(findstring iphoneos,$(PLAT)),armv7,$(ARCH))
ARCH :=$(if $(findstring android,$(PLAT)),armv7,$(ARCH))
-ARCH :=$(if $(findstring any,$(ARCH)),i386,$(ARCH)) # from msys/PKGBUILD
ARCH :=$(if $(findstring i686,$(ARCH)),i386,$(ARCH)) # from msys/mingw32
ARCH :=$(if $(findstring x32,$(ARCH)),i386,$(ARCH))
ARCH :=$(if $(findstring x64,$(ARCH)),x86_64,$(ARCH))
diff --git a/makefile b/makefile
index c8a41f447..734aefe16 100644
--- a/makefile
+++ b/makefile
@@ -34,7 +34,7 @@ PLAT :=$(if $(PLAT),$(PLAT),linux)
# architecture
ifeq ($(ARCH),)
ifneq ($(MSYSTEM_CARCH),)
-MSYSARCH := $(MSYSTEM_CARCH)
+MSYSARCH := $(if $(findstring mingw32,$(shell which gcc)),i386,$(MSYSTEM_CARCH))
else
MSYSARCH := x$(shell getconf LONG_BIT)
endif
@@ -45,7 +45,6 @@ ARCH :=$(if $(findstring macosx,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
ARCH :=$(if $(findstring linux,$(PLAT)),x$(shell getconf LONG_BIT),$(ARCH))
ARCH :=$(if $(findstring iphoneos,$(PLAT)),armv7,$(ARCH))
ARCH :=$(if $(findstring android,$(PLAT)),armv7,$(ARCH))
-ARCH :=$(if $(findstring any,$(ARCH)),i386,$(ARCH)) # from msys/PKGBUILD
ARCH :=$(if $(findstring i686,$(ARCH)),i386,$(ARCH)) # from msys/mingw32
ARCH :=$(if $(findstring x32,$(ARCH)),i386,$(ARCH))
ARCH :=$(if $(findstring x64,$(ARCH)),x86_64,$(ARCH))
diff --git a/scripts/msys/PKGBUILD b/scripts/msys/PKGBUILD
index 35419b4e5..04193b076 100644
--- a/scripts/msys/PKGBUILD
+++ b/scripts/msys/PKGBUILD
@@ -22,5 +22,5 @@ build() {
package() {
cd "$srcdir"
- make install MSYSTEM_CARCH=${arch} prefix="${pkgdir}"
+ make install MSYSTEM_CARCH=${arch} DESTDIR="${pkgdir}" prefix="${MINGW_PREFIX}"
}