From b419a76ebeac6974b4c68c6b45b47eae9ab0297e Mon Sep 17 00:00:00 2001 From: Joe DeCapo <679017+JrGoodle@users.noreply.github.com> Date: Sun, 7 May 2023 17:22:44 -0500 Subject: [PATCH] +exiftool (#1868) * +exiftool * Try to fix script path --- projects/exiftool.org/package.yml | 62 ++++++++++++++++++++++++++++++ projects/exiftool.org/test.jpg | Bin 0 -> 288 bytes 2 files changed, 62 insertions(+) create mode 100644 projects/exiftool.org/package.yml create mode 100644 projects/exiftool.org/test.jpg diff --git a/projects/exiftool.org/package.yml b/projects/exiftool.org/package.yml new file mode 100644 index 00000000..22d83baf --- /dev/null +++ b/projects/exiftool.org/package.yml @@ -0,0 +1,62 @@ +distributable: + url: https://cpan.metacpan.org/authors/id/E/EX/EXIFTOOL/Image-ExifTool-{{version.raw}}.tar.gz + strip-components: 1 + +versions: + url: https://cpan.metacpan.org/authors/id/E/EX/EXIFTOOL + match: /Image-ExifTool-\d+\.\d+\.tar.gz + strip: + - /^Image-ExifTool-/ + - /.tar.gz + +dependencies: + perl.org: '*' + +build: + dependencies: + tea.xyz/gx/make: '*' + perl.org: '*' + script: | + # Enable large file support + # https://exiftool.org/forum/index.php?topic=3916.msg18182#msg18182 + sed -i.bak -e "s/LargeFileSupport => undef/LargeFileSupport => 1/" lib/Image/ExifTool.pm + rm lib/Image/ExifTool.pm.bak + + # replace the hard-coded path to the lib directory + sed -i.bak -e 's|unshift @INC, $incDir;|unshift @INC, "$FindBin::Bin/../libexec/lib";|' exiftool + rm exiftool.bak + + sed -i.bak '/^use strict;/i\ + use FindBin; + ' exiftool + rm exiftool.bak + + perl Makefile.PL + make all + + mkdir -p {{prefix}}/libexec + mv lib {{prefix}}/libexec/ + + mkdir -p {{prefix}}/bin + mv exiftool {{prefix}}/bin/ + fix-shebangs.ts {{prefix}}/bin/* + + mkdir -p {{prefix}}/share/doc + mv html/* {{prefix}}/share/doc/ + + if [ -f blib/man1/exiftool.1 ]; then + mkdir -p {{prefix}}/share/man/man1 + mv blib/man1/exiftool.1 {{prefix}}/share/man/man1/ + fi + + if [ -f blib/man3/File::RandomAccess.3 ]; then + mkdir -p {{prefix}}/share/man/man3 + mv blib/man3/* {{prefix}}/share/man/man3/ + fi + +provides: + - bin/exiftool + +test: + script: | + exiftool 'test.jpg' | grep 'MIME Type : image/jpeg' diff --git a/projects/exiftool.org/test.jpg b/projects/exiftool.org/test.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1adaa50a65fdac95983e0ae8e6dbe88d8248ba4f GIT binary patch literal 288 zcmb79$qm9l3>?SnUGF9mSqU1T5gtepP!%8Ap#~ll!SSJ!#TKvR$5^uL(TtDwXdjHH z={SLiaIipoV~@^SBF~*8uxH`GAxex;T_0tKfW A`2YX_ literal 0 HcmV?d00001