pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New packages to create a minimal photo gallery webpage



Module Name:	pkgsrc-wip
Committed By:	Adrian Steinmann <ast%NetBSD.org@localhost>
Pushed By:	ast
Date:		Sat Oct 3 22:05:15 2015 +0200
Changeset:	3cdd69bbc6768c153a05fb74197a32c799ebd33e

Added Files:
	facedetect/DESCR
	facedetect/Makefile
	facedetect/PLIST
	facedetect/distinfo
	fgallery/DESCR
	fgallery/Makefile
	fgallery/PLIST
	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:
New packages to create a minimal photo gallery webpage

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3cdd69bbc6768c153a05fb74197a32c799ebd33e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 facedetect/DESCR          | 12 +++++++++
 facedetect/Makefile       | 46 +++++++++++++++++++++++++++++++++
 facedetect/PLIST          |  5 ++++
 facedetect/distinfo       |  5 ++++
 fgallery/DESCR            | 20 ++++++++++++++
 fgallery/Makefile         | 66 +++++++++++++++++++++++++++++++++++++++++++++++
 fgallery/PLIST            | 25 ++++++++++++++++++
 fgallery/distinfo         | 11 ++++++++
 fgallery/patches/patch-aa | 12 +++++++++
 fgallery/patches/patch-ab | 13 ++++++++++
 fgallery/patches/patch-ac | 13 ++++++++++
 fgallery/patches/patch-ad | 29 +++++++++++++++++++++
 fgallery/patches/patch-ae | 13 ++++++++++
 fgallery/patches/patch-af | 17 ++++++++++++
 14 files changed, 287 insertions(+)

