From 67b34b70acf762adcd674eabb7f32eedf49f1cc7 Mon Sep 17 00:00:00 2001 From: dcoppa Date: Tue, 18 Oct 2011 12:17:26 +0000 Subject: [PATCH] Reduce linkage: make sure the binaries only link to the libraries they really need --- audio/last.fm/Makefile | 4 ++-- .../last.fm/patches/patch-definitions_pro_inc | 21 ++++++++++++++++++ .../patches/patch-src_httpinput_httpinput_cpp | 12 ++++++++++ .../patches/patch-src_httpinput_httpinput_pro | 13 +++++++++++ .../patches/patch-src_libMoose_libMoose_pro | 14 +++++++----- .../patches/patch-src_libUnicorn_CachedHttp_h | 12 ++++++++++ .../patches/patch-src_libUnicorn_Collection_h | 12 ++++++++++ .../patch-src_libUnicorn_RedirectHttp_h | 12 ++++++++++ .../patch-src_libUnicorn_WebService_Request_h | 12 ++++++++++ ...patch-src_mediadevices_ipod_IpodDevice_cpp | 22 +++++++++++++++---- .../patch-src_mediadevices_ipod_IpodDevice_h | 12 ++++++++++ .../patch-src_mediadevices_ipod_ipod_pro | 20 +++++++++++------ audio/last.fm/patches/patch-src_src_pro | 21 +++++++++--------- 13 files changed, 159 insertions(+), 28 deletions(-) create mode 100644 audio/last.fm/patches/patch-definitions_pro_inc create mode 100644 audio/last.fm/patches/patch-src_httpinput_httpinput_cpp create mode 100644 audio/last.fm/patches/patch-src_httpinput_httpinput_pro create mode 100644 audio/last.fm/patches/patch-src_libUnicorn_CachedHttp_h create mode 100644 audio/last.fm/patches/patch-src_libUnicorn_Collection_h create mode 100644 audio/last.fm/patches/patch-src_libUnicorn_RedirectHttp_h create mode 100644 audio/last.fm/patches/patch-src_libUnicorn_WebService_Request_h create mode 100644 audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_h diff --git a/audio/last.fm/Makefile b/audio/last.fm/Makefile index 3313dbbf52f..e0dd9acaab6 100644 --- a/audio/last.fm/Makefile +++ b/audio/last.fm/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.13 2011/09/19 12:50:57 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.14 2011/10/18 12:17:26 dcoppa Exp $ COMMENT = official Last.fm client VER = 1.5.4.27091 DISTNAME = lastfm-${VER}+dfsg PKGNAME = last.fm-${VER} -REVISION = 4 +REVISION = 5 SHARED_ONLY = Yes diff --git a/audio/last.fm/patches/patch-definitions_pro_inc b/audio/last.fm/patches/patch-definitions_pro_inc new file mode 100644 index 00000000000..548bfeb4f2e --- /dev/null +++ b/audio/last.fm/patches/patch-definitions_pro_inc @@ -0,0 +1,21 @@ +$OpenBSD: patch-definitions_pro_inc,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- definitions.pro.inc.orig Tue Oct 18 11:16:46 2011 ++++ definitions.pro.inc Tue Oct 18 11:17:49 2011 +@@ -25,7 +25,7 @@ CONFIG( extension ) { + } + + INCLUDEPATH += $$ROOT_DIR/src/libMoose $$ROOT_DIR/src/libUnicorn +-DEPENDPATH += $$ROOT_DIR/src/libUnicorn $$ROOT_DIR/src/libFingerprint ++DEPENDPATH += $$ROOT_DIR/src/libUnicorn + + CONFIG(debug, debug|release) { + extension:DESTDIR = $$DESTDIR/debug +@@ -40,8 +40,6 @@ CONFIG(debug, debug|release) { + # FIXME to use proper path + UNICORNPATH = $$ROOT_DIR/src/libUnicorn + include( src/libUnicorn/unicorn.pro.inc ) +- +-LIBS += -lMoose$$EXT + + # TODO: not sure if this is right now, should probably be determined on a per-plugin basis + plugin:LIBS += -lLastFmTools$$EXT diff --git a/audio/last.fm/patches/patch-src_httpinput_httpinput_cpp b/audio/last.fm/patches/patch-src_httpinput_httpinput_cpp new file mode 100644 index 00000000000..4c523602342 --- /dev/null +++ b/audio/last.fm/patches/patch-src_httpinput_httpinput_cpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_httpinput_httpinput_cpp,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- src/httpinput/httpinput.cpp.orig Tue Oct 18 11:28:20 2011 ++++ src/httpinput/httpinput.cpp Tue Oct 18 11:28:31 2011 +@@ -21,8 +21,6 @@ + + #include "httpinput.h" + #include "logger.h" +-#include "WebService.h" +-#include "WebService/Request.h" + #include "RadioEnums.h" + + #include "MooseCommon.h" diff --git a/audio/last.fm/patches/patch-src_httpinput_httpinput_pro b/audio/last.fm/patches/patch-src_httpinput_httpinput_pro new file mode 100644 index 00000000000..329af619a45 --- /dev/null +++ b/audio/last.fm/patches/patch-src_httpinput_httpinput_pro @@ -0,0 +1,13 @@ +$OpenBSD: patch-src_httpinput_httpinput_pro,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- src/httpinput/httpinput.pro.orig Tue Oct 18 11:28:43 2011 ++++ src/httpinput/httpinput.pro Tue Oct 18 11:29:17 2011 +@@ -1,7 +1,8 @@ + TEMPLATE = lib + CONFIG += service + TARGET = httpinput +-QT += network gui xml ++QT += network ++QT -= gui + + include( ../../definitions.pro.inc ) + diff --git a/audio/last.fm/patches/patch-src_libMoose_libMoose_pro b/audio/last.fm/patches/patch-src_libMoose_libMoose_pro index c93fe77e486..0e6b5540b5b 100644 --- a/audio/last.fm/patches/patch-src_libMoose_libMoose_pro +++ b/audio/last.fm/patches/patch-src_libMoose_libMoose_pro @@ -1,10 +1,14 @@ -$OpenBSD: patch-src_libMoose_libMoose_pro,v 1.2 2011/03/30 14:00:48 dcoppa Exp $ ---- src/libMoose/libMoose.pro.orig Tue Nov 2 19:11:04 2010 -+++ src/libMoose/libMoose.pro Mon Mar 28 15:20:36 2011 -@@ -1,5 +1,5 @@ +$OpenBSD: patch-src_libMoose_libMoose_pro,v 1.3 2011/10/18 12:17:26 dcoppa Exp $ +--- src/libMoose/libMoose.pro.orig Tue Oct 18 11:12:40 2011 ++++ src/libMoose/libMoose.pro Tue Oct 18 11:31:21 2011 +@@ -1,8 +1,8 @@ TEMPLATE = lib -VERSION = 1.0.0 +VERSION = ${LIBMoose_VERSION}.0 CONFIG += dll TARGET = Moose - QT += xml network gui +-QT += xml network gui ++QT += network gui + + include( ../../definitions.pro.inc ) + diff --git a/audio/last.fm/patches/patch-src_libUnicorn_CachedHttp_h b/audio/last.fm/patches/patch-src_libUnicorn_CachedHttp_h new file mode 100644 index 00000000000..4af78b6c307 --- /dev/null +++ b/audio/last.fm/patches/patch-src_libUnicorn_CachedHttp_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_libUnicorn_CachedHttp_h,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- src/libUnicorn/CachedHttp.h.orig Tue Oct 18 11:18:54 2011 ++++ src/libUnicorn/CachedHttp.h Tue Oct 18 11:19:34 2011 +@@ -26,7 +26,7 @@ + #include "UnicornDllExportMacro.h" + + #include +-#include ++#include + #include + #include + #include diff --git a/audio/last.fm/patches/patch-src_libUnicorn_Collection_h b/audio/last.fm/patches/patch-src_libUnicorn_Collection_h new file mode 100644 index 00000000000..71ebf5154f4 --- /dev/null +++ b/audio/last.fm/patches/patch-src_libUnicorn_Collection_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_libUnicorn_Collection_h,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- src/libUnicorn/Collection.h.orig Tue Oct 18 11:21:18 2011 ++++ src/libUnicorn/Collection.h Tue Oct 18 11:21:45 2011 +@@ -31,7 +31,7 @@ + + #include + #include +-#include ++#include + + + /** @author: */ diff --git a/audio/last.fm/patches/patch-src_libUnicorn_RedirectHttp_h b/audio/last.fm/patches/patch-src_libUnicorn_RedirectHttp_h new file mode 100644 index 00000000000..d6fadd79848 --- /dev/null +++ b/audio/last.fm/patches/patch-src_libUnicorn_RedirectHttp_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_libUnicorn_RedirectHttp_h,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- src/libUnicorn/RedirectHttp.h.orig Tue Oct 18 11:19:51 2011 ++++ src/libUnicorn/RedirectHttp.h Tue Oct 18 11:20:10 2011 +@@ -26,7 +26,7 @@ + #include "UnicornDllExportMacro.h" + + #include +-#include ++#include + #include + #include + diff --git a/audio/last.fm/patches/patch-src_libUnicorn_WebService_Request_h b/audio/last.fm/patches/patch-src_libUnicorn_WebService_Request_h new file mode 100644 index 00000000000..e1595a0f69a --- /dev/null +++ b/audio/last.fm/patches/patch-src_libUnicorn_WebService_Request_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_libUnicorn_WebService_Request_h,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- src/libUnicorn/WebService/Request.h.orig Tue Oct 18 11:20:48 2011 ++++ src/libUnicorn/WebService/Request.h Tue Oct 18 11:21:07 2011 +@@ -31,7 +31,7 @@ + #include "WeightedStringList.h" + + #include +-#include ++#include + + //TODO mxcl check error handling, since that was the point of all this + //TODO escape query paramaeters in paths in get function diff --git a/audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_cpp b/audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_cpp index 0bc00c5037b..4419895f89e 100644 --- a/audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_cpp +++ b/audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_cpp @@ -1,7 +1,21 @@ -$OpenBSD: patch-src_mediadevices_ipod_IpodDevice_cpp,v 1.1 2011/09/19 12:50:57 dcoppa Exp $ ---- src/mediadevices/ipod/IpodDevice.cpp.orig Mon Sep 19 12:48:57 2011 -+++ src/mediadevices/ipod/IpodDevice.cpp Mon Sep 19 12:56:29 2011 -@@ -78,8 +78,9 @@ IpodDevice::open() +$OpenBSD: patch-src_mediadevices_ipod_IpodDevice_cpp,v 1.2 2011/10/18 12:17:26 dcoppa Exp $ +--- src/mediadevices/ipod/IpodDevice.cpp.orig Tue Oct 18 11:12:40 2011 ++++ src/mediadevices/ipod/IpodDevice.cpp Tue Oct 18 11:30:05 2011 +@@ -24,12 +24,11 @@ + + #include "logger.h" + +-#include + #include ++#include + #include + #include + #include +-#include + #include + + extern "C" +@@ -78,8 +77,9 @@ IpodDevice::open() if ( m_uid.isEmpty() ) { diff --git a/audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_h b/audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_h new file mode 100644 index 00000000000..df5c54aa400 --- /dev/null +++ b/audio/last.fm/patches/patch-src_mediadevices_ipod_IpodDevice_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_mediadevices_ipod_IpodDevice_h,v 1.1 2011/10/18 12:17:26 dcoppa Exp $ +--- src/mediadevices/ipod/IpodDevice.h.orig Tue Oct 18 11:27:38 2011 ++++ src/mediadevices/ipod/IpodDevice.h Tue Oct 18 11:27:51 2011 +@@ -22,7 +22,7 @@ + #define IPOD_DEVICE_H + + #include "TrackInfo.h" +-#include ++#include + + typedef struct _Itdb_iTunesDB Itdb_iTunesDB; + typedef struct _Itdb_Track Itdb_Track; diff --git a/audio/last.fm/patches/patch-src_mediadevices_ipod_ipod_pro b/audio/last.fm/patches/patch-src_mediadevices_ipod_ipod_pro index b738453034f..3adc20f4086 100644 --- a/audio/last.fm/patches/patch-src_mediadevices_ipod_ipod_pro +++ b/audio/last.fm/patches/patch-src_mediadevices_ipod_ipod_pro @@ -1,10 +1,17 @@ -$OpenBSD: patch-src_mediadevices_ipod_ipod_pro,v 1.2 2011/03/30 14:00:48 dcoppa Exp $ ---- src/mediadevices/ipod/ipod.pro.orig Tue Nov 2 19:10:37 2010 -+++ src/mediadevices/ipod/ipod.pro Tue Mar 29 12:27:37 2011 -@@ -8,6 +8,14 @@ include( ../../../definitions.pro.inc ) +$OpenBSD: patch-src_mediadevices_ipod_ipod_pro,v 1.3 2011/10/18 12:17:26 dcoppa Exp $ +--- src/mediadevices/ipod/ipod.pro.orig Tue Oct 18 11:12:40 2011 ++++ src/mediadevices/ipod/ipod.pro Tue Oct 18 11:30:25 2011 +@@ -2,11 +2,20 @@ TEMPLATE = lib + CONFIG += service + TARGET = Ipod_device + QT += sql ++QT -= gui + + include( ../../../definitions.pro.inc ) + HEADERS = IpodDevice.h SOURCES = IpodDevice.cpp - ++ +unix:openbsd* { + INCLUDEPATH += ${LOCALBASE}/include/gpod-1.0 ${LOCALBASE}/include/glib-2.0 ${LOCALBASE}/lib/glib-2.0/include + @@ -12,7 +19,6 @@ $OpenBSD: patch-src_mediadevices_ipod_ipod_pro,v 1.2 2011/03/30 14:00:48 dcoppa + + LIBS += -lgpod +} -+ + linux* { LIBS += -lgpod - diff --git a/audio/last.fm/patches/patch-src_src_pro b/audio/last.fm/patches/patch-src_src_pro index 2e6f8788e7e..0ae986ee677 100644 --- a/audio/last.fm/patches/patch-src_src_pro +++ b/audio/last.fm/patches/patch-src_src_pro @@ -1,9 +1,11 @@ -$OpenBSD: patch-src_src_pro,v 1.3 2011/09/19 12:50:57 dcoppa Exp $ ---- src/src.pro.orig Mon Sep 19 12:38:56 2011 -+++ src/src.pro Mon Sep 19 12:39:48 2011 -@@ -2,15 +2,11 @@ TEMPLATE = app +$OpenBSD: patch-src_src_pro,v 1.4 2011/10/18 12:17:26 dcoppa Exp $ +--- src/src.pro.orig Tue Oct 18 11:12:40 2011 ++++ src/src.pro Tue Oct 18 11:27:12 2011 +@@ -1,16 +1,13 @@ + TEMPLATE = app TARGET = Last.fm - QT += gui network xml sql +-QT += gui network xml sql ++QT += gui network xml -INCLUDEPATH += lib libFingerprint/recommendation-commons +INCLUDEPATH += lib @@ -15,10 +17,11 @@ $OpenBSD: patch-src_src_pro,v 1.3 2011/09/19 12:50:57 dcoppa Exp $ - # precompiled headers breaks icecream builds for some reason :( - system( test `ps aux | grep iceccd | wc -l` -gt 1 ): CONFIG -= precompile_header -} ++LIBS += -lMoose$$EXT #universal binaries cannot be built from precompiled headers mac:release:CONFIG -= precompile_header -@@ -27,17 +23,13 @@ unix:!mac{ +@@ -27,17 +24,13 @@ unix:!mac{ include( ../definitions.pro.inc ) @@ -38,14 +41,12 @@ $OpenBSD: patch-src_src_pro,v 1.3 2011/09/19 12:50:57 dcoppa Exp $ FORMS = container.ui \ settingsdialog.ui \ settingsdialog_account.ui \ -@@ -211,7 +203,9 @@ unix:!mac { +@@ -211,7 +204,7 @@ unix:!mac { SOURCES += simplewizard_mac.cpp \ winstyleoverrides.cpp - LIBS += -lmad -lfftw3f -+ QMAKE_LIBDIR += ${LOCALBASE}/lib -+ -+ LIBS += -lmad ++ LIBS += -lX11 -lz HEADERS -= Bootstrapper/iTunesBootstrapper.h \ Bootstrapper/PluginBootstrapper.h