Bug 41085 - palm/coldsync broken under FreeBSD 4.5 and above
Summary: palm/coldsync broken under FreeBSD 4.5 and above
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 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-28 16:00 UTC by arensb
Modified: 2002-08-04 00:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arensb 2002-07-28 16:00:05 UTC
	I just got the following message:

  From: Derik van Zuetphen <dvanzuetphen@pironet-ndh.com>
  To: arensb+freebsd-ports@ooblick.com
  Subject: FreeBSD Port: coldsync-2.1.3_3

  Hello,

  I just noticed that your Coldsync Port is broken on FreeBSD 4.6.


  Error message after make:

  Extracting for coldsync-2.1.3_3
  >> Checksum OK for coldsync-2.1.3.tar.gz.
  ===>   coldsync-2.1.3_3 depends on shared library: intl.2 - found
  ===>  Patching for coldsync-2.1.3_3
  ===>  Applying FreeBSD patches for coldsync-2.1.3_3
  /usr/bin/sed -i.bak -e 's,udi\.(\S+),udi.udi_\1,g;'  -e 's,ur\.(\S+),ur.ucr_\1,g;'  /usr/ports/palm/coldsync/work/coldsync-2.1.3/configure /usr/ports/palm/coldsync/work/coldsync-2.1.3/libpconn/PConnection_usb.c
  sed: 1: "s,udi\.(\S+),udi.udi_\1 ...": \1 not defined in the RE
  *** Error 

The problem lies in the post-patch target in the Makefile. The
relevant lines are:

	${REINPLACE_CMD} -e 's,udi\.(\S+),udi.udi_\1,g;' \
		-e 's,ur\.(\S+),ur.ucr_\1,g;' \

I've confirmed under FreeBSD 4.4 that if REINPLACE_CMD is 'sed', then
this will not work as expected, since by default sed wants "\(" and
"\)" instead of "(" and ")", and doesn't understand "\S".
	This target does work as expected if REINPLACE_CMD is 'perl -p'.

Fix: 

From the original message:

To fix: Add a -E after the sed call in Makefile:

% diff Makefile Makefile.orig
41c41
<       ${REINPLACE_CMD} -E -e 's,udi\.(\S+),udi.udi_\1,g;' \
---
>       ${REINPLACE_CMD} -e 's,udi\.(\S+),udi.udi_\1,g;' \
How-To-Repeat: 
	% cd /usr/ports/palm/coldsync
	% make
Comment 1 Tetsurou Okazaki freebsd_committer freebsd_triage 2002-08-04 00:04:57 UTC
State Changed
From-To: open->closed

Committed, thanks!