View | Details | Raw Unified | Return to bug 202635
Collapse All | Expand All

(-)multimedia/pHash/Makefile (-2 / +12 lines)
Lines 10-21 MASTER_SITES= http://phash.org/releases/ \ Link Here
10
MAINTAINER=	cyberbotx@cyberbotx.com
10
MAINTAINER=	cyberbotx@cyberbotx.com
11
COMMENT=	Open source perceptual hash library
11
COMMENT=	Open source perceptual hash library
12
12
13
USES=		gmake:lite libtool
13
LICENSE=	GPLv3 # or any later version
14
15
USES=		gmake libtool pathfix
14
GNU_CONFIGURE=	yes
16
GNU_CONFIGURE=	yes
17
CONFIGURE_ENV=	PTHREAD_LIBS="-lpthread"
15
INSTALL_TARGET=	install-strip
18
INSTALL_TARGET=	install-strip
16
USE_LDCONFIG=	yes
19
USE_LDCONFIG=	yes
17
20
18
OPTIONS_DEFINE=	FFTW JPEG PNG
21
OPTIONS_DEFINE=	DEBUG FFTW JPEG OPENMP PNG
19
OPTIONS_MULTI=	HASHING
22
OPTIONS_MULTI=	HASHING
20
OPTIONS_MULTI_HASHING=	AUDIO IMAGE VIDEO
23
OPTIONS_MULTI_HASHING=	AUDIO IMAGE VIDEO
21
OPTIONS_DEFAULT=	FFTW JPEG PNG AUDIO IMAGE VIDEO
24
OPTIONS_DEFAULT=	FFTW JPEG PNG AUDIO IMAGE VIDEO
Lines 23-34 AUDIO_DESC= Enable audio hashing Link Here
23
IMAGE_DESC=	Enable image hashing
26
IMAGE_DESC=	Enable image hashing
24
VIDEO_DESC=	Enable video hashing
27
VIDEO_DESC=	Enable video hashing
25
28
29
DEBUG_CONFIGURE_ENABLE=	debug
30
26
FFTW_CONFIGURE_WITH=	fftw
31
FFTW_CONFIGURE_WITH=	fftw
27
FFTW_LIB_DEPENDS=	libfftw3.so:${PORTSDIR}/math/fftw3
32
FFTW_LIB_DEPENDS=	libfftw3.so:${PORTSDIR}/math/fftw3
28
33
29
JPEG_CONFIGURE_WITH=	libjpeg
34
JPEG_CONFIGURE_WITH=	libjpeg
30
JPEG_USES=		jpeg
35
JPEG_USES=		jpeg
31
36
37
OPENMP_CONFIGURE_ENABLE=openmp
38
OPENMP_USES=		compiler:openmp
39
32
PNG_CONFIGURE_WITH=	libpng
40
PNG_CONFIGURE_WITH=	libpng
33
PNG_LIB_DEPENDS=	libpng.so:${PORTSDIR}/graphics/png
41
PNG_LIB_DEPENDS=	libpng.so:${PORTSDIR}/graphics/png
34
42
Lines 39-47 AUDIO_LIB_DEPENDS= libsndfile.so:${PORTSDIR}/audio/libsndfile \ Link Here
39
47
40
IMAGE_CONFIGURE_ENABLE=	image-hash
48
IMAGE_CONFIGURE_ENABLE=	image-hash
41
IMAGE_BUILD_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg
49
IMAGE_BUILD_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg
50
IMAGE_RUN_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg
42
51
43
VIDEO_CONFIGURE_ENABLE=	video-hash
52
VIDEO_CONFIGURE_ENABLE=	video-hash
44
VIDEO_BUILD_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg
53
VIDEO_BUILD_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg
54
VIDEO_RUN_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg
45
VIDEO_LIB_DEPENDS=	libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
55
VIDEO_LIB_DEPENDS=	libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
46
56
47
.include <bsd.port.mk>
57
.include <bsd.port.mk>
(-)multimedia/pHash/files/patch-Makefile.in (-11 lines)
Removed Link Here
1
--- Makefile.in.orig	2013-04-23 18:48:25 UTC
2
+++ Makefile.in
3
@@ -291,7 +291,7 @@ top_srcdir = @top_srcdir@
4
 include_HEADERS = pHash-config.h
