diff options
Diffstat (limited to 'dist')
-rw-r--r-- | dist/msys2-mingw/llvm/PKGBUILD | 12 | ||||
-rw-r--r-- | dist/msys2-mingw/mcode/PKGBUILD | 10 | ||||
-rw-r--r-- | dist/msys2-mingw/run.sh | 106 |
3 files changed, 36 insertions, 92 deletions
diff --git a/dist/msys2-mingw/llvm/PKGBUILD b/dist/msys2-mingw/llvm/PKGBUILD index a947aa1e3..a9d98b16c 100644 --- a/dist/msys2-mingw/llvm/PKGBUILD +++ b/dist/msys2-mingw/llvm/PKGBUILD @@ -3,16 +3,10 @@ pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=ci pkgrel=1 -pkgdesc="GHDL: the open-source analyzer, compiler and simulator for VHDL (LLVM backend) (mingw-w64)" +pkgdesc="GHDL: the open-source analyzer, compiler, simulator and (experimental) synthesizer for VHDL (LLVM backend) (mingw-w64)" arch=('any') -#depends=() -makedepends=("${MINGW_PACKAGE_PREFIX}-clang" "${MINGW_PACKAGE_PREFIX}-gcc-ada") -#source=( -# "ghdl::git://github.com/ghdl/ghdl.git#branch=master" -#) -#sha512sums=( -# 'SKIP' -#) +depends=('zlib-devel' "${MINGW_PACKAGE_PREFIX}-clang") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-ada") build() { mkdir "${srcdir}/builddir" diff --git a/dist/msys2-mingw/mcode/PKGBUILD b/dist/msys2-mingw/mcode/PKGBUILD index 591fa6693..75205b025 100644 --- a/dist/msys2-mingw/mcode/PKGBUILD +++ b/dist/msys2-mingw/mcode/PKGBUILD @@ -3,16 +3,10 @@ pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=ci pkgrel=1 -pkgdesc="GHDL: the open-source analyzer, compiler and simulator for VHDL (mcode backend) (mingw-w64)" +pkgdesc="GHDL: the open-source analyzer, compiler, simulator and (experimental) synthesizer for VHDL (mcode backend) (mingw-w64)" arch=('any') -#depends=() +depends=('zlib-devel') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gcc-ada") -#source=( -# "ghdl::git://github.com/ghdl/ghdl.git#branch=master" -#) -#sha512sums=( -# 'SKIP' -#) build() { mkdir "${srcdir}/builddir" diff --git a/dist/msys2-mingw/run.sh b/dist/msys2-mingw/run.sh index 32f971322..55aff45c4 100644 --- a/dist/msys2-mingw/run.sh +++ b/dist/msys2-mingw/run.sh @@ -1,5 +1,7 @@ #!/bin/sh +cd $(dirname $0) + # Stop in case of error set -e @@ -36,6 +38,12 @@ gstart () { gend () { : } +gblock () { + gstart "$1" + shift + $@ + gend +} [ -n "$CI" ] && { echo "INFO: set 'gstart' and 'gend' for CI" @@ -54,84 +62,32 @@ gend () { #--- -do_build () { - gstart 'Install common build dependencies' - pacman -S --noconfirm base-devel - gend - - if [ -z "$TARGET" ]; then - printf "${ANSI_RED}Undefined TARGET!$ANSI_NOCOLOR" - exit 1 - fi - cd "$TARGET" - - gstart "Fetch --unshallow" - # The command 'git describe' (used for version) needs the history. Get it. - # But the following command fails if the repository is complete. - git fetch --unshallow || true - gend - - MINGW_INSTALLS="$(echo "$MINGW_INSTALLS" | tr '[:upper:]' '[:lower:]')" +if [ -z "$TARGET" ]; then + printf "${ANSI_RED}Undefined TARGET!$ANSI_NOCOLOR" + exit 1 +fi +cd "$TARGET" - case "$MINGW_INSTALLS" in - mingw32) - TARBALL_ARCH="i686" - ;; - mingw64) - TARBALL_ARCH="x86_64" +# The command 'git describe' (used for version) needs the history. Get it. +# But the following command fails if the repository is complete. +gblock "Fetch --unshallow" git fetch --unshallow || true - # FIXME: specific versions of these packages should be installed automatically by makepkg-mingw. - # E.g.: mingw-w64-x86_64-llvm-8.0.1-3 mingw-w64-x86_64-clang-8.0.1-3 mingw-w64-x86_64-z3-4.8.5-1 - # However, specifying the version produces 'error: target not found:' - gstart "Install build dependencies" - pacman -S --noconfirm mingw-w64-x86_64-llvm mingw-w64-x86_64-clang mingw-w64-x86_64-z3 - gend - ;; - *) - printf "${ANSI_RED}Unknown MING_INSTALLS=${MINGW_INSTALLS}!$ANSI_NOCOLOR" - exit 1 - esac - gstart 'Install toolchain' - pacman -S --noconfirm mingw-w64-${TARBALL_ARCH}-toolchain - gend - - gstart 'Build package' - makepkg-mingw --noconfirm --noprogressbar -sCLf --noarchive - gend - - gstart 'Archive package' - makepkg-mingw --noconfirm --noprogressbar -R - gend - - gstart 'List artifacts' - ls -la - gend +MINGW_INSTALLS="$(echo "$MINGW_INSTALLS" | tr '[:upper:]' '[:lower:]')" - gstart 'Install package' - pacman --noconfirm -U "mingw-w64-${TARBALL_ARCH}-ghdl-${TARGET}-ci"-*-any.pkg.tar.zst - gend -} - -#--- - -do_test () { - gstart 'Environment' - env | grep MSYSTEM - env | grep MINGW - gend - - GHDL=ghdl ../../testsuite/testsuite.sh -} - -#--- - -cd $(dirname $0) - -case "$1" in - -t) - do_test +case "$MINGW_INSTALLS" in + mingw32) + TARBALL_ARCH="i686" ;; - *) - do_build + mingw64) + TARBALL_ARCH="x86_64" ;; + *) + printf "${ANSI_RED}Unknown MINGW_INSTALLS=${MINGW_INSTALLS}!$ANSI_NOCOLOR" + exit 1 esac + +gblock 'Install toolchain' pacman -S --noconfirm base-devel mingw-w64-${TARBALL_ARCH}-toolchain +gblock 'Build package' makepkg-mingw --noconfirm --noprogressbar -sCLf --noarchive +gblock 'Archive package' makepkg-mingw --noconfirm --noprogressbar -R +gblock 'List artifacts' ls -la +gblock 'Install package' pacman --noconfirm -U "mingw-w64-${TARBALL_ARCH}-ghdl-${TARGET}-ci"-*-any.pkg.tar.zst |