Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 2013 13:32:15 GMT
From:      John Marino <draco@marino.st>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/178144: textproc/xmlada: [MAINTAINER] Support USES+= ada and fix rpath
Message-ID:  <201304251332.r3PDWF8u007684@red.freebsd.org>
Resent-Message-ID: <201304251340.r3PDe0VI003102@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         178144
>Category:       ports
>Synopsis:       textproc/xmlada: [MAINTAINER] Support USES+= ada and fix rpath
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 25 13:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     John Marino
>Release:        
>Organization:
>Environment:
>Description:
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)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- textproc/xmlada/Makefile.orig	2012-11-17 07:02:25.000000000 +0100
+++ textproc/xmlada/Makefile	2013-04-24 19:09:33.000000000 +0200
@@ -1,25 +1,35 @@
-# New ports collection makefile for:  xmlada
-# Date created:                       12 December 2010
-# Whom:                               John Marino <draco@marino.st>
-#
-# $FreeBSD: ports/textproc/xmlada/Makefile,v 1.15 2012/11/17 06:02:25 svnexp Exp $
-#
+# 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>
--- textproc/xmlada/files/patch-Makefile.in.orig	2011-10-12 20:20:59.000000000 +0200
+++ textproc/xmlada/files/patch-Makefile.in	2013-04-24 19:09:33.000000000 +0200
@@ -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: 
--- textproc/xmlada/files/patch-dom_dom.gpr.orig	2013-04-24 19:14:56.000000000 +0200
+++ textproc/xmlada/files/patch-dom_dom.gpr	2013-04-24 19:09:33.000000000 +0200
@@ -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;
--- textproc/xmlada/files/patch-input__sources_input__sources.gpr.orig	2013-04-24 19:15:05.000000000 +0200
+++ textproc/xmlada/files/patch-input__sources_input__sources.gpr	2013-04-24 19:09:33.000000000 +0200
@@ -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;
--- textproc/xmlada/files/patch-sax_sax.gpr.orig	2013-04-24 19:14:39.000000000 +0200
+++ textproc/xmlada/files/patch-sax_sax.gpr	2013-04-24 19:09:33.000000000 +0200
@@ -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;
--- textproc/xmlada/files/patch-schema_schema.gpr.orig	2013-04-24 19:14:46.000000000 +0200
+++ textproc/xmlada/files/patch-schema_schema.gpr	2013-04-24 19:09:33.000000000 +0200
@@ -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;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304251332.r3PDWF8u007684>