Bug 178144 - textproc/xmlada: [MAINTAINER] Support USES+= ada and fix rpath
Summary: textproc/xmlada: [MAINTAINER] Support USES+= ada and fix rpath
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 14:40 UTC by John Marino
Modified: 2024-06-27 06:37 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (10.05 KB, patch)
2013-04-25 14:40 UTC, John Marino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino 2013-04-25 14:40:00 UTC
This update must occur after Mk/Uses/ada.mk is committed.
http://leaf.dragonflybsd.org/~marino/ada/ada.mk

xmlada was updated to respect USES+= ada rather than hard-code a dependency on the (older) lang/gnat-aux.
Additionally potential rpath problems have been eliminated that will appear when xmlada is built in a staging area (seen and fixed in pkgsrc).  This eliminates need for ldconfig, too.

Apply the attached diff to update textproc/xmlada
Tested in poudriere (FreeBSD 9.1-amd64)

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-04-25 14:40:08 UTC
Class Changed
From-To: sw-bug->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2013-04-25 14:45:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bapt

I'll take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-04-30 12:50:06 UTC
Author: bapt
Date: Tue Apr 30 11:49:57 2013
New Revision: 316918
URL: http://svnweb.freebsd.org/changeset/ports/316918

Log:
  Update to use USES=ada
  
  Additionally potential rpath problems have been eliminated that will appear when xmlada is built in a staging area (seen and fixed in pkgsrc). This eliminates need for ldconfig, too.
  
  PR:		ports/178144
  Submitted by:	John Marino <draco@marino.st>

Added:
  head/textproc/xmlada/files/patch-dom_dom.gpr   (contents, props changed)
  head/textproc/xmlada/files/patch-input__sources_input__sources.gpr   (contents, props changed)
  head/textproc/xmlada/files/patch-sax_sax.gpr   (contents, props changed)
  head/textproc/xmlada/files/patch-schema_schema.gpr   (contents, props changed)
Modified:
  head/textproc/xmlada/Makefile
  head/textproc/xmlada/files/patch-Makefile.in

Modified: head/textproc/xmlada/Makefile
==============================================================================
--- head/textproc/xmlada/Makefile	Tue Apr 30 11:43:35 2013	(r316917)
+++ head/textproc/xmlada/Makefile	Tue Apr 30 11:49:57 2013	(r316918)
@@ -1,25 +1,35 @@
-# New ports collection makefile for:  xmlada
-# Date created:                       12 December 2010
-# Whom:                               John Marino <draco@marino.st>
-#
+# Created by: John Marino <draco@marino.st> 
 # $FreeBSD$
-#
 
 PORTNAME=	xmlada
 PORTVERSION=	4.2.0.0
+PORTREVISION=	1
 CATEGORIES=	textproc
-MASTER_SITES=	http://downloads.dragonlace.net/src/ \
-		http://dragonlace.mirrors.ada.cx/src/
+MASTER_SITES=	http://downloads.dragonlace.net/src/
 
 MAINTAINER=	draco@marino.st
 COMMENT=	Adacore XML suite for the Ada language
 
-BUILD_DEPENDS=	gnat-aux>=20110325:${PORTSDIR}/lang/gnat-aux
-
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_BZIP2=	yes
-USE_LDCONFIG=	yes
-CC=		gnatgcc
+USES=		ada
+
+LICENSE=		GPLv2
+MAKE_JOBS_UNSAFE=	yes
+
+# Link options were added for sax, dom, schema, and input_sources libraries
+# "-R" option disables all rpaths except adalib and compiler libs.  This is
+#      done because by default the rpaths will points at the WRKOBJDIR because
+#      it doesn't support the concept of DESTDIR.
+# "-Wl,-R" adds a second rpath string.
+# -Wl,-rpath is a better choice, but synonym -Wl,-R works on all BSD and SunOS
+
+post-patch:
+	@${REINPLACE_CMD} -e "s,@ADDITIONAL_RPATH@,${LOCALBASE}/lib," \
+	  ${WRKSRC}/sax/sax.gpr \
+	  ${WRKSRC}/dom/dom.gpr \
+	  ${WRKSRC}/schema/schema.gpr \
+	  ${WRKSRC}/input_sources/input_sources.gpr
 
 .include <bsd.port.mk>

Modified: head/textproc/xmlada/files/patch-Makefile.in
==============================================================================
--- head/textproc/xmlada/files/patch-Makefile.in	Tue Apr 30 11:43:35 2013	(r316917)
+++ head/textproc/xmlada/files/patch-Makefile.in	Tue Apr 30 11:49:57 2013	(r316918)
@@ -1,6 +1,8 @@
---- Makefile.in.orig	2011-10-08 21:19:00.000000000 +0200
-+++ Makefile.in	2011-10-09 00:50:05.000000000 +0200
-@@ -52,10 +52,10 @@
+$NetBSD: patch-aa,v 1.4 2011/12/03 07:30:48 marino Exp $
+
+--- Makefile.in.orig	2011-10-08 19:19:00.000000000 +0000
++++ Makefile.in
+@@ -52,10 +52,10 @@ MAKE_ARGS=-XMODE=${MODE} -XLIBRARY_TYPE=
  .PHONY: all obj clean install install_dirs build_library_type install_library_type
  
  ifeq (${BUILDS_SHARED},yes)
