summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRod Kay2017-06-05 14:36:37 +1000
committerRod Kay2017-06-05 14:36:37 +1000
commit52cc7570ccd11b14e81655ee545f7f5c59075f35 (patch)
treeeea3cfd00b3d20a5badf10eeb786b4313b9f6efc
parenteed7d19821dc6cedf61f42c570df5e5cc9e5b5fa (diff)
downloadaur-52cc7570ccd11b14e81655ee545f7f5c59075f35.tar.gz
Update to latest git version
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD229
-rw-r--r--expose-cargs-and-largs-makefile.patch30
3 files changed, 67 insertions, 214 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3ee3989ac2c..f85f5af7c2b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,22 @@
# Generated by mksrcinfo v8
-# Sun Jul 3 01:27:24 UTC 2016
+# Mon Jun 5 04:35:52 UTC 2017
pkgbase = xmlada
- pkgdesc = A full XML suite for Ada
- pkgver = 2016
+ pkgdesc = xml parsing and schema based validation
+ pkgver = 2017
pkgrel = 1
- url = http://libre.adacore.com/libre/tools/xmlada/
+ url = http://libre.adacore.com/tools/xmlada/
arch = i686
arch = x86_64
license = GPL
+ makedepends = git
+ makedepends = gprbuild-bootstrap
depends = gcc-ada
- source = http://mirrors.cdn.adacore.com/art/57399978c7a447658e0affc0
- source = Makefile.archy
- source = generic_gpr.in
- md5sums = 631957d2f55277f1d58a68186fbf5022
- md5sums = ccb2b5dbfbf9e26b6544102e24cb6d5e
- md5sums = cde06f485e180f4cc82bcdb450d36153
+ provides = ada-xmlada
+ conflicts = ada-xmlada
+ source = git+https://github.com/AdaCore/xmlada
+ source = expose-cargs-and-largs-makefile.patch
+ sha1sums = SKIP
+ sha1sums = 9b65cc99453fd15bdb7c49a32e6f76922ec904bd
pkgname = xmlada
diff --git a/PKGBUILD b/PKGBUILD
index ec59ef90562..60ca13c6385 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,220 +1,41 @@
-# Contributor: Patrick Kelly <kameo76890 at gmail dot com>
-# Contributor: Georgios Tsalikis <aliverius somewhere near tsalikis and a net>
-# Contributor: Rod Kay <charlie5 on #ada at freenode.net>
-
pkgname=xmlada
-pkgver=2016
+pkgver=2017
pkgrel=1
-pkgdesc="A full XML suite for Ada"
+pkgdesc='xml parsing and schema based validation'
+url='http://libre.adacore.com/tools/xmlada/'
arch=('i686' 'x86_64')
-url="http://libre.adacore.com/libre/tools/xmlada/"
license=('GPL')
-depends=("gcc-ada")
-
-source=(http://mirrors.cdn.adacore.com/art/57399978c7a447658e0affc0
- Makefile.archy
- generic_gpr.in)
-
-md5sums=('631957d2f55277f1d58a68186fbf5022'
- 'ccb2b5dbfbf9e26b6544102e24cb6d5e'
- 'cde06f485e180f4cc82bcdb450d36153')
-
-
-GREP=grep
-AWK=gawk
-ECHO=echo
-SORT=sort
-MKDIR=mkdir
-INSTALL_DATA=install
-INSTALL_SCRIPT=install
-RM=rm
-FIND=find
-PRINTF=printf
-SED=sed
-REINPLACE_CMD=sed
-
-
-prepare()
-{
- WRKSRC=$srcdir/$pkgname-gpl-$pkgver-src
- FILESDIR=$srcdir
-
- DUNICODE=$WRKSRC/unicode/dummy_unicode.adb
- DINPSRC=${WRKSRC}/input_sources/dummy_input_sources.adb
- DSAX=${WRKSRC}/sax/dummy_sax.adb
- DDOM=${WRKSRC}/dom/dummy_dom.adb
- DSCHEMA=${WRKSRC}/schema/dummy_schema.adb
-
- cd $srcdir/$pkgname-gpl-$pkgver-src
-
- # dummy-unicode:
- ${GREP} --no-filename ^package ${WRKSRC}/unicode/unicode-*.ads | \
- ${AWK} '{print "with " $$2 ";"}' | ${SORT} > ${DUNICODE}
- ${ECHO} 'procedure dummy_unicode is' >> ${DUNICODE}
- ${ECHO} 'begin' >> ${DUNICODE}
- ${ECHO} ' null;' >> ${DUNICODE}
- ${ECHO} 'end dummy_unicode;' >> ${DUNICODE}
-
- sed 's/ is;/;/g' ${DUNICODE} > tmp
- sed 's/with package/with/g' tmp > ${DUNICODE}
-
- # dummy-input_sources:
- ${GREP} --no-filename ^package ${WRKSRC}/input_sources/input_sources-*.ads | \
- ${AWK} '{print "with " $$2 ";"}' | ${SORT} > ${DINPSRC}
- ${ECHO} 'procedure dummy_input_sources is' >> ${DINPSRC}
- ${ECHO} 'begin' >> ${DINPSRC}
- ${ECHO} ' null;' >> ${DINPSRC}
- ${ECHO} 'end dummy_input_sources;' >> ${DINPSRC}
-
- sed 's/ is;/;/g' ${DINPSRC} > tmp
- sed 's/with package/with/g' tmp > ${DINPSRC}
-
- # dummy-sax:
- ${GREP} --no-filename ^package ${WRKSRC}/sax/sax-*.ads | \
- ${AWK} '{print "with " $$2 ";"}' | ${SORT} > ${DSAX}
- ${ECHO} 'procedure dummy_sax is' >> ${DSAX}
- ${ECHO} 'begin' >> ${DSAX}
- ${ECHO} ' null;' >> ${DSAX}
- ${ECHO} 'end dummy_sax;' >> ${DSAX}
-
- sed 's/ is;/;/g' ${DSAX} > tmp
- sed 's/with package/with/g' tmp > ${DSAX}
-
- # dummy-dom:
- ${GREP} --no-filename ^package ${WRKSRC}/dom/dom-*.ads | \
- ${AWK} '{print "with " $$2 ";"}' | ${SORT} > ${DDOM}
- ${ECHO} 'procedure dummy_dom is' >> ${DDOM}
- ${ECHO} 'begin' >> ${DDOM}
- ${ECHO} ' null;' >> ${DDOM}
- ${ECHO} 'end dummy_dom;' >> ${DDOM}
-
- sed 's/ is;/;/g' ${DDOM} > tmp
- sed 's/with package/with/g' tmp > ${DDOM}
-
- # dummy-schema:
- ${GREP} --no-filename ^package ${WRKSRC}/schema/schema-*.ads | \
- ${AWK} '{print "with " $$2 ";"}' | ${SORT} > ${DSCHEMA}
- ${ECHO} 'procedure dummy_schema is' >> ${DSCHEMA}
- ${ECHO} 'begin' >> ${DSCHEMA}
- ${ECHO} ' null;' >> ${DSCHEMA}
- ${ECHO} 'end dummy_schema;' >> ${DSCHEMA}
-
- sed 's/ is;/;/g' ${DSCHEMA} > tmp
- sed 's/with package/with/g' tmp > ${DSCHEMA}
-
-
- # vital gpr files are missing from GPL 2015, recreate them
- #
+depends=('gcc-ada')
+makedepends=('git' 'gprbuild-bootstrap')
- PORTVERSION="2016"
+provides=('ada-xmlada')
+conflicts=('ada-xmlada')
- FIND1=$(cd ${WRKSRC}/unicode && find * -maxdepth 0 \( -name "unicode*.ads" -o -name "unicode*.adb" \) -exec printf ', "%s"' {} \; )
- FIND2=$(cd ${WRKSRC}/input_sources && find * -maxdepth 0 \( -name "input*.ad[bs]" -o -name "input_sources.ads" \) -exec printf ', "%s"' {} \; )
- FIND3=$(cd ${WRKSRC}/sax && find * -maxdepth 0 -name "sax-*.ad[bs]" -exec printf ', "%s"' {} \; )
- FIND4=$(cd ${WRKSRC}/dom && find * -maxdepth 0 -name "dom-*.ad[bs]" -exec printf ', "%s"' {} \; )
- FIND5=$(cd ${WRKSRC}/schema && find * -maxdepth 0 \( -name "schema*.ad[bs]" -o -name "schema.ads" \) -exec printf ', "%s"' {} \; )
+source=('git+https://github.com/AdaCore/xmlada'
+ 'expose-cargs-and-largs-makefile.patch')
+sha1sums=('SKIP'
+ '9b65cc99453fd15bdb7c49a32e6f76922ec904bd')
- ${SED} -e '/^with/d' -e 's|@ZONE@|unicode|' \
- -e "s|@FILES@|${FIND1}|" \
- -e 's|@VERSION@|2016|' ${FILESDIR}/generic_gpr.in \
- > ${WRKSRC}/distrib/xmlada_unicode.gpr
-
- ${SED} -e 's|@DEPENDS@|unicode|' -e 's|@ZONE@|input_sources|' \
- -e "s|@FILES@|${FIND2}|" \
- -e 's|@VERSION@|2016|' ${FILESDIR}/generic_gpr.in \
- > ${WRKSRC}/distrib/xmlada_input_sources.gpr
-
- ${SED} -e 's|@DEPENDS@|input_sources|' -e 's|@ZONE@|sax|' \
- -e "s|@FILES@|${FIND3}|" \
- -e 's|@VERSION@|2016|' ${FILESDIR}/generic_gpr.in \
- > ${WRKSRC}/distrib/xmlada_sax.gpr
-
- ${SED} -e 's|@DEPENDS@|sax|' -e 's|@ZONE@|dom|' \
- -e "s|@FILES@|${FIND4}|" \
- -e 's|@VERSION@|2016|' ${FILESDIR}/generic_gpr.in \
- > ${WRKSRC}/distrib/xmlada_dom.gpr
-
- ${SED} -e 's|@DEPENDS@|dom|' -e 's|@ZONE@|schema|' \
- -e "s|@FILES@|${FIND5}|" \
- -e 's|@VERSION@|2016|' ${FILESDIR}/generic_gpr.in \
- > ${WRKSRC}/distrib/xmlada_schema.gpr
-
- # Since we want to pull in all 5 libs, we only need to specify schema
- #
- ${REINPLACE_CMD} -i -e '/unicode/d' ${WRKSRC}/distrib/xmlada.gpr
+pkgver() {
+ cd xmlada
+ git describe | sed 's/^xmlada-//; s/-/.r/; s/-/./'
}
-
-
-build()
-{
- cd $srcdir/$pkgname-gpl-$pkgver-src
-
- ./configure --prefix=/usr
-
- PROCESSORS=5 make -f ../Makefile.archy all
+prepare() {
+ cd xmlada
+ patch -Np1 -i "$srcdir"/expose-cargs-and-largs-makefile.patch
}
+build() {
+ cd xmlada
+ ./configure --prefix=/usr --libexecdir=/lib --enable-shared
+ make PROCESSORS="$(nproc)" GPRBUILD_OPTIONS=-R
+}
-
-package()
-{
- cd $srcdir/$pkgname-gpl-$pkgver-src
-
- STAGEDIR=$pkgdir
- PREFIX=/usr
- WRKSRC=$srcdir/$pkgname-gpl-$pkgver-src
-
-
- ${MKDIR} -p \
- ${STAGEDIR}${PREFIX}/bin \
- ${STAGEDIR}${PREFIX}/include/xmlada \
- ${STAGEDIR}${PREFIX}/lib/gnat \
- ${STAGEDIR}${PREFIX}/lib/xmlada/relocatable \
- ${STAGEDIR}${PREFIX}/lib/xmlada/static \
- ${STAGEDIR}${PREFIX}/share/gps/plug-ins
-# ${STAGEDIR}${DOCSDIR}
-
- ${INSTALL_DATA} ${WRKSRC}/dom/*.ad[bs] \
- ${WRKSRC}/input_sources/*.ad[bs] \
- ${WRKSRC}/sax/*.ad[bs] \
- ${WRKSRC}/schema/*.ad[bs] \
- ${WRKSRC}/unicode/*.ad[bs] \
- ${STAGEDIR}${PREFIX}/include/xmlada
-
- ${RM} ${STAGEDIR}${PREFIX}/include/xmlada/dummy_*.adb
-
- ${INSTALL_DATA} \
- ${WRKSRC}/dom/obj/relocatable/*.ali \
- ${WRKSRC}/input_sources/obj/relocatable/*.ali \
- ${WRKSRC}/sax/obj/relocatable/*.ali \
- ${WRKSRC}/schema/obj/relocatable/*.ali \
- ${WRKSRC}/unicode/obj/relocatable/*.ali \
- ${STAGEDIR}${PREFIX}/lib/xmlada/relocatable
-
- cp -av \
- ${WRKSRC}/dom/lib/relocatable/* \
- ${WRKSRC}/input_sources/lib/relocatable/* \
- ${WRKSRC}/sax/lib/relocatable/* \
- ${WRKSRC}/schema/lib/relocatable/* \
- ${WRKSRC}/unicode/lib/relocatable/* \
- ${STAGEDIR}${PREFIX}/lib/xmlada/relocatable
-
- ${INSTALL_DATA} ${WRKSRC}/dom/obj/static/*.ali \
- ${WRKSRC}/input_sources/obj/static/*.ali \
- ${WRKSRC}/sax/obj/static/*.ali \
- ${WRKSRC}/schema/obj/static/*.ali \
- ${WRKSRC}/unicode/obj/static/*.ali \
- ${WRKSRC}/dom/lib/static/* \
- ${WRKSRC}/input_sources/lib/static/* \
- ${WRKSRC}/sax/lib/static/* \
- ${WRKSRC}/schema/lib/static/* \
- ${WRKSRC}/unicode/lib/static/* \
- ${STAGEDIR}${PREFIX}/lib/xmlada/static
-
- ${INSTALL_DATA} ${WRKSRC}/distrib/xml*.gpr \
- ${STAGEDIR}${PREFIX}/lib/gnat
+package() {
+ cd xmlada
+ make prefix="$pkgdir"/usr install
}
diff --git a/expose-cargs-and-largs-makefile.patch b/expose-cargs-and-largs-makefile.patch
new file mode 100644
index 00000000000..ee2662a6438
--- /dev/null
+++ b/expose-cargs-and-largs-makefile.patch
@@ -0,0 +1,30 @@
+diff --git a/Makefile.in b/Makefile.in
+index c6327d2..3355762 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -51,14 +51,22 @@ all: static
+ install: install-clean install-static
+ endif
+
++ifneq ($(strip $(CFLAGS)),)
++CARGS := -cargs $(CFLAGS)
++endif
++
++ifneq ($(strip $(LDFLAGS)),)
++LARGS := -largs $(LDFLAGS)
++endif
++
+ static:
+- ${GPRBUILD} -p -XLIBRARY_TYPE=static ${GPROPTS} xmlada.gpr
++ ${GPRBUILD} -p -XLIBRARY_TYPE=static ${GPROPTS} xmlada.gpr $(CARGS) $(LARGS)
+
+ shared relocatable:
+- ${GPRBUILD} -p -XLIBRARY_TYPE=relocatable ${GPROPTS} xmlada.gpr
++ ${GPRBUILD} -p -XLIBRARY_TYPE=relocatable ${GPROPTS} xmlada.gpr $(CARGS) $(LARGS)
+
+ static-pic:
+- ${GPRBUILD} -p -XLIBRARY_TYPE=static-pic ${GPROPTS} xmlada.gpr
++ ${GPRBUILD} -p -XLIBRARY_TYPE=static-pic ${GPROPTS} xmlada.gpr $(CARGS) $(LARGS)
+
+ # Rebuild the tests (and not the XML/Ada code itself)
+ test: force