From 36e0e2a4a737855dc0b5d5e415ff9cb8686e6656 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 23 Dec 2020 13:06:00 +0100 Subject: [PATCH] Add a WIP recipe for Medo I get a compiler internal error on 32bit system. Hopefully this goes better on 64bit, but I don't have a 64bit install available to test. --- haiku-apps/medo/medo-1.0.0~beta1.recipe | 94 +++++++++++++ .../medo/patches/medo-1.0.0~beta1.patchset | 130 ++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 haiku-apps/medo/medo-1.0.0~beta1.recipe create mode 100644 haiku-apps/medo/patches/medo-1.0.0~beta1.patchset diff --git a/haiku-apps/medo/medo-1.0.0~beta1.recipe b/haiku-apps/medo/medo-1.0.0~beta1.recipe new file mode 100644 index 000000000..2b84dc841 --- /dev/null +++ b/haiku-apps/medo/medo-1.0.0~beta1.recipe @@ -0,0 +1,94 @@ +SUMMARY="A Media Editor exclusively built for Haiku" +DESCRIPTION="A modern video editor with customisable OpenGL GLSL plugin based \ +effects. +There are many bundled media effects, including: +- Colour grading effects (Saturation/Exposure/Temperature etc) +- Colour correction curves and white balance. +- Support for Adobe LUT (Look Up Tables) +- Create masks and keyframes +- Several bundled transitions +- Several special effects (Blur, Night Vision, Chroma Key etc) +- Spatial tools to transform media (scale/rotate/position/crop) +- Multiple text effects, including 3D extruded fonts. +- Audio effects (20 band equaliser, fade) + +Medo can edit UHD 4K videos, export to any Haiku supported codec, is optimised \ +for many CPU-core systems, and has low system resource requirements. + +An SDK allows 3rd party developers to create Addons and Plugins." +HOMEPAGE="https://github.com/smallstepforman/Medo" +COPYRIGHT="2019-2021 Zen Yes Pty Ltd" +LICENSE="MIT" +SOURCE_URI="https://github.com/smallstepforman/Medo/archive/R1.0.0-Beta1-1.tar.gz" +CHECKSUM_SHA256="734443d5d34d74c2a654e63d5bab33baddf68199fe2497688bcac337f10b7cf8" +SOURCE_DIR="Medo-R1.0.0-Beta1-1" +PATCHES="medo-$portVersion.patchset" +REVISION="1" + +ARCHITECTURES="!x86_gcc2 ?x86_64" +SECONDARY_ARCHITECTURES="!x86" + +PROVIDES=" + medo$secondaryArchSuffix = $portVersion + app:medo + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libGL$secondaryArchSuffix + devel:libavformat$secondaryArchSuffix + devel:libsoxr$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:jam + " + +BUILD() +{ + release=true jam -q $jobArgs + sh build_addons + sh setup_attributes +} + +INSTALL() +{ + mkdir -p $appsDir/Medo + cp Medo $appsDir/Medo + + addDeskbarAppSymlink Medo $appsDir/Medo/Medo + + mkdir $appsDir/Medo/AddOns + pushd AddOns + for d in */; do + pushd ${d%/} + mkdir $appsDir/Medo/AddOns/${d%/} + cp *".so" "$appsDir/Medo/AddOns/$d" + cp *".png" "$appsDir/Medo/AddOns/$d" + popd + done + popd + + #Plugins + mkdir $appsDir/Medo/Plugins + pushd Plugins + for f in */; do + pushd ${f%/} + mkdir $appsDir/Medo/Plugins/${f%/} + cp *.* "$appsDir/Medo/Plugins/$f" + popd + done + popd + + #Resources + mkdir $appsDir/Medo/Resources + mkdir $appsDir/Medo/Resources/Icon + pushd Resources + cp *".png" "$appsDir/Medo/Resources/" + cp "Icon/Medo_Logo.png" "$appsDir/Medo/Resources/Icon" + popd +} diff --git a/haiku-apps/medo/patches/medo-1.0.0~beta1.patchset b/haiku-apps/medo/patches/medo-1.0.0~beta1.patchset new file mode 100644 index 000000000..dadd1b3ad --- /dev/null +++ b/haiku-apps/medo/patches/medo-1.0.0~beta1.patchset @@ -0,0 +1,130 @@ +From 658881e640de392987fe7796f2fc254240bbdd62 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 23 Dec 2020 13:04:24 +0100 +Subject: Fix some build problems on 32bit systems. + +Eventually I hit a compiler error. Not sure what to do next. + +diff --git a/Editor/ExportMedia_MediaKit.cpp b/Editor/ExportMedia_MediaKit.cpp +index 48b2e7c..4b4a5a8 100644 +--- a/Editor/ExportMedia_MediaKit.cpp ++++ b/Editor/ExportMedia_MediaKit.cpp +@@ -178,7 +178,7 @@ void Export_MediaKit :: BuildVideoCodecOptions() + if (cookie != selected_cookie) + continue; + +- int cookie2 = 0; ++ int32 cookie2 = 0; + memset(&format, 0, sizeof(media_format)); + format.type = B_MEDIA_RAW_VIDEO; + format.u.raw_video = media_raw_video_format::wildcard; +@@ -230,7 +230,7 @@ void Export_MediaKit :: BuildAudioCodecOptions() + if (cookie != selected_cookie) + continue; + +- int cookie2 = 0; ++ int32 cookie2 = 0; + memset(&format, 0, sizeof(media_format)); + format.type = B_MEDIA_RAW_AUDIO; + while (get_next_encoder(&cookie2, &mfi, &format, &outfmt, &mci) == B_OK) +diff --git a/Editor/ExportMedia_ffmpeg.cpp b/Editor/ExportMedia_ffmpeg.cpp +index 3dd2bd6..ab07adf 100644 +--- a/Editor/ExportMedia_ffmpeg.cpp ++++ b/Editor/ExportMedia_ffmpeg.cpp +@@ -960,7 +960,7 @@ void Export_ffmpeg :: StopEncode(const bool complete) + + /**************************************************************/ + /* WorkThread */ +-int Export_ffmpeg :: WorkThread(void *arg) ++status_t Export_ffmpeg :: WorkThread(void *arg) + { + assert(arg != nullptr); + Export_ffmpeg *instance = (Export_ffmpeg *) arg; +diff --git a/Editor/MonitorControls.cpp b/Editor/MonitorControls.cpp +index fe26cc0..e3bdcba 100644 +--- a/Editor/MonitorControls.cpp ++++ b/Editor/MonitorControls.cpp +@@ -255,7 +255,7 @@ void MonitorControls :: DrawAfterChildren(BRect frame) + char buffer[20]; + gProject->CreateTimeString(fCurrentFrame, buffer); + char *strarray[1] = {buffer}; +- int len[1] = {20}; ++ int32 len[1] = {20}; + float width; + GetStringWidths(strarray, len, 1, &width); + +diff --git a/Editor/SourceListView.cpp b/Editor/SourceListView.cpp +index f6ab2ad..0123853 100644 +--- a/Editor/SourceListView.cpp ++++ b/Editor/SourceListView.cpp +@@ -456,7 +456,7 @@ bool SourceListView :: AddItem(BListItem* item) + { + if (fInstructionItemVisible) + { +- InstructionListItem *item = (InstructionListItem *)RemoveItem(0); ++ InstructionListItem *item = (InstructionListItem *)RemoveItem((int32)0); + delete item; + fInstructionItemVisible = false; + } +@@ -474,6 +474,6 @@ void SourceListView :: RemoveAllMediaSources() + { + SourceListItem *item = (SourceListItem *)ItemAt(0); + gProject->RemoveMediaSource(item->GetMediaSource()); +- RemoveItem(0); ++ RemoveItem((int32)0); + } + } +diff --git a/Editor/TimelinePosition.cpp b/Editor/TimelinePosition.cpp +index 875b785..feb184a 100644 +--- a/Editor/TimelinePosition.cpp ++++ b/Editor/TimelinePosition.cpp +@@ -420,7 +420,7 @@ void TimelinePosition :: Draw(BRect frame) + char buffer[20]; + gProject->CreateTimeString(fCurrentPosition, buffer, true); + char *strarray[1] = {buffer}; +- int len[1] = {20}; ++ int32 len[1] = {20}; + float width; + GetStringWidths(strarray, len, 1, &width); + +diff --git a/Effects/Effect_Mask.cpp b/Effects/Effect_Mask.cpp +index 1a6c94e..96dbf20 100644 +--- a/Effects/Effect_Mask.cpp ++++ b/Effects/Effect_Mask.cpp +@@ -584,7 +584,7 @@ void Effect_Mask :: MessageReceived(BMessage *msg) + + case kMsgKeyframeSlider: + { +- int selection; ++ int32 selection; + if (msg->FindInt32("selection", &selection) == B_OK) + { + assert((selection >= 0) && (selection < fKeyframeList->CountItems())); +diff --git a/Gui/FontPanel.cpp b/Gui/FontPanel.cpp +index f5a082d..b76a922 100644 +--- a/Gui/FontPanel.cpp ++++ b/Gui/FontPanel.cpp +@@ -439,7 +439,7 @@ void FontView :: CreateStyleList(int32 family_idx) + + while (fStyleList->CountItems() > 0) + { +- BStringItem *item = (BStringItem*)fStyleList->RemoveItem(0); ++ BStringItem *item = (BStringItem*)fStyleList->RemoveItem((int32)0); + delete item; + } + +diff --git a/Jamfile b/Jamfile +index 839b0b7..45eee66 100644 +--- a/Jamfile ++++ b/Jamfile +@@ -11,6 +11,7 @@ else + } + C++FLAGS += -I. -IYarra -I/boot/system/develop/headers/private/interface ; + C++FLAGS += -I/boot/system/develop/headers/freetype2 ; ++C++FLAGS += -I/boot/system/develop/headers/x86/freetype2 -mavx ; + + # Source files needed to build Medo + # +-- +2.28.0 +