Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2011 15:43:29 GMT
From:      arrowdodger <6yearold@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/162378: x11/yakuake-kde4 doesn't honor WITHOUT_NLS
Message-ID:  <201111081543.pA8FhTqu003227@red.freebsd.org>
Resent-Message-ID: <201111081550.pA8Fo9Ku006754@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         162378
>Category:       ports
>Synopsis:       x11/yakuake-kde4 doesn't honor WITHOUT_NLS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 08 15:50:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     arrowdodger
>Release:        9-stable
>Organization:
none
>Environment:
>Description:
Since there is no way to change language in yakuake itself, i've hacked a CMake build not to install .po files if WITHOUT_NLS is defined.
I've done it same way as in devel/tortoisehg2 port.

I'm not sure about commenting find_package(Msgfmt ...) line, though.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Files /usr/ports/x11/yakuake-kde4/.Makefile.kate-swp and ./.Makefile.kate-swp differ
diff -ruN /usr/ports/x11/yakuake-kde4/Makefile ./Makefile
--- /usr/ports/x11/yakuake-kde4/Makefile	2011-06-16 12:54:22.747903161 +0400
+++ ./Makefile	2011-11-08 18:57:51.656222626 +0400
@@ -20,9 +20,23 @@
 USE_BZIP2=	yes
 USE_CMAKE=	yes
 USE_KDE4=	kdelibs kdeprefix automoc4
+
+.if defined(WITHOUT_NLS)
+PLIST_SUB+=	NLS="@comment "
+.else
+PLIST_SUB+=	NLS=""
 USE_GETTEXT=	yes
+.endif
+
 USE_QT_VER=	4
 QT_COMPONENTS=	corelib qmake_build moc_build rcc_build uic_build
 MAKE_JOBS_SAFE=	yes
 
+post-patch:
+.if defined(WITHOUT_NLS)
+	@${REINPLACE_CMD} -e 's/^%%NLS%%/# /' ${WRKSRC}/CMakeLists.txt
+.else
+	@${REINPLACE_CMD} -e 's/^%%NLS%%//' ${WRKSRC}/CMakeLists.txt
+.endif
+
 .include <bsd.port.mk>
diff -ruN /usr/ports/x11/yakuake-kde4/files/patch-CMakeLists.txt ./files/patch-CMakeLists.txt
--- /usr/ports/x11/yakuake-kde4/files/patch-CMakeLists.txt	1970-01-01 03:00:00.000000000 +0300
+++ ./files/patch-CMakeLists.txt	2011-11-08 19:32:02.231222065 +0400
@@ -0,0 +1,12 @@
+--- CMakeLists_.txt	2011-11-08 19:31:32.273220945 +0400
++++ CMakeLists.txt	2011-11-08 19:31:10.253224705 +0400
+@@ -8,6 +8,6 @@
+ 
+ add_subdirectory( app )
+ add_subdirectory( skins )
+-find_package(Msgfmt REQUIRED)
+-find_package(Gettext REQUIRED)
+-add_subdirectory( po )
++%%NLS%%find_package(Msgfmt REQUIRED)
++%%NLS%%find_package(Gettext REQUIRED)
++%%NLS%%add_subdirectory( po )
diff -ruN /usr/ports/x11/yakuake-kde4/pkg-plist ./pkg-plist
--- /usr/ports/x11/yakuake-kde4/pkg-plist	2011-06-16 12:54:22.785088334 +0400
+++ ./pkg-plist	2011-11-08 18:56:30.117223466 +0400
@@ -99,39 +99,39 @@
 share/icons/hicolor/48x48/apps/yakuake.png
 share/icons/hicolor/64x64/apps/yakuake.png
 share/icons/hicolor/scalable/apps/yakuake.svgz
-share/locale/ca/LC_MESSAGES/yakuake.mo
-share/locale/ca@valencia/LC_MESSAGES/yakuake.mo
-share/locale/cs/LC_MESSAGES/yakuake.mo
-share/locale/da/LC_MESSAGES/yakuake.mo
-share/locale/de/LC_MESSAGES/yakuake.mo
-share/locale/el/LC_MESSAGES/yakuake.mo
-share/locale/en_GB/LC_MESSAGES/yakuake.mo
-share/locale/es/LC_MESSAGES/yakuake.mo
-share/locale/et/LC_MESSAGES/yakuake.mo
-share/locale/fr/LC_MESSAGES/yakuake.mo
-share/locale/ga/LC_MESSAGES/yakuake.mo
-share/locale/gl/LC_MESSAGES/yakuake.mo
-share/locale/hr/LC_MESSAGES/yakuake.mo
-share/locale/it/LC_MESSAGES/yakuake.mo
-share/locale/ja/LC_MESSAGES/yakuake.mo
-share/locale/ko/LC_MESSAGES/yakuake.mo
-share/locale/nb/LC_MESSAGES/yakuake.mo
-share/locale/nds/LC_MESSAGES/yakuake.mo
-share/locale/nl/LC_MESSAGES/yakuake.mo
-share/locale/nn/LC_MESSAGES/yakuake.mo
-share/locale/pa/LC_MESSAGES/yakuake.mo
-share/locale/pl/LC_MESSAGES/yakuake.mo
-share/locale/pt/LC_MESSAGES/yakuake.mo
-share/locale/pt_BR/LC_MESSAGES/yakuake.mo
-share/locale/ro/LC_MESSAGES/yakuake.mo
-share/locale/ru/LC_MESSAGES/yakuake.mo
-share/locale/sk/LC_MESSAGES/yakuake.mo
-share/locale/sv/LC_MESSAGES/yakuake.mo
-share/locale/th/LC_MESSAGES/yakuake.mo
-share/locale/tr/LC_MESSAGES/yakuake.mo
-share/locale/uk/LC_MESSAGES/yakuake.mo
-share/locale/wa/LC_MESSAGES/yakuake.mo
-share/locale/zh_CN/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/ca@valencia/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/da/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/de/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/el/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/en_GB/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/es/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/et/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/ga/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/hr/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/it/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/ko/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/nb/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/nds/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/nn/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/pa/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/th/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/wa/LC_MESSAGES/yakuake.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/yakuake.mo
 @dirrmtry share/icons/hicolor/256x256/apps
 @dirrmtry share/icons/hicolor/256x256
 @dirrm share/apps/yakuake/skins/plastik_light/title


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111081543.pA8FhTqu003227>