1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00
freebsd-ports/devel/anjuta/Makefile
Tijl Coosemans 3e4a806167 Add 4 new sed commands to USES=libtool. The first two apply some of the
changes that Debian made to their libtool.  The first command applies to
libtool versions 1.4 and up.  The second command is somewhat more elaborate
but essentially it uses the sed hold space to move an "elif...fi" block
down.  It applies to 2.x.  Together these reduce overlinking to unpatched
.la files (from ports that don't have USES=libtool yet but also .la files
in the work directory).

The third and fourth command fix relinking.  During staging libtool may
relink libA when it links to another library in the work directory libB.
The reason is that libA created during build phase has its runpath set to
the location of libB in the work directory.  This allows running an
executable that links to libA from within the work directory.  The relink
removes this extra runpath.

When libtool relinks libA it replaces "libB.la" on the linker command line
with "-L${STAGEDIR}${PREFIX}/lib -lB" with the intention to link to libB in
the stage directory but this -L flag isn't necessarily the first so another
libB may be linked instead.  The two sed commands make relink the same as a
normal link.  This means libtool will relink with libraries from the work
directory using a path similar to "../srcB/.libs/libB.so" without -L flags.
This applies to libtool 1.4 and up.  Earlier versions don't seem to relink
libraries.
(This fixes ports like devel/apr1 so they link with freshly built libraries
instead of installed libraries.)

Fix all ports with missing libraries.

Additionally:
archivers/rpm4: USES=patchfix.
databases/gdbm: INSTALL_TARGET=install-strip.
devel/gnome-vfs: remove patch that doesn't change anything.
devel/ois: INSTALL_TARGET=install-strip and use standard USE_AUTOTOOLS.
devel/zziplib: INSTALL_TARGET=install-strip, MAKE_CMD.
multimedia/mjpegtools: remove USE_AUTOTOOLS, use modern compiler on i386
   instead of disabling optimisations.
net/libnetdude: disable static plugins.

PR:		190941
Exp-run:	antoine
Approved by:	portmgr (antoine)
2014-06-22 10:44:29 +00:00

121 lines
3.9 KiB
Makefile

# Created by: Dmitry Sivachenko <demon@FreeBSD.org>
# $FreeBSD$
# $MCom: ports/devel/anjuta/Makefile,v 1.72 2012/12/13 20:33:05 kwm Exp $
PORTNAME= anjuta
PORTVERSION= 2.32.1.1
PORTREVISION= 12
CATEGORIES= devel gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
MAINTAINER= gnome@FreeBSD.org
COMMENT= Integrated Development Environment for C and C++
BUILD_DEPENDS= autogen:${PORTSDIR}/devel/autogen \
bash:${PORTSDIR}/shells/bash \
p5-Locale-gettext>=1.05:${PORTSDIR}/devel/p5-Locale-gettext
LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre \
libgladeui-1.so:${PORTSDIR}/devel/glade3 \
libunique-1.0.so:${PORTSDIR}/x11-toolkits/unique \
libgdl-1.so:${PORTSDIR}/x11-toolkits/gdl
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \
autogen:${PORTSDIR}/devel/autogen \
${LOCALBASE}/share/autotools:${PORTSDIR}/devel/autotools \
p5-Locale-gettext>=1.05:${PORTSDIR}/devel/p5-Locale-gettext \
${LOCALBASE}/libdata/pkgconfig/gnome-icon-theme.pc:${PORTSDIR}/misc/gnome-icon-theme \
exctags:${PORTSDIR}/devel/ctags \
gdb66:${PORTSDIR}/devel/gdb66 \
yelp:${PORTSDIR}/x11/yelp
CONFLICTS= anjuta-3.[0-9]*
USES= desktop-file-utils gmake gettext libtool:keepla pathfix \
perl5 pkgconfig shared-mime-info shebangfix tar:bzip2
INSTALLS_OMF= yes
INSTALLS_ICONS= yes
INSTALL_TARGET= install-strip
USE_PYTHON= yes
USE_GNOME= gnomeprefix vte gtksourceview2 libgda4
USE_CSTD= gnu89
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --with-symbol-db-shm=/tmp \
--disable-vala \
--disable-graphviz \
--enable-introspection=no
USE_LDCONFIG= yes
GCONF_SCHEMAS= anjuta-build-basic-autotools-plugin.schemas \
anjuta-cvs-plugin.schemas \
anjuta-debug-manager.schemas \
anjuta-document-manager.schemas \
anjuta-editor-sourceview.schemas \
anjuta-language-cpp-java.schemas \
anjuta-message-manager-plugin.schemas \
anjuta-symbol-db.schemas \
anjuta-terminal-plugin.schemas \
file-manager.schemas \
preferences.schemas \
python-plugin-properties.schemas
SHEBANG_FILES= scripts/builder2schema.pl \
plugins/gbf-am/gbf-am-parse.in \
plugins/gbf-mkfile/gbf-mkfile-parse.in \
plugins/tools/scripts/*.pl
OPTIONS_DEFINE= SVN DEVHELP
OPTIONS_DEFAULT=DEVHELP
DEVHELP_DESC= Devhelp support
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSVN}
BUILD_DEPENDS+= svn:${PORTSDIR}/devel/subversion
LIB_DEPENDS+= libapr-1.so:${PORTSDIR}/devel/apr1
LIB_DEPENDS+= libneon.so:${PORTSDIR}/www/neon29
RUN_DEPENDS+= svn:${PORTSDIR}/devel/subversion
PLIST_SUB+= SVN=""
.else
CONFIGURE_ARGS+=--disable-plugin-subversion
PLIST_SUB+= SVN="@comment "
.endif
.if ${PORT_OPTIONS:MDEVHELP}
LIB_DEPENDS+= libdevhelp-2.so:${PORTSDIR}/devel/devhelp
PLIST_SUB+= DEVHELP=""
.else
CONFIGURE_ARGS+=--disable-plugin-devhelp
# XXX Even if we disable the devhelp plugin it gets build and installed.
# See if versions beyond 2.26.1.0 still do this.
#PLIST_SUB+= DEVHELP="@comment "
PLIST_SUB+= DEVHELP=""
.endif
post-patch:
@${RM} ${WRKSRC}/plugins/debug-manager/anjuta-debug-manager.schemas
@${REINPLACE_CMD} '/^test_LDADD =/ \
s/=/= -lgtk-x11-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lxml2 $$(INTLLIBS)/' \
${WRKSRC}/plugins/gbf-am/Makefile.in
@${REINPLACE_CMD} '/^gdbmi_test_LDADD =/s/$$/ -lgtk-x11-2.0 -lglib-2.0/' \
${WRKSRC}/plugins/gdb/Makefile.in
@${REINPLACE_CMD} -e '/^anjuta_LDADD =/s/=/= $$(ANJUTA_LIBS)/' \
-e '/^anjuta_shell_LDADD =/ \
s/=/= -lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0 $$(INTLLIBS)/' \
${WRKSRC}/src/Makefile.in
post-configure:
@${REINPLACE_CMD} -e 's|"make|"gmake|g' \
${WRKSRC}/plugins/build-basic-autotools/plugin.c
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/plugins/symbol-db/plugin.h \
${WRKSRC}/plugins/symbol-db/symbol-db-prefs.h
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in AUTHORS COPYING ChangeLog FUTURE INSTALL NEWS README \
doc/ScintillaDoc.html TODO
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>