Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Upgrade patchelf.
Browse files Browse the repository at this point in the history
The 0.6 version caused segfaults on the Raspberry Pi, so this fixes
it.
  • Loading branch information
renpytom committed Jun 25, 2017
1 parent 4361ea9 commit d831223
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ if [ $PLATFORM != "windows" ] ; then
fi

if [ $PLATFORM = "linux" -a \! -e built.patchelf ]; then
try tar xzf "$SOURCE/patchelf-0.6.tar.gz"
try cd "$BUILD/patchelf-0.6"
try tar xzf "$SOURCE/patchelf-0.9.tar.gz"
try cd "$BUILD/patchelf-0.9"

try "./configure" --prefix="$INSTALL"
try make
Expand Down
13 changes: 6 additions & 7 deletions build_pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ if [ ! -e build/built.pi_deps ]; then
touch build/built.pi_deps
fi


# Source in the built environment.

. env.sh
Expand Down Expand Up @@ -104,9 +103,9 @@ chmod +x pi_renpy.sh

# Build distro.

# pushd "$ROOT/renpy-deps/renpython"
# python -O build.py linux-`arch` "$ROOT/renpy" renpy.py
# popd
#
# rm -Rf renpy/lib
# cp -a renpy/build/linux-armv7l/lib renpy
pushd "$ROOT/renpy-deps/renpython"
python -O build.py linux-`arch` "$ROOT/renpy" renpy.py
popd

rm -Rf renpy/lib
cp -a renpy/build/linux-armv7l/lib renpy
21 changes: 10 additions & 11 deletions renpython/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"win32com",
]


def print_analysis(a):

for i in [ 'scripts', 'pure', 'binaries', 'zipfiles', 'datas', 'dependencies' ]:
Expand All @@ -75,13 +76,15 @@ def print_analysis(a):
for j in sorted(getattr(a, i)):
print " ", j


FILE_EXCLUDES = [
"D3DCOMPILER*.dll",
"d3dx9_*.dll",
"gdiplus.dll",
"pywintypes*.dll",
]


def renpy_filter(name, path, kind):

if path.startswith("/usr"):
Expand All @@ -100,6 +103,7 @@ def renpy_filter(name, path, kind):

return True


def editra_filter(name, path, kind):

if path.startswith("/usr"):
Expand All @@ -121,10 +125,11 @@ def editra_filter(name, path, kind):

return True


file_filter = renpy_filter

class Build(object):

class Build(object):

def __init__(self, platform, renpy, tmpdir):

Expand Down Expand Up @@ -172,11 +177,10 @@ def analyze(self, base, script):

print sys.path


self.analysis = Analysis([ script ],
hookspath=[ os.path.join(ROOT, "hooks") ],
hiddenimports=[ 'site' ],
excludes=EXCLUDES)
hookspath=[ os.path.join(ROOT, "hooks") ],
hiddenimports=[ 'site' ],
excludes=EXCLUDES)

def files(self):

Expand Down Expand Up @@ -208,7 +212,6 @@ def copy_file(self, src, dst):
shutil.copyfile(src, dst)
shutil.copystat(src, dst)


def copy_tree(self, src, dst):
if os.path.isdir(src):
os.mkdir(dst)
Expand Down Expand Up @@ -257,7 +260,6 @@ def process(self, name, path, kind):
else:
self.copy_binary(name, path)


def patchelf(self):

def patchfn(fn, origin):
Expand Down Expand Up @@ -392,7 +394,6 @@ def patchfn(fn):
for fn in os.listdir(self.platlib):
patchfn(os.path.join(self.platlib, fn))


def python(self, command):

def copy_python(src, dest):
Expand All @@ -412,7 +413,6 @@ def copy_python(src, dest):
copy_python(os.path.join(exedir, "zsync"), "zsync")
copy_python(os.path.join(exedir, "zsyncmake"), "zsyncmake")


def move_pure(self):
"""
Moves pure-python code from platpy to purepy.
Expand All @@ -432,7 +432,6 @@ def ispure(fn):
return True
return False


for _directory, _directories, files in os.walk(fn):
for i in files:
if not ispure(i):
Expand Down Expand Up @@ -469,6 +468,7 @@ def finish(self):
if self.workdir != self.targetdir:
self.copy_tree(self.workdir, self.targetdir)


if __name__ == "__main__":

ap = argparse.ArgumentParser()
Expand Down Expand Up @@ -511,4 +511,3 @@ def finish(self):

b.make_dynload()
b.finish()

Binary file removed source/patchelf-0.6.tar.gz
Binary file not shown.
Binary file added source/patchelf-0.9.tar.gz
Binary file not shown.

0 comments on commit d831223

Please sign in to comment.