I'll add it with next upload. Thank you! On Sun, Apr 24, 2005 at 10:26:03PM +0800, Victor Hsieh wrote: > Package: freebsd5-buildutils > Version: 5.3+2-2 > Severity: important > Tags: patch > > Hi, > > I'm trying to build FreeBSD's ports in my Debian/Linux box. When I > tried to make chinese/irssi, something wrong happened in > /usr/share/freebsd5-buildutils/ports/Mk/bsd.port.mk . > > First, my sed(1) doesn't take "-E" (in FreeBSD, it does.). But without > "-E", it seems to work just right in Linux. One possible solution is to > provide a /usr/bin/freebsd-sed , or remove those "-E" in the file. > I've encountered some other problem of sed. For example, when I do > "make generate-plist", my sed doesn't accept the givne expression. > IMO, freebsd-sed will be a better solution. > > Second, " CKSUM=`${MD5} < $$file`; " should be changed to > " CKSUM=`${MD5} < $$file | awk '{print $$1}'`; " because of different > output format. > > Third, Linux's patch(1) doesn't take an additional argument of "-b". > Modify "PATCH_ARGS+= -b .orig" into "PATCH_ARGS+= -b" will fix this > problem (how the name be decided is mentioned in the man page.). > > I've put my patch here as well as the attachment: > http://victor.csie.org/patch/bsd.port.mk_5.3+2-2.diff > > I hope it helps, thanks. :) > > Best, > Victor > > > -- System Information: > Debian Release: 3.1 > APT prefers unstable > APT policy: (500, 'unstable'), (1, 'experimental') > Architecture: i386 (i686) > Kernel: Linux 2.6.11-rc4 > Locale: LANG=zh_TW.UTF-8, LC_CTYPE=zh_TW.UTF-8 (charmap=UTF-8) > > Versions of packages freebsd5-buildutils depends on: > ii dash 0.5.2-4 The Debian Almquist Shell > ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries > an > > -- no debconf information
> --- bsd.port.mk.orig 2005-02-04 08:40:35.000000000 +0800 > +++ bsd.port.mk 2005-04-24 21:16:26.205492960 +0800 > @@ -1726,7 +1726,7 @@ > .endif > > .if ${PATCH} == "patch" > -PATCH_ARGS+= -b .orig > +PATCH_ARGS+= -b# .orig > PATCH_DIST_ARGS+= -b .orig > .endif > > @@ -2815,7 +2815,7 @@ > .if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING) > @if [ -f "${AUDITFILE}" ]; then \ > audit_created=`${_EXTRACT_AUDITFILE} | \ > - ${SED} -nEe "1s/^#CREATED: > *([0-9]{4})-?([0-9]{2})-?([0-9]{2}).*$$/\1\2\3/p"`; \ > + ${SED} -ne "1s/^#CREATED: > *([0-9]{4})-?([0-9]{2})-?([0-9]{2}).*$$/\1\2\3/p"`; \ > audit_expiry=`date -u -v-14d "+%Y%m%d"`; \ > if [ "$$audit_created" -lt "$$audit_expiry" ]; then \ > ${ECHO_MSG} "===> WARNING: Vulnerability database out > of date, checking anyway"; \ > @@ -2847,7 +2847,7 @@ > @(cd ${_DISTDIR}; \ > ${_MASTER_SITES_ENV} ; \ > for _file in ${DISTFILES}; do \ > - file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ > + file=`${ECHO_CMD} $$_file | ${SED} -e 's/:[^:]+$$//'` ; \ > select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e > 's/,/ /g'` ; \ > force_fetch=false; \ > filebasename=`${BASENAME} $$file`; \ > @@ -2914,7 +2914,7 @@ > @(cd ${_DISTDIR}; \ > ${_PATCH_SITES_ENV} ; \ > for _file in ${PATCHFILES}; do \ > - file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ > + file=`${ECHO_CMD} $$_file | ${SED} -e 's/:[^:]+$$//'` ; \ > select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e > 's/,/ /g'` ; \ > force_fetch=false; \ > filebasename=`${BASENAME} $$file`; \ > @@ -3816,7 +3816,7 @@ > @(cd ${_DISTDIR}; \ > ${_MASTER_SITES_ENV} ; \ > for _file in ${DISTFILES}; do \ > - file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ > + file=`${ECHO_CMD} $$_file | ${SED} -e 's/:[^:]+$$//'` ; \ > select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e > 's/,/ /g'` ; \ > if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ > if [ ! -z "$$select" ] ; then \ > @@ -3848,7 +3848,7 @@ > @(cd ${_DISTDIR}; \ > ${_PATCH_SITES_ENV} ; \ > for _file in ${PATCHFILES}; do \ > - file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ > + file=`${ECHO_CMD} $$_file | ${SED} -e 's/:[^:]+$$//'` ; \ > select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e > 's/,/ /g'` ; \ > if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ > if [ ! -z "$$select" ] ; then \ > @@ -3918,7 +3918,7 @@ > (cd ${DISTDIR}; OK=""; \ > for file in ${_CKSUMFILES}; do \ > pattern="`${ECHO_CMD} $$file | ${SED} -e > 's/\./\\\\./g'`"; \ > - CKSUM=`${MD5} < $$file`; \ > + CKSUM=`${MD5} < $$file | awk '{print $$1}'`; \ > CKSUM2=`${GREP} "^MD5 ($$pattern)" ${MD5_FILE} | ${AWK} > '{print $$4}'`; \ > if [ -z "$$CKSUM2" ]; then \ > ${ECHO_MSG} ">> No checksum recorded for > $$file."; \ > @@ -4552,7 +4552,7 @@ > done > @${ECHO_CMD} '@cwd ${PREFIX}' >> ${TMPPLIST} > .endif > - @for i in $$(${ECHO_CMD} ${__MANPAGES} > ${_TMLINKS:M${_PREFIX}*:S|^${_PREFIX}/||} ' ' | ${SED} -E -e > 's|man([1-9ln])/([^/ ]+) |cat\1/\2 |g'); do \ > + @for i in $$(${ECHO_CMD} ${__MANPAGES} > ${_TMLINKS:M${_PREFIX}*:S|^${_PREFIX}/||} ' ' | ${SED} -e > 's|man([1-9ln])/([^/ ]+) |cat\1/\2 |g'); do \ > ${ECHO_CMD} "@unexec rm -f %D/$${i%.gz} %D/$${i%.gz}.gz" >> > ${TMPPLIST}; \ > done > .if ${XFREE86_HTML_MAN:L} == "yes" > @@ -4601,7 +4601,7 @@ > add-plist-docs: > .if defined(PORTDOCS) > @if ${EGREP} -qe '[EMAIL PROTECTED]' ${TMPPLIST} && \ > - [ "`${SED} -En -e '/[EMAIL PROTECTED] ]*/s,,,p' ${TMPPLIST} | > ${TAIL} -n 1`" != "${PREFIX}" ]; then \ > + [ "`${SED} -n -e '/[EMAIL PROTECTED] ]*/s,,,p' ${TMPPLIST} | > ${TAIL} -n 1`" != "${PREFIX}" ]; then \ > ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ > fi > @${FIND} -P ${PORTDOCS:S/^/${DOCSDIR}\//} ! -type d 2>/dev/null | \ -- .''`. Proudly running Debian GNU/kFreeBSD unstable/unreleased (on UFS2+S) : :' : `. `' http://www.debian.org/ports/kfreebsd-gnu `- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]