5
 SUBDIRS = src bindings examples
6
 EXTRA_DIST = $(subdirs) libpHash.spec
7
-pkgconfigdir = $(libdir)/pkgconfig
8
+pkgconfigdir = ${PREFIX}/libdata/pkgconfig
9
 pkgconfig_DATA = pHash.pc
10
 LIBTOOL_DEPS = @LIBTOOL_DEPS@
11
 all: config.h pHash-config.h
(-)multimedia/pHash/files/patch-src_pHash.cpp (-2 / +13 lines)
Lines 1-11 Link Here
1
--- src/pHash.cpp.orig	2013-04-13 17:23:12 UTC
1
--- src/pHash.cpp.orig	2013-04-13 17:23:12 UTC
2
+++ src/pHash.cpp
2
+++ src/pHash.cpp
3
@@ -34,7 +34,7 @@
3
@@ -34,14 +34,18 @@
4
 int ph_num_threads()
4
 int ph_num_threads()
5
 {
5
 {
6
 	int numCPU = 1;
6
 	int numCPU = 1;
7
-#ifdef __GLIBC__
7
-#ifdef __GLIBC__
8
+#if defined(__GLIBC__) || defined(__FreeBSD__)
8
+#ifdef _SC_NPROCESSORS_ONLN
9
 		numCPU = sysconf( _SC_NPROCESSORS_ONLN );
9
 		numCPU = sysconf( _SC_NPROCESSORS_ONLN );
10
 #else
10
 #else
11
 		int mib[2];
11
 		int mib[2];
12
 		size_t len; 
13
 
14
 		mib[0] = CTL_HW;
15
+#ifdef HW_AVAILCPU
16
 		mib[1] = HW_AVAILCPU;
17
+#else
18
+		mib[1] = HW_NCPU;
19
+#endif
20
 
21
 		sysctl(mib, 2, &numCPU, &len, NULL, 0);
22
 
(-)multimedia/php-pHash/Makefile (-5 / +4 lines)
Lines 11-17 PKGNAMEPREFIX= php- Link Here
11
MAINTAINER=	cyberbotx@cyberbotx.com
11
MAINTAINER=	cyberbotx@cyberbotx.com
12
COMMENT=	PHP extension for the pHash perceptual hash library
12
COMMENT=	PHP extension for the pHash perceptual hash library
13
13
14
BUILD_DEPENDS=	${LOCALBASE}/include/CImg.h:${PORTSDIR}/graphics/cimg
14
LICENSE=	PHP30
15
LICENSE_FILE=	${WRKSRC}/LICENSE
16
15
LIB_DEPENDS=	libpHash.so:${PORTSDIR}/multimedia/pHash
17
LIB_DEPENDS=	libpHash.so:${PORTSDIR}/multimedia/pHash
16
18
17
USE_PHP=	yes
19
USE_PHP=	yes
Lines 19-32 USE_PHPIZE= yes Link Here
19
USE_PHPEXT=	yes
21
USE_PHPEXT=	yes
20
USE_PHP_BUILD=	yes
22
USE_PHP_BUILD=	yes
21
23
22
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/bindings/php
24
WRKSRC_SUBDIR=	bindings/php
23
25
24
# The tarball contains stale pre-built files that interfere with building this
26
# The tarball contains stale pre-built files that interfere with building this
25
# ourselves.
27
# ourselves.
26
post-configure:
28
post-configure:
27
	@(cd ${WRKSRC} && ${MAKE_CMD} clean)
29
	@(cd ${WRKSRC} && ${MAKE_CMD} clean)
28
30
29
pre-install:
30
	@${STRIP_CMD} ${WRKSRC}/modules/pHash.so
31
32
.include <bsd.port.mk>
31
.include <bsd.port.mk>

Return to bug 202635