Files
2025-11-15 09:12:58 +03:00

61 lines
2.4 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import pythonmodules
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
WorkDir = "rustc-%s-src" %get.srcVERSION()
### ÖNEMLİ NOT: ###
#LLVM yükseltmelerinden sonra, ilk aşama olarak rust, manuel indirdiğimiz binary rust paketi ile derlenecek. Bu birinci aşama olacak.
#İkinci aşamada ise derlediğimiz bu rust ile rust tekrar derlenecek.
#İkinci aşamada aşağıdaki satırlar yoruma çevrilecek.
### IMPORTANT NOTE ###
#After upgrading LLVM, rust will be built via manually downloaded binary rust distro. This will be phase 1.
#At phase 2, rust will be built again with this newly built rust.
#Before phase 2, the lines below will be commented out.
# Farklı sürüm ile derlenmek isterse aç kendi sürümünü kapat
# RustBinDir = "rust-1.89.0-x86_64-unknown-linux-gnu"
# Kendi sürümü ile derleme
# RustBinDir = "rust-%s-x86_64-unknown-linux-gnu" %get.srcVERSION()
# RustcDir = "%s/rustbin" %get.workDIR()
#################################################################
def build():
#İkinci aşamada bu satırlar da yoruma çevrilecek.
#At phase 2, these lines also will be commented out.
# shelltools.cd(RustBinDir)
# shelltools.system("./install.sh --prefix=%s" %RustcDir)
# shelltools.cd("..")
# pisitools.dosed("config.toml", "/usr/bin/cargo", RustcDir+"/bin/cargo")
# pisitools.dosed("config.toml", "/usr/bin/rustc", RustcDir+"/bin/rustc")
####################################################
shelltools.export("LC_ALL", "en_US.UTF-8")
shelltools.export("RUST_BACKTRACE", "1")
shelltools.system("python3 ./x.py build")
def install():
# shelltools.export("RUST_BACKTRACE", "1")
shelltools.system("DESTDIR=%s python3 ./x.py install" % get.installDIR())
# pisitools.remove("/usr/bin/*.old")
#pisitools.insinto("/", "build/x86_64-unknown-linux-gnu/stage0/etc")
#pisitools.insinto("/usr", "build/x86_64-unknown-linux-gnu/stage0/bin")
#pisitools.insinto("/usr", "build/x86_64-unknown-linux-gnu/stage0/lib")
#pisitools.insinto("/usr", "build/x86_64-unknown-linux-gnu/stage0/share")
#pisitools.insinto("/usr", "build/x86_64-unknown-linux-gnu/stage0/manifest.in")
#pisitools.dodoc("LICENSE","AUTHORS","README*")