New Port OpenEMM2013 with some questions before

horst leitenmueller horst.leitenmueller at
Sun Jan 4 18:29:18 UTC 2015

hi all,

i have ported OpenEMM2013 R2 to freebsd but i have some questions before i can add it to the bug/new port reporting system

0) do-install
	copytree_share to exclude documentation directory (USR_SHARE/...) not working (i needed to move doc one level up in do-build: )
        ${MV} ${WRKSRC}/target/USR_SHARE ${WRKSRC}/USR_SHARE

        (cd ${WRKSRC}/target/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/${PORTNAME} "! -name USR_SHARE*")

		# update also /usr/local/share with the docs

	is there a better solution for this ?

1) pkg-plist 
	documentation with 

	i added for all entries in the Docsdir 
	and NO dirrm for the %%PORTDOCS%%%%DOCSDIR%% 

	but i get a warning that 
	portlint -A
	WARN: /usr/ports/mail/openemm2013/pkg-plist: Both ``%%PORTDOCS%%@dirrm %%DOCSDIR%%'' and ``%%PORTDOCS%%@unexec %D/%%DOCSDIR%% 2>/dev/null || true'' are missing.  At least one should be used.

	and in portershandbook <> @dirrm directory (Deprecated)

	so now what i have to add :-)

2) License if not defined in freebsd.lic db mk
	and building with poudriere will fail if the license must be accepted, how can this be solved ? (as i have it now it’s not correct!)

#LICENSE_COMB=   multi
#LICENSE_NAME=  Common Public Attribution License Version 1.0 (CPAL)
#LICENSE_PERMS_OpenEMM= auto-accept # dist-mirror pkg-mirror auto-accept

is there a best practice to transfer all lic to the correct place of freebsd

        # TODO LEI
        # move the licenses to the correct place
        # /usr/local/share/doc/openemm2013/LICENSE.txt
        # /usr/local/share/doc/openemm2013/ThirdPartyLicences/*

3) devel/libslang2 name for lib dependency (LIB_DEPENDS)

   but is the one which must be declared otherwise it will be never found is it normal in this way ?


4) USES python best way to define dynamically RUN_DEPENDS  for db (py27-MySQLdb56 )

RUN_DEPENDS=    ${TOMCATHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat8 py27-MySQLdb56>=1.2.3:${PORTSDIR}/databases/py-MySQLdb56

USES=   python:2.7,run

5) best way to reinplace_cmd for paths in the target system

	@${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' -e 's|-L INFO|-L INFO -s /var/run/openemm/bav.sock|' ${WRKSRC}/src/script/control/
	to hardcode /var/run will not be the best or ?

also portlint is complaining
root at openemm:/usr/ports/mail/openemm2013 # portlint
WARN: Makefile: possible use of absolute pathname "/var".

6) not able to replace

	i have a few problems with the REINPLACE_CMD 
		i thougt special character escaping is working as normal example \$ would escapce $ but it's not $$ escapes it 
		problem here a can't escape the single quote only in this way it's working...
		another problem i wanted to use grouping but this was also not working
			LHS |(base=) os.environ.*| and on RHS |\1 {PREFIX}...| 

	@${REINPLACE_CMD} -e "s|base = os.environ\['HOME'\]| base = '${PREFIX}\/${PORTNAME}'|g" -e "s|lockpath = os.environ\['LOCK_HOME'\]|lockpath = '/var/run/openemm'|g" ${WRKSRC}/src/script/lib/

7) symlink for pyhton 

	the application refers to the /usr/local/bin/python path installation of pyhton is only with version Nr
        # TODO LEI
        #${LN} -sf /usr/local/bin/python2.7 /usr/local/bin/python

	how can this be done ?, (btw.: app has no variable for current pyhton path)

8) portlint and position of LIB_DEPENDS / BUILD_DEPENDS / RUN_DEPENDS
portlint complains about position of following

WARN: Makefile: "BUILD_DEPENDS" has to appear earlier.
WARN: Makefile: "RUN_DEPENDS" has to appear earlier.

i have tried now all positions before ... but without success, where should it be placed (i would love to have a xsd for that to know WHAT is wrong and where it should be...)

9) portlint -A was complaing about not using PREFIX in pkg-message
	i thougt it will be replaced ? but this is not working as expected; is there a other way to get this solved 
    or is the only way to hardcode it and to live with warnings?

hopefully not too long and i get some help :-)

attached the Makefile (port.shar and the pourdriere -t log; i can send when needed) 

thnx in advance 


More information about the freebsd-ports mailing list