Bug 75176 - [maintainer update] chinese/xpdf: fix file permission changes
Summary: [maintainer update] chinese/xpdf: fix file permission changes
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-17 04:40 UTC by Dryice Liu
Modified: 2004-12-18 16:51 UTC (History)
1 user (show)

See Also:


Attachments
xpdf.diff (2.13 KB, patch)
2004-12-17 04:40 UTC, Dryice Liu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dryice Liu 2004-12-17 04:40:21 UTC
	Changes:
		- fix file permission changes pointed out by Kris
		- utilize DATADIR in pkg-plist

How-To-Repeat: 	$ ll /usr/X11R6/etc/xpdfrc
	-r--r--r--    1 root     wheel        4993 12 17 12:34 /usr/X11R6/etc/xpdfrc
	$ cd /usr/ports/chinese/xpdf; make install deinstall
	[...snip]
	$ ll /usr/X11R6/etc/xpdfrc
	-rw-r--r--    1 root     wheel        4993 12 17 12:38 /usr/X11R6/etc/xpdfrc
Comment 1 Dryice Liu 2004-12-17 08:16:57 UTC
Thanks Kris for pointing me a better solution. It also fix the
maybe-not-empty directory share/xpdf problem. Please use this diff:

======================================================================
diff -ruN xpdf.old/pkg-install xpdf/pkg-install
--- xpdf.old/pkg-install	Sun Aug  4 03:32:54 2002
+++ xpdf/pkg-install	Fri Dec 17 11:32:44 2004
@@ -5,6 +5,5 @@
 XPDFRC=${PKG_PREFIX}/etc/xpdfrc
 ADDRESOURCE=${PKG_PREFIX}/share/xpdf/chinese-traditional/dot.xpdfrc
 /usr/bin/grep -F -v --file=${ADDRESOURCE} ${XPDFRC} > ${XPDFRC}.nochinese-traditional
-/bin/rm -f ${XPDFRC}
 /bin/cat ${XPDFRC}.nochinese-traditional ${ADDRESOURCE} > ${XPDFRC}
 /bin/rm -f ${XPDFRC}.nochinese-traditional
diff -ruN xpdf.old/pkg-plist xpdf/pkg-plist
--- xpdf.old/pkg-plist	Mon Aug  2 10:35:54 2004
+++ xpdf/pkg-plist	Fri Dec 17 16:06:47 2004
@@ -1,15 +1,16 @@
-share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
-share/xpdf/chinese-simplified/EUC-CN.unicodeMap
-share/xpdf/chinese-simplified/GBK.unicodeMap
-share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
-share/xpdf/chinese-simplified/README
-share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
-share/xpdf/chinese-traditional/Big5.unicodeMap
-share/xpdf/chinese-traditional/Big5ascii.unicodeMap
-share/xpdf/chinese-traditional/README
-@unexec mv -f %D/etc/xpdfrc %D/etc/xpdfrc.chinese-traditional
-@unexec grep -F -v --file=%D/share/xpdf/chinese-traditional/dot.xpdfrc %D/etc/xpdfrc.chinese-traditional > %D/etc/xpdfrc
-share/xpdf/chinese-traditional/dot.xpdfrc
+%%DATADIR%%/chinese-simplified/Adobe-GB1.cidToUnicode
+%%DATADIR%%/chinese-simplified/EUC-CN.unicodeMap
+%%DATADIR%%/chinese-simplified/GBK.unicodeMap
+%%DATADIR%%/chinese-simplified/ISO-2022-CN.unicodeMap
+%%DATADIR%%/chinese-simplified/README
+%%DATADIR%%/chinese-traditional/Adobe-CNS1.cidToUnicode
+%%DATADIR%%/chinese-traditional/Big5.unicodeMap
+%%DATADIR%%/chinese-traditional/Big5ascii.unicodeMap
+%%DATADIR%%/chinese-traditional/README
+@unexec cp %D/etc/xpdfrc %D/etc/xpdfrc.chinese-traditional
+@unexec grep -F -v --file=%D/%%DATADIR%%/chinese-traditional/dot.xpdfrc %D/etc/xpdfrc.chinese-traditional > %D/etc/xpdfrc
+%%DATADIR%%/chinese-traditional/dot.xpdfrc
 @unexec rm -f %D/etc/xpdfrc.chinese-traditional
