This moves the code to create symlinks from x11/kde/Makefile.inc to kde.port.mk. This is needed because some stuff outside x11/kde went in KDE4, namely: libkdcraw, libkexiv2 and libkipi. So we need to use "lib/kde3/foo" for shared libraries installed by those ports in WANTLIB section of Digikam, Gwenview etc. I see no point to duplicate the code when we already have kde.port.mk.
Symlinks are only created when requested by port, so no change for ports outside of x11/kde initially. But we need to wipe out ${post_install_libs} simultaneously with adding MODKDE_LIB_LINKS. Note that net/ktorrent is not a problem because libktorrent exists only in KDE4 world. This was tested on i386. No packing list changes expected or detected. okay? -- WBR, Vadim Zhukov Index: Makefile.inc =================================================================== RCS file: /cvs/ports/x11/kde/Makefile.inc,v retrieving revision 1.42 diff -u -p -r1.42 Makefile.inc --- Makefile.inc 11 Mar 2013 11:46:13 -0000 1.42 +++ Makefile.inc 28 Jun 2013 15:26:20 -0000 @@ -40,14 +40,4 @@ PERMIT_DISTFILES_FTP ?= Yes PERMIT_PACKAGE_CDROM ?= Yes PERMIT_PACKAGE_FTP ?= Yes -# let's do a sweet little dance for kde4's libs -post_install_libs = mkdir -p ${PREFIX}/lib/kde3; cd ${PREFIX}/lib/kde3 -.for l v in ${SHARED_LIBS} -post_install_libs += ;test -e ../lib$l.so.$v && ln -sf ../lib$l.so.$v lib$l.so.$v -.endfor -.if !target(post-install) -post-install: -. if defined(SHARED_LIBS) && !empty(SHARED_LIBS) - @${post_install_libs} -. endif -.endif +MODKDE_LIB_LINKS = Yes Index: kde.port.mk =================================================================== RCS file: /cvs/ports/x11/kde/kde.port.mk,v retrieving revision 1.39 diff -u -p -r1.39 kde.port.mk --- kde.port.mk 21 Mar 2013 08:48:56 -0000 1.39 +++ kde.port.mk 28 Jun 2013 15:26:20 -0000 @@ -38,7 +38,7 @@ MODKDE_MAKE_FLAGS += LIBRESOLV= MODKDE_post-patch = find ${WRKDIST} -name Makefile.am -exec touch {}.in \; -KDE=lib/kde3 +KDE = lib/kde3 SUBST_VARS += KDE SUP_PATCH_LIST ?= @@ -77,4 +77,16 @@ PATCH_LIST = ${PORTSDIR}/x11/kde/patches AUTOCONF ?= /bin/sh ${WRKDIST}/admin/cvs.sh configure WANTLIB += lib/qt3/qt-mt>=3.33 LIBTOOL_FLAGS = --tag=disable-static +.endif + +# Create soft links for shared libraries in ${PREFIX}/lib to ${KDE}. +# Used to avoid clashing with KDE4+. +MODKDE_LIB_LINKS ?= No + +.if ${MODKDE_LIB_LINKS:L} != "no" && defined(SHARED_LIBS) && !empty(SHARED_LIBS) +MODKDE_post-install = mkdir -p ${PREFIX}/${KDE}; cd ${PREFIX}/${KDE} +. for l v in ${SHARED_LIBS} +MODKDE_post-install += ; test -e ../lib$l.so.$v && \ + ln -sf ../lib$l.so.$v lib$l.so.$v +. endfor .endif Index: accessibility3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/accessibility3/Makefile,v retrieving revision 1.49 diff -u -p -r1.49 Makefile --- accessibility3/Makefile 19 Mar 2013 13:07:14 -0000 1.49 +++ accessibility3/Makefile 28 Jun 2013 15:26:20 -0000 @@ -33,6 +33,5 @@ WANTLIB += vorbis vorbisenc vorbisfile x post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: admin3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/admin3/Makefile,v retrieving revision 1.41 diff -u -p -r1.41 Makefile --- admin3/Makefile 19 Mar 2013 13:07:14 -0000 1.41 +++ admin3/Makefile 28 Jun 2013 15:26:20 -0000 @@ -24,6 +24,5 @@ WANTLIB += stdc++ util vcard xcb z post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: base3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/base3/Makefile,v retrieving revision 1.117 diff -u -p -r1.117 Makefile --- base3/Makefile 20 Jun 2013 06:54:38 -0000 1.117 +++ base3/Makefile 28 Jun 2013 15:26:20 -0000 @@ -83,7 +83,6 @@ SUBST_VARS = EXTRA_CONFIG SAMPLECONFDIR post-install: ${INSTALL_DATA} ${FILESDIR}/kdesurc ${PREFIX}/share/config ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} FAKE_FLAGS = sysconfdir=${SAMPLECONFDIR} Index: edu3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/edu3/Makefile,v retrieving revision 1.66 diff -u -p -r1.66 Makefile --- edu3/Makefile 23 Jan 2013 21:10:37 -0000 1.66 +++ edu3/Makefile 28 Jun 2013 15:26:20 -0000 @@ -36,6 +36,5 @@ WANTLIB = GL ICE SM X11 Xau Xcursor Xdam post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: games3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/games3/Makefile,v retrieving revision 1.66 diff -u -p -r1.66 Makefile --- games3/Makefile 23 Jan 2013 21:10:37 -0000 1.66 +++ games3/Makefile 28 Jun 2013 15:26:20 -0000 @@ -33,6 +33,5 @@ WANTLIB += avahi-client avahi-common dbu post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: graphics3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/graphics3/Makefile,v retrieving revision 1.108 diff -u -p -r1.108 Makefile --- graphics3/Makefile 23 Jan 2013 21:10:37 -0000 1.108 +++ graphics3/Makefile 28 Jun 2013 15:26:20 -0000 @@ -102,6 +102,5 @@ CONFIGURE_ENV += ac_cv_header_paper_h=no post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: multimedia3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/multimedia3/Makefile,v retrieving revision 1.77 diff -u -p -r1.77 Makefile --- multimedia3/Makefile 5 Feb 2013 11:47:43 -0000 1.77 +++ multimedia3/Makefile 28 Jun 2013 15:26:22 -0000 @@ -83,6 +83,5 @@ post-extract: post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: network3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/network3/Makefile,v retrieving revision 1.73 diff -u -p -r1.73 Makefile --- network3/Makefile 23 Jan 2013 21:10:38 -0000 1.73 +++ network3/Makefile 28 Jun 2013 15:26:22 -0000 @@ -42,5 +42,5 @@ post-configure: post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} + .include <bsd.port.mk> Index: office3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/office3/Makefile,v retrieving revision 1.84 diff -u -p -r1.84 Makefile --- office3/Makefile 12 Jun 2013 20:36:34 -0000 1.84 +++ office3/Makefile 28 Jun 2013 15:26:22 -0000 @@ -123,6 +123,5 @@ CONFIGURE_ENV += ac_cv_header_paper_h=no post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: pim3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/pim3/Makefile,v retrieving revision 1.78 diff -u -p -r1.78 Makefile --- pim3/Makefile 23 Jan 2013 21:10:38 -0000 1.78 +++ pim3/Makefile 28 Jun 2013 15:26:23 -0000 @@ -86,7 +86,6 @@ LIB_DEPENDS += security/gpgme>=0.4.5 \ post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} #MULTI_PACKAGES=-kpilot FULLPKGNAME-kpilot = kpilot-${VERSION} Index: sdk3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/sdk3/Makefile,v retrieving revision 1.62 diff -u -p -r1.62 Makefile --- sdk3/Makefile 20 Jun 2013 06:54:38 -0000 1.62 +++ sdk3/Makefile 28 Jun 2013 15:26:23 -0000 @@ -74,6 +74,5 @@ post-patch: post-install: cd ${PREFIX}/bin && mv cvscheck kcvscheck ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - ${post_install_libs} .include <bsd.port.mk> Index: toys3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/toys3/Makefile,v retrieving revision 1.56 diff -u -p -r1.56 Makefile --- toys3/Makefile 19 Mar 2013 13:07:14 -0000 1.56 +++ toys3/Makefile 28 Jun 2013 15:26:23 -0000 @@ -25,5 +25,5 @@ WANTLIB += pthread pthread-stubs stdc++ post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} + .include <bsd.port.mk> Index: utils3/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/utils3/Makefile,v retrieving revision 1.73 diff -u -p -r1.73 Makefile --- utils3/Makefile 3 Jun 2013 20:07:39 -0000 1.73 +++ utils3/Makefile 28 Jun 2013 15:26:23 -0000 @@ -38,6 +38,5 @@ WANTLIB += pthread pthread-stubs stdc++ post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk> Index: webdev/Makefile =================================================================== RCS file: /cvs/ports/x11/kde/webdev/Makefile,v retrieving revision 1.42 diff -u -p -r1.42 Makefile --- webdev/Makefile 19 Mar 2013 13:07:14 -0000 1.42 +++ webdev/Makefile 28 Jun 2013 15:26:23 -0000 @@ -43,6 +43,5 @@ CONFIGURE_ENV= TAR=tar post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/HTML/en/common - @${post_install_libs} .include <bsd.port.mk>