summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Marie de Rodat2017-06-18 11:09:17 +0200
committerPierre-Marie de Rodat2017-06-18 12:34:21 +0200
commitbf263bf4fe193316228dd760c910a4f1849cc2a9 (patch)
tree62c117fc40432140865e0202e0ef6749b6d026b0
downloadaur-bf263bf4fe193316228dd760c910a4f1849cc2a9.tar.gz
Initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD47
-rw-r--r--expose-cargs-and-largs-makefile.patch30
4 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..90712066caad
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = xmlada-git
+ pkgdesc = A XML parser for Ada95
+ pkgver = r1524.9dd5a10
+ pkgrel = 1
+ url = https://github.com/AdaCore/xmlada/
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ license = custom
+ makedepends = git
+ makedepends = gcc-ada
+ makedepends = gprbuild-bootstrap-git
+ depends = gcc-ada
+ provides = xmlada
+ conflicts = xmlada
+ source = git+https://github.com/AdaCore/xmlada.git
+ source = expose-cargs-and-largs-makefile.patch
+ sha1sums = SKIP
+ sha1sums = 9b65cc99453fd15bdb7c49a32e6f76922ec904bd
+
+pkgname = xmlada-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..9f9aaa26e369
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+xmlada
+*.pkg.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a9a21cc7c5a3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Pierre-Marie de Rodat <pmderodat on #ada at freenode.net>
+# Contributor: Rod Kay <charlie5 on #ada at freenode.net>
+pkgname=xmlada-git
+pkgver=r1524.9dd5a10
+pkgrel=1
+pkgdesc="A XML parser for Ada95"
+arch=('i686' 'x86_64')
+url="https://github.com/AdaCore/xmlada/"
+license=('GPL3' 'custom')
+depends=('gcc-ada')
+makedepends=('git' 'gcc-ada' 'gprbuild-bootstrap-git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=('git+https://github.com/AdaCore/xmlada.git'
+ 'expose-cargs-and-largs-makefile.patch')
+sha1sums=('SKIP'
+ '9b65cc99453fd15bdb7c49a32e6f76922ec904bd')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}"
+ patch -Np1 -i "$srcdir/expose-cargs-and-largs-makefile.patch"
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ ./configure --prefix=/usr --libexecdir=/lib --enable-shared
+ make PROCESSORS="$(nproc)" GPRBUILD_OPTIONS=-R
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+
+ # Make one install at a time to avoid GPRinstall reading/writing to
+ # the same installed project files at the same time.
+ make prefix="$pkgdir/usr" install -j1
+
+ install -D -m644 \
+ "$srcdir/${pkgname%-git}/COPYING.RUNTIME" \
+ "$pkgdir/usr/share/licenses/${pkgname}/COPYING.RUNTIME"
+}
diff --git a/expose-cargs-and-largs-makefile.patch b/expose-cargs-and-largs-makefile.patch
new file mode 100644
index 000000000000..ee2662a64387
--- /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