FreeBSD Bugzilla – Attachment 160740 Details for
Bug 202905
[PATCH] audio/hydrogen: Add USES=libarchive, stop setting LDFLAGS.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
hydrogen.patch (text/plain), 3.70 KB, created by
Raphael Kubo da Costa
on 2015-09-05 12:01:28 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Raphael Kubo da Costa
Created:
2015-09-05 12:01:28 UTC
Size:
3.70 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 396164) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= hydrogen > PORTVERSION= 0.9.6.1 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= audio > > MAINTAINER= FreeBSD@ShaneWare.Biz >@@ -20,12 +20,11 @@ > > USE_QT4= corelib gui qmake_build linguist_build moc_build network \ > qt3support rcc_build sql uic_build xml >-USES= cmake:outsource desktop-file-utils pkgconfig >+USES= cmake:outsource desktop-file-utils libarchive pkgconfig > CMAKE_ARGS+= -DTHREADS_HAVE_PTHREAD_ARG:BOOL=ON -DWANT_DEBUG:BOOL=OFF \ > -DLIBSNDFILE_INCLUDE_DIR:STRING=${LOCALBASE}/include \ > -DWANT_OSS:BOOL=ON > USE_LDCONFIG= yes >-LDFLAGS+= -L${LOCALBASE}/lib > > OPTIONS_DEFINE= ALSA JACK LADSPA LASH PORTAUDIO PULSEAUDIO RDF > OPTIONS_DEFAULT= JACK LADSPA RDF >Index: files/patch-cmake__FindHelper.cmake >=================================================================== >--- files/patch-cmake__FindHelper.cmake (revision 0) >+++ files/patch-cmake__FindHelper.cmake (working copy) >@@ -0,0 +1,54 @@ >+Sent upstream: https://github.com/hydrogen-music/hydrogen/pull/290 >+ >+cmake: Call find_path and find_library even if pkg-config calls work. >+ >+Instead of calling pkg_check_modules() with the same prefix as the calls >+to find_library() and find_path(), pass PC_${prefix} to the former. >+ >+This way, we are able to use the paths that might have been found by >+pkg-config as hints to the find_library and find_path calls. Doing so >+helps systems where the dependent libraries (libarchive, libsndfile etc) >+are not in the default linker path, as the linker is now called with the >+libraries' absolute path: >+ >+c++ file1.o file2.o [...] -o hydrogen /usr/lib/libsndfile.so ... >+ >+instead of >+ >+c++ file1.o file2.o [...] -o hydrogen -lsndfile ... >+ >+as the latter requires one to manually pass "-L/usr/local/lib" to CMake >+when configuring Hydrogen. >+ >+While here, use HINTS instead of PATHS when calling the find_*() >+functions, as CMake's documentation says that "paths computed by system >+introspection" should use HINTS, not PATHS, which is for hardcoded >+paths. >+--- cmake/FindHelper.cmake >++++ cmake/FindHelper.cmake >+@@ -23,7 +23,7 @@ macro(FIND_HELPER prefix pkg_name header lib) >+ FIND_PACKAGE(PkgConfig) >+ endif() >+ if(PKG_CONFIG_FOUND) >+- pkg_check_modules(${prefix} ${pkg_name}) >++ pkg_check_modules(PC_${prefix} ${pkg_name}) >+ #MESSAGE(STATUS " LDFLAGS ${${prefix}_LDFLAGS}" ) >+ #MESSAGE(STATUS " CFLAGS ${${prefix}_CFLAGS}" ) >+ #MESSAGE(STATUS " INCLUDEDIRS ${${prefix}_INCLUDE_DIRS}" ) >+@@ -36,12 +36,14 @@ macro(FIND_HELPER prefix pkg_name header lib) >+ >+ find_path(${prefix}_INCLUDE_DIR >+ NAMES ${header} >+- PATHS ${${prefix}_INCLUDE_DIRS} ${${prefix}_INCLUDEDIR} ${${prefix}_INCLUDE_PATHS} ENV ${prefix}_INCLUDE >++ HINTS ${PC_${prefix}_INCLUDE_DIRS} ${PC_${prefix}_INCLUDEDIR} ${PC_${prefix}_INCLUDE_PATHS} >++ ENV ${prefix}_INCLUDE >+ ) >+ >+ find_library(${prefix}_LIBRARIES >+ NAMES ${lib} >+- PATHS ${${prefix}_LIBDIR} ${${prefix}_LIBRARY_DIRS} ${${prefix}_LIB_PATHS} ENV ${prefix}_PATH >++ HINTS ${PC_${prefix}_LIBDIR} ${PC_${prefix}_LIBRARY_DIRS} ${PC_${prefix}_LIB_PATHS} >++ ENV ${prefix}_PATH >+ ) >+ endif() >+ > >Property changes on: files/patch-cmake__FindHelper.cmake >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 202905
: 160740