Browse Source

ldc: update to 1.6 release (#1893)

android-5
joakim-noah 7 years ago
committed by Fredrik Fornwall
parent
commit
4ca52245df
  1. 20
      packages/ldc/build.sh
  2. 22
      packages/ldc/ldc-disable-idgen.patch

20
packages/ldc/build.sh

@ -1,9 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://github.com/ldc-developers/ldc TERMUX_PKG_HOMEPAGE=https://github.com/ldc-developers/ldc
TERMUX_PKG_DESCRIPTION="D programming language compiler, built with LLVM" TERMUX_PKG_DESCRIPTION="D programming language compiler, built with LLVM"
_PKG_MAJOR_VERSION=1.5 _PKG_MAJOR_VERSION=1.6
TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0 TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0
TERMUX_PKG_SRCURL=https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc-${TERMUX_PKG_VERSION}-src.tar.gz TERMUX_PKG_SRCURL=https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc-${TERMUX_PKG_VERSION}-src.tar.gz
TERMUX_PKG_SHA256=03659a4b9cafff0cf8d537469dd15579f097c7748a342ea2a5770fa0edd3a084 TERMUX_PKG_SHA256=bec1821b170e4b3f0b071f3fea357172ad90c7a45d64f7542f7843ac4de6a763
TERMUX_PKG_DEPENDS="clang" TERMUX_PKG_DEPENDS="clang"
TERMUX_PKG_HOSTBUILD=true TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_BLACKLISTED_ARCHES="aarch64,i686,x86_64" TERMUX_PKG_BLACKLISTED_ARCHES="aarch64,i686,x86_64"
@ -30,25 +30,25 @@ termux_step_post_extract_package () {
tar xf $TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz tar xf $TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz
mv llvm-${LLVM_SRC_VERSION}.src llvm mv llvm-${LLVM_SRC_VERSION}.src llvm
DMD_COMPILER_VERSION=2.076.1 DMD_COMPILER_VERSION=2.077.1
termux_download \ termux_download \
http://downloads.dlang.org/releases/2.x/${DMD_COMPILER_VERSION}/dmd.${DMD_COMPILER_VERSION}.linux.tar.xz \ http://downloads.dlang.org/releases/2.x/${DMD_COMPILER_VERSION}/dmd.${DMD_COMPILER_VERSION}.linux.tar.xz \
$TERMUX_PKG_CACHEDIR/dmd.${DMD_COMPILER_VERSION}.linux.tar.xz \ $TERMUX_PKG_CACHEDIR/dmd.${DMD_COMPILER_VERSION}.linux.tar.xz \
1d0b8fb6aadc80f6c5dfe7acf46fc17d2b3de24a0bf46e947352094bb21fef04 075882fab8d3602d58148fa51500759819327ab42519c9a75f1b922c8afad423
termux_download \ termux_download \
https://github.com/dlang/tools/archive/v${DMD_COMPILER_VERSION}.tar.gz \ https://github.com/dlang/tools/archive/v${DMD_COMPILER_VERSION}.tar.gz \
$TERMUX_PKG_CACHEDIR/tools-v${DMD_COMPILER_VERSION}.tar.gz \ $TERMUX_PKG_CACHEDIR/tools-v${DMD_COMPILER_VERSION}.tar.gz \
cf42d4e5f9ceb5acfb5bd3000dd9c1ed7120b136f252b33b07fb026f36970e77 07d7cfe05344354ab2c6c298d89915998acd2c209ca4165d1f3f9a9dc7191c31
tar xf $TERMUX_PKG_CACHEDIR/tools-v${DMD_COMPILER_VERSION}.tar.gz tar xf $TERMUX_PKG_CACHEDIR/tools-v${DMD_COMPILER_VERSION}.tar.gz
mv tools-${DMD_COMPILER_VERSION} rdmd mv tools-${DMD_COMPILER_VERSION} rdmd
local DUB_VERSION=1.5.0 local DUB_VERSION=1.6.0
termux_download \ termux_download \
https://github.com/dlang/dub/archive/v${DUB_VERSION}.tar.gz \ https://github.com/dlang/dub/archive/v${DUB_VERSION}.tar.gz \
$TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz \ $TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz \
3509f959cc5b34e44adaae586b62ded387ac10031f6c1aaf1cfbb4aae5af37dd 4b6a13232deeed60b262fcad95e8d45449e6407308f2962b08b3d9ecbcb80126
tar xf $TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz tar xf $TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz
mv dub-${DUB_VERSION} dub mv dub-${DUB_VERSION} dub
@ -77,7 +77,7 @@ termux_step_host_build () {
termux_setup_ninja termux_setup_ninja
cmake -GNinja $TERMUX_PKG_SRCDIR/llvm \ cmake -GNinja $TERMUX_PKG_SRCDIR/llvm \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD=ARM \ -DLLVM_TARGETS_TO_BUILD="ARM;X86" \
-DLLVM_DEFAULT_TARGET_TRIPLE=armv7-none-linux-android \ -DLLVM_DEFAULT_TARGET_TRIPLE=armv7-none-linux-android \
-DLLVM_BUILD_TOOLS=OFF \ -DLLVM_BUILD_TOOLS=OFF \
-DLLVM_BUILD_UTILS=OFF -DLLVM_BUILD_UTILS=OFF
@ -123,11 +123,7 @@ termux_step_post_configure () {
mv llvm-config llvm/bin mv llvm-config llvm/bin
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DLLVM_CONFIG=$TERMUX_PKG_BUILDDIR/llvm/bin/llvm-config" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DLLVM_CONFIG=$TERMUX_PKG_BUILDDIR/llvm/bin/llvm-config"
export DMD="$TERMUX_PKG_HOSTBUILD_DIR/ldc-bootstrap/bin/ldmd2" export DMD="$TERMUX_PKG_HOSTBUILD_DIR/ldc-bootstrap/bin/ldmd2"
termux_step_configure_cmake termux_step_configure_cmake
cp $TERMUX_PKG_HOSTBUILD_DIR/ldc-bootstrap/ddmd/id.d $TERMUX_PKG_BUILDDIR/ddmd
cp $TERMUX_PKG_HOSTBUILD_DIR/ldc-bootstrap/ddmd/id.h $TERMUX_PKG_BUILDDIR/ddmd
} }
termux_step_make () { termux_step_make () {

22
packages/ldc/ldc-disable-idgen.patch

@ -1,22 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c89cb228..cc507c22 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -269,7 +269,7 @@ endmacro()
#
# Build idgen.
#
-build_idgen(${DDMDFE_PATH}/idgen.d ${PROJECT_BINARY_DIR}/idgen${CMAKE_EXECUTABLE_SUFFIX} ${DDMD_DFLAGS} "" "")
+#build_idgen(${DDMDFE_PATH}/idgen.d ${PROJECT_BINARY_DIR}/idgen${CMAKE_EXECUTABLE_SUFFIX} ${DDMD_DFLAGS} "" "")
# Run idgen.
add_custom_command(
OUTPUT
@@ -277,7 +277,7 @@ add_custom_command(
${PROJECT_BINARY_DIR}/${DDMDFE_PATH}/id.h
COMMAND ${PROJECT_BINARY_DIR}/idgen #provide full path to avoid clash with idgen on path
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
- DEPENDS ${PROJECT_BINARY_DIR}/idgen${CMAKE_EXECUTABLE_SUFFIX}
+ # DEPENDS ${PROJECT_BINARY_DIR}/idgen${CMAKE_EXECUTABLE_SUFFIX}
)
set(LDC_CXX_GENERATED
${PROJECT_BINARY_DIR}/${DDMDFE_PATH}/id.h
Loading…
Cancel
Save