diff options
author | Jonathan Liu | 2015-06-19 11:56:08 +1000 |
---|---|---|
committer | Jonathan Liu | 2015-06-19 11:56:08 +1000 |
commit | 06b70215b57370d52fc1e692b8367d3d43e5c6d4 (patch) | |
tree | 1c524d6c0649e9543c2da302bdee5e867b1ea05e | |
download | aur-06b70215b57370d52fc1e692b8367d3d43e5c6d4.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | djv.install | 13 | ||||
-rw-r--r-- | djv_view.desktop | 9 | ||||
-rw-r--r-- | libjpeg-boolean.patch | 36 | ||||
-rw-r--r-- | openexr.patch | 351 |
6 files changed, 489 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d78c3a145f75 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = djv + pkgdesc = Movie playback and image processing software for the film and computer animation industries + pkgver = 1.0.5 + pkgrel = 1 + url = http://djv.sourceforge.net/ + install = djv.install + arch = i686 + arch = x86_64 + license = BSD + makedepends = cmake + makedepends = portaudio + makedepends = qt5-tools + depends = desktop-file-utils + depends = ffmpeg + depends = glew + depends = libjpeg + depends = libpng + depends = libquicktime + depends = libtiff + depends = openexr + depends = qt5-base + options = !docs + source = git://git.code.sf.net/p/djv/git#tag=1.0.5 + source = libjpeg-boolean.patch + source = openexr.patch + source = djv_view.desktop + md5sums = SKIP + md5sums = 1bd8936a1bdedfe102f62b4da0937ea3 + md5sums = 462c837569fe361ec795762208753930 + md5sums = 2668ad2635036f33ba615b5dc538b1cf + +pkgname = djv + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ff1218a808f5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Jonathan Liu <net147@gmail.com> +# Contributer: N30N <archlinux@alunamation.com> +pkgname=djv +pkgver=1.0.5 +pkgrel=1 +pkgdesc="Movie playback and image processing software for the film and computer animation industries" +url="http://djv.sourceforge.net/" +license=('BSD') +arch=('i686' 'x86_64') +depends=("desktop-file-utils" "ffmpeg" "glew" "libjpeg" "libpng" "libquicktime" "libtiff" "openexr" "qt5-base") +makedepends=("cmake" "portaudio" "qt5-tools") +options=("!docs") +install="${pkgname}.install" +source=("git://git.code.sf.net/p/djv/git#tag=${pkgver}" + "libjpeg-boolean.patch" + "openexr.patch" + "${pkgname}_view.desktop") +md5sums=('SKIP' + '1bd8936a1bdedfe102f62b4da0937ea3' + '462c837569fe361ec795762208753930' + '2668ad2635036f33ba615b5dc538b1cf') + +prepare() { + cd git + patch -Np1 -i "${srcdir}/libjpeg-boolean.patch" + patch -Np1 -i "${srcdir}/openexr.patch" + sed -i '/enable_testing()/d' CMakeLists.txt + sed -i '/add_subdirectory(tests)/d' CMakeLists.txt + sed -i 's/set(djvPackageThirdParty true)/set(djvPackageThirdParty false)/' CMakeLists.txt +} + +build() { + [[ -d build ]] && rm -r build + mkdir build && cd build + cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr ../git + make +} + +package() { + cd build + make DESTDIR=${pkgdir} install + install -D -m644 {"${srcdir}","${pkgdir}/usr/share/applications"}/"${pkgname}_view.desktop" + install -D -m644 "${srcdir}/git/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 "${srcdir}/git/lib/djvViewLib/images/projector32x32.png" "${pkgdir}/usr/share/pixmaps/djv_view.png" +} + +# vim:set ts=2 sw=2 et: diff --git a/djv.install b/djv.install new file mode 100644 index 000000000000..ec1673a2da3a --- /dev/null +++ b/djv.install @@ -0,0 +1,13 @@ +post_install() { + update-desktop-database -q + update-mime-database usr/share/mime &> /dev/null + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/djv_view.desktop b/djv_view.desktop new file mode 100644 index 000000000000..c6b753d30b4d --- /dev/null +++ b/djv_view.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=DJV View +GenericName=Image sequence viewer +Type=Application +Exec=djv_view +Icon=/usr/share/pixmaps/djv_view.png +Terminal=false +MimeType=image/jpeg;image/png;image/tiff; +Categories=AudioVideo; diff --git a/libjpeg-boolean.patch b/libjpeg-boolean.patch new file mode 100644 index 000000000000..cfdfe3749d5d --- /dev/null +++ b/libjpeg-boolean.patch @@ -0,0 +1,36 @@ +--- a/plugins/djvJpegPlugin/djvJpegLoad.cpp ++++ b/plugins/djvJpegPlugin/djvJpegLoad.cpp +@@ -215,14 +215,7 @@ bool jpegOpen( + + libjpeg::jpeg_save_markers(jpeg, JPEG_COM, 0xFFFF); + +- //! \todo How do we fix the windows/libjpeg TRUE name clash? +- +- libjpeg::boolean b = +-#if defined(DJV_WINDOWS) +- 1; +-#else +- libjpeg::TRUE; +-#endif // DJV_WINDOWS ++ libjpeg::boolean b = 1; + + if (! libjpeg::jpeg_read_header(jpeg, b)) + { +--- a/plugins/djvJpegPlugin/djvJpegSave.cpp ++++ b/plugins/djvJpegPlugin/djvJpegSave.cpp +@@ -242,14 +242,7 @@ bool jpegOpen( + + libjpeg::jpeg_set_defaults(jpeg); + +- //! \todo How do we fix the windows/libjpeg TRUE name clash? +- +- libjpeg::boolean b = +-#if defined(DJV_WINDOWS) +- 1; +-#else +- libjpeg::TRUE; +-#endif // DJV_WINDOWS ++ libjpeg::boolean b = 1; + + libjpeg::jpeg_set_quality(jpeg, quality, b); + libjpeg::jpeg_start_compress(jpeg, b); diff --git a/openexr.patch b/openexr.patch new file mode 100644 index 000000000000..2d8ed37173c7 --- /dev/null +++ b/openexr.patch @@ -0,0 +1,351 @@ +From 411e95f5f70cfca990173f44371695b1e6afe721 Mon Sep 17 00:00:00 2001 +From: Darby Johnston <darbyjohnston@yahoo.com> +Date: Sat, 17 Jan 2015 12:05:58 -0800 +Subject: [PATCH] Backwards compatibility with older versions of OpenEXR + +--- + plugins/djvOpenExrPlugin/djvOpenExrPlugin.cpp | 38 ++++++++++++++++++++++----- + plugins/djvOpenExrPlugin/djvOpenExrPlugin.h | 6 +++++ + plugins/djvOpenExrPlugin/djvOpenExrSave.cpp | 4 +++ + plugins/djvOpenExrPlugin/djvOpenExrWidget.cpp | 29 +++++++++++++++++--- + plugins/djvOpenExrPlugin/djvOpenExrWidget.h | 5 +++- + 5 files changed, 71 insertions(+), 11 deletions(-) + +diff --git a/plugins/djvOpenExrPlugin/djvOpenExrPlugin.cpp b/plugins/djvOpenExrPlugin/djvOpenExrPlugin.cpp +index ff31697..6164468 100644 +--- a/plugins/djvOpenExrPlugin/djvOpenExrPlugin.cpp ++++ b/plugins/djvOpenExrPlugin/djvOpenExrPlugin.cpp +@@ -97,8 +97,11 @@ djvOpenExrPlugin::Options::Options() : + inputColorProfile (djvOpenExrPlugin::COLOR_PROFILE_GAMMA), + inputGamma (2.2), + channels (djvOpenExrPlugin::CHANNELS_GROUP_KNOWN), +- compression (djvOpenExrPlugin::COMPRESSION_NONE), ++ compression (djvOpenExrPlugin::COMPRESSION_NONE) ++#if OPENEXR_VERSION_HEX >= 0x02020000 ++ , + dwaCompressionLevel(45.0) ++#endif // OPENEXR_VERSION_HEX + {} + + //------------------------------------------------------------------------------ +@@ -129,9 +132,13 @@ const QStringList & djvOpenExrPlugin::compressionLabels() + "PIZ" << + "PXR24" << + "B44" << +- "B44A" << ++ "B44A" ++#if OPENEXR_VERSION_HEX >= 0x02020000 ++ << + "DWAA" << +- "DWAB"; ++ "DWAB" ++#endif // OPENEXR_VERSION_HEX ++ ; + + DJV_ASSERT(data.count() == COMPRESSION_COUNT); + +@@ -833,8 +840,12 @@ const QStringList & djvOpenExrPlugin::optionsLabels() + "Input Gamma" << + "Input Exposure" << + "Channels" << +- "Compression" << ++ "Compression" ++#if OPENEXR_VERSION_HEX >= 0x02020000 ++ << + "DWA Compression Level"; ++#endif // OPENEXR_VERSION_HEX ++ ; + + DJV_ASSERT(data.count() == OPTIONS_COUNT); + +@@ -932,10 +943,12 @@ QStringList djvOpenExrPlugin::option(const QString & in) const + { + out << _options.compression; + } ++#if OPENEXR_VERSION_HEX >= 0x02020000 + else if (0 == in.compare(options()[DWA_COMPRESSION_LEVEL_OPTION], Qt::CaseInsensitive)) + { + out << _options.dwaCompressionLevel; + } ++#endif // OPENEXR_VERSION_HEX + + return out; + } +@@ -1043,6 +1056,7 @@ bool djvOpenExrPlugin::setOption(const QString & in, QStringList & data) + Q_EMIT optionChanged(in); + } + } ++#if OPENEXR_VERSION_HEX >= 0x02020000 + else if (0 == in.compare(options()[DWA_COMPRESSION_LEVEL_OPTION], Qt::CaseInsensitive)) + { + double compressionLevel = 0.0; +@@ -1058,6 +1072,7 @@ bool djvOpenExrPlugin::setOption(const QString & in, QStringList & data) + Q_EMIT optionChanged(in); + } + } ++#endif // OPENEXR_VERSION_HEX + } + catch (const QString &) + { +@@ -1111,10 +1126,12 @@ void djvOpenExrPlugin::commandLine(QStringList & in) throw (QString) + { + in >> _options.compression; + } ++#if OPENEXR_VERSION_HEX >= 0x02020000 + else if ("-exr_dwa_compression_level" == arg) + { + in >> _options.dwaCompressionLevel; + } ++#endif // OPENEXR_VERSION_HEX + else + { + tmp << arg; +@@ -1154,9 +1171,12 @@ QString djvOpenExrPlugin::commandLineHelp() const + " -exr_compression (value)\n" + " Set the file compression used when saving OpenEXR images. Options = " + "%9. Default = %10.\n" ++#if OPENEXR_VERSION_HEX >= 0x02020000 + " -exr_dwa_compression_level (value)\n" + " Set the DWA compression level used when saving OpenEXR images. " +-"Default = %11.\n"). ++"Default = %11.\n" ++#endif // OPENEXR_VERSION_HEX ++ ). + arg(djvStringUtil::label(_options.threadsEnable).join(", ")). + arg(djvStringUtil::label(_options.threadCount).join(", ")). + arg(djvOpenExrPlugin::colorProfileLabels().join(", ")). +@@ -1166,8 +1186,12 @@ QString djvOpenExrPlugin::commandLineHelp() const + arg(djvOpenExrPlugin::channelsLabels().join(", ")). + arg(djvStringUtil::label(_options.channels).join(", ")). + arg(djvOpenExrPlugin::compressionLabels().join(", ")). +- arg(djvStringUtil::label(_options.compression).join(", ")). +- arg(_options.dwaCompressionLevel); ++ arg(djvStringUtil::label(_options.compression).join(", ")) ++#if OPENEXR_VERSION_HEX >= 0x02020000 ++ . ++ arg(_options.dwaCompressionLevel) ++#endif // OPENEXR_VERSION_HEX ++ ; + } + + djvImageLoad * djvOpenExrPlugin::createLoad() const +diff --git a/plugins/djvOpenExrPlugin/djvOpenExrPlugin.h b/plugins/djvOpenExrPlugin/djvOpenExrPlugin.h +index 8c07e93..d91845e 100644 +--- a/plugins/djvOpenExrPlugin/djvOpenExrPlugin.h ++++ b/plugins/djvOpenExrPlugin/djvOpenExrPlugin.h +@@ -151,8 +151,10 @@ public: + COMPRESSION_PXR24, + COMPRESSION_B44, + COMPRESSION_B44A, ++#if OPENEXR_VERSION_HEX >= 0x02020000 + COMPRESSION_DWAA, + COMPRESSION_DWAB, ++#endif // OPENEXR_VERSION_HEX + + COMPRESSION_COUNT + }; +@@ -254,7 +256,9 @@ public: + INPUT_EXPOSURE_OPTION, + CHANNELS_OPTION, + COMPRESSION_OPTION, ++#if OPENEXR_VERSION_HEX >= 0x02020000 + DWA_COMPRESSION_LEVEL_OPTION, ++#endif // OPENEXR_VERSION_HEX + + OPTIONS_COUNT + }; +@@ -278,7 +282,9 @@ public: + djvColorProfile::Exposure inputExposure; + djvOpenExrPlugin::CHANNELS channels; + djvOpenExrPlugin::COMPRESSION compression; ++#if OPENEXR_VERSION_HEX >= 0x02020000 + double dwaCompressionLevel; ++#endif // OPENEXR_VERSION_HEX + }; + + virtual void initPlugin() throw (djvError); +diff --git a/plugins/djvOpenExrPlugin/djvOpenExrSave.cpp b/plugins/djvOpenExrPlugin/djvOpenExrSave.cpp +index 561a960..d9bc1e9 100644 +--- a/plugins/djvOpenExrPlugin/djvOpenExrSave.cpp ++++ b/plugins/djvOpenExrPlugin/djvOpenExrSave.cpp +@@ -243,6 +243,7 @@ void djvOpenExrSave::_open(const QString & in, const djvImageIoInfo & info) + compression = Imf::B44A_COMPRESSION; + break; + ++#if OPENEXR_VERSION_HEX >= 0x02020000 + case djvOpenExrPlugin::COMPRESSION_DWAA: + compression = Imf::DWAA_COMPRESSION; + break; +@@ -250,13 +251,16 @@ void djvOpenExrSave::_open(const QString & in, const djvImageIoInfo & info) + case djvOpenExrPlugin::COMPRESSION_DWAB: + compression = Imf::DWAB_COMPRESSION; + break; ++#endif // OPENEXR_VERSION_HEX + + default: break; + } + + header.insert(Imf::CompressionAttribute::staticTypeName(), compression); + ++#if OPENEXR_VERSION_HEX >= 0x02020000 + addDwaCompressionLevel(header, _options.dwaCompressionLevel); ++#endif // OPENEXR_VERSION_HEX + + // Set image tags. + +diff --git a/plugins/djvOpenExrPlugin/djvOpenExrWidget.cpp b/plugins/djvOpenExrPlugin/djvOpenExrWidget.cpp +index fdeb674..5d05c47 100644 +--- a/plugins/djvOpenExrPlugin/djvOpenExrWidget.cpp ++++ b/plugins/djvOpenExrPlugin/djvOpenExrWidget.cpp +@@ -63,8 +63,11 @@ djvOpenExrWidget::djvOpenExrWidget(djvOpenExrPlugin * plugin) : + _inputExposureKneeLowWidget (0), + _inputExposureKneeHighWidget(0), + _channelsWidget (0), +- _compressionWidget (0), ++ _compressionWidget (0) ++#if OPENEXR_VERSION_HEX >= 0x02020000 ++ , + _dwaCompressionLevelWidget (0) ++#endif // OPENEXR_VERSION_HEX + { + //DJV_DEBUG("djvOpenExrWidget::djvOpenExrWidget"); + +@@ -108,9 +111,11 @@ djvOpenExrWidget::djvOpenExrWidget(djvOpenExrPlugin * plugin) : + _compressionWidget->setSizePolicy( + QSizePolicy::Fixed, QSizePolicy::Fixed); + ++#if OPENEXR_VERSION_HEX >= 0x02020000 + _dwaCompressionLevelWidget = new djvFloatEditSlider; + _dwaCompressionLevelWidget->editObject()->setClamp(false); + _dwaCompressionLevelWidget->sliderObject()->setRange(0.0, 200.0); ++#endif // OPENEXR_VERSION_HEX + + // Layout the widgets. + +@@ -149,7 +154,9 @@ djvOpenExrWidget::djvOpenExrWidget(djvOpenExrPlugin * plugin) : + "Set the file compression used when saving OpenEXR images."); + formLayout = prefsGroupBox->createLayout(); + formLayout->addRow(_compressionWidget); ++#if OPENEXR_VERSION_HEX >= 0x02020000 + formLayout->addRow("DWA compression level:", _dwaCompressionLevelWidget); ++#endif // OPENEXR_VERSION_HEX + layout->addWidget(prefsGroupBox); + + layout->addStretch(); +@@ -194,9 +201,11 @@ djvOpenExrWidget::djvOpenExrWidget(djvOpenExrPlugin * plugin) : + tmp = _plugin->option( + _plugin->options()[djvOpenExrPlugin::COMPRESSION_OPTION]); + tmp >> _options.compression; ++#if OPENEXR_VERSION_HEX >= 0x02020000 + tmp = _plugin->option( + _plugin->options()[djvOpenExrPlugin::DWA_COMPRESSION_LEVEL_OPTION]); + tmp >> _options.dwaCompressionLevel; ++#endif // OPENEXR_VERSION_HEX + + widgetUpdate(); + +@@ -257,10 +266,12 @@ djvOpenExrWidget::djvOpenExrWidget(djvOpenExrPlugin * plugin) : + SIGNAL(activated(int)), + SLOT(compressionCallback(int))); + ++#if OPENEXR_VERSION_HEX >= 0x02020000 + connect( + _dwaCompressionLevelWidget, + SIGNAL(valueChanged(double)), + SLOT(dwaCompressionLevelCallback(double))); ++#endif // OPENEXR_VERSION_HEX + } + + djvOpenExrWidget::~djvOpenExrWidget() +@@ -301,9 +312,11 @@ void djvOpenExrWidget::pluginCallback(const QString & option) + else if (0 == option.compare(_plugin->options()[ + djvOpenExrPlugin::COMPRESSION_OPTION], Qt::CaseInsensitive)) + tmp >> _options.compression; ++#if OPENEXR_VERSION_HEX >= 0x02020000 + else if (0 == option.compare(_plugin->options()[ + djvOpenExrPlugin::DWA_COMPRESSION_LEVEL_OPTION], Qt::CaseInsensitive)) + tmp >> _options.dwaCompressionLevel; ++#endif // OPENEXR_VERSION_HEX + } + catch (const QString &) + { +@@ -386,12 +399,14 @@ void djvOpenExrWidget::compressionCallback(int in) + pluginUpdate(); + } + ++#if OPENEXR_VERSION_HEX >= 0x02020000 + void djvOpenExrWidget::dwaCompressionLevelCallback(double in) + { + _options.dwaCompressionLevel = in; + + pluginUpdate(); + } ++#endif // OPENEXR_VERSION_HEX + + void djvOpenExrWidget::pluginUpdate() + { +@@ -418,9 +433,11 @@ void djvOpenExrWidget::pluginUpdate() + tmp << _options.compression; + _plugin->setOption(_plugin->options()[ + djvOpenExrPlugin::COMPRESSION_OPTION], tmp); ++#if OPENEXR_VERSION_HEX >= 0x02020000 + tmp << _options.dwaCompressionLevel; + _plugin->setOption(_plugin->options()[ + djvOpenExrPlugin::DWA_COMPRESSION_LEVEL_OPTION], tmp); ++#endif // OPENEXR_VERSION_HEX + } + + void djvOpenExrWidget::widgetUpdate() +@@ -437,8 +454,12 @@ void djvOpenExrWidget::widgetUpdate() + _inputExposureKneeLowWidget << + _inputExposureKneeHighWidget << + _channelsWidget << +- _compressionWidget << +- _dwaCompressionLevelWidget); ++ _compressionWidget ++#if OPENEXR_VERSION_HEX >= 0x02020000 ++ << ++ _dwaCompressionLevelWidget ++#endif // OPENEXR_VERSION_HEX ++ ); + + _inputGammaWidget->setVisible( + djvOpenExrPlugin::COLOR_PROFILE_GAMMA == _options.inputColorProfile); +@@ -471,7 +492,9 @@ void djvOpenExrWidget::widgetUpdate() + _inputExposureKneeHighWidget->setValue(_options.inputExposure.kneeHigh); + _channelsWidget->setCurrentIndex(_options.channels); + ++#if OPENEXR_VERSION_HEX >= 0x02020000 + _compressionWidget->setCurrentIndex(_options.compression); + _dwaCompressionLevelWidget->setValue(_options.dwaCompressionLevel); ++#endif // OPENEXR_VERSION_HEX + } + +diff --git a/plugins/djvOpenExrPlugin/djvOpenExrWidget.h b/plugins/djvOpenExrPlugin/djvOpenExrWidget.h +index 302088e..66157d4 100644 +--- a/plugins/djvOpenExrPlugin/djvOpenExrWidget.h ++++ b/plugins/djvOpenExrPlugin/djvOpenExrWidget.h +@@ -83,8 +83,9 @@ private Q_SLOTS: + void inputExposureKneeHighCallback(double); + void channelsCallback(int); + void compressionCallback(int); ++#if OPENEXR_VERSION_HEX >= 0x02020000 + void dwaCompressionLevelCallback(double); +- ++#endif // OPENEXR_VERSION_HEX + void pluginUpdate(); + void widgetUpdate(); + +@@ -103,7 +104,9 @@ private: + djvFloatEditSlider * _inputExposureKneeHighWidget; + QComboBox * _channelsWidget; + QComboBox * _compressionWidget; ++#if OPENEXR_VERSION_HEX >= 0x02020000 + djvFloatEditSlider * _dwaCompressionLevelWidget; ++#endif // OPENEXR_VERSION_HEX + }; + + //@} // djvOpenExrPlugin +-- +2.3.0 + |