diffs:
diff --git a/facedetect/DESCR b/facedetect/DESCR
new file mode 100644
index 0000000..5ca43a1
--- /dev/null
+++ b/facedetect/DESCR
@@ -0,0 +1,12 @@
+Facedetect is a simple face detector for batch processing. It
+answers the basic question: "Is there a face in this image?"
+and gives back either an exit code or the coordinates of each
+detected face in the standard output.
+
+The aim is to provide a basic command-line interface that's
+consistent and easy to use with software such as ImageMagick,
+while progressively improving the detection algorithm over
+time.
+
+Facedetect is currently used in fgallery to improve the
+thumbnail cutting region, so that faces are always centered.
diff --git a/facedetect/Makefile b/facedetect/Makefile
new file mode 100644
index 0000000..b51bdfd
--- /dev/null
+++ b/facedetect/Makefile
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.4 2015/10/03 21:32:48 ast Exp $
+#
+
+PKGBASE=        facedetect
+DISTNAME=       ${PKGBASE}-1.0
+PKGREVISION=    1
+CATEGORIES=     graphics
+
+MASTER_SITES=   ${MASTER_SITE_GITHUB:=wavexx/}
+GITHUB_PROJECT= ${PKGBASE}
+GITHUB_TAG=     d4a226674c71e89bc171f7b66de997acc1d82b72
+EXTRACT_OPTS_TAR= -s/facedetect-${GITHUB_TAG}/${DISTNAME}/p
+
+MAINTAINER=     ast%NetBSD.org@localhost
+HOMEPAGE=       http://www.thregr.org/~wavexx/software/facedetect/
+COMMENT=        Simple face detector for batch processing
+LICENSE=        gnu-gpl-v2
+
+DEPENDS+=       opencv>=2.4:../../graphics/opencv
+
+SUBST_CLASSES+=          fix-paths
+SUBST_STAGE.fix-paths=   post-extract
+SUBST_MESSAGE.fix-paths= Fixing absolute paths.
+SUBST_FILES.fix-paths=   facedetect
+SUBST_SED.fix-paths=     -e "s,'/usr/share/opencv,'${PREFIX}/share/OpenCV,g"
+
+INSTALLATION_DIRS= bin ${FD_DOCSDIR}
+
+FD_DOCSDIR=     share/doc/facedetect
+FD_DOCS=        README.rst COPYING.txt doc/biggest-best.jpg
+
+WRKSRC=         ${WRKDIR}/${DISTNAME}
+
+NO_BUILD=        yes
+REPLACE_PYTHON=  facedetect
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/${PKGBASE} ${DESTDIR}${PREFIX}/bin/${PKGBASE}
+
+post-install:
+.for file in ${FD_DOCS}
+	${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR}${PREFIX}/${FD_DOCSDIR}
+.endfor
+
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/facedetect/PLIST b/facedetect/PLIST
new file mode 100644
index 0000000..5c5b30e
--- /dev/null
+++ b/facedetect/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.3 2015/09/23 13:19:04 ast Exp $
+bin/facedetect
+share/doc/facedetect/COPYING.txt
+share/doc/facedetect/README.rst
+share/doc/facedetect/biggest-best.jpg
diff --git a/facedetect/distinfo b/facedetect/distinfo
new file mode 100644
index 0000000..62bbe4e
--- /dev/null
+++ b/facedetect/distinfo
@@ -0,0 +1,5 @@
+$NetBSD$
+
+SHA1 (facedetect-1.0-d4a226674c71e89bc171f7b66de997acc1d82b72.tar.gz) = 28c47eacf59f21f38dd18562aa2b81d43e71d1cf
+RMD160 (facedetect-1.0-d4a226674c71e89bc171f7b66de997acc1d82b72.tar.gz) = b8ac9ee08afdd041468334ccdca073c47fdcf7ff
+Size (facedetect-1.0-d4a226674c71e89bc171f7b66de997acc1d82b72.tar.gz) = 119021 bytes
diff --git a/fgallery/DESCR b/fgallery/DESCR
new file mode 100644
index 0000000..d9c4170
--- /dev/null
+++ b/fgallery/DESCR
@@ -0,0 +1,20 @@
+Fgallery is a minimalist javascript photo gallery.
+
+It is a static photo gallery generator with no frills that has a
+stylish, minimalist look: it shows your photos, and nothing else.
+
+You can see an example gallery at the following address:
+
+http://www.thregr.org/~wavexx/software/fgallery/demo/
+
+There is no server-side processing, only static generation. The
+resulting gallery can be uploaded anywhere without additional
+requirements and works with any modern browser.
+
+- Automatically orients pictures without quality loss.
+- Multi-camera friendly: automatically sorts pictures by time.
+- Adapts to the current screen size and aspect.
+- Supports face detection for improved thumbnail centering.
+- Loads fast! Especially over slow connections.
+- Can original (raw) pictures in a zip file for downloading.
+- Panoramas can be seen full-size by default.
diff --git a/fgallery/Makefile b/fgallery/Makefile
new file mode 100644
index 0000000..e24a5c7
--- /dev/null
+++ b/fgallery/Makefile
@@ -0,0 +1,66 @@
+# $NetBSD: Makefile,v 1.4 2015/10/03 21:32:48 ast Exp $
+#
+
+PKGBASE=        fgallery
+DISTNAME=       ${PKGBASE}-1.7
+PKGREVISION=    1
+CATEGORIES=     www
+
+MASTER_SITES=   http://www.thregr.org/~wavexx/software/fgallery/releases/
+EXTRACT_SUFX=   .zip
+
+MAINTAINER=     ast%NetBSD.org@localhost
+HOMEPAGE=       http://www.thregr.org/~wavexx/software/fgallery
+COMMENT=        Minimilistic, static photo gallery generator
+LICENSE=        gnu-gpl-v2
+
+NO_BUILD=       yes
+USE_TOOLS+=     perl
+REPLACE_PERL=   ${PKGBASE}
+
+DEPENDS+=       facedetect>=1.0:../../wip/facedetect
+
+SUBST_CLASSES+=          fix-paths
+SUBST_STAGE.fix-paths=   post-patch
+SUBST_MESSAGE.fix-paths= Fixing absolute paths.
+SUBST_FILES.fix-paths=   fgallery
+SUBST_SED.fix-paths=     -e "s,\"\$$RealBin/,\"${PREFIX}/share/fgallery/,g"
+
+FG_DOCSDIR=     share/doc/${PKGBASE}
+FG_DOCS=        COPYING NEWS.html NEWS.rst README.html README.rst
+FG_SHAREDIR=    share/${PKGBASE}/view
+FG_SRCDIR=      ${WRKDIR}/${DISTNAME}
+FG_VIEWDIR=     ${FG_SRCDIR}/view
+FG_VIEWFILES=   back.png \
+                cut-left.png \
+                cut-mov.png \
+                cut-right.png \
+                cut-top.png \
+                download.png \
+                eye.png \
+                index.css \
+                index.html \
+                index.js \
+                left.png \
+                mootools-core-1.4.js \
+                mootools-idle.js \
+                mootools-mooswipe.js \
+                mootools-more-1.4.js \
+                noise.png \
+                right.png \
+                throbber.gif
+
+INSTALLATION_DIRS= bin ${FG_DOCSDIR} ${FG_SHAREDIR}
+
+do-install:
+	${INSTALL_SCRIPT} ${FG_SRCDIR}/${PKGBASE} ${DESTDIR}${PREFIX}/bin/${PKGBASE}
+
+post-install:
+.for file in ${FG_DOCS}
+	${INSTALL_DATA} ${FG_SRCDIR}/${file} ${DESTDIR}${PREFIX}/${FG_DOCSDIR}
+.endfor
+.for file in ${FG_VIEWFILES}
+	${INSTALL_DATA} ${FG_VIEWDIR}/${file} ${DESTDIR}${PREFIX}/${FG_SHAREDIR}
+.endfor
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/fgallery/PLIST b/fgallery/PLIST
new file mode 100644
index 0000000..2a0274f
--- /dev/null
+++ b/fgallery/PLIST
@@ -0,0 +1,25 @@
+@comment $NetBSD$
+bin/fgallery
+share/doc/fgallery/COPYING
+share/doc/fgallery/NEWS.html
+share/doc/fgallery/NEWS.rst
+share/doc/fgallery/README.html
+share/doc/fgallery/README.rst
+share/fgallery/view/back.png
+share/fgallery/view/cut-left.png
+share/fgallery/view/cut-mov.png
+share/fgallery/view/cut-right.png
+share/fgallery/view/cut-top.png
+share/fgallery/view/download.png
+share/fgallery/view/eye.png
+share/fgallery/view/index.css
+share/fgallery/view/index.html
+share/fgallery/view/index.js
+share/fgallery/view/left.png
+share/fgallery/view/mootools-core-1.4.js
+share/fgallery/view/mootools-idle.js
+share/fgallery/view/mootools-mooswipe.js
+share/fgallery/view/mootools-more-1.4.js
+share/fgallery/view/noise.png
+share/fgallery/view/right.png
+share/fgallery/view/throbber.gif
diff --git a/fgallery/distinfo b/fgallery/distinfo
new file mode 100644
index 0000000..313e323
--- /dev/null
+++ b/fgallery/distinfo
@@ -0,0 +1,11 @@
+$NetBSD$
+
+SHA1 (fgallery-1.7.zip) = 2ca73247e2aebbb682ae6c1f03be24846276c393
+RMD160 (fgallery-1.7.zip) = fface70de739bd020528ae0ec180c0e27a8e5b72
+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-ae) = 18d4bf0e39c06991bae457b2ee1479d603b49a05
+SHA1 (patch-af) = ebbb72ec0cf26f856478004768b59d80df34edf5
diff --git a/fgallery/patches/patch-aa b/fgallery/patches/patch-aa
new file mode 100644
index 0000000..1aafeca
--- /dev/null
+++ b/fgallery/patches/patch-aa
@@ -0,0 +1,12 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht 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
+@@ -20,7 +20,6 @@
+ use File::Basename qw{fileparse};
+ use File::Find qw{find};
+ use File::Path qw{make_path remove_tree};
+-use FindBin qw{$RealBin};
+ use Getopt::Long qw{:config bundling};
+ use IO::Handle;
+ use Image::ExifTool qw{ImageInfo};
diff --git a/fgallery/patches/patch-ab b/fgallery/patches/patch-ab
new file mode 100644
index 0000000..9da852f
--- /dev/null
+++ b/fgallery/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht 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
+@@ -29,7 +29,7 @@
+ use Time::Piece;
+ 
+ # defaults
+-my $mode = 0644;
++my $mode = oct(644);
+ my $slim = 0;
+ my $ofile = 0;
+ my $orient = 1;
diff --git a/fgallery/patches/patch-ac b/fgallery/patches/patch-ac
new file mode 100644
index 0000000..ad1fbd2
--- /dev/null
+++ b/fgallery/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht 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
+@@ -86,7 +86,7 @@
+ }
+ 
+ 
+-sub any(&@)
++sub any
+ {
+   my ($fun, @seq) = @_;
+   return (List::Util::first { &$fun() } @seq)? 1: 0;
diff --git a/fgallery/patches/patch-ad b/fgallery/patches/patch-ad
new file mode 100644
index 0000000..f897391
--- /dev/null
+++ b/fgallery/patches/patch-ad
@@ -0,0 +1,29 @@
+$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 @@
+ }
+ 
+ my $exiftrancmd;
+-if($orient)
++while($orient)
+ {
+-  if(!system("exiftran -h >/dev/null 2>&1")) {
++  if(system("exiftran -h >/dev/null 2>&1")) {
+     $exiftrancmd = "exiftran -aip";
+-  } elsif(!system("exifautotran >/dev/null 2>&1")) {
++    last;
++  }
++  if(system("exifautotran >/dev/null 2>&1")) {
+     $exiftrancmd = "exifautotran";
+-  } else {
+-    fatal("cannot execute exiftran or exifautotran for lossless JPEG autorotation");
++    last;
+   }
+ }
++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
new file mode 100644
index 0000000..9ea46e0
--- /dev/null
+++ b/fgallery/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht 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
+@@ -349,7 +354,7 @@
+     my (undef, undef, $suffix) = fileparse($file, qr/\.[^.]*$/);
+     return if(length($suffix) < 2);
+     $suffix = lc(substr($suffix, 1));
+-    if(any { $_ eq $suffix } @exts) {
++    if(any(sub {$_ eq $suffix},@exts)) {
+       push(@files, $file);
+     }
+   }
diff --git a/fgallery/patches/patch-af b/fgallery/patches/patch-af
new file mode 100644
index 0000000..ea1086f
--- /dev/null
+++ b/fgallery/patches/patch-af
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/03/04 19:04:20 oht 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
+@@ -680,8 +685,9 @@
+   push(@{$json{data}}, \%data);
+ }
+ 
+-open(JSON, ">$out/data.json");
+-print(JSON encode_json(\%json));
+-close(JSON);
++my $JSON;
++open($JSON, '>', "$out/data.json");
++print($JSON encode_json(\%json));
++close($JSON);
+ 
+ print("completed\n");


Home | Main Index | Thread Index | Old Index