From b87f4944eaf1354aa8e96c4c29792a9fe72274d2 Mon Sep 17 00:00:00 2001 From: notthewave Date: Sun, 22 Aug 2021 12:09:50 +0200 Subject: [PATCH] New package: MLV-App-1.13 --- srcpkgs/MLV-App/patches/arm-arch.patch | 17 ++++++ srcpkgs/MLV-App/patches/install-path.patch | 71 ++++++++++++++++++++++ srcpkgs/MLV-App/patches/unistd-musl.patch | 17 ++++++ srcpkgs/MLV-App/template | 15 +++++ 4 files changed, 120 insertions(+) create mode 100644 srcpkgs/MLV-App/patches/arm-arch.patch create mode 100644 srcpkgs/MLV-App/patches/install-path.patch create mode 100644 srcpkgs/MLV-App/patches/unistd-musl.patch create mode 100644 srcpkgs/MLV-App/template diff --git a/srcpkgs/MLV-App/patches/arm-arch.patch b/srcpkgs/MLV-App/patches/arm-arch.patch new file mode 100644 index 000000000000..c0ce16c14910 --- /dev/null +++ b/srcpkgs/MLV-App/patches/arm-arch.patch @@ -0,0 +1,17 @@ +diff --git a/platform/qt/MLVApp.pro b/platform/qt/MLVApp.pro +index df513af..4f39aa2 100644 +--- a/platform/qt/MLVApp.pro ++++ b/platform/qt/MLVApp.pro +@@ -84,7 +84,11 @@ win32{ + + # Linux + linux-g++*{ +- QMAKE_CFLAGS += -O3 -fopenmp -msse4.1 -mssse3 -msse3 -msse2 -msse -std=c99 -ftree-vectorize ++ contains(QT_ARCH, x86_64, x86){ ++ QMAKE_CFLAGS += -O3 -fopenmp -msse4.1 -mssse3 -msse3 -msse2 -msse -std=c99 -ftree-vectorize ++ } else { ++ QMAKE_CFLAGS += -O3 -fopenmp -std=c99 -ftree-vectorize ++ } + QMAKE_CXXFLAGS += -fopenmp -std=c++11 -ftree-vectorize + LIBS += -lgomp + } diff --git a/srcpkgs/MLV-App/patches/install-path.patch b/srcpkgs/MLV-App/patches/install-path.patch new file mode 100644 index 000000000000..3895e24c0c0c --- /dev/null +++ b/srcpkgs/MLV-App/patches/install-path.patch @@ -0,0 +1,71 @@ +diff --git a/platform/qt/MLVApp.pro b/platform/qt/MLVApp.pro +index df513af..a099ae5 100644 +--- a/platform/qt/MLVApp.pro ++++ b/platform/qt/MLVApp.pro +@@ -412,22 +412,22 @@ windows{ + + #to deploy the project with QT Creators "Deploy [All|Project]" feature in Menu->Build. + #in "Projects->Run Settings->Add Deploy Step->Make->Make arguments" field put argument "install". Qt Creator deploy feature will get active. +-linux-g++ { +- target.path = $$(HOME)/bin +- desktop.path = $$(HOME)/.local/share/applications +- desktop.files += mlvapp.desktop +- icon512.path = $$(HOME)/.local/share/icons/hicolor/512x512/apps +- icon512.files += RetinaIMG/MLVAPP.png +- tools.path = target.path +- tools.extra = mkdir -p $$(HOME)/bin; tar -C $$(HOME)/bin -xvJf $$_PRO_FILE_PWD_/FFmpeg/ffmpegLinux.tar.xz --strip-components=1 --wildcards */ffmpeg; tar -C $$(HOME)/bin -xvJf $$_PRO_FILE_PWD_/raw2mlv/raw2mlvLinux.tar.xz --strip-components=1 --wildcards */raw2mlv +- +- INSTALLS += target desktop icon512 tools +-} ++#linux-g++ { ++# target.path = $$(HOME)/bin ++# desktop.path = $$(HOME)/.local/share/applications ++# desktop.files += mlvapp.desktop ++# icon512.path = $$(HOME)/.local/share/icons/hicolor/512x512/apps ++# icon512.files += RetinaIMG/MLVAPP.png ++# tools.path = target.path ++# tools.extra = mkdir -p $$(HOME)/bin; tar -C $$(HOME)/bin -xvJf $$_PRO_FILE_PWD_/FFmpeg/ffmpegLinux.tar.xz --strip-components=1 --wildcards */ffmpeg; tar -C $$(HOME)/bin -xvJf $$_PRO_FILE_PWD_/raw2mlv/raw2mlvLinux.tar.xz --strip-components=1 --wildcards */raw2mlv ++# ++# INSTALLS += target desktop icon512 tools ++#} + + #for using linuxdeployqt + #->run "make INSTALL_ROOT=. -j$(nproc) install" (is possible via QtCreators Project tab, add build step (make)) + #->run via terminal "linuxdeployqt-continuous-x86_64.AppImage path/to/appdir/usr/share/applications/mlvapp.desktop -appimage -qmake=pathToQmake/qmake" +-#linux-g++ { ++linux-g++ { + # DEFINES += APP_IMAGE + + # QMAKE_POST_LINK += tar -C ../qt/FFmpeg/ -xvJf ../qt/FFmpeg/ffmpegLinux.tar.xz --strip=1 --wildcards */ffmpeg $$escape_expand(\n\t) +@@ -436,19 +436,19 @@ linux-g++ { + # QMAKE_POST_LINK += tar -C ../qt/raw2mlv/ -xvJf ../qt/raw2mlv/raw2mlvLinux.tar.xz --strip=1 --wildcards */raw2mlv $$escape_expand(\n\t) + # QMAKE_POST_LINK += chmod a+x ../qt/raw2mlv/raw2mlv $$escape_expand(\n\t) + +-# isEmpty(PREFIX) { +-# PREFIX = /usr +-# } +-# target.path = $$PREFIX/bin ++ isEmpty(PREFIX) { ++ PREFIX = /usr ++ } ++ target.path = $$PREFIX/bin + # ffmpegSt.path = $$PREFIX/bin + # ffmpegSt.files += FFmpeg/ffmpeg + # ffmpegSt.files += raw2mlv/raw2mlv +-# desktop.path = $$PREFIX/share/applications +-# desktop.files += mlvapp.desktop +-# icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps +-# icon512.files += RetinaIMG/MLVAPP.png ++ desktop.path = $$PREFIX/share/applications ++ desktop.files += mlvapp.desktop ++ icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps ++ icon512.files += RetinaIMG/MLVAPP.png + # INSTALLS += ffmpegSt +-# INSTALLS += icon512 +-# INSTALLS += desktop +-# INSTALLS += target +-#} ++ INSTALLS += icon512 ++ INSTALLS += desktop ++ INSTALLS += target ++} diff --git a/srcpkgs/MLV-App/patches/unistd-musl.patch b/srcpkgs/MLV-App/patches/unistd-musl.patch new file mode 100644 index 000000000000..c49ae2214460 --- /dev/null +++ b/srcpkgs/MLV-App/patches/unistd-musl.patch @@ -0,0 +1,17 @@ +diff --git a/src/mlv/video_mlv.c b/src/mlv/video_mlv.c +index 7238d286..0ff00552 100644 +--- a/src/mlv/video_mlv.c ++++ b/src/mlv/video_mlv.c +@@ -9,11 +9,9 @@ + #include + #include "camid/camera_id.h" + ++#include + #if defined(__linux) + #include +-extern int usleep (__useconds_t __useconds); +-#else +-#include + #endif + + #include "video_mlv.h" diff --git a/srcpkgs/MLV-App/template b/srcpkgs/MLV-App/template new file mode 100644 index 000000000000..8319eb38a475 --- /dev/null +++ b/srcpkgs/MLV-App/template @@ -0,0 +1,15 @@ +# Template file for 'MLV-App' +pkgname=MLV-App +version=1.13 +revision=1 +wrksrc=${pkgname}-QTv${version} +build_wrksrc="platform/qt" +build_style=qmake +hostmakedepends="qt5-qmake pkg-config qt5-host-tools" +makedepends="qt5-multimedia-devel qt5-devel libgomp-devel ffmpeg" +short_desc="All in one MLV processing app for Magic Lantern" +maintainer="notthewave " +license="GPL-3.0-or-later" +homepage="https://mlv.app" +distfiles="https://github.com/ilia3101/MLV-App/archive/refs/tags/QTv${version}.tar.gz" +checksum=1ec87a4b325cc73ce1d512f2cd65df407fbe9eb751602cdfe26371258f81b329