-@dirrm share/xpdf/chinese-simplified
-@dirrm share/xpdf/chinese-traditional
+@dirrm %%DATADIR%%/chinese-simplified
+@dirrm %%DATADIR%%/chinese-traditional
+@unexec rmdir %%DATADIR%% 2> /dev/null || true
======================================================================


-- 
Cheers,
Dryice

http://dryice.3322.org
Comment 2 Dryice Liu 2004-12-17 08:23:06 UTC
--text follows this line--
Thanks Kris for pointing me a better solution. It also fix the
maybe-not-empty directory share/xpdf problem. Please use this diff:
Date: Fri, 17 Dec 2004 16:23:08 +0800
Message-ID: <86r7lpwcyb.fsf@dryice.3322.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

======================================================================
diff -ruN xpdf.old/pkg-install xpdf/pkg-install
--- xpdf.old/pkg-install	Sun Aug  4 03:32:54 2002
+++ xpdf/pkg-install	Fri Dec 17 11:32:44 2004
@@ -5,6 +5,5 @@
 XPDFRC=${PKG_PREFIX}/etc/xpdfrc
 ADDRESOURCE=${PKG_PREFIX}/share/xpdf/chinese-traditional/dot.xpdfrc
 /usr/bin/grep -F -v --file=${ADDRESOURCE} ${XPDFRC} > ${XPDFRC}.nochinese-traditional
-/bin/rm -f ${XPDFRC}
 /bin/cat ${XPDFRC}.nochinese-traditional ${ADDRESOURCE} > ${XPDFRC}
 /bin/rm -f ${XPDFRC}.nochinese-traditional
diff -ruN xpdf.old/pkg-plist xpdf/pkg-plist
--- xpdf.old/pkg-plist	Mon Aug  2 10:35:54 2004
+++ xpdf/pkg-plist	Fri Dec 17 16:06:47 2004
@@ -1,15 +1,16 @@
-share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
-share/xpdf/chinese-simplified/EUC-CN.unicodeMap
-share/xpdf/chinese-simplified/GBK.unicodeMap
-share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
-share/xpdf/chinese-simplified/README
-share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
-share/xpdf/chinese-traditional/Big5.unicodeMap
-share/xpdf/chinese-traditional/Big5ascii.unicodeMap
-share/xpdf/chinese-traditional/README
-@unexec mv -f %D/etc/xpdfrc %D/etc/xpdfrc.chinese-traditional
-@unexec grep -F -v --file=%D/share/xpdf/chinese-traditional/dot.xpdfrc %D/etc/xpdfrc.chinese-traditional > %D/etc/xpdfrc
-share/xpdf/chinese-traditional/dot.xpdfrc
+%%DATADIR%%/chinese-simplified/Adobe-GB1.cidToUnicode
+%%DATADIR%%/chinese-simplified/EUC-CN.unicodeMap
+%%DATADIR%%/chinese-simplified/GBK.unicodeMap
+%%DATADIR%%/chinese-simplified/ISO-2022-CN.unicodeMap
+%%DATADIR%%/chinese-simplified/README
+%%DATADIR%%/chinese-traditional/Adobe-CNS1.cidToUnicode
+%%DATADIR%%/chinese-traditional/Big5.unicodeMap
+%%DATADIR%%/chinese-traditional/Big5ascii.unicodeMap
+%%DATADIR%%/chinese-traditional/README
+@unexec cp %D/etc/xpdfrc %D/etc/xpdfrc.chinese-traditional
+@unexec grep -F -v --file=%D/%%DATADIR%%/chinese-traditional/dot.xpdfrc %D/etc/xpdfrc.chinese-traditional > %D/etc/xpdfrc
+%%DATADIR%%/chinese-traditional/dot.xpdfrc
 @unexec rm -f %D/etc/xpdfrc.chinese-traditional
-@dirrm share/xpdf/chinese-simplified
-@dirrm share/xpdf/chinese-traditional
+@dirrm %%DATADIR%%/chinese-simplified
+@dirrm %%DATADIR%%/chinese-traditional
+@unexec rmdir %%DATADIR%% 2> /dev/null || true
======================================================================


-- 
Cheers,
Dryice

http://dryice.3322.org
Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2004-12-18 16:51:40 UTC
State Changed
From-To: open->closed

Committed, thanks!