Update AppImage build system (include gavl and ruby)

parent f5c88b4a
......@@ -106,7 +106,9 @@ add_subdirectory( ext_cairo )
add_subdirectory( ext_pango )
add_subdirectory( ext_gdkpixbuf )
add_subdirectory( ext_gtk+ )
add_subdirectory( ext_gavl )
add_subdirectory( ext_frei0r )
add_subdirectory( ext_vidstab )
add_subdirectory( ext_mlt )
add_subdirectory( ext_ruby )
add_subdirectory( ext_kdenlive )
ExternalProject_Add(ext_gavl
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://downloads.sourceforge.net/project/gmerlin/gavl/1.4.0/gavl-1.4.0.tar.gz
URL_MD5 2752013a817fbc43ddf13552215ec2c0
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST} ${AT_SHARED_ONLY} --without-doxygen
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
ExternalProject_Add(
ext_ruby
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.gz
URL_MD5 4e6b030af3897b811059e1289fc75b31
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST} ${AT_SHARED_ONLY}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
......@@ -31,8 +31,8 @@ export KDENLIVE_SOURCES=$2
export LC_ALL=en_US.UTF-8
export LANG=en_us.UTF-8
export CC=/usr/bin/gcc-6
export CXX=/usr/bin/g++-6
#export CC=/usr/bin/gcc-6
#export CXX=/usr/bin/g++-6
# We want to use $prefix/deps/usr/ for all our dependencies
export DEPS_INSTALL_PREFIX=$BUILD_PREFIX/deps/usr
......@@ -105,13 +105,13 @@ cmake --build . --target ext_x264
cmake --build . --target ext_x265
# libvpx does not compile with this gcc6 version
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
#export CC=/usr/bin/gcc
#export CXX=/usr/bin/g++
cmake --build . --target ext_libvpx
export CC=/usr/bin/gcc-6
export CXX=/usr/bin/g++-6
#export CC=/usr/bin/gcc-6
#export CXX=/usr/bin/g++-6
cmake --build . --target ext_ffmpeg
cmake --build . --target ext_sox
......@@ -122,6 +122,7 @@ cmake --build . --target ext_harfbuzz
cmake --build . --target ext_pango
cmake --build . --target ext_gdkpixbuf
cmake --build . --target ext_gtk+
cmake --build . --target ext_gavl
cmake --build . --target ext_frei0r
cmake --build . --target ext_vidstab
cmake --build . --target ext_mlt
......@@ -135,3 +136,4 @@ cmake --build . --target ext_kdeclarative
cmake --build . --target ext_breezeicons
cmake --build . --target ext_kcrash
cmake --build . --target ext_breeze
cmake --build . --target ext_ruby
......@@ -41,13 +41,7 @@ cd $BUILD_PREFIX
# Now we can get the process started!
#
# Step 0: place the translations where ki18n and Qt look for them
if [ -d $APPDIR/usr/share/locale ] ; then
mv $APPDIR/usr/share/locale $APPDIR/usr/share/kdenlive
fi
# Step 1: Copy over all the resources provided by dependencies that we need
cp -r $DEPS_INSTALL_PREFIX/share/locale $APPDIR/usr/share/kdenlive
cp -r $DEPS_INSTALL_PREFIX/share/kf5 $APPDIR/usr/share
cp -r $DEPS_INSTALL_PREFIX/share/mime $APPDIR/usr/share
......@@ -122,7 +116,9 @@ linuxdeployqt $APPDIR/usr/share/applications/org.kde.kdenlive.desktop \
# -appimage \
rm $APPDIR/usr/lib/libGL.so.1
rm $APPDIR/usr/lib/libGL.so.1 || true
rm $APPDIR/usr/lib/libasound.so.2 || true
# libxcb should be removed
rm $APPDIR/usr/lib/libxcb*
......@@ -164,7 +160,8 @@ KDENLIVE_VERSION=$(grep "KDENLIVE_VERSION" config-kdenlive.h | cut -d '"' -f 2)
# Also find out the revision of Git we built
# Then use that to generate a combined name we'll distribute
cd $KDENLIVE_SOURCES
#cd $KDENLIVE_SOURCES
cd $BUILD_PREFIX/deps-build/ext_kdenlive/ext_kdenlive-prefix/src/ext_kdenlive/
if [[ -d .git ]]; then
GIT_REVISION=$(git rev-parse --short HEAD)
VERSION=$KDENLIVE_VERSION-$GIT_REVISION
......
......@@ -26,9 +26,12 @@ mkdir -p $APPDIR/usr/bin
export DEPS_INSTALL_PREFIX=$BUILD_PREFIX/deps/usr/
export DOWNLOADS_DIR=$BUILD_PREFIX/downloads/
# Copy existing translations
cp -r $DEPS_INSTALL_PREFIX/share/locale $APPDIR/usr/share/
# Use newer gcc
export CC=/usr/bin/gcc-6
export CXX=/usr/bin/g++-6
#export CC=/usr/bin/gcc-6
#export CXX=/usr/bin/g++-6
# Setup variables needed to help everything find what we build
......@@ -58,6 +61,16 @@ mkdir -p $BUILD_PREFIX/kdenlive.appdir/usr
# Configure the dependencies for building
cmake $KDENLIVE_SOURCES/packaging/appimage/3rdparty -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX/kdenlive.appdir/usr/ -DEXT_INSTALL_DIR=$DEPS_INSTALL_PREFIX -DEXT_DOWNLOAD_DIR=$DOWNLOADS_DIR -DKDENLIVE_INSTALL_DIR=$BUILD_PREFIX/kdenlive.appdir/usr/
#download translations
#mkdir -p $BUILD_PREFIX/deps-build/ext_kdenlive/ext_kdenlive-prefix/src/ext_kdenlive-build/
#cp $KDENLIVE_SOURCES/packaging/appimage/fetch_l10n_po.rb $BUILD_PREFIX/deps-build/ext_kdenlive/ext_kdenlive-prefix/src/ext_kdenlive-build/
#cp $KDENLIVE_SOURCES/packaging/appimage/subdirs $BUILD_PREFIX/deps-build/ext_kdenlive/ext_kdenlive-prefix/src/ext_kdenlive-build/
#cd $BUILD_PREFIX/deps-build/ext_kdenlive/ext_kdenlive-prefix/src/ext_kdenlive-build/
#ruby fetch_l10n_po.rb --enable-kdenlive
#cd $BUILD_PREFIX/deps-build/
cmake --build . --target ext_kdenlive
# Now switch to it
......
#!/usr/bin/env ruby
#
# Ruby script for pulling l10n application translations for kdenlive
# Requires ruby version >= 1.9
#
# Copyright (c) 2005, Mark Kretschmann, <kretschmann at kde dot org>
# Copyright (c) 2014, Nicolas Lécureuil, <kde at nicolaslecureuil dot fr>
# Copyright (c) 2010-2018, Gilles Caulier, <caulier dot gilles at gmail dot com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
require 'rbconfig'
isWindows = RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/i
STDOUT.sync = true
branch = "trunk"
tag = ""
enable_kdenlive = false
for opt in $*
case opt
when "--enable-kdenlive"
enable_kdenlive = true
else
puts("Unknown option '#{opt}'.\n")
puts("Possible arguments to customize i18n extraction:\n")
puts("--enable-kdenlive\n")
exit
end
end
print ("extract kdenlive i18n : #{enable_kdenlive}\n")
i18nlangs = []
if isWindows
i18nlangs = `type .\\project\\release\\subdirs`
else
i18nlangs = `cat subdirs`
end
##########################################################################################
# EXTRACT TRANSLATED APPLICATION FILES
if !(File.exists?("po") && File.directory?("po"))
Dir.mkdir( "po" )
end
Dir.chdir( "po" )
topmakefile = File.new( "CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
i18nlangs.each_line do |lang|
lang.chomp!()
if (lang != nil && lang != "")
print ("#{lang} ")
if !(File.exists?(lang) && File.directory?(lang))
Dir.mkdir(lang)
end
Dir.chdir(lang)
makefile = File.new( "CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
makefile << "file(GLOB _po_files *.po)\n"
makefile << "GETTEXT_PROCESS_PO_FILES( #{lang} ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} )\n"
makefile.close()
if (enable_kdenlive == true)
# kdenlive
for part in ['kdenlive']
if isWindows
`svn cat svn://anonsvn.kde.org/home/kde/#{branch}/l10n-kf5/#{lang}/messages/kdemultimedia/#{part}.po > #{part}.po`
else
`svn cat svn://anonsvn.kde.org/home/kde/#{branch}/l10n-kf5/#{lang}/messages/kdemultimedia/#{part}.po 2> /dev/null | tee #{part}.po `
end
if FileTest.size( "#{part}.po" ) == 0
File.delete( "#{part}.po" )
end
end
end
Dir.chdir("..")
topmakefile << "add_subdirectory( #{lang} )\n"
end
end
topmakefile.close()
puts ("\n")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment