Bug 179703 - [PATCH] x11/libfm: Fix NLS, take maintainership
Summary: [PATCH] x11/libfm: Fix NLS, take maintainership
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-19 07:40 UTC by nemysis
Modified: 2013-06-22 13:00 UTC (History)
1 user (show)

See Also:


Attachments
libfm-1.1.0.patch (3.32 KB, patch)
2013-06-19 07:40 UTC, nemysis
no flags Details | Diff
libfm.diff (4.79 KB, patch)
2013-06-22 00:21 UTC, nemysis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nemysis 2013-06-19 07:40:00 UTC
- Take maintainership
- Use REINPLACE_CMD instead of simple patches
- Fix NLS
- Trim pkg-plist

Removed file(s):
- files/patch-configure

Generated and tested manually, tested with port test and with RedPorts, sent with FreeBSD Port Tools 0.99_7 (mode: change, diff: ports)

How-To-Repeat: 
Build log

https://redports.org/buildarchive/20130619054001-4518/
Comment 1 William Grzybowski freebsd_committer freebsd_triage 2013-06-21 13:59:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 2 William Grzybowski 2013-06-21 14:26:13 UTC
The build is not completely clean:

pkg_delete: unable to completely remove directory '/usr/local/etc/xdg'
pkg_delete: file '/usr/local/include/libfm' doesn't exist
pkg_delete: unable to completely remove directory '/usr/local/include/libfm'
pkg_delete: couldn't entirely delete package `libfm-1.1.0'
(perhaps the packing list is incorrectly specified?)



--
William Grzybowski
------------------------------------------
Curitiba/PR - Brasil
Comment 3 nemysis 2013-06-22 00:21:26 UTC
On Fri, 21 Jun 2013 10:26:13 -0300
William Grzybowski <william88@gmail.com> wrote:

> The build is not completely clean:
> 
> pkg_delete: unable to completely remove directory '/usr/local/etc/xdg'
> pkg_delete: file '/usr/local/include/libfm' doesn't exist
> pkg_delete: unable to completely remove directory '/usr/local/include/libfm'
> pkg_delete: couldn't entirely delete package `libfm-1.1.0'
> (perhaps the packing list is incorrectly specified?)
> 
> 
> 
> --
> William Grzybowski
> ------------------------------------------
> Curitiba/PR - Brasil

Now are all test clean, have not try on RedPorts but knew is good.
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-06-22 12:57:16 UTC
Author: wg
Date: Sat Jun 22 11:57:08 2013
New Revision: 321568
URL: http://svnweb.freebsd.org/changeset/ports/321568

Log:
  x11/libfm: minor fixes
  
  - Fix NLS option [1]
  - Preserve .conf files [1]
  - Pass maintainership to submitter [1]
  - Fix pkg-plist and install of .conf
  
  PR:		ports/179703 [1]
  Submitted by:	nemysis <nemysis@gmx.ch>

Deleted:
  head/x11/libfm/files/
Modified:
  head/x11/libfm/Makefile
  head/x11/libfm/pkg-plist

Modified: head/x11/libfm/Makefile
==============================================================================
--- head/x11/libfm/Makefile	Sat Jun 22 11:47:57 2013	(r321567)
+++ head/x11/libfm/Makefile	Sat Jun 22 11:57:08 2013	(r321568)
@@ -7,7 +7,7 @@ PORTREVISION=	1
 CATEGORIES=	x11
 MASTER_SITES=	SF/pcmanfm/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/libfm%20%28required%20by%20PCManFM%29/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	nemysis@gmx.ch
 COMMENT=	The libFM backend library to PCManFM
 
 LICENSE=	GPLv2
@@ -15,38 +15,53 @@ LICENSE=	GPLv2
 LIB_DEPENDS=	startup-notification-1:${PORTSDIR}/x11/startup-notification \
 		menu-cache:${PORTSDIR}/x11/menu-cache
 
+USES=		pkgconfig
 USE_GNOME=	gnomehack gtk20
 USE_AUTOTOOLS=	libtool
+CONFIGURE_ARGS+=--sysconfdir=${LOCALBASE}/etc
 USE_GMAKE=	yes
 USE_FAM=	yes
 USE_LDCONFIG=	yes
-USES=		pkgconfig
+
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
-CONFIGURE_ARGS+=--sysconfdir=${LOCALBASE}/etc
 
 MAN1=		libfm-pref-apps.1
 
 OPTIONS_DEFINE=	NLS
+OPTIONS_SUB=	yes
 
-.include <bsd.port.options.mk>
+NLS_USES=	gettext
 
-.if ${PORT_OPTIONS:MNLS}
-USES+=		gettext
-PLIST_SUB+=	NLS=""
-.else
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+=	NLS="@comment "
-.endif
+.include <bsd.port.options.mk>
 
 post-patch:
+	@${REINPLACE_CMD} -e 's|^VALAC.*|VALAC=""|' \
+		${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's|-DG_DISABLE_DEPRECATED||g' \
 		${WRKSRC}/src/Makefile.in
 	@${REINPLACE_CMD} -e \
 		's|-Wno-unused-but-set-variable||' \
 		${WRKSRC}/src/actions/Makefile.am ${WRKSRC}/src/actions/Makefile.in
+	@${REINPLACE_CMD} -e '/libfm.conf/,/pref-apps.conf/ d' ${WRKSRC}/data/Makefile.in
+
+.if ! ${PORT_OPTIONS:MNLS}
+	@${REINPLACE_CMD} -e 's|src po|src|' \
+		${WRKSRC}/Makefile.in
+.endif
 
 pre-install:
-	cd ${WRKDIR}/libfm-${PORTVERSION} && ${CHMOD} 755 install-sh
+	@(cd ${WRKDIR}/libfm-${PORTVERSION} && ${CHMOD} 755 install-sh)
+
+post-install:
+	${MKDIR} ${PREFIX}/etc/xdg/libfm
+	${INSTALL_DATA} ${WRKSRC}/data/libfm.conf ${PREFIX}/etc/xdg/libfm/libfm.conf.sample
+	${INSTALL_DATA} ${WRKSRC}/data/pref-apps.conf ${PREFIX}/etc/xdg/libfm/pref-apps.conf.sample
+.if ! exists(${PREFIX}/etc/xdg/libfm/libfm.conf)
+	${INSTALL_DATA} ${WRKSRC}/data/libfm.conf ${PREFIX}/etc/xdg/libfm/libfm.conf
+.endif
+.if ! exists(${PREFIX}/etc/xdg/libfm/pref-apps.conf)
+	${INSTALL_DATA} ${WRKSRC}/data/pref-apps.conf ${PREFIX}/etc/xdg/libfm/pref-apps.conf
+.endif
 
 .include <bsd.port.mk>

Modified: head/x11/libfm/pkg-plist
==============================================================================
--- head/x11/libfm/pkg-plist	Sat Jun 22 11:47:57 2013	(r321567)
+++ head/x11/libfm/pkg-plist	Sat Jun 22 11:57:08 2013	(r321568)
@@ -1,7 +1,11 @@
 bin/libfm-pref-apps
-etc/xdg/libfm/libfm.conf
-etc/xdg/libfm/pref-apps.conf
 include/libfm
+@unexec if cmp -s %D/etc/xdg/libfm/libfm.conf %D/etc/xdg/libfm/libfm.conf.sample; then rm -f %D/etc/xdg/libfm/libfm.conf; fi
+etc/xdg/libfm/libfm.conf.sample
+@exec if [ ! -f %D/etc/xdg/libfm/libfm.conf ] ; then cp -p %D/%F %B/libfm.conf; fi
+@unexec if cmp -s %D/etc/xdg/libfm/pref-apps.conf %D/etc/xdg/libfm/pref-apps.conf.sample; then rm -f %D/etc/xdg/libfm/pref-apps.conf; fi
+etc/xdg/libfm/pref-apps.conf.sample
+@exec if [ ! -f %D/etc/xdg/libfm/pref-apps.conf ] ; then cp -p %D/%F %B/pref-apps.conf; fi
 include/libfm-1.0/fm-actions.h
 include/libfm-1.0/fm-app-chooser-combo-box.h
 include/libfm-1.0/fm-app-chooser-dlg.h
@@ -140,19 +144,19 @@ share/applications/libfm-pref-apps.deskt
 %%NLS%%share/locale/zh_CN/LC_MESSAGES/libfm.mo
 %%NLS%%share/locale/zh_TW/LC_MESSAGES/libfm.mo
 share/mime/packages/libfm.xml
-@dirrm etc/xdg/libfm
-@dirrm etc/xdg
-@dirrmtry share/locale/es_VE/LC_MESSAGES
-@dirrmtry share/locale/es_VE
-@dirrmtry share/locale/lg/LC_MESSAGES
-@dirrmtry share/locale/lg
-@dirrmtry share/locale/tt_RU/LC_MESSAGES
-@dirrmtry share/locale/tt_RU
-@dirrmtry share/locale/ur_PK/LC_MESSAGES
-@dirrmtry share/locale/ur_PK
-@dirrmtry share/applications
+@dirrmtry etc/xdg/libfm
+@dirrmtry etc/xdg
 @dirrmtry share/mime/packages
 @dirrmtry share/mime
+%%NLS%%@dirrmtry share/locale/ur_PK/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/ur_PK
+%%NLS%%@dirrmtry share/locale/tt_RU/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/tt_RU
+%%NLS%%@dirrmtry share/locale/lg/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/lg
+%%NLS%%@dirrmtry share/locale/es_VE/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/es_VE
 @dirrm %%DATADIR%%/ui
 @dirrm %%DATADIR%%
+@dirrmtry share/applications
 @dirrm include/libfm-1.0
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 William Grzybowski freebsd_committer freebsd_triage 2013-06-22 13:00:38 UTC
State Changed
From-To: open->closed

Committed. Thanks!