Bug 173097 - [patch] editors/xmlcopyeditor XML parser option
Summary: [patch] editors/xmlcopyeditor XML parser option
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-26 04:00 UTC by Cy Schubert
Modified: 2016-01-17 12:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer freebsd_triage 2012-10-26 04:00:00 UTC
editors/xmlcopyeditor depends on textproc/xerces-c2 for its XML parser.
Unfortunately if other ports have one of the other conflicting xerces ports
installed, the conflict will prevent xmlcopyeditor to install. The following
patch will allow xmlcopyeditor to use one of the other xerces ports for its
XML parser.

Index: Makefile
===================================================================
--- Makefile	(revision 306382)
+++ Makefile	(working copy)
@@ -7,13 +7,21 @@
 
 PORTNAME=	xmlcopyeditor
 PORTVERSION=	1.2.0.4
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	editors
 MASTER_SITES=	SF/xml-copy-editor/${PORTNAME}-linux/${PORTVERSION}
 
 MAINTAINER=	jjuanino@gmail.com
 COMMENT=	Fast validating XML editor
 
+OPTIONS_SINGLE=	XERCES
+OPTIONS_SINGLE_XERCES=	XERCES_C XERCES_C2 XERCES_C2_DEVEL XERCES_C3
+OPTIONS_DEFAULT=	XERCES_C2
+XERCES_C_DESC=	Use xerces-c XML parser
+XERCES_C2_DESC=	Use xerces-c2 XML parser
+XERCES_C2_DEVEL_DESC=	Use xerces-c2-devel XML parser
+XERCES_C3_DESC=	Use xerces-c2 XML parser
+
 USE_WX=		2.8+
 WX_COMPS=	wx contrib
 WX_CONF_ARGS=	absolute
@@ -30,8 +38,7 @@
 		src/po/en_us/messages.po
 
 BUILD_DEPENDS+=	${LOCALBASE}/include/boost/shared_ptr.hpp:${PORTSDIR}/devel/boost-libs
-LIB_DEPENDS+=	xerces-c.27:${PORTSDIR}/textproc/xerces-c2 \
-		xslt.2:${PORTSDIR}/textproc/libxslt \
+LIB_DEPENDS+=	xslt.2:${PORTSDIR}/textproc/libxslt \
 		aspell.16:${PORTSDIR}/textproc/aspell \
 		pcre.1:${PORTSDIR}/devel/pcre \
 		xml2.5:${PORTSDIR}/textproc/libxml2 \
@@ -44,4 +51,16 @@
 		-I${LOCALBASE}/include/libxml2 ${PTHREAD_CFLAGS}
 LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MXERCES_C}
+LIB_DEPENDS+=	xerces-c.17:${PORTSDIR}/textproc/xerces-c
+.elif ${PORT_OPTIONS:MXERCES_C2}
+LIB_DEPENDS+=	xerces-c.27:${PORTSDIR}/textproc/xerces-c2
+.elif ${PORT_OPTIONS:MXERCES_C2_DEVEL}
+LIB_DEPENDS+=	xerces-c.280:${PORTSDIR}/textproc/xerces-c2-devel
+.elif ${PORT_OPTIONS:MXERCES_C3}
+LIB_DEPENDS+=	xerces-c.3:${PORTSDIR}/textproc/xerces-c3
+.endif
+
+.include <bsd.port.post.mk>

Fix: 

See description.
How-To-Repeat: Try to install this port on a system with one of the other xerces ports
installed.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-26 04:00:07 UTC
Maintainer of editors/xmlcopyeditor,

Please note that PR ports/173097 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/173097

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-26 04:00:08 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Jose G. Juanino 2012-10-26 21:39:07 UTC
El viernes 26 de octubre a las 05:00:07 CEST, Edwin Groothuis escribió:
> Maintainer of editors/xmlcopyeditor,
> 
> Please note that PR ports/173097 has just been submitted.
> 
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
> 
> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/173097

Please commit.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-10-26 22:26:09 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2012-10-26 23:21:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->cy

Assign to myself for commit.
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2013-02-14 04:59:47 UTC
State Changed
From-To: open->analyzed

Patch incomplete as it does not address linker error when built with CLANG.
Comment 7 Cy Schubert freebsd_committer freebsd_triage 2013-02-14 05:09:59 UTC
State Changed
From-To: analyzed->open

Change state back to open, wrong PR.
Comment 8 Martin Wilke freebsd_committer freebsd_triage 2016-01-17 12:37:09 UTC
This pr is now 4 years old, I close here.