ports/117449: [PATCH] fixed install problem when `WITHOUT_KDE' is set
denisehg at hotpop.com
denisehg at hotpop.com
Wed Oct 24 11:30:05 UTC 2007
>Number: 117449
>Category: ports
>Synopsis: [PATCH] fixed install problem when `WITHOUT_KDE' is set
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 24 11:30:04 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Denise H. G.
>Release: FreeBSD 6.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD pluton.xbsd.name 6.2-STABLE FreeBSD 6.2-STABLE #0: Sat Oct 20 01:41:47 CST 2007 dhg at pluton.xbsd.name:/opt/obj/usr/src/sys/mibsd-SMP-ULE amd64
>Description:
If `WITHOUT_KDE' is set, the install scripts will install locale files into the root dir, and icons into `/usr/share/icons'. These dirs are not correct places to hold the data, I think.
>How-To-Repeat:
Set the environment `WITHOUT_KDE' and then make install.
>Fix:
--- Makefile.patch begins here ---
--- /usr/ports/deskutils/kchmviewer/Makefile 2007-05-20 04:01:41.000000000 +0800
+++ Makefile 2007-10-24 18:57:52.000000000 +0800
@@ -25,13 +25,17 @@
.if !defined(WITHOUT_KDE)
USE_KDELIBS_VER=3
PLIST_SUB+= KDE=""
+PLIST_SUB+= QT="@comment "
CONFIGURE_ARGS+=--with-kde
.else
USE_QT_VER= 3
+PLIST_SUB+= QT=""
PLIST_SUB+= KDE="@comment "
CONFIGURE_TARGET=
CONFIGURE_ARGS+=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
DO_NOT_COMPILE+=kio-msits
+KDE_LOCALEDIR=${LOCALBASE}/share/locale
+KDE_ICONDIR=${LOCALBASE}/share/icons
.endif
pre-everything::
@@ -43,4 +47,22 @@
@${REINPLACE_CMD} -e 's|-O2||g;s|-lpthread|${PTHREAD_LIBS}|g' \
${WRKSRC}/${CONFIGURE_SCRIPT}
+post-configure:
+.if defined(WITHOUT_KDE)
+ @${REINPLACE_CMD} -e 's|kde_locale =.*|kde_locale = ${KDE_LOCALEDIR}|g' \
+ ${WRKSRC}/po/Makefile
+ @${REINPLACE_CMD} -e 's|kde_icondir =.*|kde_icondir = ${KDE_ICONDIR}|g' \
+ ${WRKSRC}/src/pics/Makefile
+ @${REINPLACE_CMD} -e 's|crystalsvg|hicolor|g' \
+ ${WRKSRC}/src/pics/Makefile
+.endif
+
+pre-install:
+.if defined(WITHOUT_KDE)
+ @${REINPLACE_CMD} -e 's|Categories=.*|Categories=Utility;|g' \
+ ${WRKSRC}/lib/kio-msits/kchmviewer.desktop
+ @${INSTALL_DATA} ${WRKSRC}/lib/kio-msits/kchmviewer.desktop \
+ ${LOCALBASE}/share/applications
+.endif
+
.include <bsd.port.mk>
--- Makefile.patch ends here ---
--- pkg-plist.patch begins here ---
--- /opt/ports/deskutils/kchmviewer/pkg-plist 2007-03-28 04:38:22.000000000 +0800
+++ pkg-plist 2007-10-24 18:54:04.000000000 +0800
@@ -8,16 +8,20 @@
%%KDE%%share/icons/crystalsvg/128x128/apps/kchmviewer.png
%%KDE%%share/icons/crystalsvg/48x48/apps/kchmviewer.png
%%KDE%%share/icons/crystalsvg/64x64/apps/kchmviewer.png
-%%KDE%%share/locale/cs/LC_MESSAGES/kchmviewer.mo
-%%KDE%%share/locale/du/LC_MESSAGES/kchmviewer.mo
-%%KDE%%share/locale/fr/LC_MESSAGES/kchmviewer.mo
-%%KDE%%share/locale/ru/LC_MESSAGES/kchmviewer.mo
-%%KDE%%share/locale/tr/LC_MESSAGES/kchmviewer.mo
-%%KDE%%share/locale/zh_CN/LC_MESSAGES/kchmviewer.mo
+%%QT%%share/applications/kchmviewer.desktop
+%%QT%%share/icons/hicolor/128x128/apps/kchmviewer.png
+%%QT%%share/icons/hicolor/48x48/apps/kchmviewer.png
+%%QT%%share/icons/hicolor/64x64/apps/kchmviewer.png
+share/locale/cs/LC_MESSAGES/kchmviewer.mo
+share/locale/du/LC_MESSAGES/kchmviewer.mo
+share/locale/fr/LC_MESSAGES/kchmviewer.mo
+share/locale/ru/LC_MESSAGES/kchmviewer.mo
+share/locale/tr/LC_MESSAGES/kchmviewer.mo
+share/locale/zh_CN/LC_MESSAGES/kchmviewer.mo
%%KDE%%share/services/msits.protocol
-%%KDE%%@dirrmtry share/locale/zh_CN/LC_MESSAGES
-%%KDE%%@dirrmtry share/locale/zh_CN
-%%KDE%%@dirrmtry share/locale/du/LC_MESSAGES
-%%KDE%%@dirrmtry share/locale/du
-%%KDE%%@dirrmtry share/locale/cs/LC_MESSAGES
-%%KDE%%@dirrmtry share/locale/cs
+ at dirrmtry share/locale/zh_CN/LC_MESSAGES
+ at dirrmtry share/locale/zh_CN
+ at dirrmtry share/locale/du/LC_MESSAGES
+ at dirrmtry share/locale/du
+ at dirrmtry share/locale/cs/LC_MESSAGES
+ at dirrmtry share/locale/cs
--- pkg-plist.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list