From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 18 10:28:24 2009 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 425AB106566C for ; Sun, 18 Oct 2009 10:28:24 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id F10278FC14 for ; Sun, 18 Oct 2009 10:28:23 +0000 (UTC) Received: from [85.173.16.144] (helo=izar) by services.ipt.ru with esmtpa (Exim 4.54 (FreeBSD)) id 1MzSzu-0006Cy-QR; Sun, 18 Oct 2009 14:28:22 +0400 To: Juergen Lock References: <20091017154404.GA80599@triton8.kn-bremen.de> From: Boris Samorodov Date: Sun, 18 Oct 2009 14:30:43 +0400 In-Reply-To: <20091017154404.GA80599@triton8.kn-bremen.de> (Juergen Lock's message of "Sat\, 17 Oct 2009 17\:44\:04 +0200") Message-ID: <99413628@ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-emulation@FreeBSD.org Subject: Re: how to test for linux base version? (googleearth) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2009 10:28:24 -0000 Juergen Lock 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). > 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 ----- 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. 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... -- WBR, bsam