Created
March 4, 2015 22:37
-
-
Save elieux/a1d7f9a87fcef58dbb44 to your computer and use it in GitHub Desktop.
mingw-w64-itstool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contributor (MSYS2): David Macek <[email protected]> | |
# Maintainer (Arch Linux): Jan Alexander Steffens (heftig) <[email protected]> | |
# Contributor (Arch Linux): Michael Pusterhofer <pusterhofer(at)student(dot)tugraz(dot)at> | |
_realname=itstool | |
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") | |
pkgver=2.0.2 | |
pkgrel=1 | |
pkgdesc="XML to PO and back again" | |
arch=('any') | |
url="http://itstool.org/" | |
license=('GPL3') | |
depends=("${MINGW_PACKAGE_PREFIX}-python2" | |
"${MINGW_PACKAGE_PREFIX}-libxml2") | |
source=("http://files.itstool.org/itstool/${_realname}-${pkgver}.tar.bz2" | |
'reloc.patch') | |
sha256sums=('bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a' | |
'22f1b9b43fec80c346b0c224850a09dd4f9323bf091ee249e2c93532bc053a0c') | |
prepare() { | |
cd ${_realname}-${pkgver} | |
sed -i 's/| python/&2/' configure.ac | |
patch -p0 -i "${srcdir}/reloc.patch" | |
autoreconf -fi | |
} | |
build() { | |
mkdir -p "build-${CARCH}" | |
cd "build-${CARCH}" | |
../${_realname}-${pkgver}/configure \ | |
--prefix=${MINGW_PREFIX} \ | |
--build=${MINGW_CHOST} \ | |
--host=${MINGW_CHOST} \ | |
--target=${MINGW_CHOST} \ | |
PYTHON=python2 | |
make | |
} | |
check() { | |
cd "build-${CARCH}" | |
make -k check | |
} | |
package() { | |
cd "build-${CARCH}" | |
make DESTDIR="${pkgdir}" install | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- itstool.in.orig 2015-03-04 22:31:35.784281300 +0100 | |
+++ itstool.in 2015-03-04 22:49:19.980146100 +0100 | |
@@ -19,6 +19,7 @@ | |
VERSION="@VERSION@" | |
DATADIR="@DATADIR@" | |
+BINDIR="@bindir@" | |
import gettext | |
import hashlib | |
@@ -709,10 +710,8 @@ | |
dirs.append(ddir) | |
ddir = os.getenv('XDG_DATA_DIRS', '') | |
if ddir == '': | |
- if DATADIR not in ('/usr/local/share', '/usr/share'): | |
- ddir += DATADIR + ':' | |
- ddir += '/usr/local/share:/usr/share' | |
- dirs.extend(ddir.split(':')) | |
+ ddir = os.path.abspath(os.path.join(sys.executable, os.path.relpath(DATADIR, BINDIR))) | |
+ dirs.extend(ddir.split(os.pathsep)) | |
ddone = {} | |
for ddir in dirs: | |
itsdir = os.path.join(ddir, 'itstool', 'its') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment