From owner-freebsd-ports Fri Mar 26 9:29:25 1999 Delivered-To: freebsd-ports@freebsd.org Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (Postfix) with ESMTP id 8C636150FA for ; Fri, 26 Mar 1999 09:29:23 -0800 (PST) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id KAA07741; Fri, 26 Mar 1999 10:29:03 -0700 (MST) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id KAA01141; Fri, 26 Mar 1999 10:29:03 -0700 Date: Fri, 26 Mar 1999 10:29:03 -0700 Message-Id: <199903261729.KAA01141@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Steve Price Cc: Nate Williams , freebsd-ports@FreeBSD.ORG Subject: Re: Ports question In-Reply-To: References: <199903261620.JAA00260@mt.sri.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > # I just made a new JDK release for FreeBSD, and I need a way to determine > # which 'flavor' of FreeBSD is being used on the build system in order to > # determine which 'flavor' of binary should be used. > # > # I have both an A.OUT version and an ELF version, and I'd like to install > # the most appropriate version on the system. > > You can use something like this: > > .include > > .if ${PORTOBJFORMAT} == "elf" > DISTFILES+= jdk1.1.7-elf.tar.gz > .else > DISTFILES+= jdk1.1.7-aout.tar.gz > .endif > ... > > .include Ahh, OK. > # Second, on ELF systems, if the data of /usr/libexec/ld-elf.so.1 is older > # than March 24, I need to install a new loader. Or, I need to abort the > # installation since it requires a new runtime loader. > > Installing a new loader would be a bad thing to do from the ports > tree. Agreed. > As for testing the date that is not a perfect solution either. > I'd like to see a quick-n-dirty test prgram written and add that > to the ELF distfiles. Then you could do something like this: > > do-install: > @${WRKDIR}/dladdr-test || (${CAT} ${PKGDIR}/LOADER-UPGRADE \ > && exit 1) > > 'dladdr-test' is a simple little program like this. > > #include > int > main() > { > Dl_info dlinfo; > if (dladdr((void *)&main, &dlinfo) == 0) > return 1; > return 0; > } > > This works since older versions of dladdr were guaranteed to return > a zero every time and the new version shouldn't fail in this simple > case. Since you seem qualified, do you want to do it or are you gonna make me? :) :) Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message