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
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
--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
State Changed From-To: open->closed Committed, thanks!