diff --git a/media-gfx/photivo/patches/photivo-0~pre20191017.patchset b/media-gfx/photivo/patches/photivo-0~pre20191017.patchset deleted file mode 100644 index a53a27037..000000000 --- a/media-gfx/photivo/patches/photivo-0~pre20191017.patchset +++ /dev/null @@ -1,188 +0,0 @@ -From e0f13bc85973f0c18cffb932fa929b7ace32a032 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 19 Oct 2019 13:20:42 +1000 -Subject: Fix build for Haiku - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f14b03c..91a9317 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -269,6 +269,7 @@ target_link_libraries(Photivo - if(WITH_X3F) - target_link_libraries(Photivo - ${OPENCV_LIBRARIES} -+ iconv - tiff) - endif() - if(USE_OPENMP) -@@ -378,7 +379,7 @@ if(WIN32) - endforeach() - endif() - install(CODE "execute_process(COMMAND windeployqt ${CMAKE_INSTALL_PREFIX}/Photivo.exe)") --else() -+elseif(NOT HAIKU) - install(FILES qrc/photivo-appicon.png DESTINATION ${DEFAULT_SYSTEM_PREFIX}/share/pixmaps) - install(FILES ReferenceMaterial/photivo.desktop DESTINATION ${DEFAULT_SYSTEM_PREFIX}/share/applications) - install_symlink(${CMAKE_INSTALL_PREFIX}/Photivo ${DEFAULT_SYSTEM_PREFIX}/bin/photivo) -diff --git a/External/rawspeed/src/librawspeed/io/FileIO.h b/External/rawspeed/src/librawspeed/io/FileIO.h -index b9bfc8d..0b4c33d 100644 ---- a/External/rawspeed/src/librawspeed/io/FileIO.h -+++ b/External/rawspeed/src/librawspeed/io/FileIO.h -@@ -18,7 +18,7 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if !(defined(__unix__) || defined(__APPLE__)) -+#if !(defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__)) - #ifndef NOMINMAX - #define NOMINMAX // do not want the min()/max() macros! - #endif -diff --git a/External/rawspeed/src/librawspeed/io/FileReader.cpp b/External/rawspeed/src/librawspeed/io/FileReader.cpp -index bfa12ad..0848705 100644 ---- a/External/rawspeed/src/librawspeed/io/FileReader.cpp -+++ b/External/rawspeed/src/librawspeed/io/FileReader.cpp -@@ -29,7 +29,7 @@ - #include // for unique_ptr - #include // for make_unsigned - --#if !(defined(__unix__) || defined(__APPLE__)) -+#if !(defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__)) - #ifndef NOMINMAX - #define NOMINMAX // do not want the min()/max() macros! - #endif -@@ -45,7 +45,7 @@ namespace rawspeed { - std::unique_ptr FileReader::readFile() { - size_t fileSize = 0; - --#if defined(__unix__) || defined(__APPLE__) -+#if defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) - using file_ptr = std::unique_ptr; - file_ptr file(fopen(fileName, "rb"), &fclose); - -diff --git a/External/rawspeed/src/librawspeed/io/FileWriter.cpp b/External/rawspeed/src/librawspeed/io/FileWriter.cpp -index 5f05a75..3eae04a 100644 ---- a/External/rawspeed/src/librawspeed/io/FileWriter.cpp -+++ b/External/rawspeed/src/librawspeed/io/FileWriter.cpp -@@ -24,7 +24,7 @@ - #include "io/FileIOException.h" // for FileIOException - #include // for fclose, fopen, fwrite, FILE, NULL - --#if !defined(__unix__) && !defined(__APPLE__) -+#if !defined(__unix__) && !defined(__APPLE__) && !defined(__HAIKU__) - #ifndef NOMINMAX - #define NOMINMAX // do not want the min()/max() macros! - #endif -@@ -42,7 +42,7 @@ FileWriter::FileWriter(const char *_filename) : mFilename(_filename) {} - void FileWriter::writeFile(Buffer* filemap, uint32 size) { - if (size > filemap->getSize()) - size = filemap->getSize(); --#if defined(__unix__) || defined(__APPLE__) -+#if defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) - size_t bytes_written = 0; - FILE *file; - --- -2.26.0 - - -From d4bc8fc995f44e7d8ac8f415f1ac38e4ff241caf Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 7 Jun 2020 13:01:50 +1000 -Subject: Disable thumb worker - - -diff --git a/Sources/filemgmt/ptThumbGenWorker.cpp b/Sources/filemgmt/ptThumbGenWorker.cpp -index 5705960..98ad49b 100644 ---- a/Sources/filemgmt/ptThumbGenWorker.cpp -+++ b/Sources/filemgmt/ptThumbGenWorker.cpp -@@ -160,7 +160,9 @@ TThumbPtr ptThumbGenWorker::generateThumb(const TThumbId& AThumbId) - { - const QString hFilePath = AThumbId.FilePath; - hThumbnail.reset(new ptImage8); -- -+#ifdef __HAIKU__ -+ hThumbnail->FromQImage(QImage(QString::fromUtf8(":/dark/icons/image-48px.png"))); -+#else - // For the time being just take broken - hThumbnail->FromQImage(QImage(QString::fromUtf8(":/dark/icons/broken-image-48px.png"))); - -@@ -206,6 +208,7 @@ TThumbPtr ptThumbGenWorker::generateThumb(const TThumbId& AThumbId) - } - - DestroyMagickWand(hGMImage); -+#endif - FThumbCache->insert(AThumbId, hThumbnail); - } - -diff --git a/qrc/photivo.qrc b/qrc/photivo.qrc -index 8f4557b..f395ae2 100644 ---- a/qrc/photivo.qrc -+++ b/qrc/photivo.qrc -@@ -53,6 +53,7 @@ - patterns/slider-stripe-midgrey.png - photivo-appicon.png - photivo-splash.png -+ dark/icons/image-48px.png - dark/icons/folder-48px.png - dark/icons/go-up-48px.png - dark/icons/broken-image-48px.png --- -2.26.0 - - -From 8f17c6fab19b34aa410f7fed5275923f5460f8f6 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 7 Jun 2020 15:23:42 +1000 -Subject: Set username - - -diff --git a/Sources/ptPhotivo.cpp b/Sources/ptPhotivo.cpp -index 625e9b9..7e4f8b0 100644 ---- a/Sources/ptPhotivo.cpp -+++ b/Sources/ptPhotivo.cpp -@@ -446,7 +446,9 @@ int TheMain(int Argc, char* Argv[]) - // - // QtSingleApplication needs an unique identifier. We build it on User + ProgramName. - // -- -+#ifdef Q_OS_HAIKU -+ QString User = "Photivo_user"; -+#else - QStringList Env = QProcess::systemEnvironment(); - QString User = Env.filter(QRegExp("^USERNAME=|^USER=", Qt::CaseInsensitive)).first(); - if (!User.isEmpty()) -@@ -455,6 +457,7 @@ int TheMain(int Argc, char* Argv[]) - User = "_" + User.right(User.length()-Idx-1); - } - User = "Photivo" + User; -+#endif - - #ifdef Q_OS_MAC - TheApplication = new MacQApplication(User, Argc, Argv); --- -2.26.0 - - -From 918d79d30d8b589de86512ad1d3c4541c4b68ed0 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 7 Jun 2020 15:49:32 +1000 -Subject: Disable preview panel by default - - -diff --git a/Sources/ptSettings.cpp b/Sources/ptSettings.cpp -index 2e72642..d4fb63a 100644 ---- a/Sources/ptSettings.cpp -+++ b/Sources/ptSettings.cpp -@@ -2165,7 +2165,7 @@ ptSettings::ptSettings(const short InitLevel, const QString Path) - {"FileMgrIsOpen", 9, 0, 0}, - {"LastFileMgrLocation", 1, "", 0}, - {"FileMgrShowDirThumbs", 1, 1, 0}, -- {"FileMgrShowImageView", 1, 1, 0}, -+ {"FileMgrShowImageView", 1, 0, 0}, - {"FileMgrShowSidebar", 1, 1, 0}, - {"FileMgrThumbLayoutType", 1, tlVerticalByRow, 0}, - {"FileMgrShowRAWs", 1, 1, 0}, --- -2.26.0 - diff --git a/media-gfx/photivo/patches/photivo-0~pre20201120.patchset b/media-gfx/photivo/patches/photivo-0~pre20201120.patchset new file mode 100644 index 000000000..f0ddac6b2 --- /dev/null +++ b/media-gfx/photivo/patches/photivo-0~pre20201120.patchset @@ -0,0 +1,122 @@ +From e3c67a66bf9c8259afbddf7e55387a40803b51bb Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 21 Nov 2020 23:13:49 +1000 +Subject: Fix build for Haiku + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5f9d506..e006ad3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -146,7 +146,7 @@ message( "Build Adobe profiles creator : ${WITH_ADOBE_PROFILES}\n" ) + + set( CMAKE_CXX_FLAGS "" ) + set( CMAKE_C_FLAGS "" ) +-set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -funroll-loops -fopenmp -std=gnu++0x" ) ++set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -funroll-loops -std=gnu++0x" ) + set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -std=gnu++0x" ) + set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=gnu++0x" ) + +-- +2.28.0 + + +From 47ef2716d446eb05899a03d654e749205033a4df Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 21 Nov 2020 23:14:43 +1000 +Subject: Disable thumb worker + + +diff --git a/Sources/filemgmt/ptThumbGenWorker.cpp b/Sources/filemgmt/ptThumbGenWorker.cpp +index a774b1d..1119b15 100644 +--- a/Sources/filemgmt/ptThumbGenWorker.cpp ++++ b/Sources/filemgmt/ptThumbGenWorker.cpp +@@ -149,6 +149,9 @@ TThumbPtr ptThumbGenWorker::generateThumb(const TThumbId& AThumbId) { + const QString hFilePath = AThumbId.FilePath; + hThumbnail.reset(new ptImage8); + ++#ifdef __HAIKU__ ++ hThumbnail->FromQImage(QImage(QString::fromUtf8(":/dark/icons/image-48px.png"))); ++#else + ptDcRaw hDcRaw; + MagickWand* hGMImage = NewMagickWand(); + QSize hSize; +@@ -184,6 +187,7 @@ TThumbPtr ptThumbGenWorker::generateThumb(const TThumbId& AThumbId) { + } + + DestroyMagickWand(hGMImage); ++#endif + FThumbCache->insert(AThumbId, hThumbnail); + } + +diff --git a/qrc/photivo.qrc b/qrc/photivo.qrc +index 8f4557b..f395ae2 100644 +--- a/qrc/photivo.qrc ++++ b/qrc/photivo.qrc +@@ -53,6 +53,7 @@ + patterns/slider-stripe-midgrey.png + photivo-appicon.png + photivo-splash.png ++ dark/icons/image-48px.png + dark/icons/folder-48px.png + dark/icons/go-up-48px.png + dark/icons/broken-image-48px.png +-- +2.28.0 + + +From ce3e470a0be95c475329f2f3913268f103b02ca8 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 21 Nov 2020 23:15:28 +1000 +Subject: Set username + + +diff --git a/Sources/ptMain.cpp b/Sources/ptMain.cpp +index fd40ba5..bae290a 100644 +--- a/Sources/ptMain.cpp ++++ b/Sources/ptMain.cpp +@@ -526,6 +526,9 @@ int photivoMain(int Argc, char *Argv[]) { + InitializeMagick(*Argv); + + //QApplication TheApplication(Argc,Argv); ++#ifdef Q_OS_HAIKU ++ QString user = "Photivo_user"; ++#else + QStringList environment = QProcess::systemEnvironment(); + QString user=environment.filter(QRegExp("^USERNAME=|^USER=",Qt::CaseInsensitive)).first(); + if(!user.isEmpty()){ +@@ -533,6 +536,7 @@ int photivoMain(int Argc, char *Argv[]) { + user="_"+user.right(user.length()-l-1); + } + user="photivo"+user; ++#endif + + #ifdef Q_OS_MAC + TheApplication = new MyQApplication(user, Argc,Argv); +-- +2.28.0 + + +From 287dfcfa4675c08ae9d68abe600dbcdf4b41c8e9 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 21 Nov 2020 23:15:07 +1000 +Subject: Disable preview panel by default + + +diff --git a/Sources/ptSettings.cpp b/Sources/ptSettings.cpp +index 592a76c..9e06823 100644 +--- a/Sources/ptSettings.cpp ++++ b/Sources/ptSettings.cpp +@@ -362,7 +362,7 @@ ptSettings::ptSettings(const short InitLevel, const QString Path) { + {"FileMgrIsOpen" ,9 ,0 ,0}, + {"LastFileMgrLocation" ,1 ,"" ,0}, + {"FileMgrShowDirThumbs" ,1 ,1 ,0}, +- {"FileMgrShowImageView" ,1 ,1 ,0}, ++ {"FileMgrShowImageView" ,1 ,0 ,0}, + {"FileMgrShowSidebar" ,1 ,1 ,0}, + {"FileMgrThumbLayoutType" ,1 ,tlVerticalByRow ,0}, + {"FileMgrShowRAWs" ,1 ,1 ,0}, +-- +2.28.0 + + diff --git a/media-gfx/photivo/photivo-0~pre20191017.recipe b/media-gfx/photivo/photivo-0~pre20201120.recipe similarity index 61% rename from media-gfx/photivo/photivo-0~pre20191017.recipe rename to media-gfx/photivo/photivo-0~pre20201120.recipe index 6e0c62ef9..9bb8bcf41 100644 --- a/media-gfx/photivo/photivo-0~pre20191017.recipe +++ b/media-gfx/photivo/photivo-0~pre20201120.recipe @@ -13,16 +13,19 @@ It is intended to be used in a workflow together with digiKam/F-Spot/Shotwell an It needs a quite strong computer and is not aimed at beginners." HOMEPAGE="http://www.photivo.org" COPYRIGHT="2004-2007 Jeremy Ruston, - 2007-2019, UnaMesa Association" + 2007-2020, UnaMesa Association" LICENSE="GNU GPL v3" -REVISION="2" -srcGitRevision="a6b1b46dd0fe" -SOURCE_URI="https://bitbucket.org/CamielBouchier/photivo/get/$srcGitRevision.zip" -CHECKSUM_SHA256="390abef7c4b660ae471d3f93e2c701dce2c497c129936bad563ba891bb562cde" -SOURCE_DIR="CamielBouchier-photivo-$srcGitRevision" +REVISION="1" +srcGitRevision="b8210572f022" +SOURCE_URI="https://bitbucket.org/Photivo/photivo/get/$srcGitRevision.tar.bz2" +CHECKSUM_SHA256="0086c2b4f57bf58295812385edb5f9299c21266fd71c1ba8bd482da7a28e400b" +SOURCE_DIR="Photivo-photivo-$srcGitRevision" + PATCHES="photivo-$portVersion.patchset" -ADDITIONAL_FILES="photivo.rdef.in - haikuicons.zip" +ADDITIONAL_FILES=" + photivo.rdef.in + haikuicons.zip + " ARCHITECTURES="!x86_gcc2 x86_64" SECONDARY_ARCHITECTURES="x86" @@ -47,56 +50,12 @@ REQUIRES=" lib:liblensfun$secondaryArchSuffix lib:liblcms2$secondaryArchSuffix lib:liblqr_1$secondaryArchSuffix - lib:libopencv_aruco$secondaryArchSuffix - lib:libopencv_bgsegm$secondaryArchSuffix - lib:libopencv_bioinspired$secondaryArchSuffix - lib:libopencv_core$secondaryArchSuffix - lib:libopencv_cvv$secondaryArchSuffix - lib:libopencv_calib3d$secondaryArchSuffix - lib:libopencv_ccalib$secondaryArchSuffix - lib:libopencv_datasets$secondaryArchSuffix - lib:libopencv_dnn$secondaryArchSuffix - lib:libopencv_dnn_objdetect$secondaryArchSuffix - lib:libopencv_face$secondaryArchSuffix - lib:libopencv_features2d$secondaryArchSuffix - lib:libopencv_flann$secondaryArchSuffix - lib:libopencv_freetype$secondaryArchSuffix - lib:libopencv_fuzzy$secondaryArchSuffix - lib:libopencv_highgui$secondaryArchSuffix - lib:libopencv_hdf$secondaryArchSuffix - lib:libopencv_hfs$secondaryArchSuffix - lib:libopencv_img_hash$secondaryArchSuffix - lib:libopencv_imgcodecs$secondaryArchSuffix - lib:libopencv_imgproc$secondaryArchSuffix - lib:libopencv_line_descriptor$secondaryArchSuffix - lib:libopencv_ml$secondaryArchSuffix - lib:libopencv_objdetect$secondaryArchSuffix - lib:libopencv_optflow$secondaryArchSuffix - lib:libopencv_phase_unwrapping$secondaryArchSuffix - lib:libopencv_plot$secondaryArchSuffix - lib:libopencv_reg$secondaryArchSuffix - lib:libopencv_rgbd$secondaryArchSuffix - lib:libopencv_photo$secondaryArchSuffix - lib:libopencv_stitching$secondaryArchSuffix - lib:libopencv_saliency$secondaryArchSuffix - lib:libopencv_shape$secondaryArchSuffix - lib:libopencv_stereo$secondaryArchSuffix - lib:libopencv_structured_light$secondaryArchSuffix - lib:libopencv_superres$secondaryArchSuffix - lib:libopencv_surface_matching$secondaryArchSuffix - lib:libopencv_text$secondaryArchSuffix - lib:libopencv_tracking$secondaryArchSuffix - lib:libopencv_video$secondaryArchSuffix - lib:libopencv_videoio$secondaryArchSuffix - lib:libopencv_videostab$secondaryArchSuffix - lib:libopencv_xfeatures2d$secondaryArchSuffix - lib:libopencv_xobjdetect$secondaryArchSuffix - lib:libopencv_xphoto$secondaryArchSuffix lib:libpugixml$secondaryArchSuffix lib:libQt5Core$secondaryArchSuffix lib:libQt5Gui$secondaryArchSuffix lib:libQt5Network$secondaryArchSuffix lib:libQt5Widgets$secondaryArchSuffix + lib:libraw$secondaryArchSuffix lib:libtiff$secondaryArchSuffix lib:libxml2$secondaryArchSuffix lib:libz$secondaryArchSuffix @@ -121,6 +80,7 @@ BUILD_REQUIRES=" devel:libQt5Gui$secondaryArchSuffix devel:libQt5Network$secondaryArchSuffix devel:libQt5Widgets$secondaryArchSuffix + devel:libraw$secondaryArchSuffix devel:libtiff$secondaryArchSuffix devel:libxml2$secondaryArchSuffix devel:libz$secondaryArchSuffix @@ -162,6 +122,10 @@ INSTALL() cd build make install + mv $appsDir/Photivo/bin/photivo $appsDir/Photivo/Photivo + mv $appsDir/Photivo/share/photivo/* $appsDir/Photivo + rm -rf $appsDir/Photivo/{bin,share,pixmaps,applications} + local APP_SIGNATURE="application/x-vnd.photivo" local LONG_INFO="$SUMMARY" sed \