Date: Fri, 26 Mar 1999 11:27:22 -0600 (CST) From: Steve Price <sprice@hiwaay.net> To: Nate Williams <nate@mt.sri.com> Cc: freebsd-ports@FreeBSD.ORG Subject: Re: Ports question Message-ID: <Pine.OSF.4.02.9903261108280.22203-100000@fly.HiWAAY.net> In-Reply-To: <199903261620.JAA00260@mt.sri.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Mar 1999, Nate Williams wrote: # 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 <bsd.port.pre.mk> .if ${PORTOBJFORMAT} == "elf" DISTFILES+= jdk1.1.7-elf.tar.gz .else DISTFILES+= jdk1.1.7-aout.tar.gz .endif ... .include <bsd.port.post.mk> # 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. 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 <dlfcn.h> 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. # Does anyone have any suggestions on how I would go about doing this? # I'm *NOT* a ports person, nor have I made any port from scratch, so be # gentle with me. :) :) # # # Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.02.9903261108280.22203-100000>