From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- media-libs/libxmlbird/Manifest | 6 + .../files/libxmlbird-1.2.0-configure-valac.patch | 62 ++++++++ .../libxmlbird/files/libxmlbird-1.2.0-libdir.patch | 159 +++++++++++++++++++++ media-libs/libxmlbird/libxmlbird-1.2.0.ebuild | 61 ++++++++ media-libs/libxmlbird/metadata.xml | 11 ++ 5 files changed, 299 insertions(+) create mode 100644 media-libs/libxmlbird/Manifest create mode 100644 media-libs/libxmlbird/files/libxmlbird-1.2.0-configure-valac.patch create mode 100644 media-libs/libxmlbird/files/libxmlbird-1.2.0-libdir.patch create mode 100644 media-libs/libxmlbird/libxmlbird-1.2.0.ebuild create mode 100644 media-libs/libxmlbird/metadata.xml (limited to 'media-libs/libxmlbird') diff --git a/media-libs/libxmlbird/Manifest b/media-libs/libxmlbird/Manifest new file mode 100644 index 000000000000..73f24e36ab2c --- /dev/null +++ b/media-libs/libxmlbird/Manifest @@ -0,0 +1,6 @@ +AUX libxmlbird-1.2.0-configure-valac.patch 1789 SHA256 0d6da9ea7c1c3555e6891beda67f90bcc86e2b6bcf894a452fefa57c5e2a24d3 SHA512 b3b3642b3b0a9c3c18ccdeddd67b08078473ccf4db6de6e33b41c84ef119b13e25034e2c77e958df5e9ca93eb189b89c3b542a58f2e63d039438a21ef6c19d66 WHIRLPOOL 67162ef9da2a808242a5667b84cde4b203f3af1bc736200684e564f03c7b18c47c05c6f8bcfbd2371135df088043f8ce89d315ff4876a24a842d91db2c155f77 +AUX libxmlbird-1.2.0-libdir.patch 7266 SHA256 468bed62014d41e096eec5c15b4d07ac7dd516d6b591563c70d31b61776612f1 SHA512 a879ca5fc70be9a9a3baa7311032b166bc88e6f655e195b57447c665fbe3241dc48235a0f849d9fed4542e09937b150cb7e93f75906668d11fead010318e42a9 WHIRLPOOL d02df827a41715ae1327803bd812e62be00b42196a690d815a7d4f6f98b511b6229b42e13f419150e8ccc94c3d5db2b8d3fd6a28f0ce407bcfc6283527467854 +DIST libxmlbird-1.2.0.tar.xz 20004 SHA256 baca1d813c4a53c67a8052f8488766af7f73c38b1187fa0f7cd939899071dc24 SHA512 0677004a79194dde87f27387ae1faeb19aa2ecd985664ad4f3f7576d39f71e0d05215c92bb15f3e3f1a4053e27025fd1a4151f1ba12774cfa789d47648097e5b WHIRLPOOL 51ac2fe20fa434267dd2af968707c8370ff3b02c137554fc88e0a0147e61d2824c3381a46e016802fb6af3c16cdf950c231c3c6a01b7bda477f4c76091da3201 +EBUILD libxmlbird-1.2.0.ebuild 1247 SHA256 8c40cd307fced84ee795130eda747040c4d306d5430349ecb9444c70d492e78f SHA512 7227c3ac5b56efeca1415326f1e086adc9a7369cb881400b3a4014b8105c6e8dc7976ef809d536c84f189a2840bf5781e3417be171fce0f6686fce249504d0b8 WHIRLPOOL 8655d487d7eaa6b6c15d563cdb4179f79bef2830b5872460875f30ee84f5e0b73f277ba3efc7595d5594cefcc53521d052f94c698504ada03e6cf409f54e8966 +MISC ChangeLog 819 SHA256 b5bc571ba73538229716f99b17db33154eabbd9617d57b035d33a559565094b2 SHA512 a00291d24713fad5b18d0582096c56d46e5fd1c9a01f0a23325dfadfbc2f3c65a3fa0f79be7ff7cde23ff3862b35f22ce54898a451dbabd55edbd649107ea389 WHIRLPOOL 9ecffe825163ff6c3c75445e73cb6b337a0056c7056c67c37bbbd885bc6532d6352f333b0bddb4813bbda7001c49259cef529d9962675a970c787555aba392f2 +MISC metadata.xml 351 SHA256 128861cfe46024622768a72d91f48e3bb0c2e40014eecb8b08688f7a97c55bc4 SHA512 9538a6f758475b5381770ba633843b88a4d1b5e780d6822faca6e1c0f576c0e49d1eb44f152b08a89eb092adbc29541b6736362d1ac8c804a8e7f66dc4b69496 WHIRLPOOL f5ca1cf5971bf4faab874583473d02541d6668fd7b6467d5e3b4501eec5e4d06c57e395f7e56abb34cca3bbdbee91d4917b2c0d18459800fa38b48a4da60d397 diff --git a/media-libs/libxmlbird/files/libxmlbird-1.2.0-configure-valac.patch b/media-libs/libxmlbird/files/libxmlbird-1.2.0-configure-valac.patch new file mode 100644 index 000000000000..121d6fd68de8 --- /dev/null +++ b/media-libs/libxmlbird/files/libxmlbird-1.2.0-configure-valac.patch @@ -0,0 +1,62 @@ +https://github.com/johanmattssonm/xmlbird/pull/5 + +From 67864656d7446b067a388c6fd2f059322d7047f0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Tue, 17 May 2016 17:00:05 -0400 +Subject: [PATCH] configure/test: respect --valac option + +Make sure we don't still test `valac` when the compiler has been set to +a specific version/path. +--- + configure | 6 +++--- + scripts/tests.py | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/configure b/configure +index f80559f..4bbd9d5 100755 +--- a/configure ++++ b/configure +@@ -44,8 +44,8 @@ def test_library_version (lib): + process.communicate()[0] + return process.returncode == 0 + +-def configure (): +- if not test_program_version ("valac", 0, 16, 0): ++def configure(valac): ++ if not test_program_version(valac, 0, 16, 0): + print (FAIL + "valac is too old." + ENDC) + exit (1) + +@@ -105,7 +105,7 @@ if not options.nonnull: + else: + options.nonnull = True + +-configure() ++configure(options.valac) + + configfile.write_compile_parameters(options.prefix, + options.dest, +diff --git a/scripts/tests.py b/scripts/tests.py +index 7281e05..88483f1 100644 +--- a/scripts/tests.py ++++ b/scripts/tests.py +@@ -1,6 +1,6 @@ + #!/usr/bin/python3 + import subprocess +-from scripts.config import PREFIX ++from scripts.config import (PREFIX, VALAC) + from scripts.run import run + from scripts.version import LIBXMLBIRD_SO_VERSION + +@@ -32,7 +32,7 @@ def build_tests(): + run ("mkdir -p build/tests"); + + for test in tests: +- run ("valac --ccode --pkg=posix --pkg=xmlbird --vapidir=./build " ++ run (VALAC + " --ccode --pkg=posix --pkg=xmlbird --vapidir=./build " + + "--directory=./build tests/" + test + ".vala tests/Test.vala"); + + run ("""gcc -fPIC -c \ +-- +2.8.2 + diff --git a/media-libs/libxmlbird/files/libxmlbird-1.2.0-libdir.patch b/media-libs/libxmlbird/files/libxmlbird-1.2.0-libdir.patch new file mode 100644 index 000000000000..ca47ba35d5d6 --- /dev/null +++ b/media-libs/libxmlbird/files/libxmlbird-1.2.0-libdir.patch @@ -0,0 +1,159 @@ +From 661c84d232e8d22978dd0220f7860b149c19f2e4 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Tue, 17 May 2016 17:37:53 -0400 +Subject: [PATCH] configure: respect libdir at build time + +The xmlbird.pc file encodes the libdir in it, so make sure we have it +at configure & build time. That means moving the flag from install to +configure and the config module. + +Also clean up the code a bit so `--libdir lib64` doesn't break things. +It previously assumed that the argument always had a leading slash. +--- + configure | 19 ++++++++++++++++++- + install.py | 39 +++++++++++---------------------------- + scripts/configfile.py | 3 ++- + scripts/pkgconfig.py | 2 +- + 4 files changed, 32 insertions(+), 31 deletions(-) + +diff --git a/configure b/configure +index 4bbd9d5..ed64f66 100755 +--- a/configure ++++ b/configure +@@ -51,6 +51,7 @@ def configure(valac): + + parser = OptionParser() + parser.add_option('-p', '--prefix', dest='prefix', help='Install prefix', metavar='PREFIX') ++parser.add_option('-l', '--libdir', dest='libdir', help='path to directory for shared libraries (lib or lib64).', metavar='LIBDIR') + parser.add_option('-d', '--dest', dest='dest', help='Install to this directory', metavar='DEST') + parser.add_option('-c', '--cc', dest='cc', help='C compiler', metavar='CC') + parser.add_option('-v', '--valac', dest='valac', help='Vala compiler', metavar='VALAC') +@@ -93,7 +94,22 @@ if not options.prefix: + options.prefix = '${DESTDIR}${PREFIX}' + else: + options.prefix = '/usr' +- ++ ++if not options.libdir: ++ if platform.dist()[0] == 'Ubuntu' or platform.dist()[0] == 'Debian': ++ process = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'], stdout=subprocess.PIPE) ++ out, err = process.communicate() ++ options.libdir = 'lib/' + out.decode('UTF-8').rstrip('\n') ++ else: ++ p = platform.machine() ++ if p == 'i386' or p == 's390' or p == 'ppc' or p == 'armv7hl': ++ options.libdir = 'lib' ++ elif p == 'x86_64' or p == 's390x' or p == 'ppc64': ++ options.libdir = 'lib64' ++ else: ++ options.libdir = 'lib' ++options.libdir = '/' + options.libdir.lstrip('/') ++ + if not options.dest: + options.dest = '' + if not options.cc: +@@ -108,6 +124,7 @@ else: + configure(options.valac) + + configfile.write_compile_parameters(options.prefix, ++ options.libdir, + options.dest, + options.cc, + options.valac, +diff --git a/install.py b/install.py +index d3d3007..d8b995b 100755 +--- a/install.py ++++ b/install.py +@@ -62,7 +62,6 @@ def link (dir, file, linkname): + run ('cd ' + dest + prefix + dir + ' && ln -sf ' + file + ' ' + linkname) + + parser = OptionParser() +-parser.add_option ("-l", "--libdir", dest="libdir", help="path to directory for shared libraries (lib or lib64).") + parser.add_option ("-d", "--dest", dest="dest", help="install to this directory", metavar="DEST") + + (options, args) = parser.parse_args() +@@ -73,40 +72,24 @@ if not options.dest: + prefix = config.PREFIX + dest = options.dest + +-if not options.libdir: +- if platform.dist()[0] == 'Ubuntu' or platform.dist()[0] == 'Debian': +- process = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'], stdout=subprocess.PIPE) +- out, err = process.communicate() +- libdir = '/lib/' + out.decode('UTF-8').rstrip ('\n') +- else: +- p = platform.machine() +- if p == 'i386' or p == 's390' or p == 'ppc' or p == 'armv7hl': +- libdir = '/lib' +- elif p == 'x86_64' or p == 's390x' or p == 'ppc64': +- libdir = '/lib64' +- else: +- libdir = '/lib' +-else: +- libdir = options.libdir +- + if "openbsd" in sys.platform: +- install ('build/bin/libxmlbird.so.' + '${LIBxmlbird_VERSION}', '/lib', 644) ++ install ('build/bin/libxmlbird.so.' + '${LIBxmlbird_VERSION}', config.LIBDIR, 644) + elif os.path.isfile ('build/bin/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION): +- install ('build/bin/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, libdir, 644) +- link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) +- link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so') ++ install ('build/bin/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, config.LIBDIR, 644) ++ link (config.LIBDIR, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) ++ link (config.LIBDIR, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so') + elif os.path.isfile ('build/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION): +- install ('build/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, libdir, 644) +- link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) +- link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so') ++ install ('build/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, config.LIBDIR, 644) ++ link (config.LIBDIR, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) ++ link (config.LIBDIR, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so') + elif os.path.isfile ('build/bin/libxmlbird.' + version.LIBXMLBIRD_SO_VERSION + '.dylib'): +- install ('build/bin/libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', libdir, 644) +- link (libdir, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', ' libxmlbird.dylib.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) +- link (libdir, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', ' libxmlbird.dylib') ++ install ('build/bin/libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', config.LIBDIR, 644) ++ link (config.LIBDIR, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', ' libxmlbird.dylib.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) ++ link (config.LIBDIR, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', ' libxmlbird.dylib') + else: + print ("Can't find libxmlbird.") + exit (1) + + install ('build/xmlbird/xmlbird.h', '/include', 644) + install ('build/xmlbird.vapi', '/share/vala/vapi', 644) +-install ('build/xmlbird.pc', libdir + '/pkgconfig', 644) ++install ('build/xmlbird.pc', config.LIBDIR + '/pkgconfig', 644) +diff --git a/scripts/configfile.py b/scripts/configfile.py +index 71c1e20..4a88585 100755 +--- a/scripts/configfile.py ++++ b/scripts/configfile.py +@@ -1,10 +1,11 @@ + #!/usr/bin/python3 + +-def write_compile_parameters (prefix, dest, cc, valac, non_null, ++def write_compile_parameters (prefix, libdir, dest, cc, valac, non_null, + valacflags, cflags, ldflags): + f = open('./scripts/config.py', 'w+') + f.write("#!/usr/bin/python3\n") + f.write("PREFIX = \"" + prefix + "\"\n") ++ f.write("LIBDIR = \"" + libdir + "\"\n") + f.write("DEST = \"" + dest + "\"\n") + f.write("CC = \"" + cc + "\"\n") + f.write("VALAC = \"" + valac + "\"\n") +diff --git a/scripts/pkgconfig.py b/scripts/pkgconfig.py +index c080234..c79c413 100644 +--- a/scripts/pkgconfig.py ++++ b/scripts/pkgconfig.py +@@ -6,7 +6,7 @@ def generate_pkg_config_file(): + f.write("prefix=" + config.PREFIX + "\n") + f.write("""exec_prefix=${prefix} + includedir=${prefix}/include +-libdir=${exec_prefix}/lib ++libdir=${exec_prefix}""" + config.LIBDIR + """ + + Name: xmlbird + Description: XML parser +-- +2.8.2 + diff --git a/media-libs/libxmlbird/libxmlbird-1.2.0.ebuild b/media-libs/libxmlbird/libxmlbird-1.2.0.ebuild new file mode 100644 index 000000000000..6b9e3a4a26ef --- /dev/null +++ b/media-libs/libxmlbird/libxmlbird-1.2.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit python-any-r1 vala toolchain-funcs multilib eutils multiprocessing + +DESCRIPTION="XML parser written in Vala" +HOMEPAGE="https://birdfont.org/xmlbird.php" +SRC_URI="https://birdfont.org/xmlbird-releases/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +# The test build logic needs work. Doesn't respect compiler settings. +RESTRICT="test" + +DEPEND="${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/doit[${PYTHON_USEDEP}]')" + +src_prepare() { + vala_src_prepare + + epatch "${FILESDIR}"/${PN}-1.2.0-configure-valac.patch + epatch "${FILESDIR}"/${PN}-1.2.0-libdir.patch + + sed -i \ + -e "s:pkg-config:$(tc-getPKG_CONFIG):" \ + configure dodo.py || die + sed -i \ + -e '/tests.build_tests/d' \ + build.py || die +} + +v() { + echo "$@" + "$@" || die +} + +src_configure() { + v ./configure \ + --prefix "${EPREFIX}/usr" \ + --libdir "$(get_libdir)" \ + --valac "${VALAC}" \ + --cc "$(tc-getCC)" \ + --cflags "${CFLAGS} ${CPPFLAGS}" \ + --ldflags "${LDFLAGS}" +} + +src_compile() { + v doit run -n $(makeopts_jobs) +} + +src_install() { + v ./install.py --dest "${D}" + dodoc NEWS README.md +} diff --git a/media-libs/libxmlbird/metadata.xml b/media-libs/libxmlbird/metadata.xml new file mode 100644 index 000000000000..6cbe76d4b07f --- /dev/null +++ b/media-libs/libxmlbird/metadata.xml @@ -0,0 +1,11 @@ + + + + + fonts@gentoo.org + + + https://birdfont.org/bugtracker/ + johanmattssonm/xmlbird + + -- cgit v1.2.3