openoffice.org-2.3.1_1 depends on libpaper-1.1.21_3
Jung-uk Kim
jkim at FreeBSD.org
Wed Feb 27 18:04:11 UTC 2008
On Wednesday 27 February 2008 12:24 pm, Jung-uk Kim wrote:
> On Wednesday 27 February 2008 11:34 am, Richard (Rick) Seay wrote:
> > On Tue, Feb 26, 2008 at 1:05 PM, Jung-uk Kim <jkim at freebsd.org>
>
> wrote:
> > > AFAIK, paperconf is an optional feature and it is not fatal
> > > error.
> >
> > Thanks for the quick reply.
> >
> > I just reproduced the problem. Here is the message that I got:
> >
> > $ ls ~/.openoffice.org2
> >
> > ls: /home/rick/.openoffice.org2: No such file or directory
> >
> > $ /usr/local/bin/openoffice.org-2.3.1
> >
> > paperconf: not found
> >
> > $
> >
> >
> > There was no pre-existing ~/.openoffice.org2. Perhaps I should
> > not have used the word "failed". In fact, the setup dialog
> > completed properly, but the "paperconf: not found" message made
> > me think that there was an error. From your reply, it seems that
> > the message may be safely ignored. After looking into it
> > further, I find I can produce the error message by just renaming
> > /usr/local/bin/paperconf and running any component of openoffice.
>
> Yes, you can safely ignore the message. FYI, it is optional
> feature because paperconf is GPL'd:
>
> http://www.openoffice.org/issues/show_bug.cgi?id=77363
>
> Then, Linux people had the same issue:
>
> http://www.openoffice.org/issues/show_bug.cgi?id=78617
>
> So, the final code became like this:
>
> http://lxr.go-oo.org/source/gsl/psprint/source/printer/printerinfom
>anager.cxx#143
>
> Unfortunately it does not work for FreeBSD but I didn't bother
> looking into it. ;-)
Oh, I think I know why it didn't work for FreeBSD. In non-Solaris
case:
%cat popen.c
#include <stdio.h>
int
main(void)
{
FILE *f;
f = popen("foobar 2>/dev/null", "r");
if (f) {
printf("done\n");
pclose(f);
} else
printf("failed\n");
return (0);
}
%cc -o popen popen.c
%./popen
done
foobar: not found
%
Now let's take a look at Solaris case:
%cat popen.c
#include <stdio.h>
int
main(void)
{
FILE *f;
f = popen("sh -c foobar 2>/dev/null", "r");
if (f) {
printf("done\n");
pclose(f);
} else
printf("failed\n");
return (0);
}
%cc -o popen popen.c
%./popen
done
%
It works. So, the easy solution would be:
- #ifdef SOLARIS
+ #ifdef LINUX
// #i78617# workaround missing paperconf command; on e.g. Linux
// the 2>/dev/null works on the started shell also
- FILE* pPipe = popen( "sh -c paperconf 2>/dev/null", "r" );
+ FILE* pPipe = popen( "paperconf 2>/dev/null", "r" );
#else
- FILE* pPipe = popen( "paperconf 2>/dev/null", "r" );
+ FILE* pPipe = popen( "sh -c paperconf 2>/dev/null", "r" );
#endif
I.e., Linux is so special. ;-)
Jung-uk Kim
More information about the freebsd-openoffice
mailing list