summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlie52015-07-25 22:03:14 +1000
committercharlie52015-07-25 22:03:14 +1000
commit8cb38e24ff3723c31a5b87b1babef03e90a22e70 (patch)
tree5a5357c31a2675801a094b3a5b7b94f9a0d04bee
parent938de77051b6e457b1136092d303cb8940c7965d (diff)
downloadaur-8cb38e24ff3723c31a5b87b1babef03e90a22e70.tar.gz
Updated to use own Makefile.
-rw-r--r--.SRCINFO2
-rw-r--r--Makefile.archy150
-rw-r--r--PKGBUILD155
3 files changed, 301 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5720953c551..6b8ebb1506f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -8,7 +8,9 @@ pkgbase = xmlada
license = GPL
depends = gcc-ada
source = http://mirrors.cdn.adacore.com/art/949752df2432aed8d06c48d57cea71f38d0517cc
+ source = Makefile.archy
md5sums = 98c96b8c6a877617ec4da3ef6a03288a
+ md5sums = f602e44dd83d553395a3dc2a18e0510d
pkgname = xmlada
diff --git a/Makefile.archy b/Makefile.archy
new file mode 100644
index 00000000000..72ba10f5eb6
--- /dev/null
+++ b/Makefile.archy
@@ -0,0 +1,150 @@
+ADALIB!= gnatls -v | grep adalib | awk '{print $$1}'
+
+PROCESSORS=7
+
+STATIC_FLAGS= -gnatQ -O2 -gnatn -gnatp -gnatA -j${PROCESSORS}
+DYNAMIC_FLAGS= -fPIC ${STATIC_FLAGS}
+
+ECHO=echo
+
+LIBVER=4.6.0.0
+
+CURRENT_FOLDER=$(shell pwd)
+
+#
+# unicode depends on nothing
+#
+
+unicode/lib/static/libxmlada_unicode.a: unicode/dummy_unicode.adb
+ @echo building static unicode/lib/static/libxmlada_unicode.a library
+ @rm -f unicode/lib/static/libxmlada_unicode.a
+ gnatmake -c unicode/dummy_unicode.adb -D unicode/obj/static ${STATIC_FLAGS}
+ rm unicode/obj/static/dummy*
+ ar cq unicode/lib/static/libxmlada_unicode.a unicode/obj/static/*.o
+ ranlib unicode/lib/static/libxmlada_unicode.a
+
+unicode/lib/relocatable/libxmlada_unicode.so: unicode/dummy_unicode.adb
+ @${ECHO} building shared library unicode/lib/relocatable/libxmlada_unicode.so
+ @rm -f unicode/lib/relocatable/libxmlada_unicode.so unicode/lib/relocatable/libxmlada_unicode.so.${LIBVER}
+ gnatmake -c unicode/dummy_unicode.adb -D unicode/obj/relocatable ${DYNAMIC_FLAGS}
+ rm unicode/obj/relocatable/dummy*
+ gcc -shared -Wl,-rpath,${PREFIX}/lib/xmlada/relocatable \
+ -L${ADALIB} -lgnat -Wl,-rpath,${ADALIB} \
+ -o unicode/lib/relocatable/libxmlada_unicode.so.${LIBVER} -Wl,-soname,unicode/lib/relocatable/libxmlada_unicode.so.${LIBVER} \
+ unicode/obj/relocatable/*.o
+ ln -s $(CURRENT_FOLDER)/unicode/lib/relocatable/libxmlada_unicode.so.${LIBVER} unicode/lib/relocatable/libxmlada_unicode.so
+
+#
+# input sources depends on unicode
+#
+
+input_sources/lib/static/libxmlada_input_sources.a: input_sources/dummy_input_sources.adb unicode/lib/static/libxmlada_unicode.a
+ @echo building static input_sources/lib/static/libxmlada_input_sources.a library
+ @rm -f input_sources/lib/static/libxmlada_input_sources.a
+ gnatmake -c input_sources/dummy_input_sources.adb -D input_sources/obj/static -aOunicode/obj/static -aIunicode ${STATIC_FLAGS}
+ rm input_sources/obj/static/dummy*
+ ar cq input_sources/lib/static/libxmlada_input_sources.a input_sources/obj/static/*.o
+ ranlib input_sources/lib/static/libxmlada_input_sources.a
+
+input_sources/lib/relocatable/libxmlada_input_sources.so: input_sources/dummy_input_sources.adb unicode/lib/relocatable/libxmlada_unicode.so
+ @${ECHO} building shared library input_sources/lib/relocatable/libxmlada_input_sources.so
+ @rm -f input_sources/lib/relocatable/libxmlada_input_sources.so input_sources/lib/relocatable/libxmlada_input_sources.so.${LIBVER}
+ gnatmake -c input_sources/dummy_input_sources.adb -D input_sources/obj/relocatable -aOunicode/obj/relocatable -aIunicode ${DYNAMIC_FLAGS}
+ rm input_sources/obj/relocatable/dummy*
+ gcc -shared -Wl,-rpath,${PREFIX}/lib/xmlada/relocatable \
+ -L${ADALIB} -lgnat -Wl,-rpath,${ADALIB} \
+ -Lunicode/lib/relocatable -lxmlada_unicode \
+ -o input_sources/lib/relocatable/libxmlada_input_sources.so.${LIBVER} -Wl,-soname,input_sources/lib/relocatable/libxmlada_input_sources.so.${LIBVER} \
+ input_sources/obj/relocatable/*.o
+ ln -s $(CURRENT_FOLDER)/input_sources/lib/relocatable/libxmlada_input_sources.so.${LIBVER} input_sources/lib/relocatable/libxmlada_input_sources.so
+
+#
+# sax depends on input sources and unicode (sufficent to limit to I.S)
+#
+
+sax/lib/static/libxmlada_sax.a: sax/dummy_sax.adb input_sources/lib/static/libxmlada_input_sources.a
+ @echo building static sax/lib/static/libxmlada_sax.a library
+ @rm -f sax/lib/static/libxmlada_sax.a
+ gnatmake -c sax/dummy_sax.adb -D sax/obj/static -aOunicode/obj/static -aOinput_sources/obj/static -aIunicode -aIinput_sources ${STATIC_FLAGS}
+ rm sax/obj/static/dummy*
+ ar cq sax/lib/static/libxmlada_sax.a sax/obj/static/*.o
+ ranlib sax/lib/static/libxmlada_sax.a
+
+sax/lib/relocatable/libxmlada_sax.so: sax/dummy_sax.adb input_sources/lib/relocatable/libxmlada_input_sources.so
+ @${ECHO} building shared library sax/lib/relocatable/libxmlada_sax.so
+ @rm -f sax/lib/relocatable/libxmlada_sax.so sax/lib/relocatable/libxmlada_sax.so.${LIBVER}
+ gnatmake -c sax/dummy_sax.adb -D sax/obj/relocatable -aOunicode/obj/relocatable -aOinput_sources/obj/relocatable -aIunicode -aIinput_sources ${DYNAMIC_FLAGS}
+ rm sax/obj/relocatable/dummy*
+ gcc -shared -Wl,-rpath,${PREFIX}/lib/xmlada/relocatable \
+ -L${ADALIB} -lgnat -Wl,-rpath,${ADALIB} \
+ -Lunicode/lib/relocatable -lxmlada_unicode \
+ -Linput_sources/lib/relocatable -lxmlada_input_sources \
+ -o sax/lib/relocatable/libxmlada_sax.so.${LIBVER} -Wl,-soname,sax/lib/relocatable/libxmlada_sax.so.${LIBVER} \
+ sax/obj/relocatable/*.o
+ ln -s $(CURRENT_FOLDER)/sax/lib/relocatable/libxmlada_sax.so.${LIBVER} sax/lib/relocatable/libxmlada_sax.so
+
+#
+# dom depends on three other libraries (sufficent to limit to sax)
+#
+
+dom/lib/static/libxmlada_dom.a: dom/dummy_dom.adb sax/lib/static/libxmlada_sax.a
+ @echo building static dom/lib/static/libxmlada_dom.a library
+ @rm -f dom/lib/static/libxmlada_dom.a
+ gnatmake -c dom/dummy_dom.adb -D dom/obj/static -aOunicode/obj/static -aOinput_sources/obj/static -aOsax/obj/static -aIunicode -aIinput_sources -aIsax ${STATIC_FLAGS}
+ rm dom/obj/static/dummy*
+ ar cq dom/lib/static/libxmlada_dom.a dom/obj/static/*.o
+ ranlib dom/lib/static/libxmlada_dom.a
+
+dom/lib/relocatable/libxmlada_dom.so: dom/dummy_dom.adb sax/lib/relocatable/libxmlada_sax.so
+ @${ECHO} building shared library dom/lib/relocatable/libxmlada_dom.so
+ @rm -f dom/lib/relocatable/libxmlada_dom.so dom/lib/relocatable/libxmlada_dom.so.${LIBVER}
+ gnatmake -c dom/dummy_dom.adb -D dom/obj/relocatable -aOunicode/obj/relocatable -aOinput_sources/obj/relocatable -aOsax/obj/relocatable -aIunicode -aIinput_sources -aIsax ${DYNAMIC_FLAGS}
+ rm dom/obj/relocatable/dummy*
+ gcc -shared -Wl,-rpath,${PREFIX}/lib/xmlada/relocatable \
+ -L${ADALIB} -lgnat -Wl,-rpath,${ADALIB} \
+ -Lunicode/lib/relocatable -lxmlada_unicode \
+ -Linput_sources/lib/relocatable -lxmlada_input_sources \
+ -Lsax/lib/relocatable -lxmlada_sax \
+ -o dom/lib/relocatable/libxmlada_dom.so.${LIBVER} -Wl,-soname,dom/lib/relocatable/libxmlada_dom.so.${LIBVER} \
+ dom/obj/relocatable/*.o
+ ln -s $(CURRENT_FOLDER)/dom/lib/relocatable/libxmlada_dom.so.${LIBVER} dom/lib/relocatable/libxmlada_dom.so
+
+#
+# schema depends on four other libraries (sufficent to limit to dom)
+#
+
+schema/lib/static/libxmlada_schema.a: schema/dummy_schema.adb dom/lib/static/libxmlada_dom.a
+ @echo building static schema/lib/static/libxmlada_schema.a library
+ @rm -f schema/lib/static/libxmlada_schema.a
+ gnatmake -c schema/dummy_schema.adb -D schema/obj/static -aOunicode/obj/static -aOinput_sources/obj/static -aOsax/obj/static -aOdom/obj/static -aIunicode -aIinput_sources -aIsax -aIdom ${STATIC_FLAGS}
+ rm schema/obj/static/dummy*
+ ar cq schema/lib/static/libxmlada_schema.a schema/obj/static/*.o
+ ranlib schema/lib/static/libxmlada_schema.a
+
+schema/lib/relocatable/libxmlada_schema.so: schema/dummy_schema.adb dom/lib/relocatable/libxmlada_dom.so
+ @${ECHO} ${CURRENT_FOLDER} ************************** building shared library schema/lib/relocatable/libxmlada_schema.so
+ @rm -f schema/lib/relocatable/libxmlada_schema.so schema/lib/relocatable/libxmlada_schema.so.${LIBVER}
+ gnatmake -c schema/dummy_schema.adb -D schema/obj/relocatable -aOunicode/obj/relocatable -aOinput_sources/obj/relocatable -aOsax/obj/relocatable -aOdom/obj/relocatable -aIunicode -aIinput_sources -aIsax -aIdom ${DYNAMIC_FLAGS}
+ rm schema/obj/relocatable/dummy*
+ gcc -shared -Wl,-rpath,${PREFIX}/lib/xmlada/relocatable \
+ -L${ADALIB} -lgnat -Wl,-rpath,${ADALIB} \
+ -Lunicode/lib/relocatable -lxmlada_unicode \
+ -Linput_sources/lib/relocatable -lxmlada_input_sources \
+ -Lsax/lib/relocatable -lxmlada_sax \
+ -Ldom/lib/relocatable -lxmlada_dom \
+ -o schema/lib/relocatable/libxmlada_schema.so.${LIBVER} -Wl,-soname,schema/lib/relocatable/libxmlada_schema.so.${LIBVER} \
+ schema/obj/relocatable/*.o
+ ln -s $(CURRENT_FOLDER)/schema/lib/relocatable/libxmlada_schema.so.${LIBVER} schema/lib/relocatable/libxmlada_schema.so
+
+#
+# Sphinx documentation
+#
+
+docs:
+ ${MAKE} -e -C docs
+
+
+all: schema/lib/static/libxmlada_schema.a schema/lib/relocatable/libxmlada_schema.so
+
+
+
diff --git a/PKGBUILD b/PKGBUILD
index b53fb4a0550..5a61b8ba901 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,16 +12,159 @@ url="http://libre.adacore.com/libre/tools/xmlada/"
license=('GPL')
depends=("gcc-ada")
-source=(http://mirrors.cdn.adacore.com/art/949752df2432aed8d06c48d57cea71f38d0517cc)
-md5sums=('98c96b8c6a877617ec4da3ef6a03288a')
+source=(http://mirrors.cdn.adacore.com/art/949752df2432aed8d06c48d57cea71f38d0517cc
+ Makefile.archy)
+md5sums=('98c96b8c6a877617ec4da3ef6a03288a'
+ 'f602e44dd83d553395a3dc2a18e0510d')
-build() {
+
+GREP=grep
+AWK=gawk
+ECHO=echo
+SORT=sort
+MKDIR=mkdir
+INSTALL_DATA=cp
+INSTALL_SCRIPT=cp
+RM=rm
+
+
+prepare()
+{
+ WRKSRC=$srcdir/$pkgname-gpl-$pkgver-src
+
+ 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}
+
+}
+
+
+
+build()
+{
cd $srcdir/$pkgname-gpl-$pkgver-src
./configure --prefix=/usr
- make
+ make -f ../Makefile.archy all
}
-package() {
+
+
+package()
+{
cd $srcdir/$pkgname-gpl-$pkgver-src
- make -j1 prefix=$pkgdir/usr install
+
+ STAGEDIR=$pkgdir
+ PREFIX=/usr
+ WRKSRC=$srcdir/$pkgname-gpl-$pkgver-src
+
+
+ ${MKDIR} -p ${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 \
+ ${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
+
+ ${INSTALL_DATA} ${WRKSRC}/distrib/xmlada_gps.py \
+ ${STAGEDIR}${PREFIX}/share/gps/plug-ins
+
+ ${INSTALL_SCRIPT} ${WRKSRC}/xmlada-config ${STAGEDIR}${PREFIX}/bin
+
+
+# make -j1 prefix=$pkgdir/usr install
}