@@ -13,12 +15,89 @@
  install: install_static
  endif
  
-@@ -132,8 +132,6 @@
- 	${INSTALL} distrib/xmlada_schema.gpr         ${libdir}/gnat/
- 	${INSTALL} distrib/xmlada_unicode.gpr        ${libdir}/gnat/
- 	${INSTALL} xmlada-config  ${bindir}
+@@ -91,53 +91,50 @@ docs: force
+ 
+ # Rule for installing the modules
+ %_inst: force
+-	${CP} $*/*.ad[bs]        ${includedir}/xmlada
+-	cd $*; ls *.ad[bs] > ${libdir}/gnat/xmlada/xmlada_$*.lgpr
+-	-cd ${xmllib}; ${CHMOD} ugo+w *.ali
+-	-${CP} $*/lib/${LIBRARY_TYPE}/*.ali   ${xmllib}
+-	${RM} ${libdir}/libxmlada_$**
+-	${RM} ${xmllib}libxmlada_$**
++	${CP} $*/*.ad[bs]        ${DESTDIR}${includedir}/xmlada
++	cd $*; ls *.ad[bs] > ${DESTDIR}${libdir}/gnat/xmlada/xmlada_$*.lgpr
++	-cd ${DESTDIR}${xmllib}; ${CHMOD} ugo+w *.ali
++	-${CP} $*/lib/${LIBRARY_TYPE}/*.ali   ${DESTDIR}${xmllib}
++	${RM} ${DESTDIR}${libdir}/libxmlada_$**
++	${RM} ${DESTDIR}${xmllib}libxmlada_$**
+ ifeq (${LIBRARY_TYPE},static)
+-	${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${xmllib}
++	${INSTALL} -m 644 $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${DESTDIR}${xmllib}
+ else
+ ifeq (${OS},Windows_NT)
+-	${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} ${xmllib}
+-	cd ${bindir}; ${CP} ${libdir}/xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} libxmlada_$*.${LIBEXT}
++	${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} ${DESTDIR}${xmllib}
++	cd ${DESTDIR}${bindir}; ${CP} ${libdir}/xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} libxmlada_$*.${LIBEXT}
+ else
+-	${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${xmllib}
+-	cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}
+-	cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}}
+-	cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}}
+-	cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION}
++	${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${DESTDIR}${xmllib}
++	cd ${DESTDIR}${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}
++	cd ${DESTDIR}${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}}
++	cd ${DESTDIR}${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}}
++	cd ${DESTDIR}${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION}
+ endif
+ endif
+-	cd ${xmllib}; ${CHMOD} ugo-w *.ali
++	cd ${DESTDIR}${xmllib}; ${CHMOD} ugo-w *.ali
+ 
+ install_dirs: force
+-	@${MKDIR} ${bindir}
+-	@${MKDIR} ${xmllib}
+-	@${MKDIR} ${libdir}/gnat/xmlada
+-	@${MKDIR} ${datadir}/doc/xmlada
+-	@${MKDIR} ${includedir}/xmlada
+-	@${MKDIR} ${datadir}/gps/plug-ins/
++	@${MKDIR} ${DESTDIR}${bindir}
++	@${MKDIR} ${DESTDIR}${xmllib}
++	@${MKDIR} ${DESTDIR}${libdir}/gnat/xmlada
++	@${MKDIR} ${DESTDIR}${datadir}/doc/xmlada
++	@${MKDIR} ${DESTDIR}${includedir}/xmlada
++	@${MKDIR} ${DESTDIR}${datadir}/gps/plug-ins/
+ 
+ ## Do the installation for either shared or static, depending on
+ ## $LIBRARY_TYPE
+ install_library_type: install_dirs ${MODULE_INSTALL}
+-	${INSTALL} distrib/xmlada_shared.gpr         ${libdir}/gnat
+-	${INSTALL} distrib/xmlada.gpr                ${libdir}/gnat/
+-	${INSTALL} distrib/xmlada_dom.gpr            ${libdir}/gnat/
+-	${INSTALL} distrib/xmlada_sax.gpr            ${libdir}/gnat/
+-	${INSTALL} distrib/xmlada_input.gpr          ${libdir}/gnat/
+-	${INSTALL} distrib/xmlada_schema.gpr         ${libdir}/gnat/
+-	${INSTALL} distrib/xmlada_unicode.gpr        ${libdir}/gnat/
+-	${INSTALL} xmlada-config  ${bindir}
 -	-${INSTALL} docs/xml.ps   ${datadir}/doc/xmlada 2>/dev/null
 -	-${INSTALL} docs/xml.pdf  ${datadir}/doc/xmlada
- 	-${INSTALL} docs/xml.html ${datadir}/doc/xmlada
- 	-${INSTALL} docs/xml.info ${datadir}/doc/xmlada
- 	${CHMOD} +x ${bindir}/xmlada-config
+-	-${INSTALL} docs/xml.html ${datadir}/doc/xmlada
+-	-${INSTALL} docs/xml.info ${datadir}/doc/xmlada
+-	${CHMOD} +x ${bindir}/xmlada-config
+-	${INSTALL} distrib/xmlada_gps.py ${datadir}/gps/plug-ins/
++	${INSTALL} -m 644 distrib/xmlada_shared.gpr  ${DESTDIR}${libdir}/gnat/
++	${INSTALL} -m 644 distrib/xmlada.gpr         ${DESTDIR}${libdir}/gnat/
++	${INSTALL} -m 644 distrib/xmlada_dom.gpr     ${DESTDIR}${libdir}/gnat/
++	${INSTALL} -m 644 distrib/xmlada_sax.gpr     ${DESTDIR}${libdir}/gnat/
++	${INSTALL} -m 644 distrib/xmlada_input.gpr   ${DESTDIR}${libdir}/gnat/
++	${INSTALL} -m 644 distrib/xmlada_schema.gpr  ${DESTDIR}${libdir}/gnat/
++	${INSTALL} -m 644 distrib/xmlada_unicode.gpr ${DESTDIR}${libdir}/gnat/
++	${INSTALL} xmlada-config  ${DESTDIR}${bindir}
++	${INSTALL} -m 644 docs/xml.html ${DESTDIR}${datadir}/doc/xmlada
++	${INSTALL} -m 644 docs/xml.info ${DESTDIR}${datadir}/doc/xmlada
++	${INSTALL} -m 644 distrib/xmlada_gps.py ${DESTDIR}${datadir}/gps/plug-ins/
+ 
+ ## Do the installation for an explicit target
+ install_static: 

Added: head/textproc/xmlada/files/patch-dom_dom.gpr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xmlada/files/patch-dom_dom.gpr	Tue Apr 30 11:49:57 2013	(r316918)
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.2 2012/07/08 20:03:08 marino Exp $
+
+--- dom/dom.gpr.orig	2011-11-11 12:40:42.991596000 +0000
++++ dom/dom.gpr
+@@ -10,6 +10,7 @@ project Dom is
+    for Object_Dir  use "obj/" & Project'Library_Kind;
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name & ".so." & Shared.Version;
++   for Library_Options use ("-R", "-Wl,-R,@ADDITIONAL_RPATH@");
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;

Added: head/textproc/xmlada/files/patch-input__sources_input__sources.gpr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xmlada/files/patch-input__sources_input__sources.gpr	Tue Apr 30 11:49:57 2013	(r316918)
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.2 2012/07/08 20:03:08 marino Exp $
+
+--- input_sources/input_sources.gpr.orig	2011-10-08 19:18:37.000000000 +0000
++++ input_sources/input_sources.gpr
+@@ -8,6 +8,7 @@ project Input_Sources is
+    for Object_Dir  use "obj/" & Project'Library_Kind;
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name & ".so." & Shared.Version;
++   for Library_Options use ("-R", "-Wl,-R,@ADDITIONAL_RPATH@");
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;

Added: head/textproc/xmlada/files/patch-sax_sax.gpr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xmlada/files/patch-sax_sax.gpr	Tue Apr 30 11:49:57 2013	(r316918)
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.2 2012/07/08 20:03:08 marino Exp $
+
+--- sax/sax.gpr.orig	2011-10-08 19:18:44.000000000 +0000
++++ sax/sax.gpr
+@@ -9,6 +9,7 @@ project Sax is
+    for Object_Dir  use "obj/" & Project'Library_Kind;
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name & ".so." & Shared.Version;
++   for Library_Options use ("-R", "-Wl,-R,@ADDITIONAL_RPATH@");
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;

Added: head/textproc/xmlada/files/patch-schema_schema.gpr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/xmlada/files/patch-schema_schema.gpr	Tue Apr 30 11:49:57 2013	(r316918)
@@ -0,0 +1,12 @@
+$NetBSD: patch-af,v 1.2 2012/07/08 20:03:08 marino Exp $
+
+--- schema/schema.gpr.orig	2011-10-08 19:18:59.000000000 +0000
++++ schema/schema.gpr
+@@ -10,6 +10,7 @@ project Schema is
+    for Object_Dir  use "obj/" & Project'Library_Kind;
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name & ".so." & Shared.Version;
++   for Library_Options use ("-R", "-Wl,-R,@ADDITIONAL_RPATH@");
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2013-04-30 12:50:28 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 5 Nabeel Amir 2024-06-27 06:37:33 UTC
A privacy-centric Conversational AI platform leveraging AI Agents, Commercial and Opensource LLM support to centralize knowledge, thereby enriching collaboration and facilitating streamlined automation. WorkHub empowers users with versatile conversational bots and tools that provide insights, knowledge, and data-driven actions. With seamless integration capabilities, Workhub can be connected to any database and applications, ensuring comprehensive access to information.


Visit - https://workhub.ai/