Re: New port with USES=gmake will not stage

Euan Thoms euan at potensol.com
Thu Jun 11 06:01:31 UTC 2015


 
On Thursday, June 11, 2015 13:44 SGT, "Euan Thoms" <euan at potensol.com> wrote: 
 
>  
> On Thursday, June 11, 2015 13:33 SGT, "Euan Thoms" <euan at potensol.com> wrote: 
>  
> >  
> > On Thursday, June 11, 2015 13:18 SGT, "Chris H" <bsd-lists at bsdforge.com> wrote: 
> >  
> > > On Thu, 11 Jun 2015 11:33:03 +0800 "Euan Thoms" <euan at potensol.com> wrote
> > > 
> > > > I'm making a port for OpenSIPS. It builds successfully, but the even 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 OpenSIPS.
> > > > 
> > > > I've done a similar port before and the FreeBSD ports macros do the staging
> > > > for me. However, even when I tell gmake the DESTDIR=${STAGEDIR} in do-build
> > > > and do-install, a "make" just installs the files to /usr/local/... .
> > > > 
> > > > I can't find any documentation on how to ensure building uses staging.
> > > > OpenSIPS doesn't have a configure script AFAIK. It has it's own menuconfig
> > > > which normally generates a Makefile.conf. The only thing useful in there is
> > > > PREFIX= , but that is to specify the final destination paths (also used in
> > > > linking I guess). My port passes the compile flags in MAKE_ARGS instead of
> > > > using a Makefile.conf file. 
> > > Kind of a tough call w/o any real information -- your Makefile, the source
> > > location? :)
> > 
> > Sorry about that.
> > 
> > Source file is here: http://opensips.org/pub/opensips/1.11.5/opensips-1.11.5-latest_src.tar.gz
> > 
> > here is my Makefile contents:
> > 
> > # cat Makefile
> > # Created by: Euan Thoms <euan at potensol.com>
> > # $FreeBSD$
> > 
> > PORTNAME=               opensips1-lts
> > PORTVERSION=            1.11.5
> > CATEGORIES=             net
> > MASTER_SITES=           http://opensips.org/pub/opensips/1.11.5/
> > DISTNAME=               opensips-${PORTVERSION}-latest_src
> > 
> > MAINTAINER=             euan at potensol.com
> > COMMENT=                OpenSIPS (Open SIP Server) is a mature Open Source implementation of a SIP server.
> > 
> > LICENSE=                GPLv2
> > LIB_DEPENDS=            libxml2.so:${PORTSDIR}/textproc/libxml2 \
> >                         libmemcached.so:${PORTSDIR}/databases/libmemcached
> > 
> > BUILD_DEPENDS=          python:${PORTSDIR}/lang/python
> > 
> > WRKSRC=                 ${WRKDIR}/opensips-${PORTVERSION}-tls
> > 
> > OPTIONS_DEFINE=         LDAP MYSQL PGSQL MEMCACHED
> > OPTIONS_DEFAULT=        LDAP PGSQL MEMCACHED
> > OPTIONS_SUB= yes
> > 
> > LDAP_DESC=              Build with LDAP support
> > MYSQL_DESC=             Build with MySQL support
> > PGSQL_DESC=             Build with PostgreSQL support
> > MEMCACHED_DESC=         Build with memcached support
> > 
> > USES=                   gmake shebangfix
> > USE_GCC=                yes
> > 
> > .include <bsd.port.options.mk>
> > 
> > #post-patch:
> > #       ${REINPLACE_CMD} -e 's|^#include <Python.h>|#include "Python.h"|' ${WRKSRC}/
> > 
> > EXCLUDE_MODULES=        aaa_radius b2b_logic cachedb_cassandra cachedb_couchbase \
> >                         cachedb_memcached cachedb_mongodb cachedb_redis carrierroute cpl-c db_berkeley \
> >                         db_http db_mysql db_oracle db_perlvdb db_postgres db_unixodbc dialplan \
> >                         event_rabbitmq h350 regex identity jabber json ldap lua httpd mi_xmlrpc_ng \
> >                         mi_xmlrpc mmgeoip osp perl pi_http presence presence_dialoginfo presence_mwi \
> >                         presence_xml pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp python \
> >                         rest_client rls sngtc snmpstats xcap xcap_client xmpp
> > 
> > INCLUDE_MODULES=        aaa_radius b2b_logic cachedb_memcached carrierroute \
> >                         cpl-c db_postgres dialplan event_rabbitmq h350 regex identity jabber json \
> >                         ldap httpd mi_xmlrpc_ng mi_xmlrpc mmgeoip perl pi_http presence \
> >                         presence_dialoginfo presence_mwi presence_xml pua pua_bla pua_dialoginfo \
> >                         pua_mi pua_usrloc pua_xmpp python rest_client rls xcap xcap_client xmpp
> > 
> > MAKE_ARGS+=             PREFIX=${LOCALBASE}
> > MAKE_ARGS+=             exclude_modules="${EXCLUDE_MODULES}" include_modules="${INCLUDE_MODULES}"
> > 
> > #do-build:
> > #       cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} ${ALL_TARGET}
> > #
> > #do-install:
> > #       cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} ${INSTALL_TARGET}
> > 
> > .include <bsd.port.mk>
> > #### EOF ############
> > 
> > I can't find the make files for stage to drill down and see what's going wrong. Any pointers to the script that "make stage" uses? 
> 
> Oops, I just found a folder in the source tarballs packaging folder called "freebsd". And inside that is what looks like a fully baked port.
> 
> # ls work/opensips-1.11.5-tls/packaging/freebsd
> Makefile   distinfo   files/     pkg-descr
> 
> 
> I haven't tried it yet, but I am now wondering why it isn't in the ports tree. Somebody has gone to the effort to make it.

Well, that port in the tarballs' use of macros is outdated and it only support i386 which is strange (ONLY_FOR_ARCHS=i386). But the patches may come in handy getting it to build with clang. Currently my port got it building with USE_GCC=yes without any patching. Just that I can't get it to stage.
 
-- 
Regards, Euan Thoms 




More information about the freebsd-ports mailing list