mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-01 01:17:02 +00:00
aad09bc5e2
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)
74 lines
2.2 KiB
Makefile
74 lines
2.2 KiB
Makefile
# Created by: Yukihiro Nakai <Nakai@technologist.com>
|
|
# $FreeBSD$
|
|
# $MCom: ports/textproc/libxml2/Makefile,v 1.15 2012/11/26 19:55:23 kwm Exp $
|
|
|
|
PORTNAME= libxml2
|
|
PORTVERSION= 2.8.0
|
|
PORTREVISION?= 5
|
|
CATEGORIES?= textproc gnome
|
|
MASTER_SITES= ftp://xmlsoft.org/libxml2/ \
|
|
http://xmlsoft.org/sources/ \
|
|
ftp://gd.tuwien.ac.at/pub/libxml/
|
|
DIST_SUBDIR= gnome2
|
|
|
|
MAINTAINER?= gnome@FreeBSD.org
|
|
COMMENT?= XML parser library for GNOME
|
|
|
|
.if !defined(REFERENCE_PORT)
|
|
USE_CSTD= gnu89
|
|
GNU_CONFIGURE= yes
|
|
USES= gmake iconv libtool:keepla pathfix pkgconfig
|
|
USE_LDCONFIG= yes
|
|
CONFIGURE_ARGS?=--with-iconv=${ICONV_PREFIX} \
|
|
--with-html-dir=${PREFIX}/share/doc \
|
|
--with-html-subdir=${PORTNAME} \
|
|
--with-lzma=/usr \
|
|
--without-python
|
|
|
|
LIBVERSION= ${PORTVERSION}
|
|
PLIST_SUB+= LIBVERSION=${LIBVERSION}
|
|
|
|
.if !defined(MASTERDIR)
|
|
OPTIONS_DEFINE= SCHEMA THREADS MEM_DEBUG XMLLINT_HIST THREAD_ALLOC
|
|
OPTIONS_DEFAULT=SCHEMA THREADS
|
|
|
|
SCHEMA_DESC= XML schema support
|
|
SCHEMA_CONFIGURE_WITH= schemas
|
|
THREADS_DESC= Threads support
|
|
THREADS_CONFIGURE_WITH= threads
|
|
MEM_DEBUG_DESC= Memory debugging (DEVELOPERS ONLY!)
|
|
MEM_DEBUG_CONFIGURE_WITH= mem-debug
|
|
XMLLINT_HIST_DESC= History for xmllint
|
|
XMLLINT_HIST_CONFIGURE_WITH= history
|
|
THREAD_ALLOC_DESC= Per-thread memory (DEVELOPERS ONLY!)
|
|
THREAD_ALLOC_CONFIGURE_WITH= thread-alloc
|
|
.endif # !defined(MASTERDIR)
|
|
|
|
post-patch:
|
|
.for d in . doc doc/devhelp doc/examples
|
|
@${REINPLACE_CMD} -e '/^install-data-am:/ s|install-data-local||' \
|
|
${WRKSRC}/${d}/Makefile.in
|
|
.endfor
|
|
.for f in catalog.c xmlcatalog.c xmllint.c doc/xmllint.1
|
|
@${REINPLACE_CMD} -e \
|
|
's|/etc/xml/catalog|${LOCALBASE}/share/xml/catalog|g; \
|
|
s|/etc/sgml/catalog|${LOCALBASE}/share/sgml/catalog|g' \
|
|
${WRKSRC}/${f}
|
|
.endfor
|
|
# manual patch because WITH_FBSD10_FIX break the python bindings
|
|
${FIND} ${WRKSRC} -type f -name configure \
|
|
-exec ${SH} -c " \
|
|
mtime=\$$(date -r \$$(stat -f '%m' \$$0) '+%Y%m%d%H%M.%S'); \
|
|
${SED} -i '.batman' -e 's|freebsd1\*)|freebsd1.\*)|g' \
|
|
-e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \$$0; \
|
|
touch -mt \$$mtime \$$0" {} \; || /usr/bin/true
|
|
|
|
.if !defined(MASTERDIR)
|
|
post-install:
|
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libxml2.so.${LIBVERSION}
|
|
.endif # !defined(MASTERDIR)
|
|
|
|
.include <bsd.port.mk>
|
|
|
|
.endif
|