Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 2009 19:41:57 +0200
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        Boris Samorodov <bsam@ipt.ru>
Cc:        freebsd-emulation@FreeBSD.org, Juergen Lock <nox@jelal.kn-bremen.de>
Subject:   Re: how to test for linux base version?  (googleearth)
Message-ID:  <20091018174157.GB99191@triton8.kn-bremen.de>
In-Reply-To: <99413628@ipt.ru>
References:  <20091017154404.GA80599@triton8.kn-bremen.de> <99413628@ipt.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 18, 2009 at 02:30:43PM +0400, Boris Samorodov wrote:
> Juergen Lock <nox@jelal.kn-bremen.de> writes:
> 
> > I just got reminded to add a linux base version check to astro/google-earth
> > (It now needs recent linux libstdc++.so.6 with GLIBCXX_3.4.9 that only
> > is in f9 or f10, you can do
> 
> First of, I'd recommend leaving f9 alone (I'm going to deprecate all
> linux base ports except fc4 and f10 soon).
> 
Ah Ok.  (Does f10 work well enough on 7.x yet?)

> > 	objdump -T /compat/linux/usr/lib/libstdc++.so.6 |grep 'ABS.*GLIBCXX'
> > to check) - and was wondering how to best check for that in a port.
> > This is what I came up with so far:
> >
> > Index: Makefile
> > ===================================================================
> > RCS file: /home/pcvs/ports/astro/google-earth/Makefile,v
> > retrieving revision 1.35
> > diff -u -p -r1.35 Makefile
> > --- Makefile	24 Sep 2009 21:01:36 -0000	1.35
> > +++ Makefile	17 Oct 2009 15:32:22 -0000
> > @@ -38,6 +38,14 @@ RUN_DEPENDS+=	${LINUXBASE}/usr/lib/libGL
> >  USE_LINUX_APPS+=	dri
> >  .endif
> >  
> > +.if (${OSVERSION} < 800076 && \
> > +	 !defined(OVERRIDE_LINUX_BASE_PORT)) || \
> > +	(defined(OVERRIDE_LINUX_BASE_PORT) && \
> > +	 !(${OVERRIDE_LINUX_BASE_PORT} == f10) || \
> > +	   ${OVERRIDE_LINUX_BASE_PORT} == f9)
> > +IGNORE=		needs at least f9 Linux base
> > +.endif
> > +
> >  do-extract:
> >  	@${MKDIR} ${WRKSRC}
> >  	@${CP} ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES} ${WRKSRC}
> >
> >  Anyone have a better idea? :)
> 
> I'm not sure if it's better but just an other idea:
> -----
> .if ${OSVERSION}<7000XX  /*** XX should be find out ***/
> IGNORE FreeBSD>=7.X is needed with Linux emulation 2.6.x.
> .elif ${OSVERSION}<800076 && \
>         ! defined (OVERRIDE_LINUX_NONBASE_PORTS) ||
>         ! (${OVERRIDE_LINUX_NONBASE_PORTS} == f10)
> IGNORE= you need to use non-default linux ports (define OVERRIDE_LINUX_BASE_PORT=f10 and OVERRIDE_LINUX_NONBASE_PORTS=f10)
> .endif
> -----

 In the meantime I found emulators/linux-systemsimcell does something
similar, and it uses ${OSVERSION}<700055 for the first check.  Does
that look alright?  (seems to be the last OSVERSION before 7.0-R from
looking at
	http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#FREEBSD-VERSIONS
)

> 
> This check is not strict either. The thing is that both BASE and NONBASE
> variables should be defined and have f10 value for OSVERSION<800076.
> 
 Ok.

> I have an item at my TODO list to switch to using USE_LINUX=f10[+] or
> similar but it's not the highest priority and ENOTIME now...

 Heh yeah I guess that'd be useful here...

 Anyway, thanx, :)
	Juergen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091018174157.GB99191>