Commit 3003b26a authored by Thibault Saunier's avatar Thibault Saunier

Port to meson

Differential Revision: https://phabricator.freedesktop.org/D1153
parent 097fcbf7
......@@ -4,55 +4,17 @@
# PyCharm
.idea
# Generated by autogen.sh
# Generated by configure
mesonbuild/
Makefile
Makefile.in
bin/pitivi
aclocal.m4
autom4te.cache/
autoregen.sh
compile
config.guess
config.log
config.status
config.sub
configure
data/pitivi.desktop.in
depcomp
install-sh
libtool
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
missing
pitivi/configure.py
pitivi/coptimizations/.deps/
po/POTFILES
po/stamp-it
py-compile
*__pycache__*
# Generated by make
*.la
*.lo
*.o
data/pitivi.appdata.xml
data/pitivi.desktop
help/*/*.mo
help/*/*.page
# Don't ignore the English manual.
!help/C/*.page
help/*/*.stamp
locale/
pitivi/coptimizations/.libs/
po/*.gmo
po/.intltool-merge-cache
subprojects/gst-transcoder/
# Generated by make check
po/pitivi.pot
tests/samples/*.proxy.mkv
# Generated by make html
......@@ -62,13 +24,6 @@ help/index.cache
# Generated when running the project
*.pyc
# libpitivi
pitivi/libpitivi/.deps/*
pitivi/libpitivi/.libs/*
*.gir
*.typelib
prebuilt/
# xdg-app/flatpak
.bashrc
build/flatpak/.flatpak-builder
......@@ -76,4 +31,3 @@ build/flatpak/pitivi*.json
build/xdg-app/.xdg-app-builder/
build/xdg-app/pitivi-*.json
build/devel/
AUTOMAKE_OPTIONS = dist-bzip2
SUBDIRS = bin pitivi po tests data
ACLOCAL_AMFLAGS = -I m4
if BUILD_HELP
SUBDIRS += help
endif
mimedir = $(datadir)/mime/packages
mime_DATA = pitivi.xml
man_MANS = docs/pitivi.1
EXTRA_DIST = \
NEWS \
AUTHORS \
RELEASE \
pitivi.xml
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
EXTRA_DIST += \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
$(man_MANS)
# This rule allows running pitivi uninstalled
locale-uninstalled:
if test -d po && test -z "$(DESTDIR)"; then \
$(MAKE) -C po datadir=../$(top_builddir) install; \
fi
locale-uninstalled-clean:
@-rm -rf _trial_temp
@-rm -rf $(top_builddir)/locale
all-local: locale-uninstalled
clean-local: locale-uninstalled-clean
check-integration:
cd tests; make check-integration
#!/bin/sh
export PYTHON=python3
package=pitivi
# if no arguments specified then this will be printed
if test -z "$*"; then
echo "+ checking for autogen.sh options"
echo " This autogen script will automatically run ./configure as:"
echo " ./configure $@"
echo " To pass any additional options, please specify them on the $0"
echo " command line."
fi
autoreconf --force --install || exit 1
if test -n "$NOCONFIGURE"; then
echo "+ skipping configure stage for package $package, as requested."
echo "+ autogen.sh done."
exit 0
fi
echo "+ running configure ..."
echo "./configure $@"
./configure "$@" || exit 2
# install pre-commit hook for doing clean commits
rm -f .git/hooks/pre-commit
ln -s ../../pre-commit.hook .git/hooks/pre-commit
echo ""
which pre-commit > /dev/null
if [ $? -eq 0 ]; then
pre-commit install
else
echo "Please install pre-commit from http://pre-commit.com/ before proposing patches"
echo ""
fi
bin_SCRIPTS = \
pitivi
CLEANFILES = $(bin_SCRIPTS)
configure_file(input: 'pitivi.in',
output: 'pitivi',
configuration: cdata)
pitivi_bin = '@0@/pitivi'.format(meson.current_build_dir())
install_data(pitivi_bin, install_dir: get_option('bindir'))
# FIXME Work around to be able to run uninstalled
run_command('cp', pitivi_bin, meson.current_source_dir())
......@@ -16,7 +16,7 @@ export make="$FLATPAK_ENVPATH/pitivi/build/flatpak/pitivi-flatpak -b make"
export check="$FLATPAK_ENVPATH/pitivi/build/flatpak/pitivi-flatpak -b make check"
export minstall="$FLATPAK_ENVPATH/pitivi/build/flatpak/pitivi-flatpak -b make install"
export autogen="$FLATPAK_ENVPATH/pitivi/build/flatpak/pitivi-flatpak -b ./autogen.sh --prefix=/app --disable-gtk-doc"
export configure="$FLATPAK_ENVPATH/pitivi/build/flatpak/pitivi-flatpak -b ./configure --prefix=/app --disable-gtk-doc"
export configure="$FLATPAK_ENVPATH/pitivi/build/flatpak/pitivi-flatpak -b ./configure --prefix=/app"
alias make=$make
alias check=$check
......
......@@ -38,6 +38,7 @@ CONFIGURED_LD_LIBRARY_PATH = '@CONFIGURED_LD_LIBRARY_PATH@'
CONFIGURED_GST_PLUGIN_PATH = '@CONFIGURED_GST_PLUGIN_PATH@'
LIBDIR = '@LIBDIR@'
DATADIR = '@DATADIR@'
BUILDDIR = '@BUILDDIR@'
def _prepend_env_path(name, value):
......@@ -59,8 +60,8 @@ def _add_pitivi_path():
dir = os.path.dirname(os.path.abspath(__file__))
if _in_devel():
root = os.path.split(dir)[0]
sys.path.append(os.path.join(root, "pitivi", "coptimizations", ".libs"))
localedir = os.path.join(os.path.split(dir)[0], 'locale')
sys.path.append(BUILDDIR)
localedir = os.path.join(BUILDDIR, 'po')
else:
root = os.path.join(LIBDIR, 'pitivi', 'python')
localedir = os.path.join(DATADIR, "locale")
......
......@@ -373,7 +373,7 @@ then
if [ -z "$APP_INSTALLED" ] && [ -z "$USE_REMOTE" ]
then
cd $APPLICATION_REPOSITORY
$FLATPAK run --branch=$BRANCH -d --command="./autogen.sh" $APPLICATION_REF_NAME
$FLATPAK run --branch=$BRANCH -d --command="./configure" $APPLICATION_REF_NAME
$FLATPAK run --branch=$BRANCH -d --command="make" $APPLICATION_REF_NAME
fi
......@@ -414,7 +414,7 @@ then
if [ -z $BUNDLE ] || [ -n "$CHECK" ]
then
echo "-> Building $APPLICATION_NAME from current repository"
cd $APPLICATION_REPOSITORY && $FLATPAK build --env=PYTHON=python3 $PREFIX ./autogen.sh --prefix=/app || exit 1
cd $APPLICATION_REPOSITORY && $FLATPAK build --env=PYTHON=python3 $PREFIX ./configure --prefix=/app --libdir=lib || exit 1
$FLATPAK build --env=PYTHON=python3 $PREFIX make || exit 1
fi
fi
......
......@@ -219,7 +219,7 @@
"build-options" : {
"build-args": ["--share=network"]
},
"config-opts": ["--module=meson==0.29"],
"config-opts": ["--module=meson==0.32"],
"sources": [
{
"type": "file",
......@@ -333,23 +333,11 @@
}
]
},
{
"name": "gst-transcoder",
"config-opts": ["--libdir=lib"],
"sources": [
{
"type": "git",
"url": "https://github.com/pitivi/gst-transcoder.git"
},
{
"type": "file",
"path": "gst-transcoder-configure",
"dest-filename": "configure"
}
]
},
{
"name": "pitivi",
"build-options" : {
"build-args": ["--share=network"]
},
"sources": [
{
"type": "git",
......
#!/bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MESON=meson
command -v $MESON > /dev/null 2>&1
if [ $? != 0 ]
then
MESON=meson.py
command -v $MESON > /dev/null 2>&1
if [ $? != 0 ]
then
echo "You should install mesonbuild to build Pitivi: http://mesonbuild.com/"
echo "You can simply install it with:"
echo " $ sudo pip3 install meson"
exit 1
fi
fi
NINJA=ninja
command -v $NINJA > /dev/null 2>&1
if [ $? != 0 ]
then
NINJA=ninja-build
command -v $NINJA > /dev/null 2>&1
if [ $? != 0 ]
then
echo "You should install ninja-build to build pitivi: https://ninja-build.org/"
exit 1
fi
fi
# install pre-commit hook for doing clean commits
rm -f .git/hooks/pre-commit
ln -s ../../pre-commit.hook .git/hooks/pre-commit
echo ""
which pre-commit > /dev/null
if [ $? -eq 0 ]; then
pre-commit install
else
echo "Please install pre-commit from http://pre-commit.com/ before proposing patches"
echo ""
fi
BUILDDIR=mesonbuild
rm -Rf $BUILDDIR > /dev/null 2>&1
mkdir $BUILDDIR/ && cd $BUILDDIR && $MESON ../ $@
cat <<EOF > $DIR/Makefile
all:
cd $BUILDDIR && $NINJA
install:
cd $BUILDDIR && DESTDIR="\${DESTDIR}" $NINJA install
check:
cd $BUILDDIR && $NINJA test
clean:
rm -Rf $BUILDDIR
rm Makefile
EOF
m4_define([glib_req_version], [2.30.0])
m4_define([gstreamer_req_version], [1.6.0])
m4_define([gtk_req_version], [3.10.0])
AC_PREREQ(2.52)
dnl Note for packagers: see pitivi/check.py for the dependencies
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
AC_INIT(Pitivi, 0.96.0.1,
https://phabricator.freedesktop.org/tag/pitivi/,
pitivi)
dnl https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
LT_PREREQ([2.2.6])
LT_INIT()
dnl https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html
dnl "1.6" is the minimum automake version.
dnl "foreign" because we don't have an INSTALL file.
AM_INIT_AUTOMAKE([1.6 foreign])
dnl can autoconf find the source ?
AC_CONFIG_SRCDIR([pitivi/application.py])
AC_SUBST_FILE(AUTHORS)
AUTHORS=$srcdir/AUTHORS
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
AC_CONFIG_MACRO_DIR([m4])
AS_AC_EXPAND(LIBDIR, $libdir)
AS_AC_EXPAND(GITVERSION, m4_esyscmd_s([git describe --always]))
AC_MSG_NOTICE(Storing library files in $LIBDIR)
AS_AC_EXPAND(DATADIR, $datadir)
AC_MSG_NOTICE(Storing data files in $DATADIR)
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
AC_MSG_NOTICE(Storing configuration files in $SYSCONFDIR)
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
AC_MSG_NOTICE(Using localstatedir $LOCALSTATEDIR)
# python checks
# you can change the required python version bellow
AM_PATH_PYTHON([3])
AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
# - 'SO' for PyPy, CPython 2.7-3.2
# - 'EXT_SUFFIX' for CPython3.3+ (http://bugs.python.org/issue16754)
# - fallback to '.so'
PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; get = distutils.sysconfig.get_config_var; sys.stdout.write(get('EXT_SUFFIX') or get('SO') or '.so');"`
AC_SUBST(PYTHON_SO)
dnl ALL_LINGUAS="fr"
GETTEXT_PACKAGE="pitivi"
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
m4_ifdef([IT_PROG_INTLTOOL],
[IT_PROG_INTLTOOL([0.35.0])],
[AC_MSG_ERROR("The IT_PROG_INTLTOOL m4 macro is not available. Install intltool.")])
CONFIGURED_PYTHONPATH=$PYTHONPATH
AC_SUBST(CONFIGURED_PYTHONPATH)
CONFIGURED_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
AC_SUBST(CONFIGURED_LD_LIBRARY_PATH)
CONFIGURED_GST_PLUGIN_PATH=$GST_PLUGIN_PATH
AC_SUBST(CONFIGURED_GST_PLUGIN_PATH)
CONFIGURED_GI_TYPELIB_PATH=$GI_TYPELIB_PATH
AC_SUBST(CONFIGURED_GI_TYPELIB_PATH)
AC_CONFIG_FILES([bin/pitivi], [chmod +x bin/pitivi])
PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= gtk_req_version],
[HAVE_GTK=yes],
[HAVE_GTK=no])
AS_IF([test "x$HAVE_GTK" = xno],
[AC_MSG_ERROR([GTK+ >= gtk_req_version is required])])
PKG_CHECK_MODULES(GTK_X11, gtk+-x11-3.0 >= gtk_req_version, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)
PKG_CHECK_MODULES(GTK_QUARTZ, gtk+-quartz-3.0 >= gtk_req_version, HAVE_GTK_QUARTZ=yes, HAVE_GTK_QUARTZ=no)
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
AM_CONDITIONAL(HAVE_GTK_QUARTZ, test "x$HAVE_GTK_QUARTZ" = "xyes")
PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= gstreamer_req_version gstreamer-video-1.0 >= gstreamer_req_version],
[HAVE_GSTREAMER=yes],
[HAVE_GSTREAMER=no])
AC_SUBST(GTK_LIBS)
AS_IF([test "x$HAVE_GSTREAMER" = xno],
[AC_MSG_ERROR([GStreamer >= gstreamer_req_version is required])])
PKG_CHECK_MODULES([cairo], [cairo])
PKG_CHECK_MODULES([py3cairo], [py3cairo])
AC_ARG_ENABLE(help,
AS_HELP_STRING([--disable-help],[disable help]),
[
case "${enableval}" in
yes) BUILD_HELP=yes ;;
no) BUILD_HELP=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-help) ;;
esac
],
[BUILD_HELP=yes]) dnl Default value
AM_CONDITIONAL(BUILD_HELP, test "x$BUILD_HELP" = "xyes")
if test x$BUILD_HELP = xyes; then
YELP_HELP_INIT
fi
PITIVI_CFLAGS="$GTK_CFLAGS $GSTREAMER_CFLAGS $GSTREAMER_VIDEO_CFLAGS"
PITIVI_LIBS="$LIBM $GTK_LIBS $GSTREAMER_LIBS $GSTREAMER_VIDEO_CFLAGS"
AC_SUBST(PITIVI_CFLAGS)
AC_SUBST(PITIVI_LIBS)
dnl output stuff
AC_OUTPUT(
Makefile
bin/Makefile
help/Makefile
pitivi/Makefile
pitivi/configure.py
pitivi/coptimizations/Makefile
pitivi/dialogs/Makefile
pitivi/undo/Makefile
pitivi/utils/Makefile
pitivi/timeline/Makefile
pitivi/viewer/Makefile
po/Makefile.in
tests/Makefile
data/Makefile
data/pitivi.desktop.in
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/256x256/Makefile
data/icons/512x512/Makefile
data/pixmaps/Makefile
data/ui/Makefile
data/renderpresets/Makefile
data/audiopresets/Makefile
data/videopresets/Makefile
data/gstpresets/Makefile
)
SUBDIRS=icons pixmaps ui renderpresets audiopresets videopresets gstpresets
desktopdir = $(datadir)/applications
desktop_in_files = pitivi.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
appdatadir = $(datadir)/appdata
appdata_in_files = pitivi.appdata.xml.in
appdata_DATA = $(appdata_in_files:.appdata.xml.in=.appdata.xml)
@INTLTOOL_XML_RULE@
CLEANFILES = \
$(desktop_DATA) \
$(appdata_DATA)
EXTRA_DIST = \
$(desktop_in_files) \
$(appdata_in_files)
audiopresetsdir = $(pkgdatadir)/audiopresets
audiopresets_DATA = \
iPod.json
EXTRA_DIST = \
$(audiopresets_DATA)
gstpresetsdir = $(pkgdatadir)/gstpresets
gstpresets_DATA = \
GstJpegEnc.prs \
jpeg-flac-in-matroska.gep \
prores-flac-in-matroska.gep \
jpeg-opus-in-matroska.gep \
prores-opus-in-matroska.gep
EXTRA_DIST = \
$(gstpresets_DATA)
themedir = $(datadir)/icons/hicolor
size = 16x16
iconsdir = $(themedir)/$(size)/apps
icons_DATA = \
pitivi.png
EXTRA_DIST = \
$(icons_DATA)
themedir = $(datadir)/icons/hicolor
size = 22x22
iconsdir = $(themedir)/$(size)/apps
icons_DATA = \
pitivi.png
EXTRA_DIST = \
$(icons_DATA)
themedir = $(datadir)/icons/hicolor
size = 24x24
iconsdir = $(themedir)/$(size)/apps
icons_DATA = \
pitivi.png
EXTRA_DIST = \
$(icons_DATA)
themedir = $(datadir)/icons/hicolor
size = 256x256
iconsdir = $(themedir)/$(size)/apps
icons_DATA = \
pitivi.png
EXTRA_DIST = \
$(icons_DATA)
themedir = $(datadir)/icons/hicolor
size = 32x32
iconsdir = $(themedir)/$(size)/apps
icons_DATA = \
pitivi.png
EXTRA_DIST = \
$(icons_DATA)
themedir = $(datadir)/icons/hicolor
size = 48x48
iconsdir = $(themedir)/$(size)/apps
icons_DATA = \
pitivi.png
EXTRA_DIST = \
$(icons_DATA)
themedir = $(datadir)/icons/hicolor
size = 512x512
iconsdir = $(themedir)/$(size)/apps
icons_DATA = \
pitivi.png
EXTRA_DIST = \
$(icons_DATA)
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256 512x512
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
install-data-hook: update-icon-cache
uninstall-hook: update-icon-cache
update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
$(gtk_update_icon_cache); \
else \
echo "*** Icon cache not updated. After (un)install, run this:"; \
echo "*** $(gtk_update_icon_cache)"; \
fi
sizes = ['16x16', '24x24', '32x32', '512x512', '22x22', '256x256', '48x48']
themedir = get_option('datadir') + '/icons/hicolor/'
foreach size: sizes
install_data(size + '/pitivi.png', install_dir: themedir + size + '/apps/')
endforeach
subdir('icons')
install_subdir('pixmaps', install_dir: pkgdatadir)
install_subdir('ui', install_dir: pkgdatadir)
install_subdir('renderpresets', install_dir: pkgdatadir)
install_subdir('audiopresets', install_dir: pkgdatadir)
install_subdir('videopresets', install_dir: pkgdatadir)
install_subdir('gstpresets', install_dir: pkgdatadir)
custom_target('pitivi.desktop',
output : 'pitivi.desktop',
input : 'pitivi.desktop.in.in',
command : [intltool_merge, '--desktop-style', podir, '@INPUT@', '@OUTPUT@'],
install : true,
install_dir : get_option('datadir') + '/applications')
custom_target('pitivi.appdata.xml',
output : 'pitivi.appdata.xml',
input : 'pitivi.appdata.xml.in',
command : [intltool_merge, '--desktop-style', podir, '@INPUT@', '@OUTPUT@'],
install : true,
install_dir : get_option('datadir') + '/appdata')
pixmapdir = $(pkgdatadir)/pixmaps
pixmap_DATA = \
hicolor/24x24/actions/pitivi-align.svg \
hicolor/24x24/actions/pitivi-gapless.svg \
hicolor/24x24/actions/pitivi-group.svg \
hicolor/24x24/actions/pitivi-keyframe.svg \
hicolor/24x24/actions/pitivi-relink.svg \
hicolor/24x24/actions/pitivi-split.svg \
hicolor/24x24/actions/pitivi-ungroup.svg \
hicolor/24x24/actions/pitivi-unlink.svg \
pitivi-advanced-16.png \
pitivi-advanced-22.png \
pitivi-advanced-24.png \
pitivi-render-16.png \
pitivi-render-22.png \
pitivi-render-24.png \
processing-clip.png \
processing-clip.svg \
trimbar-focused.png \
trimbar-normal.png \
asset-proxied.svg \
asset-proxying-error.svg \
asset-proxy-in-progress.svg
effectspixmapdir = $(pkgdatadir)/pixmaps/effects
effectspixmap_DATA = \
effects/agingtv.png \
effects/bulge.png \
effects/burn.png \
effects/chromium.png \
effects/circle.png \
effects/cogdownsample.png \
effects/color-distance.png \
effects/coloreffects.png \
effects/defaultthumbnail.svg \
effects/dicetv.png \
effects/diffuse.png \
effects/dilate.png \
effects/dodge.png \
effects/edgetv.png \
effects/exclusion.png \
effects/fisheye.png \
effects/frei0r-filter-3dflippo.png \
effects/frei0r-filter-brightness.png \
effects/frei0r-filter-bw0r.png \
effects/frei0r-filter-cartoon.png \
effects/frei0r-filter-contrast0r.png \
effects/frei0r-filter-distort0r.png \
effects/frei0r-filter-edgeglow.png \
effects/frei0r-filter-equaliz0r.png \
effects/frei0r-filter-flippo.png \
effects/frei0r-filter-gamma.png \
effects/frei0r-filter-glow.png \
effects/frei0r-filter-hueshift0r.png \
effects/frei0r-filter-invert0r.png \
effects/frei0r-filter-k-means-clustering.png \
effects/frei0r-filter-lens-correction.png \
effects/frei0r-filter-letterb0xed.png \
effects/frei0r-filter-nosync0r.png \
effects/frei0r-filter-perspective.png \
effects/frei0r-filter-pixeliz0r.png \
effects/frei0r-filter-rgb-parade.png \
effects/frei0r-filter-saturat0r.png \
effects/frei0r-filter-scale0tilt.png \
effects/frei0r-filter-scanline0r.png \
effects/frei0r-filter-sobel.png \
effects/frei0r-filter-squareblur.png \
effects/frei0r-filter-tehroxx0r.png \
effects/frei0r-filter-twolay0r.png \
effects/frei0r-filter-vectorscope.png \
effects/frei0r-filter-water.png \
effects/frei0r-filter-white-balance.png \
effects/gamma-correction.png \
effects/gaussianblur.png \
effects/kaleidoscope.png \
effects/marble.png \
effects/mirror.png \
effects/optv.png \
effects/pinch.png \
effects/radioactv.png \
effects/revtv.png \
effects/shagadelictv.png \
effects/solarize.png \
effects/sphere.png \
effects/square.png \
effects/stretch.png \
effects/threshold0r.png \
effects/tunnel.png \
effects/twirl.png
transitionspixmapdir = $(pkgdatadir)/pixmaps/transitions
transitionspixmap_DATA = \
transitions/barndoor-dbl.png \
transitions/barndoor-dtl.png \
transitions/barndoor-h.png \