freebsd-ports/sysutils/hal/Makefile
Tijl Coosemans aad09bc5e2 When linking a library libA with a library libB using libtool, if libB.la
exists, libtool will add all libraries libB.la refers to (dependency_libs
field) to the linker command line and store them in the dependency_libs
field of libA.la.  So everything that subsequently links with libA will also
link to these extra libraries.  This causes too much overlinking.

This commit modifies Mk/Uses/libtool.mk so it empties the dependency_libs
field in .la libraries during staging.  However, because .la libraries have
very limited use when dependency_libs is empty it makes sense to completely
remove them during staging.

So with this commit USES=libtool is modified to remove .la libraries and a
new form (USES=libtool:keepla) is introduced in case they need to be kept
(dependency_libs is still emptied).

PORTREVISION is bumped on all ports with USES=libtool that install .la
libraries.  Most ports are also changed to add :keepla because .la
libraries have to be kept around as long as there are dependent ports with
.la libraries that refer to them in their dependency_libs field.  In most
cases :keepla can be removed again as soon as all dependent ports that
install .la libraries have some form of USES=libtool added to their
Makefile.

PR:		ports/188759
Exp-run:	bdrewery
Approved by:	portmgr (bdrewery)
2014-04-23 13:25:16 +00:00

113 lines
3.4 KiB
Makefile

# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
# $FreeBSD$
# $MCom: ports/sysutils/hal/Makefile,v 1.81 2010/04/13 02:49:07 mezz Exp $
PORTNAME= hal
DISTVERSION= 0.5.14
PORTREVISION= 26
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/
MAINTAINER= gnome@FreeBSD.org
COMMENT= Hardware Abstraction Layer for simplifying device access
BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
# keep shlib version, to prevent confusion with polkit-* from sysutils/polkit
LIB_DEPENDS= libpolkit.so.2:${PORTSDIR}/sysutils/policykit \
libvolume_id.so:${PORTSDIR}/devel/libvolume_id \
libck-connector.so:${PORTSDIR}/sysutils/consolekit
RUN_DEPENDS= ${LOCALBASE}/share/pciids/pci.ids:${PORTSDIR}/misc/pciids \
bash:${PORTSDIR}/shells/bash
USES= gettext gmake libtool:keepla pathfix pkgconfig shebangfix
USE_GNOME= intlhack
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
USE_PYTHON= yes
CONFIGURE_ARGS= --disable-gtk-doc \
--with-backend=freebsd \
--disable-docbook-docs \
--with-pci-ids=${LOCALBASE}/share/pciids \
--disable-usb-ids \
--without-libpci \
--disable-usb \
--disable-smbios \
--disable-apm \
--disable-pmu \
--enable-policy-kit \
--enable-console-kit \
--with-socket-dir=/var/run/hald \
--with-eject=/usr/sbin/cdcontrol \
--with-pid-file=/var/run/hald/hald.pid \
--with-deprecated-keys \
--localstatedir=/var
CONFIGURE_ENV= GTKDOC="false"
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
SHEBANG_FILES= tools/hal-*
#HALVERSION= 0.5.10
#SNAPVERSION= 20080218
USERS= haldaemon
GROUPS= haldaemon
USE_RC_SUBR= hald
USE_GNOME_SUBR= yes
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${DISTVERSION}
PLIST_SUB= VERSION=${DISTVERSION}
RC_FILES= hal.conf:${PREFIX}/etc/dbus-1/system.d
PLIST_FILES= ${PRIV_FILES:S|^|%%DATADIR%%/dist/|}
SUB_FILES= pkg-install pkg-deinstall
SUB_LIST= RC_FILES="${RC_FILES}"
INSTALL_TARGET= install-strip
OPTIONS_DEFINE= FIXED_MOUNTPOINTS
FIXED_MOUNTPOINTS_DESC= use fixed mountpoints
FIXED_MOUNTPOINTS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-tools_hal-storage-mount.c
.include <bsd.port.pre.mk>
.if (${ARCH}=="i386" || ${ARCH}=="amd64" || ${ARCH}=="ia64")
RUN_DEPENDS+= dmidecode:${PORTSDIR}/sysutils/dmidecode
.endif
.if ${OSVERSION} >= 800063
PLIST_SUB+= USB2=""
.else
PLIST_SUB+= USB2="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -e '/^scriptdir = /s|[(]libexecdir[)]/scripts|(libexecdir)/hal/scripts|' \
${WRKSRC}/tools/Makefile.in \
${WRKSRC}/tools/freebsd/Makefile.in
@${REINPLACE_CMD} -e 's|[(]libexecdir[)]/scripts|(libexecdir)/hal/scripts|' \
${WRKSRC}/hald/Makefile.in \
${WRKSRC}/tools/Makefile.in
@${REINPLACE_CMD} -e 's|user="0"|group="operator"|g' \
${WRKSRC}/hal.conf.in
@${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
< ${FILESDIR}/README.fuse > ${WRKDIR}/README.fuse
post-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/dist
${INSTALL_DATA} ${WRKSRC}/hal.conf ${STAGEDIR}${DATADIR}/dist
@${MKDIR} ${STAGEDIR}${PREFIX}/share/hal/fdi/policy/10osvendor
${INSTALL_DATA} ${FILESDIR}/10-mouse-sysmouse.fdi \
${STAGEDIR}${PREFIX}/share/hal/fdi/policy/10osvendor
${INSTALL_SCRIPT} ${FILESDIR}/mount-fuse \
${STAGEDIR}${PREFIX}/share/hal/mount-fuse
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/hald/freebsd/README \
${STAGEDIR}${DOCSDIR}/README.freebsd
${INSTALL_DATA} ${WRKDIR}/README.fuse \
${STAGEDIR}${DOCSDIR}/README.fuse
.endif
@${MKDIR} ${STAGEDIR}/var/lib/hal
.include <bsd.port.post.mk>