- 论坛徽章:
- 2
|
安装最新简体中文版的 Adobe Reader7(ZT)
上面的方法我没用,我用的是一位台湾的大哥提供的,方法如下:
修改/usr/ports/print/acroread7 的 Makefile
#####################################################
# New ports collection makefile for: acroread7
# Date created: 16 March 2005
# Whom: Trevor Johnson <trevor@freebsd.org>;
#
# $FreeBSD: ports/print/acroread7/Makefile,v 1.9 2005/06/17 22:59:24 netchild Exp $
#
PORTNAME= acroread7
PORTVERSION= 7.0.0
#CATEGORIES= print linux
#MASTER_SITES= http://download.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/ \
# ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/
#DISTNAME= AdobeReader_enu-7.0.0-2.i386.rpm
CATEGORIES+= print linux
MASTER_SITES= http://download.adobe.com/pub/adobe/reader/unix/7x/7.0/${ADOBE_LANG}/ \
ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/${ADOBE_LANG}/
DISTNAME= AdobeReader_${ADOBE_LANG}-7.0.0-2.i386.rpm
EXTRACT_SUFX=
DIST_SUBDIR= acroread
EXTRACT_ONLY=
RESTRICTED= "Must fill out redistribution form at http://www.adobe.com/products/acrobat/distribute.html"
#MAINTAINER= trevor@FreeBSD.org
#COMMENT= View, distribute and print PDF documents
MAINTAINER?= trevor@FreeBSD.org
COMMENT?= View, distribute and print PDF documents
BUILD_DEPENDS= rpm:${PORTSDIR}/archivers/rpm
RUN_DEPENDS= ${LINUXBASE}/usr/lib/libgtk-x11-2.0.so.0:${PORTSDIR}/x11-toolkits/linux-gtk2 \
${LINUXBASE}/usr/lib/libpango-1.0.so.0:${PORTSDIR}/x11-toolkits/linux-pango
CONFLICTS= acroread
ONLY_FOR_ARCHS= amd64 i386
USE_REINPLACE= yes
USE_LINUX= yes
USE_XLIB= yes # This should be USE_X_PREFIX, doesn't work yet.
NO_BUILD= yes
REINPLACE_ARGS= -i '' -E
PLIST= ${WRKDIR}/plist
PREFIX?= ${LINUXBASE} # have a look at the USE_XLIB comment
.if !defined(ADOBE_LANG)
ADOBE_LANG?= enu
.endif
pre-install:
@kldstat -v | ${GREP} -E 'linux(aout|elf)' >;/dev/null ||\
{ ${ECHO_MSG} "Linux ABI compatibility must be enabled to install ${PORTNAME}-${PORTVERSION}"; \
exit 1; }
@${RM} -rf ${WRKSRC}/tmp
@${MKDIR} ${WRKSRC}/tmp
cd ${WRKSRC}/tmp; \
rpm2cpio < ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} | ${CPIO} -id; \
${RM} -rf usr/bin/acroread; \
${FIND} * -type f -o -type l >; ${PLIST} \
&& ${FIND} -d * -type d | ${SED} -e 's:^:@dirrm :' | \
${GREP} -vE "(usr/bin$$|local$$|share$$|usr$$)" >;>; ${PLIST}
@${ECHO} @cwd %%LOCALBASE%% >;>; ${PLIST}
@${ECHO} bin/acroread7 >;>; ${PLIST}
@${ECHO} bin/acroread >;>; ${PLIST}
@${ECHO} "@unexec rpm -e --noscripts --root ${PREFIX} --dbpath /var/lib/rpm \
${DISTNAME:S/.i386.rpm//} 2>;/dev/null || ${TRUE}" >;>; ${PLIST}
do-install:
# @rpm -U --ignorearch --ignoreos --root ${PREFIX} --dbpath /var/lib/rpm \
@rpm -U --force --ignorearch --ignoreos --root ${PREFIX} --dbpath /var/lib/rpm \
--nodeps --replacepkgs ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} || ${TRUE}
# disable the PPKLite plugin as it requires an LDAP share lib
${CHMOD} 0 ${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/intellinux/plug_ins/PPKLite.api
# XXX: This is missing a "${BRANDELF} -t Linux <executables>;".
post-install:
@${REINPLACE_CMD} 's:Linux:FreeBSD|Linux:g' \
${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread
cd ${LOCALBASE}/bin ; ${LN} -sf ${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread acroread7
cd ${LOCALBASE}/bin ; ${LN} -sf ${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread acroread
@${ECHO_MSG} "Be sure to read the license agreement in"
# @${ECHO_MSG} "${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/Legal/ENU/license_ENU_uc.txt"
@${ECHO_MSG} "${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/Legal/${ADOBE_LANG:U}/license_${ADOBE_LANG:U}_uc.txt"
.include <bsd.port.mk>;
###############################################################
cd /usr/ports/chinese/
fetch http://bbs.ilc.edu.tw/chinsan/acroread7/acroread7-chs.shar
sh acroread7-chs.shar
cd acroread7-chs ;
make install clean
[ 本帖最后由 FinalBSD 于 2005-11-16 20:40 编辑 ] |
|