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

(-)Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	hydrogen
4
PORTNAME=	hydrogen
5
PORTVERSION=	0.9.6.1
5
PORTVERSION=	0.9.6.1
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	audio
7
CATEGORIES=	audio
8
8
9
MAINTAINER=	FreeBSD@ShaneWare.Biz
9
MAINTAINER=	FreeBSD@ShaneWare.Biz
Lines 20-31 Link Here
20
20
21
USE_QT4=	corelib gui qmake_build linguist_build moc_build network \
21
USE_QT4=	corelib gui qmake_build linguist_build moc_build network \
22
		qt3support rcc_build sql uic_build xml
22
		qt3support rcc_build sql uic_build xml
23
USES=		cmake:outsource desktop-file-utils pkgconfig
23
USES=		cmake:outsource desktop-file-utils libarchive pkgconfig
24
CMAKE_ARGS+=	-DTHREADS_HAVE_PTHREAD_ARG:BOOL=ON -DWANT_DEBUG:BOOL=OFF \
24
CMAKE_ARGS+=	-DTHREADS_HAVE_PTHREAD_ARG:BOOL=ON -DWANT_DEBUG:BOOL=OFF \
25
		-DLIBSNDFILE_INCLUDE_DIR:STRING=${LOCALBASE}/include \
25
		-DLIBSNDFILE_INCLUDE_DIR:STRING=${LOCALBASE}/include \
26
		-DWANT_OSS:BOOL=ON
26
		-DWANT_OSS:BOOL=ON
27
USE_LDCONFIG=	yes
27
USE_LDCONFIG=	yes
28
LDFLAGS+=	-L${LOCALBASE}/lib
29
28
30
OPTIONS_DEFINE=		ALSA JACK LADSPA LASH PORTAUDIO PULSEAUDIO RDF
29
OPTIONS_DEFINE=		ALSA JACK LADSPA LASH PORTAUDIO PULSEAUDIO RDF
31
OPTIONS_DEFAULT=	JACK LADSPA RDF
30
OPTIONS_DEFAULT=	JACK LADSPA RDF
(-)files/patch-cmake__FindHelper.cmake (+54 lines)
Line 0 Link Here
1
Sent upstream: https://github.com/hydrogen-music/hydrogen/pull/290
2
3
cmake: Call find_path and find_library even if pkg-config calls work.
4
5
Instead of calling pkg_check_modules() with the same prefix as the calls
6
to find_library() and find_path(), pass PC_${prefix} to the former.
7
8
This way, we are able to use the paths that might have been found by
9
pkg-config as hints to the find_library and find_path calls. Doing so
10
helps systems where the dependent libraries (libarchive, libsndfile etc)
11
are not in the default linker path, as the linker is now called with the
12
libraries' absolute path:
13
14
c++ file1.o file2.o [...] -o hydrogen /usr/lib/libsndfile.so ...
15
16
instead of
17
18
c++ file1.o file2.o [...] -o hydrogen -lsndfile ...
19
20
as the latter requires one to manually pass "-L/usr/local/lib" to CMake
21
when configuring Hydrogen.
22
23
While here, use HINTS instead of PATHS when calling the find_*()
24
functions, as CMake's documentation says that "paths computed by system
25
introspection" should use HINTS, not PATHS, which is for hardcoded
26
paths.
27
--- cmake/FindHelper.cmake
28
+++ cmake/FindHelper.cmake
29
@@ -23,7 +23,7 @@ macro(FIND_HELPER prefix pkg_name header lib)
30
             FIND_PACKAGE(PkgConfig)
31
         endif()
32
         if(PKG_CONFIG_FOUND)
33
-            pkg_check_modules(${prefix} ${pkg_name})
34
+            pkg_check_modules(PC_${prefix} ${pkg_name})
35
             #MESSAGE(STATUS  " LDFLAGS       ${${prefix}_LDFLAGS}" )
36
             #MESSAGE(STATUS  " CFLAGS        ${${prefix}_CFLAGS}" )
37
             #MESSAGE(STATUS  " INCLUDEDIRS   ${${prefix}_INCLUDE_DIRS}" )
38
@@ -36,12 +36,14 @@ macro(FIND_HELPER prefix pkg_name header lib)
39
 
40
         find_path(${prefix}_INCLUDE_DIR
41
             NAMES ${header}
42
-            PATHS ${${prefix}_INCLUDE_DIRS} ${${prefix}_INCLUDEDIR} ${${prefix}_INCLUDE_PATHS} ENV ${prefix}_INCLUDE
43
+            HINTS ${PC_${prefix}_INCLUDE_DIRS} ${PC_${prefix}_INCLUDEDIR} ${PC_${prefix}_INCLUDE_PATHS}
44
+            ENV ${prefix}_INCLUDE
45
         )
46
 
47
         find_library(${prefix}_LIBRARIES
48
             NAMES ${lib}
49
-            PATHS ${${prefix}_LIBDIR} ${${prefix}_LIBRARY_DIRS} ${${prefix}_LIB_PATHS} ENV ${prefix}_PATH
50
+            HINTS ${PC_${prefix}_LIBDIR} ${PC_${prefix}_LIBRARY_DIRS} ${PC_${prefix}_LIB_PATHS}
51
+            ENV ${prefix}_PATH
52
         )
53
     endif()
54
 

Return to bug 202905