[Bug 202635] [NEW PORTS] multimedia/pHash: Open source perceptual hash library and multimedia/php-pHash (PHP extension for pHash)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 11 21:34:42 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202635

Jan Beich <jbeich at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress
           Assignee|freebsd-ports-bugs at FreeBSD. |jbeich at FreeBSD.org
                   |org                         |
                 CC|                            |cyberbotx at cyberbotx.com
 Attachment #160940|                            |maintainer-approval?(cyberb
              Flags|                            |otx at cyberbotx.com)

--- Comment #4 from Jan Beich <jbeich at FreeBSD.org> ---
Created attachment 160940
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=160940&action=edit
pre-commit fixup

Everything is addressed in the attached patch waiting for your approval. OPENMP
option is a bonus.

-------- multimedia/pHash -------- 

$ portlint -AC
WARN: Makefile: Consider defining LICENSE.
0 fatal errors and 1 warning found.

Does not compile with VIDEO option unselected. libpHash.so doesn't actually
link against libpthread.so but bootlegs it from libavcodec.so. The issue is
likely in m4/ax_pthread.m4 and can be worked around by overriding PTHREAD_LIBS
from environment.

  /bin/sh ../libtool --tag=CXX   --mode=link c++  -O2 -pipe -fstack-protector
-fno-strict-aliasing  -ffast-math -O3  -fstack-protector -L/usr/local/lib -o
test_texthash test_texthash.o ../src/libpHash.la -lmpg123 -lsamplerate
-lsndfile   -lpng -ljpeg -lfftw3
  libtool: link: c++ -O2 -pipe -fstack-protector -fno-strict-aliasing
-ffast-math -O3 -fstack-protector -o .libs/test_texthash test_texthash.o 
-L/usr/local/lib ../src/.libs/libpHash.so /usr/local/lib/libsndfile.so -lmpg123
-lsamplerate -lpng -ljpeg -lfftw3 -Wl,-rpath -Wl,/usr/local/lib
  ../src/.libs/libpHash.so: undefined reference to `pthread_create'
  c++: error: linker command failed with exit code 1 (use -v to see invocation)
  Makefile:323: recipe for target 'test_texthash' failed

Also, -ffast-math -O3 may hinder DEBUG builds if unconditional.

>XUSES=		gmake:lite libtool

devel/gmake-lite is mainly used to avoid a circular dependency. If devel/gmake
doesn't somehow depend on this port then drop :lite.

>X--- Makefile.in.orig	2013-04-23 18:48:25 UTC
>X+++ Makefile.in
>X@@ -291,7 +291,7 @@ top_srcdir = @top_srcdir@
>X include_HEADERS = pHash-config.h
>X SUBDIRS = src bindings examples
>X EXTRA_DIST = $(subdirs) libpHash.spec
>X-pkgconfigdir = $(libdir)/pkgconfig
>X+pkgconfigdir = ${PREFIX}/libdata/pkgconfig
>X pkgconfig_DATA = pHash.pc
>X LIBTOOL_DEPS = @LIBTOOL_DEPS@

USES=pathfix exists exactly for such cases.

>X--- src/pHash.cpp.orig	2013-04-13 17:23:12 UTC
>X+++ src/pHash.cpp
>X@@ -34,7 +34,7 @@
>X int ph_num_threads()
>X {
>X 	int numCPU = 1;
>X-#ifdef __GLIBC__
>X+#if defined(__GLIBC__) || defined(__FreeBSD__)
>X 		numCPU = sysconf( _SC_NPROCESSORS_ONLN );
>X #else
>X 		int mib[2];

_SC_NPROCESSORS_ONLN maybe standardized in POSIX one day[1]. Better, use the
version that would work on at least DragonFly as well.

http://austingroupbugs.net/view.php?id=339
http://muscles.dragonflybsd.org/bulk/latest-per-pkg/pHash/ (not yet)

-------- multimedia/php-pHash --------

$ portlint -AC
WARN: Makefile: Consider defining LICENSE.
0 fatal errors and 1 warning found.

>XBUILD_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg

Looking under ${WRKSRC} nothing uses CImg.h unlike multimedia/pHash where it's
conditional against some options. Maybe make it RUN_DEPENDS there to avoid
leaking the implementation detail into consumers.

>XWRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/bindings/php

Convert to WRKSRC_SUBDIR.

>Xpre-install:
>X	@${STRIP_CMD} ${WRKSRC}/modules/pHash.so

Redundant as Mk/bsd.php.mk uses INSTALL_LIB which strips module according to
STRIP variable or DEBUG option. Also, see install(1) manpage for -s flag.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list