This port conflicts with openldap because it uses the same library names.

Fix it by prefixing this port's libraries with moz, e.g. libldap -> libmozldap
The include files ldap.h and lber.h have been fixed in the same way.

This fix also changes the installation target from a specific
mozilla directory to the standard locations.

PR:		ports/22721
Submitted by:	"Charles N. Owens" <owensc@enc.edu>
This commit is contained in:
Paul Richards 2001-04-17 18:24:16 +00:00
parent 921ae36307
commit c4f3b6abb3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=41599
2 changed files with 44 additions and 17 deletions

View file

@ -10,6 +10,7 @@ PORTVERSION= 1998.12.31
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= directory/c-sdk/ldap
DISTNAME= ldapsdk_12311998
MAINTAINER= paul@FreeBSD.org
@ -29,19 +30,45 @@ do-install:
${MKDIR} ${INSTALL_DIR}/include
${MKDIR} ${INSTALL_DIR}/lib
${INSTALL_DATA} ${OBJDIR}/bin/liblber.so.1.0 \
${INSTALL_DIR}/lib/liblber.so.1
-(cd ${INSTALL_DIR}/lib; ${LN} -s liblber.so.1 liblber.so)
${PREFIX}/lib/libmozlber.so.1
-(cd ${PREFIX}/lib; ${LN} -s libmozlber.so.1 libmozlber.so)
${INSTALL_DATA} ${OBJDIR}/bin/libldap.so.1.0 \
${INSTALL_DIR}/lib/libldap.so.1
-(cd ${INSTALL_DIR}/lib; ${LN} -s libldap.so.1 libldap.so)
${PREFIX}/lib/libmozldap.so.1
-(cd ${PREFIX}/lib; ${LN} -s libmozldap.so.1 libmozldap.so)
${INSTALL_DATA} ${OBJDIR}/lib/liblber.a ${PREFIX}/lib/libmozlber.a
${INSTALL_DATA} ${OBJDIR}/lib/libldap.a ${PREFIX}/lib/libmozldap.a
cd ${OBJDIR}/etc && ${TAR} -chf - * | \
${TAR} -xf - -C ${INSTALL_DIR}/etc
cd ${OBJDIR}/include && ${TAR} -chf - * | \
${TAR} -xf - -C ${INSTALL_DIR}/include
cd ${OBJDIR}/lib && ${TAR} -chf - * | \
${TAR} -xf - -C ${INSTALL_DIR}/lib
cd ${INSTALL_DIR}/include \
&& [ -f lber.h ] \
&& ( cat lber.h | sed -e 's/ldap\.h/mozldap\.h/' > mozlber.h ) \
&& rm lber.h \
&& [ -f ldap.h ] \
&& ( cat ldap.h | sed -e 's/lber\.h/mozlber\.h/' > mozldap.h ) \
&& rm ldap.h
${LN} -sf ${INSTALL_DIR}/include/mozlber.h ${PREFIX}/include
${LN} -sf ${INSTALL_DIR}/include/mozldap.h ${PREFIX}/include
post-install:
@${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/mozilla/directory/lib
@${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
@echo
@echo 'PLEASE NOTE (2000/8/23):'
@echo ' The mozilla lber and ldap libraries now are installed'
@echo ' with the names mozlber and mozldap.'
@echo
@echo ' This has been done to resolve a library naming conflict with '
@echo ' the openldap port. Also, these libraries and related'
@echo ' header files are now installed by default in the standard'
@echo ' directories /usr/local/lib and /usr/local/include.'
@echo
@echo ' The complete set of mozilla ldapsdk header files'
@echo ' has been installed in /usr/local/mozilla/directory/include,'
@echo ' should you require one of the more esoteric ones.'
@echo
@echo ' Also, please note that the PerLDAP port (../perldap) has'
@echo ' been updated to link appropriately to these new library names.'
@echo
.include <bsd.port.mk>

View file

@ -4,18 +4,18 @@ mozilla/directory/etc/ldapfriendly
mozilla/directory/etc/ldaptemplates.conf
@dirrm mozilla/directory/etc
mozilla/directory/include/disptmpl.h
mozilla/directory/include/lber.h
mozilla/directory/include/ldap.h
mozilla/directory/include/mozlber.h
mozilla/directory/include/mozldap.h
mozilla/directory/include/srchpref.h
@dirrm mozilla/directory/include
mozilla/directory/lib/liblber.so.1
mozilla/directory/lib/liblber.so
mozilla/directory/lib/libldap.so.1
mozilla/directory/lib/libldap.so
mozilla/directory/lib/liblber.a
mozilla/directory/lib/libldap.a
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %D/mozilla/directory/lib
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R
@dirrm mozilla/directory/lib
@dirrm mozilla/directory
@dirrm mozilla
lib/libmozlber.so.1
lib/libmozlber.so
lib/libmozldap.so.1
lib/libmozldap.so
lib/libmozlber.a
lib/libmozldap.a
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m /usr/local/lib
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R