mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
exiv2, bump to 0.28.5 (#12730)
strip and keep 0.27.7 for backwords compatibility
This commit is contained in:
@@ -3,34 +3,47 @@ DESCRIPTION="Exiv2 provides fast and easy read and write access to the Exif, \
|
||||
IPTC and XMP metadata of images in various formats. Exiv2 is available as \
|
||||
free software and with a commercial license, and is used in many projects."
|
||||
HOMEPAGE="https://www.exiv2.org/"
|
||||
COPYRIGHT="2004-2021 Exiv2 authors
|
||||
COPYRIGHT="2004-2025 Exiv2 authors
|
||||
2004-2013 Andreas Huggel
|
||||
2009 Brad Schick"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/Exiv2/exiv2/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="551b1266e3aabd321f6d555dccd776128ee449d5039feafee927a1f33f7a9753"
|
||||
CHECKSUM_SHA256="e1671f744e379a87ba0c984617406fdf8c0ad0c594e5122f525b2fb7c28d394d"
|
||||
PATCHES="exiv2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
|
||||
|
||||
PROVIDES="
|
||||
exiv2$secondaryArchSuffix = $portVersion
|
||||
lib:libexiv2$secondaryArchSuffix = $portVersion
|
||||
lib:libexiv2$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libbrotlicommon$secondaryArchSuffix
|
||||
lib:libbrotlidec$secondaryArchSuffix
|
||||
lib:libexpat$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libinih$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
exiv2${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libexiv2${secondaryArchSuffix} = $portVersion
|
||||
devel:libexiv2_xmp${secondaryArchSuffix} = $portVersion
|
||||
devel:libexiv2$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
exiv2$secondaryArchSuffix == $portVersion base
|
||||
@@ -38,7 +51,7 @@ REQUIRES_devel="
|
||||
|
||||
PROVIDES_tools="
|
||||
exiv2${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:exiv2$secondaryArchSuffix = $portVersion
|
||||
cmd:exiv2$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_tools="
|
||||
$REQUIRES
|
||||
@@ -50,16 +63,17 @@ ARCHITECTURES_doc="any"
|
||||
PROVIDES_doc="
|
||||
exiv2_doc = $portVersion
|
||||
"
|
||||
|
||||
REPLACES_doc="
|
||||
exiv2_x86_doc
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbrotlidec$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libinih$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
@@ -68,7 +82,7 @@ BUILD_PREREQUIRES="
|
||||
cmd:dot
|
||||
cmd:doxygen
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gettext
|
||||
cmd:gettext$secondaryArchSuffix
|
||||
cmd:grep
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
@@ -82,10 +96,14 @@ BUILD()
|
||||
|
||||
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DCMAKE_INSTALL_DOCDIR=$documentationDir/packages/exiv2 \
|
||||
-DEXIV2_ENABLE_CURL=ON \
|
||||
-DEXIV2_ENABLE_VIDEO=ON \
|
||||
-DEXIV2_BUILD_SAMPLES=OFF \
|
||||
-DEXIV2_BUILD_DOC=ON
|
||||
-DEXIV2_BUILD_DOC=ON \
|
||||
-DBUILD_WITH_STACK_PROTECTOR=OFF \
|
||||
-DCMAKE_SKIP_RPATH=YES
|
||||
|
||||
make -C build $jobArgs
|
||||
make -C build doc
|
||||
@@ -95,14 +113,9 @@ INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs libexiv2 libexiv2-xmp
|
||||
prepareInstalledDevelLib libexiv2
|
||||
fixPkgconfig
|
||||
|
||||
sed -i "s,\/$relativeLibDir/libexiv2-xmp.a,\/$relativeDevelopLibDir/libexiv2-xmp.a,g" \
|
||||
$libDir/cmake/exiv2/exiv2Config-release.cmake
|
||||
sed -i "s,\/include,\/$relativeIncludeDir,g" \
|
||||
$libDir/cmake/exiv2/exiv2Config.cmake
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
@@ -114,3 +127,9 @@ INSTALL()
|
||||
packageEntries doc \
|
||||
$documentationDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
# 60% tests passed, 2 tests failed out of 5
|
||||
ctest --test-dir build --output-on-failure
|
||||
}
|
||||
74
media-gfx/exiv2/exiv2_0.27-0.27.7.recipe
Normal file
74
media-gfx/exiv2/exiv2_0.27-0.27.7.recipe
Normal file
@@ -0,0 +1,74 @@
|
||||
SUMMARY="A C++ library and command line utility to manage image metadata"
|
||||
DESCRIPTION="Exiv2 provides fast and easy read and write access to the Exif, \
|
||||
IPTC and XMP metadata of images in various formats. Exiv2 is available as \
|
||||
free software and with a commercial license, and is used in many projects."
|
||||
HOMEPAGE="https://www.exiv2.org/"
|
||||
COPYRIGHT="2004-2021 Exiv2 authors
|
||||
2004-2013 Andreas Huggel
|
||||
2009 Brad Schick"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/Exiv2/exiv2/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="551b1266e3aabd321f6d555dccd776128ee449d5039feafee927a1f33f7a9753"
|
||||
SOURCE_DIR="exiv2-$portVersion"
|
||||
PATCHES="exiv2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
exiv2_0.27$secondaryArchSuffix = $portVersion
|
||||
lib:libexiv2$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libexpat$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
# cmd:gettext$secondaryArchSuffix
|
||||
cmd:grep
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CXXFLAGS="-D_BSD_SOURCE"
|
||||
export LDFLAGS="-lbsd -lnetwork"
|
||||
|
||||
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_INSTALL_DOCDIR=$documentationDir/packages/exiv2 \
|
||||
-DEXIV2_ENABLE_CURL=ON \
|
||||
-DEXIV2_ENABLE_VIDEO=ON \
|
||||
-DEXIV2_BUILD_EXIV2_COMMAND=OFF \
|
||||
-DEXIV2_BUILD_SAMPLES=OFF \
|
||||
-DEXIV2_BUILD_DOC=OFF
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs libexiv2 libexiv2-xmp
|
||||
fixPkgconfig
|
||||
|
||||
rm -rf $developDir $libDir/cmake
|
||||
}
|
||||
46
media-gfx/exiv2/patches/exiv2-0.28.5.patchset
Normal file
46
media-gfx/exiv2/patches/exiv2-0.28.5.patchset
Normal file
@@ -0,0 +1,46 @@
|
||||
From 6a69ca158bf2d3780cdbf4d33b50ef7fb9fddcc4 Mon Sep 17 00:00:00 2001
|
||||
From: Luc Schrijvers <begasus@gmail.com>
|
||||
Date: Sun, 10 Aug 2025 19:06:23 +0200
|
||||
Subject: Fix: error: 'path' was not declared in this scope
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Joachim Mairböck <j.mairboeck@gmail.com>
|
||||
|
||||
diff --git a/src/futils.cpp b/src/futils.cpp
|
||||
index 1797c1b..123375c 100644
|
||||
--- a/src/futils.cpp
|
||||
+++ b/src/futils.cpp
|
||||
@@ -58,6 +58,10 @@ namespace fs = std::experimental::filesystem;
|
||||
// clang-format on
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#include <image.h>
|
||||
+#endif
|
||||
+
|
||||
#ifndef _MAX_PATH
|
||||
#define _MAX_PATH 1024
|
||||
#endif
|
||||
@@ -386,6 +390,17 @@ std::string getProcessPath() {
|
||||
auto path = fs::path(pathbuf);
|
||||
#elif defined(__sun__)
|
||||
auto path = fs::read_symlink(Internal::stringFormat("/proc/%d/path/a.out", getpid()));
|
||||
+#elif defined(__HAIKU__)
|
||||
+ int32 cookie = 0;
|
||||
+ image_info info;
|
||||
+ while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK)
|
||||
+ {
|
||||
+ if (info.type == B_APP_IMAGE)
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ auto path = fs::path(info.name);
|
||||
#elif defined(__unix__)
|
||||
auto path = fs::read_symlink("/proc/self/exe");
|
||||
#endif
|
||||
--
|
||||
2.50.1
|
||||
|
||||
Reference in New Issue
Block a user