DeadSix27/python_cross_compile_script

forked, and a range of suggestions for you to consider or lose at your pleasure

Closed this issue · 4 comments

Hello. I have just forked your repository and perhaps tomorrow will submit a pull request with a range of suggestions for you to consider or lose at your pleasure. eg

1. meson/ninja processing added
it relies on a range of settings to be false and 'is_meson_ninja' to be true
use meson/ninja like this below to omit "configure/make" processing and instead perform "meson/ninja" processing

'repo_type' : 'git',
'url' : 'https://code.videolan.org/videolan/dav1d.git',
'folder_name' : 'libdav1d_git',
'needs_configure' : False,
'clean_post_configure' : False,
'needs_make' : False,
'needs_make_install' : False,
'is_cmake' : False,
'is_meson_ninja' : True,
'source_subfolder' : 'build',
'create_meson_environment_file' : '{current_path}/meson_environment_ubuntu_mingw64_for_windows_x86_64.txt',
'meson_options' : '--prefix={target_prefix} --libdir={target_prefix}/lib --default-library=static --buildtype=plain --backend=ninja --buildtype=release --cross-file={current_path}/meson_environment_ubuntu_mingw64_for_windows_x86_64.txt ./ ../',
'run_post_meson' : [
	'cat {current_path}/meson_environment_ubuntu_mingw64_for_windows_x86_64.txt',
],
'ninja_options' : 'install',
'run_post_ninja' : [
	'chmod +777 {target_prefix}/lib/libdav1d.a',
	'chmod +777 {target_prefix}/lib/pkgconfig/dav1d.pc',
],

2. Added libdav1d into ffmpeg and build dav1d.exe

3. A range of minor suggestions for a range of dependencies, based on your code, jb's code and Alexpux's patches

At least threehard coded patch-link needs to be modified to be linked into your tree's repository instead of the fork.
https://raw.githubusercontent.com/hydra3333/python_cross_compile_script/master/patches/glib2/disable_libmount-make-UTF-yes.patch
https://raw.githubusercontent.com/hydra3333/python_cross_compile_script/master/patches/opusfile-from-Alexpux/no-openssl-wincert.patch
https://raw.githubusercontent.com/hydra3333/python_cross_compile_script/master/patches/libressl-from-Alexpux/libressl-0001-ignore-compiling-test-and-man-module.patch
And anything beginning with
https://raw.githubusercontent.com/Alexpux/
perhaps could(should) be copied into your tree's repository and the hard coded patch-link needs to be modified to be linked into your tree's repository

4. these are the things I try to install to get it to run (the 2 meson/ninja lines ar at the end)

sudo apt-get install -y python python-pip
sudo apt-get install -y python3 python3-pip
sudo apt-get install -y cython cython3
sudo pip  install progressbar2
sudo pip3 install progressbar2
sudo pip3 install py2exe
pip  install progressbar2
pip3 install progressbar2
pip3 install py2exe
sudo apt-get install -y texinfo yasm git make automake gcc gcc-c++ pax cvs svn flex bison patch libtoolize hg cmake gettext-autopoint
sudo apt-get install -y libxslt rake
sudo apt-get install -y gperf gyp p7zip docbook-to-man docbook2x pando p7zip
sudo apt-get install -y build-essential autoconf libtool-bin libtool gettext autopoint gyp gperf autogen bzip2 pandoc 
sudo apt-get install -y subversion curl texinfo g++ bison flex cvs yasm automake ed gcc cmake git make pkg-config mercurial unzip pax wget ant
sudo apt-get install -y git-remote-hg libxslt1.1 libxml2 rake docbook-utils docbook-style-xsl docbook-xsl docbook-to-man docbook2x p7zip p7zip-full
sudo apt-get install -y xsltproc itstool autoconf-archive
#sudo apt-get remove -y nasm
sudo apt-get remove -y doxygen
# gendef is installed with mingw
sudo apt-get install -y libmozjs-dev libxmu-dev libgconf2-dev libdbus-1-dev network-manager-dev xserver-xorg-dev # for libproxy
sudo apt-get install -y zlib1g-dev #warning: you may need to install zlib development headers first if you want to build mp4-box on ubuntu
sudo apt-get install -y p7zip-full
sudo apt-get install -y autoconf-archive
sudo apt-get install -y meson
sudo apt-get install -y python3-distutils
#
sudo apt-get install -y docbook2x docbook-xsl
sudo apt-get install -y dbtoepub docbook-xsl-doc-html docbook-xsl-doc-pdf docbook-xsl-doc-text docbook-xsl-saxon fop libsaxon-java libxalan2-java libxslthl-java xalan
#
sudo apt-get install -y python3 python3-pip ninja-build
pip3 install --user meson

5. if you wanted to use the new nasm 2.14 instead of yasm (something requires nasm anyway IIRC?), this is what I run to build it beforehand and then change yasm to nasm in the script

set -x
if [[ ! -d "nasm-2.14" ]]; then
   echo "Downloading nasm 2.14"
   #url="https://github.com/hydra3333/h3333_python_cross_compile_script/blob/master/miscellaneous/nasm-2.14.tar.xz?raw=true"
   url="https://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.xz"
   rm -f "nasm-2.14.tar.xz"
   curl -4 -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Cache-Control: max-age=0' "$url" --retry 50 -L --output "nasm-2.14.tar.xz" --fail # -L means "allow redirection" or some odd :|
   tar -xf "nasm-2.14.tar.xz" || unzip "nasm-2.14.tar.xz"
   echo "Configuring nasm 2.14"
   cd nasm-2.14
      ./autogen.sh || exit 1
      ./configure --prefix=/usr --exec_prefix=/usr --enable-sections --enable-lto  || exit 1
      echo "Make nasm 2.14"
      make  || exit 1
      echo "Installing nasm 2.14"
      sudo make install  || exit 1 # sudo so it copies into /usr folder tree
   cd ..
   echo "Done Building and Installing nasm 2.14"
fi
set +x

goodness me !
libressl is now broken upstream, affecting a few things :( :( :(
back-tracking commits doesn't help. i may wait for a bit until that's resolved.

Ah.
libressl/portable#462 (comment)
backtracking libressl to release 2.8.2

@hydra3333 See: #82

You need to change a lot on your fork I worry.

:) Cool, thanks. I'll just remove and re-fork.