Date: Fri, 12 Jun 2015 13:11:59 +0800 From: "Euan Thoms" <euan@potensol.com> To: "Shane Ambler" <FreeBSD@ShaneWare.Biz> Cc: freebsd-ports@freebsd.org Subject: =?utf-8?q?Re:_New_port_with_USES=3Dgmake_will_not_stage?= Message-ID: <72b5-557a6a00-b-6b8b4580@220794286> In-Reply-To: <557A510A.4040409@ShaneWare.Biz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, June 12, 2015 11:24 SGT, Shane Ambler <FreeBSD@ShaneWare.Biz= > wrote: > On 11/06/2015 15:03, Euan Thoms wrote: > > > > On Thursday, June 11, 2015 13:18 SGT, "Chris H" <bsd-lists@bsdforge= .com> wrote: > > > >> On Thu, 11 Jun 2015 11:33:03 +0800 "Euan Thoms" <euan@potensol.com= > wrote > >> > >>> I'm making a port for OpenSIPS. It builds successfully, but the e= ven with > >>> just "make" it installs files to the system instead of to stage (= i.e. to > >>> /usr/local/... instead of /usr/ports/net/opensips/work/stage/usr/= local/...). > >>> > >>> I am using gmake and gcc since that's what's required for OpenSIP= S. > >>> > >>> I've done a similar port before and the FreeBSD ports macros do t= he staging > >>> for me. However, even when I tell gmake the DESTDIR=3D${STAGEDIR}= in do-build > >>> and do-install, a "make" just installs the files to /usr/local/..= . . > > > MAKE=5FARGS+=3D PREFIX=3D${LOCALBASE} > > MAKE=5FARGS+=3D exclude=5Fmodules=3D"${EXCLUDE=5FMODULE= S}" include=5Fmodules=3D"${INCLUDE=5FMODULES}" > > While MAKE=5FARGS should send options to gmake, what about backing up= a > step to configure? > > Try setting PREFIX in CONFIGURE=5FENV or maybe MAKE=5FENV to specify = > environment variables instead of arguments. > > cd ${WRKSRC} && ${MAKE=5FENV} ${GMAKE} ${MAKE=5FARGS} ${ALL=5FTARGET}= > > Do you need USE=5FAUTOTOOLS=3Dautoconf or to add a custom do-configur= e: ? > Well that's the thing, it doesn't seem to use autotools or any kind of = ./configure script. It seems to use it's own ncurses style menuconfig t= o generate a Makefile.conf. Unlike it's fork sister Kamailio, it doesn'= t use a "make $ARGS cfg" either. So, you're right, it's about the Makefile preparation, only it has to b= e done more manually. I'm going through the Makefile and Makefile.def just now. I've already = found a few things that need FreeBSDisms added. For example; SMP detect= ion has a ifeq($(OS),solaris) statement, but I need to add one for free= bsd. Currently I'm going with the following, unless anyone can suggest = a better way: else ifeq ($(OS),freebsd) SMP=5FSTR =3D $(shell sysctl kern.smp.active | grep 1) ifeq (,$(SMP=5FSTR)) ISSMP ?=3D no else ISSMP ?=3D yes endif Also, I added a rule for FreeBSD to set LIBDIR to "lib" regardless of a= rchitecture. It was being set to "lib64" which is normal for Linux I gu= ess. I notice there are several paths mentioned in the OpenSIPS Makefile.def= s that may effect the staging process. This is taken from the file: # install location DESTDIR ?=3D $(LOCALBASE) PREFIX ?=3D $(DESTDIR) prefix =3D $(PREFIX) # install path is $(basedir) $(prefix) # example: # creating a bin. archive in /tmp, which unpacks in /usr/local # basedir=3D/tmp # prefix=3D/usr/local I noticed there is support for FreeBSD added to the Makefile and Makfil= e.defs, but it was probably added a while back. It's clearly not compat= ible with the Ports staging requirements. I'll keep going, should have = something to report back soon. -- Regards, Euan Thoms
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?72b5-557a6a00-b-6b8b4580>