Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2015 21:34:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 202635] [NEW PORTS] multimedia/pHash: Open source perceptual hash library and multimedia/php-pHash (PHP extension for pHash)
Message-ID:  <bug-202635-13-pao6jEWhNx@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-202635-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-202635-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202635

Jan Beich <jbeich@FreeBSD.org> changed:

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

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

Everything is addressed in the attached patch waiting for your approval. OP=
ENMP
option is a bonus.

-------- multimedia/pHash --------=20

$ 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_L=
IBS
from environment.

  /bin/sh ../libtool --tag=3DCXX   --mode=3Dlink c++  -O2 -pipe -fstack-pro=
tector
-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=20
-L/usr/local/lib ../src/.libs/libpHash.so /usr/local/lib/libsndfile.so -lmp=
g123
-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 invocat=
ion)
  Makefile:323: recipe for target 'test_texthash' failed

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

>XUSES=3D		gmake:lite libtool

devel/gmake-lite is mainly used to avoid a circular dependency. If devel/gm=
ake
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 =3D @top_srcdir@
>X include_HEADERS =3D pHash-config.h
>X SUBDIRS =3D src bindings examples
>X EXTRA_DIST =3D $(subdirs) libpHash.spec
>X-pkgconfigdir =3D $(libdir)/pkgconfig
>X+pkgconfigdir =3D ${PREFIX}/libdata/pkgconfig
>X pkgconfig_DATA =3D pHash.pc
>X LIBTOOL_DEPS =3D @LIBTOOL_DEPS@

USES=3Dpathfix 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 =3D 1;
>X-#ifdef __GLIBC__
>X+#if defined(__GLIBC__) || defined(__FreeBSD__)
>X 		numCPU =3D 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=3D339
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=3D	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg

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

>XWRKSRC=3D		${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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-202635-13-pao6jEWhNx>