ports/129122: Building OpenOffice.org-3.0.0 fails

Jukka A. Ukkonen jau at iki.fi
Sat Dec 6 01:20:09 PST 2008


Quoting Maho NAKATA:
> 
> I welcome patches and patch submitters should sign to SCA...
> Best,
> 
> From: Robert Huff <roberthuff at rcn.com>
> Subject: Re: ports/129122: Building OpenOffice.org-3.0.0 fails
> Date: Mon, 01 Dec 2008 01:19:21 -0500
> 
> > 
> > Jukka A. Ukkonen writes:
> > 
> > >  	To make the ports build successful on ACL enabled systems
> > >  	while waiting for the real fix you can...
> > >  
> > >  	1) either make the build phase use the native cp in place of
> > >  	gcp (labour intensive),
> > >  
> > >  	2) or emulate gcp on top of the native cp (simple),
> > 
> > 	Simple for /you/ maybe; not so much for many others.  Care to
> > share the wisdom?


	Since patches and sharing of wisdom have been requested...

	My approach has been simply overriding the true (broken) gcp
	using a wrapper script to convert gcp command line options to
	those used by the native cp.
	This of course is not so much a patch but simply a workaround.
	See my replacement gcp script at the end.

	I have put this gcp replacement in my own ~/bin directory and
	inserted my own ~/bin in the PATH before /usr/local/bin, which
	is the location of the real gcp.

	Additionally I have manually edited the configure script to
	remove the test for real gcp.
	Another means to the same result is running "make configure"
	while the replacement gcp is not yet in the PATH.
	Either way this part has always taken some manual action.

	As I already have pointed out, the actual patch should go into
	gcp anyhow.
	So, I think a workaround is exactly what is needed to get OOo
	successfully built while gcp remains broken.

	I hope this helps.


	Cheers,
		// jau
.---  ..-  -.-  -.-  .-    .-  .-.-.-    ..-  -.-  -.-  ---  -.  .  -.
  /    Jukka A. Ukkonen,                             Oxit Ltd, Finland
 /__   M.Sc. (sw-eng & cs)                    (Phone) +358-500-606-671
   /   Internet: Jukka.Ukkonen(a)Oxit.Fi        (Home) +358-9-6215-280
  /    Internet: jau(a)iki.fi
 v
        .---  .-  ..-  ...-.-  ..  -.-  ..  .-.-.-  ..-.  ..
+ + + + My opinions are mine and mine alone, not my employers. + + + +


 o
  \ /
-  X ------------------------- clip clip ------------------------------
  / \
 O


#!/bin/sh
#debug=echo

GCP_EMULATION_VERSION='cp (GNU coreutils) 6.9'
COPYRIGHT_MESSAGE='Copyright (C) 2007-2008 Jukka Ukkonen / Thunderbolt Ltd.'

newopts=""

_prog=`basename $0`

usage()
{
	echo	'usage: '"${_prog}" \
		'[-abdfiHlLPpRrstTuvx]' \
		'[-t destdir] [-S backup_suffix]' \
		'src ... [dest]'
	echo ''
	return 0
}
	

while getopts "abdfiHlLPpRrsS:t:Tuvx-:" opt ; do
	case "$opt" in
	\?)
		usage
		exit 255
		;;

	-)	case "$OPTARG" in
			"version")
				echo "$GCP_EMULATION_VERSION"
				echo "$COPYRIGHT_MESSAGE"
				exit 0
				;;
			"help")
				usage
				exit 0
				;;
			"")
				break
				;;
			*)
				echo 'Option "'"$OPTARG"'" currently unsupported.'
				exit 255
				;;
		esac
		;;

	a)	# same as -dpPR in GNU
		# In a modern BSD -a works.
		# We assume an old system.

		newopts="$newopts -pPR"
		;;

	b)	# BSD cp currently has no backup mode
		;;

	d)	# -P --preserve=link
		# emulate as -Pp
		# -p == --preserve=mode,ownership,timestamps
		newopts="$newopts -Pp"
		;;

	f)	newopts="$newopts -f"
		;;

	i)	newopts="$newopts -i"
		;;

	H)	newopts="$newopts -H"
		;;

	l)	newopts="$newopts -l"
		;;

	L)	newopts="$newopts -L"
		;;

	P)	newopts="$newopts -P"
		;;

	p)	newopts="$newopts -p"
		;;

	R|r)	newopts="$newopts -R"
		;;

	s)	# BSD cp currently does not create symlinks -> hard-link
		newopts="$newopts -l"
		;;

	S)	# BSD cp currently has no backup mode
		;;

	t)	target_dir="$OPTARG"
		;;

	T)	# in GNU: treat DEST as a normal file
		;;

	u)	# BSD cp currently supports no update mode
		# Emulate using no overwrite.
		newopts="$newopts -n"
		;;

	v)	newopts="$newopts -v"
		;;

	x)	# in GNU: stay on this file system
		# Not currently supported by BSD.
		;;

	esac
done

shift `expr $OPTIND - 1`

if [ X"${target_dir}" = "X" ] ; then
	$debug /bin/cp $newopts "$@"
else
	$debug /bin/cp $newopts "$@" "${target_dir}"
fi


More information about the freebsd-openoffice mailing list