how to test for linux base version? (googleearth)

Juergen Lock nox at jelal.kn-bremen.de
Sat Oct 17 15:45:25 UTC 2009


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
	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? :)

 Thanx,
	Juergen


More information about the freebsd-emulation mailing list