mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
x11-toolkits/attica: Change the location where we install its headers.
In preparation for the upcoming KDE Frameworks 5 and Plasma 5 ports, install attica's headers into include/attica/attica instead of include/attica. Users of attica reference the headers in the code with #include <attica/foo.h> which means the compiler is passed -I${LOCALBASE}/include for the headers to be found. The KDE Frameworks 5 version of attica installs the headers into include/KF5/attica, so depending on the other of the arguments the compiler can end up being passed -I${LOCALBASE}/include -I${LOCALBASE}/include/KF5 leading to the wrong attica headers being used instead. By changing the header location, we make sure one passes -I${LOCALBASE}/include/attica to use the attica 0.4.2 headers. The original idea and code came from Tobias Berner <tcberner@gmail.com>, with further improvements from myself. While here, add some comments explaining why some sed calls are made in the post-patch target. Last but not least, audio/tomahawk had to be patched for the attica headers to be properly found now that they are no longer in ${LOCALBASE}/include. The patch itself contains a larger explanation of what had to be done. All other ports depending on x11-toolkits/attica work fine without any changes. Submitted by: Tobias Berner <tcberner@gmail.com> (original version)
This commit is contained in:
parent
c08596d872
commit
87c262ff1c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=410702
21
audio/tomahawk/files/patch-src_libtomahawk_CMakeLists.txt
Normal file
21
audio/tomahawk/files/patch-src_libtomahawk_CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
||||
Make sure targets depending on tomahawklib also include LIBATTICA_INCLUDE_DIR.
|
||||
|
||||
If x11-toolkits/attica is not installed in a location such as
|
||||
${LOCALBASE}/include, we risk breaking the build like this:
|
||||
|
||||
In file included from /wrkdirs/usr/ports/audio/tomahawk/work/tomahawk-0.8.4/src/infoplugins/generic/charts/ChartsPlugin.cpp:29:
|
||||
In file included from /wrkdirs/usr/ports/audio/tomahawk/work/tomahawk-0.8.4/src/libtomahawk/TomahawkSettings.h:28:
|
||||
/wrkdirs/usr/ports/audio/tomahawk/work/tomahawk-0.8.4/src/libtomahawk/AtticaManager.h:30:10: fatal error: 'attica/provider.h' file not found
|
||||
#include <attica/provider.h>
|
||||
--- src/libtomahawk/CMakeLists.txt.orig 2015-04-15 04:41:40 UTC
|
||||
+++ src/libtomahawk/CMakeLists.txt
|
||||
@@ -488,6 +488,9 @@ set_target_properties(
|
||||
OUTPUT_NAME "tomahawk"
|
||||
)
|
||||
|
||||
+if(LIBATTICA_FOUND)
|
||||
+ TARGET_INCLUDE_DIRECTORIES(tomahawklib INTERFACE ${LIBATTICA_INCLUDE_DIR})
|
||||
+endif(LIBATTICA_FOUND)
|
||||
|
||||
qt5_use_modules(tomahawklib Widgets Network Sql WebKitWidgets Concurrent Xml UiTools Svg)
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= attica
|
||||
PORTVERSION= 0.4.2
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 2
|
||||
CATEGORIES= x11-toolkits
|
||||
MASTER_SITES= KDE/stable/${PORTNAME}
|
||||
@ -18,9 +19,22 @@ CMAKE_ARGS= -DATTICA_ENABLE_TESTS:BOOL=OFF \
|
||||
-DQT4_BUILD:BOOL=ON
|
||||
|
||||
post-patch:
|
||||
# LIB_DESTINATION is not caught by USES=pathfix.
|
||||
${REINPLACE_CMD} \
|
||||
-e 's,$${LIB_DESTINATION}/pkgconfig,libdata/pkgconfig,' \
|
||||
${WRKSRC}/lib/CMakeLists.txt
|
||||
# By default attica will produce libattica.0.4.so but not libattica.0.so.
|
||||
${REINPLACE_CMD} \
|
||||
-e 's,.$${CMAKE_LIBATTICA_VERSION_MINOR},,' \
|
||||
${WRKSRC}/lib/CMakeLists.txt
|
||||
# Install headers into a subdirectory of ${LOCALBASE}/include so that passing
|
||||
# -I${LOCALBASE}/include does not cause it to be preferred over the KF5 version
|
||||
# installed into ${LOCALBASE}/include/KF5.
|
||||
${REINPLACE_CMD} \
|
||||
-e "s,include/attica,include/attica/attica," \
|
||||
${WRKSRC}/lib/CMakeLists.txt
|
||||
${REINPLACE_CMD} \
|
||||
-e "s,/include,/include/attica," \
|
||||
${WRKSRC}/lib/cmake/libattica.pc.cmake
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,46 +1,46 @@
|
||||
include/attica/accountbalance.h
|
||||
include/attica/achievement.h
|
||||
include/attica/activity.h
|
||||
include/attica/atticabasejob.h
|
||||
include/attica/atticaclient_export.h
|
||||
include/attica/atticautils.h
|
||||
include/attica/buildservice.h
|
||||
include/attica/buildservicejob.h
|
||||
include/attica/buildservicejoboutput.h
|
||||
include/attica/category.h
|
||||
include/attica/comment.h
|
||||
include/attica/content.h
|
||||
include/attica/deletejob.h
|
||||
include/attica/distribution.h
|
||||
include/attica/downloaddescription.h
|
||||
include/attica/downloaditem.h
|
||||
include/attica/event.h
|
||||
include/attica/folder.h
|
||||
include/attica/forum.h
|
||||
include/attica/getjob.h
|
||||
include/attica/homepageentry.h
|
||||
include/attica/homepagetype.h
|
||||
include/attica/icon.h
|
||||
include/attica/itemjob.h
|
||||
include/attica/knowledgebaseentry.h
|
||||
include/attica/license.h
|
||||
include/attica/listjob.h
|
||||
include/attica/message.h
|
||||
include/attica/metadata.h
|
||||
include/attica/person.h
|
||||
include/attica/platformdependent.h
|
||||
include/attica/platformdependent_v2.h
|
||||
include/attica/postjob.h
|
||||
include/attica/privatedata.h
|
||||
include/attica/project.h
|
||||
include/attica/provider.h
|
||||
include/attica/providermanager.h
|
||||
include/attica/publisher.h
|
||||
include/attica/publisherfield.h
|
||||
include/attica/putjob.h
|
||||
include/attica/remoteaccount.h
|
||||
include/attica/topic.h
|
||||
include/attica/version.h
|
||||
include/attica/attica/accountbalance.h
|
||||
include/attica/attica/achievement.h
|
||||
include/attica/attica/activity.h
|
||||
include/attica/attica/atticabasejob.h
|
||||
include/attica/attica/atticaclient_export.h
|
||||
include/attica/attica/atticautils.h
|
||||
include/attica/attica/buildservice.h
|
||||
include/attica/attica/buildservicejob.h
|
||||
include/attica/attica/buildservicejoboutput.h
|
||||
include/attica/attica/category.h
|
||||
include/attica/attica/comment.h
|
||||
include/attica/attica/content.h
|
||||
include/attica/attica/deletejob.h
|
||||
include/attica/attica/distribution.h
|
||||
include/attica/attica/downloaddescription.h
|
||||
include/attica/attica/downloaditem.h
|
||||
include/attica/attica/event.h
|
||||
include/attica/attica/folder.h
|
||||
include/attica/attica/forum.h
|
||||
include/attica/attica/getjob.h
|
||||
include/attica/attica/homepageentry.h
|
||||
include/attica/attica/homepagetype.h
|
||||
include/attica/attica/icon.h
|
||||
include/attica/attica/itemjob.h
|
||||
include/attica/attica/knowledgebaseentry.h
|
||||
include/attica/attica/license.h
|
||||
include/attica/attica/listjob.h
|
||||
include/attica/attica/message.h
|
||||
include/attica/attica/metadata.h
|
||||
include/attica/attica/person.h
|
||||
include/attica/attica/platformdependent.h
|
||||
include/attica/attica/platformdependent_v2.h
|
||||
include/attica/attica/postjob.h
|
||||
include/attica/attica/privatedata.h
|
||||
include/attica/attica/project.h
|
||||
include/attica/attica/provider.h
|
||||
include/attica/attica/providermanager.h
|
||||
include/attica/attica/publisher.h
|
||||
include/attica/attica/publisherfield.h
|
||||
include/attica/attica/putjob.h
|
||||
include/attica/attica/remoteaccount.h
|
||||
include/attica/attica/topic.h
|
||||
include/attica/attica/version.h
|
||||
lib/libattica.so
|
||||
lib/libattica.so.0
|
||||
lib/libattica.so.0.4.2
|
||||
|
Loading…
Reference in New Issue
Block a user