- 论坛徽章:
- 0
|
我的系统是vmware5.0+freebsd6.0-release
1.先是cvsup了一下.
cvsup -h cvsup3.freebsdchina.org -g -L 2 /etc/ports-supfile
ports-supfile改了两个地方,
一是注销了ports-all,二是去掉了ports-print前面的#
2.从清华的ftp站点上下载了AdobeReader_chs-7.0.1-1.i386.rpm,cp到/usr/ports/distfiles/acroread7/
并tar czvf AdobeReader_chs-7.0.1-1.i386.tar.gz AdobeReader_chs-7.0.1-1.i386.rpm
生成AdobeReader_chs-7.0.1-1.i386.tar.gz
3.通过md5 AdobeReader_chs-7.0.1-1.i386.tar.gz得到hash,通过ls -la得到size,
修改/usr/ports/print/acroread7/distinfo文件为:
MD5 (acroread/AdobeReader_chs-7.0.1-1.i386.tar.gz) = 1ae0a4bebbae1a47a771ef671a3
0095f
SIZE (acroread/AdobeReader_chs-7.0.1-1.i386.tar.gz) = 54989107
4.修改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.15 2006/02/21 18:49:08 hrs Exp $
- #
- PORTNAME= acroread7
- PORTVERSION?= 7.0.1
- PORTREVISION?= 1
- CATEGORIES?= print linux
- MASTER_SITES?= http://ardownload.adobe.com/pub/adobe/reader/unix/7x/${VERSIONDIR}/${ADOBE_LANG:L}/ \
- ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/${VERSIONDIR}/${ADOBE_LANG:L}/
- DISTNAME= # redefined below
- DIST_SUBDIR= acroread
- MAINTAINER= hrs@FreeBSD.org
- COMMENT= Adobe Reader for view, print, and search PDF documents (${ADOBE_LANG})
- RUN_DEPENDS= acroread:${PORTSDIR}/print/acroreadwrapper \
- ${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
- RESTRICTED= "Must fill out redistribution form at http://www.adobe.com/products/acrobat/distribute.html"
- NO_PACKAGE= "Use and redistribution with repackaging are not allowed"
- ONLY_FOR_ARCHS= amd64 i386
- USE_LINUX= yes
- USE_X_PREFIX= yes
- NO_BUILD= yes
- PLIST= ${PKGDIR}/pkg-plist.${PORTVERSION}
- PLIST_SUB= ACRODIR=${ACRODIR} \
- PLUGINDIR=${PLUGINDIR} \
- ADOBE_LANG=${ADOBE_LANG:U} \
- LOCALE_NAME=${LOCALE_NAME}
- SUB_FILES= ln mv rm pkg-message
- SUB_LIST= ADOBE_LANG=${ADOBE_LANG:U}
- PKGMESSAGE= ${WRKDIR}/pkg-message
- WRKSRC= ${WRKDIR}/AdobeReader
- .if ${PORTVERSION} == 7.0.1
- VERSIONDIR= ${PORTVERSION}
- DISTNAME= AdobeReader_${ADOBE_LANG:L}-${PORTVERSION}-1.i386
- POSTPROCESS= > /dev/null
- .else
- VERSIONDIR= 7.0
- DISTNAME= AdbeRdr701_linux_${ADOBE_LANG:L}
- IS_INTERACTIVE= yes
- .endif
- LANGCODE= chs:zh_CN cht:zh_TW dan:da_DK deu:de_DE enu:en_US \
- esp:es_ES fra:fr_FR ita:it_IT jpn:ja_JP kor:ko_KR \
- nld:nl_NL nor:nb_NO ptb:pt_BR suo:fi_FI sve:sv_SE
- ADOBE_LANG?= ENU
- .for L in ${ADOBE_LANG:L}
- LOCALE_NAME= ${LANGCODE:M${L}\:*:C/.*\://}
- LANG_${L:U}= ""
- .endfor
- .for L in ${LANGCODE:C/\:.*//:U}
- LANG_${L}?= "@comment "
- PLIST_SUB+= LANG_${L}=${LANG_${L}}
- .endfor
- .if ${ADOBE_LANG:U} == ENU
- LANG_NONENU?= "@comment "
- .endif
- PLIST_SUB+= LANG_NONENU=${LANG_NONENU}
- ACRODIR= Adobe/Acrobat7.0/${ADOBE_LANG:U}
- PLUGINDIR= lib/browser_linux_plugins
- INSTALLDIR= ${PREFIX}/${ACRODIR}
- INSTALLEXEC= ${SETENV} UNAME_s=Linux \
- InstallDir=${INSTALLDIR} \
- UNAME_r="Linux Compatibility on FreeBSD" \
- ${SH} ./INSTALL --install_path=${INSTALLDIR} ${POSTPROCESS}
- do-install:
- @${MKDIR} ${INSTALLDIR}
- @${MKDIR} ${WRKDIR}/bin
- @${INSTALL_SCRIPT} \
- ${WRKDIR}/ln ${WRKDIR}/rm ${WRKDIR}/mv \
- ${WRKDIR}/bin
- @${ECHO_CMD} Installing...
- @cd ${WRKSRC} && ${SETENV} PATH=${WRKDIR}/bin:${PATH} ${INSTALLEXEC}
- ${CHMOD} 0 ${INSTALLDIR}/Reader/intellinux/plug_ins/PPKLite.api
- ${BRANDELF} -t Linux ${INSTALLDIR}/Reader/intellinux/bin/acroread
- .if ${ADOBE_LANG:U} == ENU
- post-install:
- @${CAT} ${PKGMESSAGE}
- .endif
- .include <bsd.port.mk>
复制代码
只改了两个地方,PORTVERSION?= 7.0.1和.if ${PORTVERSION} == 7.0.1
原Makefile这里的版本号是7.0.5
然后make install clean
结果如下:
- ===> Installing for acroread7-7.0.1_1
- ===> acroread7-7.0.1_1 depends on executable: acroread - found
- ===> acroread7-7.0.1_1 depends on file: /compat/linux/usr/lib/libgtk-x11-2.0.so.0 - found
- ===> acroread7-7.0.1_1 depends on file: /compat/linux/usr/lib/libpango-1.0.so.0 - found
- ===> acroread7-7.0.1_1 depends on file: /compat/linux/etc/redhat-release - found
- ===> acroread7-7.0.1_1 depends on file: /compat/linux/usr/X11R6/lib/libXrender.so.1 - found
- ===> Generating temporary packing list
- ===> Checking if print/acroread7 already installed
- Installing...
- cd: can't cd to /usr/ports/print/acroread7/work/AdobeReader
- *** Error code 2
- Stop in /usr/ports/print/acroread7.
复制代码
说是找不到AdobeReader这个目录,后来我mkdir了这个目录,再次make的时候,又说找不到一个./INSTALL这样一个文件.
精华区里有剑心写的安装acroread7中文版的文章,不过是针对FreeBSD5.4的,里面的Makefile我也拿来用过,也提示其他错误.
各位大侠看看到底怎么装?
[ 本帖最后由 flyingkisser 于 2006-2-26 21:41 编辑 ] |
|