new package: wiz

This commit is contained in:
Tee KOBAYASHI 2022-02-20 05:31:11 +09:00 committed by xtkoba
parent 2915853902
commit c20cbccd78
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,13 @@
--- a/Makefile
+++ b/Makefile
@@ -72,8 +72,8 @@
ifeq ($(PLATFORM),native)
ifeq ($(CFG),release)
- CXX_FLAGS := -D_POSIX_SOURCE -Os -std=c++17 -MMD -Wall -Wextra $(WERR_) -Wold-style-cast -Wnon-virtual-dtor -fno-exceptions -fno-rtti
- LXXFLAGS := -lm -s -flto
+ CXX_FLAGS := $(CXXFLAGS) $(CPPFLAGS) -D_POSIX_SOURCE -std=c++17 -MMD -Wall -Wextra $(WERR_) -Wold-style-cast -Wnon-virtual-dtor -fno-exceptions -fno-rtti
+ LXXFLAGS := $(LDFLAGS) -lm -s -flto
else ifeq ($(CFG),debug)
CXX_FLAGS := -D_POSIX_SOURCE -DWIZ_DEBUG -g -std=c++17 -MMD -Wall -Wextra $(WERR_) -Wold-style-cast -Wnon-virtual-dtor -fno-exceptions -fno-rtti
LXXFLAGS := -lm

23
packages/wiz/build.sh Normal file
View File

@ -0,0 +1,23 @@
TERMUX_PKG_HOMEPAGE=http://wiz-lang.org/
TERMUX_PKG_DESCRIPTION="A high-level assembly language for writing homebrew software for retro console platforms"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
_COMMIT=b25ba2d90288fc8a380d99b3ad08a5b48caaa484
TERMUX_PKG_VERSION=2021.06.02
TERMUX_PKG_SRCURL=https://github.com/wiz-lang/wiz.git
TERMUX_PKG_GIT_BRANCH=master
TERMUX_PKG_DEPENDS="libc++"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="PREFIX=$TERMUX_PREFIX"
termux_step_post_get_source() {
git fetch --unshallow
git checkout $_COMMIT
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
echo " is different from what is expected to be: \"$version\""
return 1
fi
}