pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
added dependencies; better external command handling
Module Name: pkgsrc-wip
Committed By: Adrian Steinmann <ast%NetBSD.org@localhost>
Pushed By: ast
Date: Sun Oct 11 11:28:25 2015 +0200
Changeset: 77c60f55df597f7bd030c4796451e1b8a4f1259b
Modified Files:
fgallery/Makefile
fgallery/distinfo
fgallery/patches/patch-aa
fgallery/patches/patch-ab
fgallery/patches/patch-ac
fgallery/patches/patch-ad
fgallery/patches/patch-ae
fgallery/patches/patch-af
Log Message:
added dependencies; better external command handling
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=77c60f55df597f7bd030c4796451e1b8a4f1259b
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
fgallery/Makefile | 5 ++++
fgallery/distinfo | 2 +-
fgallery/patches/patch-aa | 2 +-
fgallery/patches/patch-ab | 2 +-
fgallery/patches/patch-ac | 2 +-
fgallery/patches/patch-ad | 69 ++++++++++++++++++++++++++++++++++++++++-------
fgallery/patches/patch-ae | 2 +-
fgallery/patches/patch-af | 2 +-
8 files changed, 70 insertions(+), 16 deletions(-)
diffs:
diff --git a/fgallery/Makefile b/fgallery/Makefile
index e24a5c7..6a71fef 100644
--- a/fgallery/Makefile
+++ b/fgallery/Makefile
@@ -19,6 +19,11 @@ USE_TOOLS+= perl
REPLACE_PERL= ${PKGBASE}
DEPENDS+= facedetect>=1.0:../../wip/facedetect
+DEPENDS+= ImageMagick>=6.9:../../graphics/ImageMagick
+DEPENDS+= jpegoptim>=1.4:../../graphics/jpegoptim
+DEPENDS+= pngcrush>=1.7:../../graphics/pngcrush
+DEPENDS+= lcms2>=2.7:../../graphics/lcms2
+DEPENDS+= p7zip>=9.38:../../archivers/p7zip
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= post-patch
diff --git a/fgallery/distinfo b/fgallery/distinfo
index 313e323..676bd22 100644
--- a/fgallery/distinfo
+++ b/fgallery/distinfo
@@ -6,6 +6,6 @@ Size (fgallery-1.7.zip) = 145719 bytes
SHA1 (patch-aa) = ea6913990d988f0d4e6676b3e7f75e1104c6d348
SHA1 (patch-ab) = 536ee6d16369ae4cd51db346a199bf57b833510e
SHA1 (patch-ac) = 9aa0319eafe721eea9ef0eee3934c6642227d36c
-SHA1 (patch-ad) = 0da10404403ecc9a6fe30a24262997af6b40820d
+SHA1 (patch-ad) = 08f5783bb5f9795f5b467f00b04209bcaf7a59b7
SHA1 (patch-ae) = 18d4bf0e39c06991bae457b2ee1479d603b49a05
SHA1 (patch-af) = ebbb72ec0cf26f856478004768b59d80df34edf5
diff --git a/fgallery/patches/patch-aa b/fgallery/patches/patch-aa
index 1aafeca..bfb7fa8 100644
--- a/fgallery/patches/patch-aa
+++ b/fgallery/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht Exp $
+$NetBSD: patch-aa,v 1.1.1.1 2015/10/11 19:04:20 ast Exp $
Path of fgallery/view code
--- fgallery.orig 2015-10-03 21:35:52.000000000 +0200
+++ fgallery 2015-10-03 21:39:40.000000000 +0200
diff --git a/fgallery/patches/patch-ab b/fgallery/patches/patch-ab
index 9da852f..71bf5b8 100644
--- a/fgallery/patches/patch-ab
+++ b/fgallery/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht Exp $
+$NetBSD: patch-ab,v 1.1.1.1 2015/10/11 19:04:20 ast Exp $
Use oct instead of 0###
--- fgallery.orig 2014-09-05 16:33:54.000000000 +0200
+++ fgallery 2015-10-02 11:10:05.000000000 +0200
diff --git a/fgallery/patches/patch-ac b/fgallery/patches/patch-ac
index ad1fbd2..17f6577 100644
--- a/fgallery/patches/patch-ac
+++ b/fgallery/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht Exp $
+$NetBSD: patch-ac,v 1.1.1.1 2015/10/11 19:04:20 ast Exp $
Don't use subroutine prototypes
--- fgallery.orig 2014-09-05 16:33:54.000000000 +0200
+++ fgallery 2015-10-02 11:10:05.000000000 +0200
diff --git a/fgallery/patches/patch-ad b/fgallery/patches/patch-ad
index f897391..019f49f 100644
--- a/fgallery/patches/patch-ad
+++ b/fgallery/patches/patch-ad
@@ -1,29 +1,78 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht Exp $
-Handle exiftran/exitautotran discovery better
---- fgallery.orig 2014-09-05 16:33:54.000000000 +0200
-+++ fgallery 2015-10-02 11:10:05.000000000 +0200
-@@ -326,16 +326,19 @@
+$NetBSD: patch-ac,v 1.1.1.1 2015/10/11 19:04:20 ast Exp $
+Handle discovery/checking of external commands uniformly
+--- fgallery.orig 2015-10-11 11:16:27.000000000 +0200
++++ fgallery 2015-10-11 11:11:52.000000000 +0200
+@@ -233,6 +233,12 @@
+ return int($value);
}
++# see if our environment has a given command installed
++sub cmd_exists
++{
++ my ($c) = @_;
++ return qx{/bin/sh -c "command -v $c"};
++}
+
+ sub print_help()
+ {
+@@ -299,41 +305,32 @@
+ fatal("output directory already exists, but doesn't look like a template copy");
+ }
+
+-# check tools
+-if(system("identify -version >/dev/null 2>&1")
+-|| system("convert -version >/dev/null 2>&1")) {
+- fatal("cannot run \"identify\" or \"convert\" (check if ImageMagick is installed)");
+-}
+-if(system("7za -h >/dev/null 2>&1"))
+-{
++# check for existence of external commands
++unless(cmd_exists('7z')) {
+ $p7zip = 0;
+- if(system("zip -h >/dev/null 2>&1")) {
+- fatal("cannot run \"zip\" (check if 7za or zip is installed)");
+- }
+-}
+-if(system("jpegoptim -V >/dev/null 2>&1")) {
+- $jpegoptim = 0;
++ cmd_exists('zip') || fatal('Missing 7z or zip command');
+ }
+-if(system("pngcrush -h >/dev/null 2>&1")) {
+- $pngoptim = 0;
+-}
+-if($facedet && system("facedetect -h >/dev/null 2>&1")) {
+- fatal("cannot run \"facedetect\" (see http://www.thregr.org/~wavexx/hacks/facedetect/)");
+-}
+-if($sRGB && system("tificc >/dev/null 2>&1")) {
+- fatal("cannot run \"tificc\" (check if liblcms2-utils is installed)");
+-}
+-
++fatal 'Missing identify or convert executable (from ImageMagick)'
++ unless cmd_exists('identify') || cmd_exists('convert');
++$jpegoptim = 0 unless cmd_exists('jpegoptim');
++$pngoptim = 0 unless cmd_exists('pngcrush');
++fatal 'Missing facedetect (see http://www.thregr.org/~wavexx/hacks/facedetect/'
++ if $facedet && !cmd_exists('facedetect');
++fatal 'Missing tificc executable (from lcms2 library)'
++ if $sRGB && !cmd_exists('tificc');
my $exiftrancmd;
-if($orient)
+while($orient)
{
- if(!system("exiftran -h >/dev/null 2>&1")) {
-+ if(system("exiftran -h >/dev/null 2>&1")) {
++ if(cmd_exists('exiftran')) {
$exiftrancmd = "exiftran -aip";
- } elsif(!system("exifautotran >/dev/null 2>&1")) {
+ last;
+ }
-+ if(system("exifautotran >/dev/null 2>&1")) {
++ if(cmd_exists('exifautotran')) {
$exiftrancmd = "exifautotran";
- } else {
- fatal("cannot execute exiftran or exifautotran for lossless JPEG autorotation");
+ last;
}
++ fatal 'Missing exiftran or exifautotran executable for JPEG autorotation'
++ unless $exiftrancmd;
}
-+fatal("cannot execute exiftran or exifautotran for lossless JPEG autorotation")
-+ if $orient && ! defined $exiftrancmd;
# list available files
- my @files;
diff --git a/fgallery/patches/patch-ae b/fgallery/patches/patch-ae
index 9ea46e0..ef00450 100644
--- a/fgallery/patches/patch-ae
+++ b/fgallery/patches/patch-ae
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht Exp $
+$NetBSD: patch-ae,v 1.1.1.1 2015/10/11 19:04:20 ast Exp $
Pass a code ref as expected
--- fgallery.orig 2014-09-05 16:33:54.000000000 +0200
+++ fgallery 2015-10-02 11:10:05.000000000 +0200
diff --git a/fgallery/patches/patch-af b/fgallery/patches/patch-af
index ea1086f..66d16ae 100644
--- a/fgallery/patches/patch-af
+++ b/fgallery/patches/patch-af
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht Exp $
+$NetBSD: patch-af,v 1.1.1.1 2015/10/11 19:04:20 ast Exp $
Don't use bare variable for filehandle
--- fgallery.orig 2014-09-05 16:33:54.000000000 +0200
+++ fgallery 2015-10-02 11:10:05.000000000 +0200
Home |
Main Index |
Thread Index |
Old Index