From 75e7bb9c72d562d397f9fb62072ab114cfbc6244 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 6 Mar 2022 15:21:10 +0000 Subject: fixed python compilation for js78 --- repo/devel/clang.xibuild | 12 ++++++++---- repo/devel/llvm.xibuild | 39 +++++++++++++++++++++++++++------------ repo/devel/rustc.xibuild | 18 +++++++++--------- repo/python/python-mach.xibuild | 16 ++++++++++++++++ repo/python/python.xibuild | 2 +- repo/system/js78.xibuild | 16 +++++++++------- repo/system/sqlite3.xibuild | 26 ++++++++++++++++++++++++++ 7 files changed, 96 insertions(+), 33 deletions(-) create mode 100644 repo/python/python-mach.xibuild create mode 100644 repo/system/sqlite3.xibuild (limited to 'repo') diff --git a/repo/devel/clang.xibuild b/repo/devel/clang.xibuild index fa4430f..c729c9a 100644 --- a/repo/devel/clang.xibuild +++ b/repo/devel/clang.xibuild @@ -14,6 +14,11 @@ ADDITIONAL=" prepare () { apply_patches + + # link in /usr/inlcude/llvm to include + ln -s /usr/include/llvm include/llvm + # (there should be a better way to do this, since tblgen does look in /include rather than /usr/include) + } build () { @@ -30,7 +35,7 @@ build () { -DCMAKE_EXE_LINKER_FLAGS_RELEASE_INIT="$LDFLAGS -Wl,-z,stack-size=2097152" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ - -DCLANG_VENDOR=Alpine \ + -DCLANG_VENDOR=XiLinux \ -DLLVM_EXTERNAL_LIT=/usr/bin/lit \ -DCLANG_BUILD_EXAMPLES=OFF \ -DCLANG_INCLUDE_DOCS=ON \ @@ -44,11 +49,10 @@ build () { -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON - ninja clang-tblgen + ninja clang-tblgen ninja } package () { - DESTDIR=$PKG_DEST ninja -C build install - install -m 644 build/lib/libclang.a $PKG_DEST/usr/lib + DESTDIR=$PKG_DEST ninja install } diff --git a/repo/devel/llvm.xibuild b/repo/devel/llvm.xibuild index aa18732..82496a4 100644 --- a/repo/devel/llvm.xibuild +++ b/repo/devel/llvm.xibuild @@ -16,18 +16,27 @@ build () { cd build CC=gcc CXX=g++ \ cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DLLVM_ENABLE_FFI=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_BUILD_LLVM_DYLIB=ON \ - -DLLVM_LINK_LLVM_DYLIB=ON \ - -DLLVM_ENABLE_RTTI=ON \ - -DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \ - -DLLVM_BUILD_TESTS=ON \ - -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_ENABLE_SPHINX=ON \ - -DLLVM_ENABLE_TERMINFO=ON \ - -DLLVM_BINUTILS_INCDIR=/usr/include \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLLVM_BINUTILS_INCDIR=/usr/include \ + -DLLVM_BUILD_DOCS=OFF \ + -DLLVM_BUILD_EXAMPLES=OFF \ + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_BUILD_TESTS=ON \ + -DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-linux-musl" \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_FFI=ON \ + -DLLVM_ENABLE_LIBCXX=OFF \ + -DLLVM_ENABLE_PIC=ON \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_ENABLE_SPHINX=OFF \ + -DLLVM_ENABLE_TERMINFO=ON \ + -DLLVM_ENABLE_ZLIB=ON \ + -DLLVM_HOST_TRIPLE="x86_64-linux-musl" \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_APPEND_VC_REV=OFF \ -Wno-dev -G Ninja .. && ninja llvm-tblgen && ninja && @@ -42,4 +51,10 @@ package () { cd build python3 ../utils/lit/setup.py install --prefix=/usr --root=$PKG_DEST + mkdir $PKG_DEST/usr/bin + for path in bin/*; do + name=${path##*/} + ln -s ../lib/llvm/bin/$name $PKG_DEST/usr/bin/$name + done + } diff --git a/repo/devel/rustc.xibuild b/repo/devel/rustc.xibuild index 1e4df28..9667aa3 100644 --- a/repo/devel/rustc.xibuild +++ b/repo/devel/rustc.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="cmake llvm" +MAKEDEPS="cmake llvm clang" DEPS="curl gcc libssh2 openssl" PKG_VER=1.58.1 @@ -54,16 +54,16 @@ build () { --set="target.$target.llvm-config=/usr/bin/llvm-config" \ --set="target.$target.musl-root=/usr" \ --set="target.$target.crt-static=false" \ - --set="target.$target.cc=gcc" \ - --set="target.$target.cxx=c++" \ - --set="target.$target.ar=ar" \ - --set="target.$target.linker=gcc" \ + --set="target.$target.cc=clang" \ + --set="target.$target.cxx=clang++" \ + --set="target.$target.ar=llvm-ar" \ + --set="target.$target.linker=clang" \ --set="target.$build.musl-root=/usr" \ --set="target.$build.crt-static=false" \ - --set="target.$build.cc=gcc" \ - --set="target.$build.cxx=c++" \ - --set="target.$build.ar=ar" \ - --set="target.$build.linker=gcc" + --set="target.$build.cc=clang" \ + --set="target.$build.cxx=clang++" \ + --set="target.$build.ar=llvm-ar" \ + --set="target.$build.linker=clang" python ./x.py dist --jobs $JOBS diff --git a/repo/python/python-mach.xibuild b/repo/python/python-mach.xibuild new file mode 100644 index 0000000..c838687 --- /dev/null +++ b/repo/python/python-mach.xibuild @@ -0,0 +1,16 @@ +#!/bin/sh + +MAKEDEPS="python" +DEPS="" + +PKG_VER=1.0.0 +SOURCE=https://files.pythonhosted.org/packages/4b/88/d4def370b1ba6127ab936d4cb368ef3f00b500309ae90fb31132861fb872/mach-$PKG_VER.tar.gz +DESC="Generic command line command dispatching framework." + +build() { + python setup.py build +} + +package () { + python setup.py install --root="$PKG_DEST" --optimize=1 +} diff --git a/repo/python/python.xibuild b/repo/python/python.xibuild index 4cc8ddd..91e0d9e 100644 --- a/repo/python/python.xibuild +++ b/repo/python/python.xibuild @@ -1,7 +1,7 @@ #!/bin/sh -MAKEDEPS="make autoconf automake autoconf-archive" +MAKEDEPS="make autoconf automake autoconf-archive sqlite" DEPS="bzip2 expat gdbm libffi libnsl libxcrypt openssl zlib grep" PKG_VER=3.10.2 diff --git a/repo/system/js78.xibuild b/repo/system/js78.xibuild index 39eb45c..26716d9 100644 --- a/repo/system/js78.xibuild +++ b/repo/system/js78.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="gcc autoconf2-13 icu rustc zlib which zip clang llvm patch make" +MAKEDEPS="gcc autoconf2-13 icu rustc zlib which zip clang llvm patch make python-six python-mach" DEPS="readline nspr bash zlib" PKG_VER=78.15.0 @@ -18,9 +18,6 @@ prepare () { apply_patches export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576" - - autoreconf -fi - mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm export PATH=/opt/rustc/bin:$PATH export LD_LIBRARY_PATH=/opt/rustc/lib:$LD_LIBRARY_PATH @@ -28,12 +25,11 @@ prepare () { } build () { - mkdir build && - cd build && + mkdir build + cd build SHELL=/bin/bash PYTHON=/usr/bin/python3 \ ../js/src/configure --prefix=/usr \ - --with-clang-path=/usr/bin/clang \ --with-intl-api \ --with-libclang-path=/usr/lib \ --with-system-icu \ @@ -54,7 +50,13 @@ build () { make -j1 +} +check () { + dist/bin/jsapi-tests \ + --format=none \ + --exclude-random \ + basic } package () { diff --git a/repo/system/sqlite3.xibuild b/repo/system/sqlite3.xibuild new file mode 100644 index 0000000..12f7210 --- /dev/null +++ b/repo/system/sqlite3.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +MAKEDEPS="make" +DEPS="libedit" + +PKG_VER=3370200 +SOURCE=https://sqlite.org/2022/sqlite-autoconf-$PKG_VER.tar.gz +DESC="Small suite of programs for UNIX, designed to allow process supervision" + +build () { + ./configure --prefix=/usr \ + --disable-static \ + --enable-fts5 \ + CPPFLAGS="-DSQLITE_ENABLE_FTS3=1 \ + -DSQLITE_ENABLE_FTS4=1 \ + -DSQLITE_ENABLE_COLUMN_METADATA=1 \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \ + -DSQLITE_ENABLE_DBSTAT_VTAB=1 \ + -DSQLITE_SECURE_DELETE=1 \ + -DSQLITE_ENABLE_FTS3_TOKENIZER=1" && + make +} + +package () { + make DESTDIR=$PKG_DEST install +} -- cgit v1.2.1