summaryrefslogtreecommitdiff
path: root/app-crypt/rhash
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /app-crypt/rhash
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'app-crypt/rhash')
-rw-r--r--app-crypt/rhash/Manifest4
-rw-r--r--app-crypt/rhash/files/rhash-1.3.9-nls.patch22
-rw-r--r--app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch230
-rw-r--r--app-crypt/rhash/rhash-1.3.9-r2.ebuild81
4 files changed, 337 insertions, 0 deletions
diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index 5c2fc6edb899..b1692cf08231 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1,9 +1,13 @@
AUX darwin-triplet.patch 657 BLAKE2B cb710ca481e9a45d593ab857dc10ff8baf6c3bc5fbd2ac9ef97cee5589d8873cdc81a6a730f9058a7b9a10199667384ebbf56f828d2e6b817bf40443653adbe5 SHA512 5caec1179c860c0bf003605dd96d8c4a47a3ef784d937080a237106364918a36c1bf1138b9a4b1b0f5e5c042d653c5b324ada1a0f9b621dc33aa4a11d4f9c1c1
AUX freebsd-triplet.patch 800 BLAKE2B 43f1f7e1fa43313e2f323a3e5031a463185c2388a3b59c75f1a3a216d6ce6e04be9cb584ffe3c44773c072408740c02354dec4969d42d6abd824a1fc633fa4dd SHA512 7f66e6ab4bdc21959e00b8ad21aaa13eab6d11552d92e8978ce5c501339a3ddf0b303f47ae5fce4056522ffea90cef3d25c5dc5d6469e7bbffa078526e1c7404
AUX rhash-1.3.6-no_echon.patch 1224 BLAKE2B 949b6aa839667a6fef3c3a668b6cadc451986ba837807b3d7a56b80f50c8248d734745f886d40d341a99fefaf439f95bdeb0382ee15ea9e4f8561f98703fba2d SHA512 3771077c64c28b1fcf310d7a449d3e1eb951d1669b2ad3ddffe76d98ac5821ea8af40013984c65f28c7fce3434b7173a74a77120847f557cab2dedefac0c8b58
+AUX rhash-1.3.9-nls.patch 744 BLAKE2B 898b5fe0227dce6f78825790f8b10f80f38ced806dd2851d059ab0c1ce92b0c916046ea2de608a20edeb96bcaec272dd08abc55791b360b96b5f0a1b5c2767cc SHA512 8ebc08fc3b04aa8534ce85beddd74ed589d907bfce7374e489a69b48b26d7a1425371b593394001372ee318e677e09eae360b12527ce81a0468107104a770c5e
+AUX rhash-1.3.9-rc-segfault.patch 9662 BLAKE2B c7fc3833c7b635f808b99d3879dd40ea8ae08e3a6a6bd1f281ea0a9583f7fd94a738ebbc35db5c275dd71d7a004a486623617d13e48a95619a8b7b5d0fd25b28 SHA512 d9db2ee0eba473ef2f651eba92f36722bd30bffc0700367261883a0c6477259f41f29a7a6e3661983f4ed9afe1a8d27d1b223f165edf22ee846d961adb14b462
AUX unquote-cc.patch 791 BLAKE2B a872b7a8e8d2e04f5cf3dda0b4f4aa5e0177878942f9836f8a431d950392dafb46be646048a0ab4dc4a31ac20b6676fa8627b39bbb30a990861cf8d3cfc742f8 SHA512 7a4c2bf019cbcde021bb79572abdbc9b42f995ada5bb9798fed127d79c44ed9d4b9544c1413952604b1dd45ed307acdacba6675419f6331d75ecf34c15b8f5ca
DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6
DIST rhash-1.3.8-src.tar.gz 393544 BLAKE2B c326b3fa6dbc5ea2cce40105dc319456fdcc58140a05e8002bf1d92be921d8bbd27bf670370ba7cf2ff2001ff70ddbeb8efc9712869a7b215c5f51a5e493b5c9 SHA512 9dba4fa4dd49d323f2e440c5b93eac1ef62eb4046ec4ef611f0978c12c1739002f1ac1f1ec5e61bd359dc89e9ed612db71be91a795184ac5d5433280d27fa4c1
+DIST rhash-1.3.9-src.tar.gz 403415 BLAKE2B 49f3b9348485b83521f58fa1de30517b05a8265547cbec3276d89c42b46baccc4ea22d41638764600c76669308a5f7d9d3995b7cec51676c9f8492ba740e473c SHA512 6fae0587cdeb42df59d542c58bad734259d1ff39fba92531c10a469b51310644669ffbe0453e72d85c2cf38b176962f6dca9062a121ac019f1b30f207a176e60
EBUILD rhash-1.3.6-r1.ebuild 1904 BLAKE2B 0e9ba826c6931509a9ee7364d3f3e26b8b0ba633557c4ef3514315fec36942565189ac714c01376803c46de20a5d27b4182c66e65c8ce3b0d327f9f4f5819c2a SHA512 ce0b57549dfeb09cb3608e167fcc7cb8c07c9cbfc2f69a69bb5d0678a78cf94ca1bb66302f60818aa28f5892397e7ba92a3293944c5f73cffd4d803f18ddd31f
EBUILD rhash-1.3.8.ebuild 2061 BLAKE2B f793d773cda3f0ae8274fd5864786a97c5aa2c9e8428d87b9d74e5015b5bcfcb2a548549320c7925cae7766de369f756e065d6fb5395dd9f1a92042235697bcd SHA512 be49c11d4201b92b33ee9c386bedac0378ef5298fc4d0165f30ac3cd088949171bfcfdf09bb28bee6807010896f012f54c0f674b1785df560f373f06d8eedc19
+EBUILD rhash-1.3.9-r2.ebuild 1955 BLAKE2B 7c0920958260b317476dc8a7bf147f38bf1467510dab0d556f8dd6e77bceed51d135b1c4f46dd7989373b938ffb8b1b7142da221dd8ac7051b2e2b82c9a966c1 SHA512 45e23ec2abbe36f4355721259c91c03f1eda855e9e9766197d79eb836cda61be4f81593bbe1b938e75cd7615beb6805cdb746f7b7278efdddccdf20cabe0c996
MISC metadata.xml 753 BLAKE2B 09d65c4222a77b9cdab0e82e8b3a38a63762c9e691285f712e09e99ecf28937d70436ac0dc56a890ea1f6ca9981c7f02383ce92a0da6a0c5ca11af2b3598e77e SHA512 d9a8480839af7651eb09b1210b2b0f736d01018cd1863eb17f24f0f51024c234f6f5036745f2034e89bcbd85f396b194184fc987adba43d9d0bebfa0b65d635a
diff --git a/app-crypt/rhash/files/rhash-1.3.9-nls.patch b/app-crypt/rhash/files/rhash-1.3.9-nls.patch
new file mode 100644
index 000000000000..a6fb902676f3
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.3.9-nls.patch
@@ -0,0 +1,22 @@
+From a165520d3f63e976dd3b842c2fbb05f05f1029a8 Mon Sep 17 00:00:00 2001
+From: Aleksey <rhash.admin@gmail.com>
+Date: Sun, 15 Dec 2019 03:35:09 +0300
+Subject: [PATCH] i18n: fix a string in uk.po by adding newline
+
+---
+ po/uk.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/po/uk.po b/po/uk.po
+index 959e47a..d6c0b1d 100644
+--- a/po/uk.po
++++ b/po/uk.po
+@@ -234,7 +234,7 @@ msgstr "Перевірити хеш-файли, вказані у командн
+
+ #: parse_cmdline.c:91
+ msgid "Update the specified hash file.\n"
+-msgstr "Оновити вказаний хеш-файл"
++msgstr "Оновити вказаний хеш-файл.\n"
+
+ #: parse_cmdline.c:92
+ msgid "Rename files by inserting crc32 sum into name.\n"
diff --git a/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch b/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
new file mode 100644
index 000000000000..a2052c67bbf2
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
@@ -0,0 +1,230 @@
+diff --git a/ChangeLog b/ChangeLog
+index 8537968..9724c9d 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,7 @@
++Tue 07 Jan 2020 Aleksey
++ * Bugfix: restore behavior of 'rhash -rc' to be the same as in v1.3.8
++ * Bugfix: fix a segfault and memory errors
++
+ Sat 14 Dec 2019 Aleksey
+ * === Version 1.3.9 ===
+
+diff --git a/calc_sums.c b/calc_sums.c
+index a76c8c9..0f25224 100644
+--- a/calc_sums.c
++++ b/calc_sums.c
+@@ -535,6 +535,7 @@ int check_hash_file(file_t* file, int chdir)
+ log_error_msg_file_t(_("file is binary: %s\n"), file);
+ if (fd != stdin)
+ fclose(fd);
++ file_cleanup(&parent_dir);
+ return -1;
+ }
+
+@@ -586,6 +587,7 @@ int check_hash_file(file_t* file, int chdir)
+ rhash_data.miss++;
+ rhash_data.processed++;
+ }
++ file_cleanup(&parent_dir);
+ time = rsh_timer_stop(&timer);
+
+ if (res >= -1 && (rsh_fprintf(rhash_data.out, "%s\n", str_set(buf, '-', 80)) < 0 ||
+diff --git a/file.c b/file.c
+index 6f593f9..2f0eb2a 100644
+--- a/file.c
++++ b/file.c
+@@ -266,7 +266,7 @@ static int detect_path_encoding(file_t* file, wchar_t* dir_path, const char* pri
+ int i;
+ assert(file && !file->real_path);
+ file->mode &= ~FileMaskStatBits;
+- if (!dir_path && ascii)
++ if (ascii)
+ file->mode |= FileIsAsciiPrintPath;
+ /* detect encoding in two or four steps */
+ for (i = 0; i < 4; i += step) {
+@@ -333,45 +333,39 @@ int file_init_by_print_path(file_t* file, file_t* prepend_dir, const char* print
+ #ifdef _WIN32
+ {
+ const char** primary_path;
+- const char* dir_primary_path;
+ wchar_t* dir_path = (prepend_dir && !IS_DOT_TSTR(prepend_dir->real_path) ? prepend_dir->real_path : NULL);
+ int encoding = detect_path_encoding(file, dir_path, print_path, init_flags);
+ if (encoding < 0)
+ return -1;
+ if (encoding == 0) {
+ primary_path = &file->print_path;
+- dir_primary_path = (prepend_dir ? file_get_print_path(prepend_dir, FPathUtf8) : NULL);
+ } else {
+ primary_path = &file->native_path;
+- dir_primary_path = (prepend_dir ? file_get_print_path(prepend_dir, FPathNative) : NULL);
+ }
+- if ((!dir_primary_path || IS_DOT_TSTR(dir_primary_path)) &&
+- (init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
++ if ((init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
+ *primary_path = print_path;
+ file->mode |= (encoding == 0 ? FileDontFreePrintPath : FileDontFreeNativePath);
+ } else {
+- *primary_path = make_path(dir_primary_path, print_path, 1);
++ *primary_path = rsh_strdup(print_path);
+ }
+- return 0;
+ }
+ #else
+ if (!prepend_dir || IS_DOT_STR(prepend_dir->real_path)) {
+- file_init(file, print_path, init_flags);
++ file_init(file, print_path, init_flags & (FileInitReusePath | FileMaskModeBits));
+ } else {
+- const char* path = make_path(prepend_dir->real_path, print_path, 0);
+- file_init(file, path, init_flags & ~FileInitReusePath);
++ file->real_path = make_path(prepend_dir->real_path, print_path, 0);
++ file->mode = init_flags & FileMaskModeBits;
+ }
+- if (!prepend_dir || IS_DOT_STR(prepend_dir->print_path) ||
+- (!prepend_dir->print_path && opt.path_separator != ALIEN_PATH_SEPARATOR)) {
+- if ((init_flags & FileInitReusePath) != 0) {
+- file->print_path = print_path;
+- file->mode |= FileDontFreePrintPath;
+- } else
+- file->print_path = rsh_strdup(print_path);
++ assert(file->print_path == NULL);
++ if ((init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
++ file->print_path = print_path;
++ file->mode |= FileDontFreePrintPath;
+ } else {
+- file->print_path = make_path(file_get_print_path(prepend_dir, FPathPrimaryEncoding), print_path, 1);
++ file->print_path = rsh_strdup(print_path);
+ }
+ #endif
++ /* note: flag FileInitUpdatePrintPathLastSlash is used only with file_init() */
++ assert((init_flags & FileInitUpdatePrintPathLastSlash) == 0);
+ if ((init_flags & (FileInitRunFstat | FileInitRunLstat)) &&
+ file_stat(file, (init_flags & FileInitRunLstat)) < 0)
+ return -1;
+@@ -544,9 +538,10 @@ static char* get_modified_path(const char* path, const char* str, int operation)
+ end_pos = strlen(path);
+ start_pos = (end_pos > 0 ? end_pos - 1 : 0);
+ for (; start_pos > 0 && !IS_ANY_SLASH(path[start_pos]); start_pos--);
+- for (; start_pos > 0 && IS_ANY_SLASH(path[start_pos]); start_pos--);
+- if (start_pos == 0)
++ if (start_pos == 0 && !IS_ANY_SLASH(path[start_pos]))
+ return rsh_strdup(".");
++ for (; start_pos > 0 && IS_ANY_SLASH(path[start_pos]); start_pos--);
++ start_pos++;
+ } else {
+ char* point = strrchr(path, '.');
+ if (!point)
+@@ -580,9 +575,10 @@ static tpath_t get_modified_tpath(ctpath_t path, const char* str, int operation)
+ end_pos = wcslen(path);
+ start_pos = (end_pos > 0 ? end_pos - 1 : 0);
+ for (; start_pos > 0 && !IS_ANY_TSLASH(path[start_pos]); start_pos--);
+- for (; start_pos > 0 && IS_ANY_TSLASH(path[start_pos]); start_pos--);
+- if (start_pos == 0)
++ if (start_pos == 0 && !IS_ANY_TSLASH(path[start_pos]))
+ return rsh_wcsdup(L".");
++ for (; start_pos > 0 && IS_ANY_TSLASH(path[start_pos]); start_pos--);
++ start_pos++;
+ } else {
+ rsh_tchar* point = wcsrchr(path, L'.');
+ if (!point)
+diff --git a/hash_check.c b/hash_check.c
+index 1f9c936..582a09d 100644
+--- a/hash_check.c
++++ b/hash_check.c
+@@ -210,9 +210,9 @@ static int detect_hash_type(char** ptr, char* end, int* p_len)
+ } else {
+ /* search backward (but no more then 129 symbols) */
+ if ((p - end) >= 129) end = p - 129;
+- for (; p >= end && p[-1] == '='; eq_num++, p--)
++ for (; p > end && p[-1] == '='; eq_num++, p--)
+ char_type = FmtBase64;
+- for (; p >= end && (next_type &= test_hash_char(p[-1])); len++, p--)
++ for (; p > end && (next_type &= test_hash_char(p[-1])); len++, p--)
+ char_type = next_type;
+ }
+ if ((char_type & FmtBase64) != 0)
+diff --git a/tests/test_rhash.sh b/tests/test_rhash.sh
+index 8c6e40d..db41b19 100755
+--- a/tests/test_rhash.sh
++++ b/tests/test_rhash.sh
+@@ -84,12 +84,9 @@ remove_tmpdir()
+ trap remove_tmpdir EXIT
+
+ # prepare test files
+-SUBDIR=$RHASH_TMP/dir1
+-mkdir $RHASH_TMP $SUBDIR || die "Unable to create tmp dir."
++mkdir $RHASH_TMP || die "Unable to create tmp dir."
++cp "$SCRIPT_DIR/test1K.data" $RHASH_TMP/test1K.data
+ cd "$RHASH_TMP"
+-cp "$SCRIPT_DIR/test1K.data" test1K.data
+-FILE_A=dir1/a.txt
+-printf "a" > $FILE_A
+
+ # get the list of supported hash options
+ HASHOPT="`$rhash --list-hashes|sed 's/ .*$//;/[^23]-/s/-\([0-9R]\)/\1/'|tr A-Z a-z`"
+@@ -207,14 +204,13 @@ TEST_EXPECTED="(message) 1 E8B7BE43 5c334qy BTAXLOOA6G3KQMODTHRGS5ZGME hvfkN/qlp
+ check "$TEST_RESULT" "$TEST_EXPECTED"
+
+ new_test "test %u modifier: "
+-cp $FILE_A "dir1/=@+.txt"
++mkdir dir1 && printf "a" > "dir1/=@+.txt"
+ TEST_RESULT=$( $rhash -p '%uf %Uf %up %Up %uxc %uxC %ubc %ubC\n' "dir1/=@+.txt" )
+ TEST_EXPECTED="%3d%40%2b.txt %3D%40%2B.txt dir1%2f%3d%40%2b.txt dir1%2F%3D%40%2B.txt e8b7be43 E8B7BE43 5c334qy 5C334QY"
+ check "$TEST_RESULT" "$TEST_EXPECTED" .
+ TEST_RESULT=$( $rhash -p '%uBc %UBc %Bc %u@c %U@c\n' -m "a" )
+ TEST_EXPECTED="6Le%2bQw%3d%3d 6Le%2BQw%3D%3D 6Le+Qw== %e8%b7%beC %E8%B7%BEC"
+ check "$TEST_RESULT" "$TEST_EXPECTED"
+-rm -f "dir1/=@+.txt"
+
+ new_test "test special characters: "
+ TEST_RESULT=$( $rhash -p '\63\1\277\x0f\x1\t\\ \x34\r' -m "" )
+@@ -252,7 +248,9 @@ TEST_RESULT=$( $rhash --simple -a test1K.data | $rhash -vc - 2>/dev/null | grep
+ match "$TEST_RESULT" "^test1K.data *OK"
+
+ new_test "test checking magnet link: "
+-TEST_RESULT=$( $rhash --magnet -a test1K.data | $rhash -vc - 2>&1 | grep test1K.data )
++# also test that '--check' verifies files in the current directory
++mkdir magnet_dir && $rhash --magnet -a test1K.data > magnet_dir/t.magnet
++TEST_RESULT=$( $rhash -vc magnet_dir/t.magnet 2>&1 | grep test1K.data )
+ TEST_EXPECTED="^test1K.data *OK"
+ match "$TEST_RESULT" "$TEST_EXPECTED"
+
+@@ -283,6 +281,20 @@ TEST_RESULT=$( $rhash --simple --embed-crc --embed-crc-delimiter=_ 'test.data' 2
+ check "$TEST_RESULT" "d3d99e8b test_[D3D99E8B].data"
+ rm 'test_[D3D99E8B].data' 'test_[D3D99E8C].data'
+
++new_test "test checking recursively: "
++mkdir -p check/a && cp test1K.data check/a/b.data
++echo "a/b.data B70B4C26" > check/b.sfv
++TEST_RESULT=$( $rhash -Crc check/ | grep b.data )
++match "$TEST_RESULT" "^a/b.data *OK" .
++echo "B70B4C26" > check/a/b.data.crc32
++TEST_RESULT=$( $rhash --crc-accept=.crc32 -Crc check/a | grep "data.*OK" )
++match "$TEST_RESULT" "^check/a.b.data *OK" .
++# test that hash-files specified explicitly by command line are checked
++# in the current directory even with '--recursive' option
++echo "test1K.data B70B4C26" > check/t.sfv
++TEST_RESULT=$( $rhash -Crc check/t.sfv | grep "data.*OK" )
++match "$TEST_RESULT" "^test1K.data *OK"
++
+ new_test "test wrong sums detection: "
+ $rhash -p '%c\n%m\n%e\n%h\n%g\n%t\n%a\n%w\n' -m WRONG > t.sum
+ TEST_RESULT=$( $rhash -vc t.sum 2>&1 | grep 'OK' )
+@@ -290,8 +302,7 @@ check "$TEST_RESULT" ""
+ rm t.sum
+
+ new_test "test *accept options: "
+-rm -rf test_dir/
+-mkdir -p test_dir && touch test_dir/file.txt test_dir/file.bin
++mkdir test_dir && touch test_dir/file.txt test_dir/file.bin
+ # correctly handle MIGW posix path conversion
+ echo "$MSYSTEM" | grep -q '^MINGW[36][24]' && SLASH=// || SLASH="/"
+ # test also --path-separator option
+@@ -301,7 +312,6 @@ TEST_RESULT=$( $rhash -rC --simple --accept=.txt --path-separator=\\ test_dir )
+ check "$TEST_RESULT" "00000000 test_dir\\file.txt" .
+ TEST_RESULT=$( $rhash -rc --crc-accept=.bin test_dir 2>/dev/null | sed -n '/Verifying/s/-//gp' )
+ match "$TEST_RESULT" "( Verifying test_dir.file\\.bin )"
+-rm -rf test_dir/
+
+ new_test "test ignoring of log files: "
+ touch t1.out t2.out
diff --git a/app-crypt/rhash/rhash-1.3.9-r2.ebuild b/app-crypt/rhash/rhash-1.3.9-r2.ebuild
new file mode 100644
index 000000000000..861a75662e4d
--- /dev/null
+++ b/app-crypt/rhash/rhash-1.3.9-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="Console utility and library for computing and verifying file hash sums"
+HOMEPAGE="http://rhash.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="debug nls libressl ssl static-libs"
+
+RDEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+)"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+BDEPEND="
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/RHash-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-nls.patch
+ # Fixes for https://github.com/rhash/RHash/issues/104
+ # and https://github.com/rhash/RHash/issues/106
+ "${FILESDIR}"/${P}-rc-segfault.patch
+)
+
+src_prepare() {
+ default
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ set -- \
+ ./configure \
+ --target="${CHOST}" \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysconfdir="${EPREFIX}"/etc \
+ --disable-openssl-runtime \
+ --disable-static \
+ --enable-lib-shared \
+ $(use_enable debug) \
+ $(use_enable nls gettext) \
+ $(use_enable ssl openssl) \
+ $(use_enable static-libs lib-static)
+
+ echo "${@}"
+ "${@}" || die "configure failed"
+}
+
+# We would add compile-gmo to the build targets but install-gmo always
+# recompiles unconditionally. :(
+
+multilib_src_install() {
+ # -j1 needed due to race condition.
+ emake DESTDIR="${D}" -j1 \
+ install{,-lib-headers,-pkg-config} \
+ $(use nls && echo install-gmo) \
+ $(use kernel_Winnt || echo install-lib-so-link)
+}
+
+multilib_src_test() {
+ emake test
+}