summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kuhn <Wuodan0@gmail.com>2015-01-06 16:15:30 +0100
committerStefan Kuhn <Wuodan0@gmail.com>2015-01-06 16:15:30 +0100
commitdfb07e48b4158aa16dc80dc063065a6eeb236675 (patch)
tree2afdf78584e0f324624a9b2a9ffe8f5ae0ae8d41
parentwww-servers/apache: raised EAPI to make eclass happy, no tests ;) (diff)
downloadwuodan-dfb07e48b4158aa16dc80dc063065a6eeb236675.tar.gz
wuodan-dfb07e48b4158aa16dc80dc063065a6eeb236675.tar.bz2
wuodan-dfb07e48b4158aa16dc80dc063065a6eeb236675.zip
sys-libs/timezone-data: added 'dialog' USE flag
-rw-r--r--sys-libs/timezone-data/Manifest6
-rw-r--r--sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak84
-rw-r--r--sys-libs/timezone-data/files/timezone-data-2014j-dialog.patch.bak348
-rw-r--r--sys-libs/timezone-data/metadata.xml3
-rw-r--r--sys-libs/timezone-data/timezone-data-2014j.ebuild4
5 files changed, 7 insertions, 438 deletions
diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
index 754ce60..9b0decd 100644
--- a/sys-libs/timezone-data/Manifest
+++ b/sys-libs/timezone-data/Manifest
@@ -2,11 +2,9 @@ AUX timezone-data-2014h-makefile.patch 3811 SHA256 815932985476d2ff349e7dbbe8f22
AUX timezone-data-2014j-POSIX-TZ-display.patch 411 SHA256 8e4c9fac51f1b5ec47f5f53d45c43dcf43999a3678eed118c35c1a960d589287 SHA512 3c9df4133474d45e1b448320bd80568617beac28608db139aa38126c724936fb840d74963b258776e4bbab9543d939c8e06f8d9d5c6559e945eb159879b266fd WHIRLPOOL 81db899e5edbf2040f1253054f138706df520e3c0c1770413347c8d19cb1c4f13e9fd316a45603449ca65e4547dd13d8eea11b6baa594ff64cb48647fdaa633d
AUX timezone-data-2014j-POSIX-TZ-settings.patch 1003 SHA256 778ee276aebbd43177ae3478a51a05f82646b2072fd96c577619bd33ed0df44d SHA512 9ea5d2dffcf08ad47dd2d604a40df8be02626d1de479664cff445eb7f03fc6f2e3a19d5c9db70b745b69ae0f1b7f1a4664fb15d9f1da3655b242927f73cd1a14 WHIRLPOOL b46fed60b7c5c95bb82554da7460540eefcbcdcfcc72252218b285294bff9589f3c5339bfa9db1ba4d845fbdbe864e7c54c17b6bd5048bc7382a31886c179e09
AUX timezone-data-2014j-coord-gawk.patch 1534 SHA256 2151ad39cf31b8e5d1e00c7a74d2d437826321090773e247c4074a49c1ad9f8e SHA512 9087dba486828c2de4cfd7d30d223923c7d75779320bec827b25fbe310a004bcc3d84a4613002868247fa3eeb65b39eceb88db13be4745dc332f5ea925851810 WHIRLPOOL bff8d3688a5e1d279c0efacfae939f23a6ff12d62d2816a29e1e346d73f6ef1e5f5afb755696cb7fbb91593eb2a0877a310fb71b7e44cdb8dd5b949f52db4cc5
-AUX timezone-data-2014j-dialog-2.patch.bak 2026 SHA256 a85e38c1416b95b17916a8bde5625911c2d064d1ef9b8179314b3b10f895b0cf SHA512 66d240fb6372a8c962eebf94e21fca59b90bc55f6d2bf4cf128bfa5f11486659d88d9927e84503d4f37e832833ab130e26488f1d09baef5014116acc09074eb3 WHIRLPOOL 571450f9bd6ed2157e23215896ed9c035c03165af96b9784081dd5aee679a6ded1adce86e5b460c6e1a200cc4f7d48aa058d4ed40f913e453d5c4c02ae0ee96a
AUX timezone-data-2014j-dialog.patch 8143 SHA256 7562f0be70fa14ac29dd4666c93063f4a4400ab9cab1fbc8b9fa9dbaebea56ed SHA512 54fbcb6fe2160e97aef3e77d7297c38baeb23cea0aa15541f23e96f937f4f64508dded4a46c48463d38ade0131639b05db9da7422e2af065302c7d8444a630de WHIRLPOOL 9332844966989fdd48edc2cec51fade0ff13ff06cbb5fb0ec3a611e64eaa947e36f9517ec40e5ebace82c63eb750df0000a2fb29d8faffd00ef93eb93ac3cecd
-AUX timezone-data-2014j-dialog.patch.bak 9916 SHA256 99c08df50a12119d89ce41c623360e32b9c077b807176832ba611f902e8477da SHA512 e06f676a75f9a9a1fa53058375bc35873f1a0dde971c003b573e06f9f8c16e0594aa9938181bdc667951aef14de3412d6993d6a9e57c45d488fc8fc15bd9a6b0 WHIRLPOOL c2834abc80792c2c2fc29ec20e5b515d001908707482d19bb534768a5f287c81b33924f8da94bf6edfdd993b1cb37ce5885c1f522d056ecc25d6e096b58c31c8
DIST tzcode2014j.tar.gz 182416 SHA256 7fd46125464856309fc81fe85a67a61de862b8ab884ce8ca82051f5fa308ede2 SHA512 1207670c168a80fe9db86307028efa3af8ca304817ebe36df5b5c2d2b67deba4294f05f4d6afa04220c3b255ad1903e2850bfb0649b2edfb2d754345a4b2490a WHIRLPOOL 87275670bc5eeaa634ea7cc858e0c52e61e69640d89a98119d42bf087f26b65216146749648c1347dca0924776e9f6f914ba85aac19c5a3e581ad329fb85de84
DIST tzdata2014j.tar.gz 290688 SHA256 a2d870320694d40535df822ac8074dc629a90e92abafa5d3373314f78ddc0e0d SHA512 4c2979be3a96f91f8576304ec905d571b73df0842c8300c1d7317819b45ab3e29948ed911aa265b12a4ad587d5cba44f646dd02e40e4fbf9e68556a2d327142e WHIRLPOOL adf3fc77aae18dccf05e3c990052fc2cb735a2c91bf9e93136cb45862e6f283e706beaa79373354817662a8b17449000a58760cb8f95fa78de88690207014a3e
-EBUILD timezone-data-2014j.ebuild 4654 SHA256 c28abdba9c3f8361f5558c3d73e841262c3033bf8b01928bef0e483324f178f2 SHA512 2dc9a3efc0398acf60b13a36da81a292737801c2e16b9bbc14944d268eefb0b23d13f7464506f3e447bf88bf8ddfc12f73d20b1a1ed186c4044e6734043b5fc5 WHIRLPOOL 5230c14192fcb4023288bbafd7adb174fb6266679372d8ed2133cae3e61f07bd8430d2714191071d06850d4588f1f82b6c2b5b98fe83513a5ac4518472da5f58
+EBUILD timezone-data-2014j.ebuild 4673 SHA256 31dd59a0a79f0400adbd1b9bb3bb0db300054925e322e4cb157ea96ceac33baf SHA512 d0367a0ed19d08ffc15974a3ed39455bd6a0ad51a80bada8e7fb4cbd37b6eb4cec065b3ecc59a82a9b5507283a0ea92aaa7b432a1567bcad7ecb4cca62ad0be7 WHIRLPOOL 8000e06866b43b6012fa22d3498e68e2b9f5845c549306b289a4577c8ce677e92ea86614ff2710b3d0302620061f742b6dcc0ef92f5412f52a591569dbd63481
MISC ChangeLog 42843 SHA256 73a8bcfae55c07cfbe138e23ef3b5b252ccb9434fc330b1cada79db36c6797f4 SHA512 e439805cde3409634962fb855dc8d0e2136046811ef902e9d8214db7ccda3137c9a7e8b2b5127d7d6fd9f9d59603cb0e8d78f842796bb5cd5ae37956750de9aa WHIRLPOOL e320da83e089b400c3b9020c96937609934eb9596ce020e50dfc2e39a5d1f6d8ef76b1a0078dd6a8b0fec77bbcb92f7d2c8c5d404f4bf10e85c1ee871b3d19e1
-MISC metadata.xml 472 SHA256 4ab35a5283c62aa867e05bcfdcaeb90e5ac191347a32735d37290885502a2511 SHA512 f91ce6146a369ddb6ee82c0d6e221ceb1fbe9beb073c2e37c27b07e0684c701328891a51f58ef9fefea6007e0111979af7034787b167735fb6d79c8462d9dfcc WHIRLPOOL ab3bbde9fbc205a887f591b7362034b01081c9a477dab314acfd92b4aa4b7e010532fdee7b2684504044fb3df2e8e8d09466d67765ec9feff3a2223ff7c54a1e
+MISC metadata.xml 592 SHA256 df9ceffab1465bafc5baba69b3774923ca1a1a40b8b659204eb4086d0f756c0d SHA512 b3c653f841688082db9ed2208e3e216827ade68e39e8c680f100b62f19107a61c48d37149f9e30341a02945fc2258eac83fb13cd1d7690b2b2e9546df374bc6f WHIRLPOOL dcfc686e92a9c64a369f9cb4865c1154393c380c2c94482ada107e2907eefdd508a5d001d5aed9c247a4f8bfcc09d8fc6c647a980ff76462aefc632de53d9fe4
diff --git a/sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak b/sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak
deleted file mode 100644
index 8789537..0000000
--- a/sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak
+++ /dev/null
@@ -1,84 +0,0 @@
-diff --git a/tzselect.ksh b/tzselect.ksh
-index 1816f9f..9280fb9 100644
---- a/tzselect.ksh
-+++ b/tzselect.ksh
-@@ -98,7 +98,7 @@ then
- case $select_result in
- "") echo >&2 "Please enter a number in range." ;;
- # print result
-- ?*) echo "${select_result}"; break
-+ ?*) echo -n "${select_result}"; break
- esac
- done || exit
- }
-@@ -138,7 +138,7 @@ else
- shift `expr $select_i - 1`
- select_result=$1
- # print result
-- echo "${select_result}"
-+ echo -n "${select_result}"
- break
- fi
- echo >&2 'Please enter a number in range.'
-@@ -177,7 +177,7 @@ showdialog() {
- inputbox)
- echo >&2 "${2}"
- read INPUTBOX
-- echo "${INPUTBOX}"
-+ echo -n "${INPUTBOX}"
- return 0 ;;
- esac
- return 1
-diff --git a/tzselect_dialog b/tzselect_dialog
-index a352694..cd93313 100755
---- a/tzselect_dialog
-+++ b/tzselect_dialog
-@@ -28,7 +28,7 @@ TYPE="${1}"
- shift
- MSG="${1}"
- shift
--MENU_ITEMS=()
-+MENU_ITEMS=(0 0)
- RET_DIALOG=
-
- case "${TYPE}" in
-@@ -38,7 +38,7 @@ case "${TYPE}" in
- MENU_ITEMS+=(0)
- # add value and description
- while [ $# -gt 0 ]; do
-- MENU_ITEMS+=("$(( ( ${#MENU_ITEMS[@]} +1 ) / 2 ))" "${1}")
-+ MENU_ITEMS+=("$(( ( ${#MENU_ITEMS[@]} -1 ) / 2 ))" "${1}")
- shift
- done ;;
- esac
-@@ -47,9 +47,9 @@ esac
- ANSWER=$("${WHICHDIALOG}" \
- --no-cancel \
- "--${TYPE}" \
-- "${MSG}" 0 0 \
-+ "${MSG}" \
- "${MENU_ITEMS[@]}" \
-- 9>&1 1>&2 2>&9)
-+ 3>&1 1>&2 2>&3)
- RET_DIALOG=$?
-
- # exit on cancel unless it's a yesno
-@@ -58,14 +58,14 @@ RET_DIALOG=$?
- case "${TYPE}" in
- yesno)
- if [ "${RET_DIALOG}" -eq 0 ]; then
-- ANSWER=$([ -n "${1}" ] && echo "${1}" || echo Yes)
-+ ANSWER=$([ -n "${1}" ] && echo -n "${1}" || echo -n Yes)
- else
-- ANSWER=$([ -n "${2}" ] && echo "${2}" || echo No)
-+ ANSWER=$([ -n "${2}" ] && echo -n "${2}" || echo -n No)
- fi ;;
- # get string from index
- menu)
-- ANSWER="${MENU_ITEMS[(($ANSWER * 2))]}" || exit $? ;;
-+ ANSWER="${MENU_ITEMS[(($ANSWER * 2 + 2))]}" || exit $? ;;
- esac
- # print result
--echo "${ANSWER}"
-+echo -n "${ANSWER}"
- exit 0
diff --git a/sys-libs/timezone-data/files/timezone-data-2014j-dialog.patch.bak b/sys-libs/timezone-data/files/timezone-data-2014j-dialog.patch.bak
deleted file mode 100644
index 56506be..0000000
--- a/sys-libs/timezone-data/files/timezone-data-2014j-dialog.patch.bak
+++ /dev/null
@@ -1,348 +0,0 @@
-tzselect: User input/output through one function
-
-Which can be 'overriden' in the calling process as $SHOWDIALOG
-With this, tzselect can be used by other scripts with a customized
-user dialog. Better solutions are welcome!
-
-Example call:
-SHOWDIALOG=$PWD/tzselect_dialog tzselect
-
-where tzselect_dialog imitates the function showdialog() of tzselect.
-
-see: https://github.com/Wuodan/tz/commit/5297b9ca06f79c334b9492713ce388b590e436e3
-
-diff --git a/tzselect.ksh b/tzselect.ksh
-index 3acdebd..1816f9f 100644
---- a/tzselect.ksh
-+++ b/tzselect.ksh
-@@ -36,6 +36,7 @@ REPORT_BUGS_TO=tz@iana.org
- # Specify default values for environment variables if they are unset.
- : ${AWK=awk}
- : ${TZDIR=`pwd`}
-+: ${SHOWDIALOG=showdialog}
-
- # Check for awk Posix compliance.
- ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
-@@ -73,9 +74,10 @@ Options:
- Report bugs to $REPORT_BUGS_TO."
-
- # Ask the user to select from the function's arguments,
--# and assign the selected argument to the variable 'select_result'.
-+# and print selected argument
- # Exit on EOF or I/O error. Use the shell's 'select' builtin if available,
- # falling back on a less-nice but portable substitute otherwise.
-+# First argument is the message preceeding the selection
- if
- case $BASH_VERSION in
- ?*) : ;;
-@@ -88,11 +90,15 @@ then
- # even though it is never executed.
- eval '
- doselect() {
-+ # print message first
-+ echo >&2 "${1}"
-+ shift
- select select_result
- do
- case $select_result in
- "") echo >&2 "Please enter a number in range." ;;
-- ?*) break
-+ # print result
-+ ?*) echo "${select_result}"; break
- esac
- done || exit
- }
-@@ -107,6 +113,9 @@ then
- '
- else
- doselect() {
-+ # print message first
-+ echo >&2 "${1}"
-+ shift
- # Field width of the prompt numbers.
- select_width=`expr $# : '.*'`
-
-@@ -128,6 +137,8 @@ else
- if test 1 -le $select_i && test $select_i -le $#; then
- shift `expr $select_i - 1`
- select_result=$1
-+ # print result
-+ echo "${select_result}"
- break
- fi
- echo >&2 'Please enter a number in range.'
-@@ -140,6 +151,38 @@ else
- }
- fi
-
-+# showdialog()
-+# All normal user input/output goes through this function
-+#
-+# The user dialog of this script can be altered by setting
-+# the SHOWDIALOG variable as in:
-+# SHOWDIALOG=$PWD/tzselect_dialog tzselect
-+# where 'tzselect_dialog' imitates this function
-+#
-+# Arguments:
-+# Type: one of: menu, yesno, msgbox, inputbox
-+# Message: text to display
-+# Options: menu-options, only for types menu and yesno
-+#
-+showdialog() {
-+ # action depends on first argument
-+ case "${1}" in
-+ menu|yesno)
-+ shift
-+ doselect "${@}"
-+ return $? ;;
-+ msgbox)
-+ echo >&2 "${2}"
-+ return 0 ;;
-+ inputbox)
-+ echo >&2 "${2}"
-+ read INPUTBOX
-+ echo "${INPUTBOX}"
-+ return 0 ;;
-+ esac
-+ return 1
-+}
-+
- while getopts c:n:t:-: opt
- do
- case $opt$OPTARG in
-@@ -270,8 +313,7 @@ output_distances='
- # Begin the main loop. We come back here if the user wants to retry.
- while
-
-- echo >&2 'Please identify a location' \
-- 'so that time zone rules can be set correctly.'
-+ dialogtext='Please identify a location so that time zone rules can be set correctly.'
-
- continent=
- country=
-@@ -284,7 +326,8 @@ while
-
- # Ask the user for continent or ocean.
-
-- echo >&2 'Please select a continent, ocean, "coord", or "TZ".'
-+ dialogtext="${dialogtext}
-+Please select a continent, ocean, \"coord\", or \"TZ\"."
-
- quoted_continents=`
- $AWK '
-@@ -304,10 +347,9 @@ while
- `
-
- eval '
-- doselect '"$quoted_continents"' \
-+ continent=`"${SHOWDIALOG}" menu '\'"${dialogtext}"\'' '"$quoted_continents"' \
- "coord - I want to use geographical coordinates." \
-- "TZ - I want to specify the time zone using the Posix TZ format."
-- continent=$select_result
-+ "TZ - I want to specify the time zone using the Posix TZ format."` || exit $?
- case $continent in
- Americas) continent=America;;
- *" "*) continent=`expr "$continent" : '\''\([^ ]*\)'\''`
-@@ -319,11 +361,9 @@ while
- TZ)
- # Ask the user for a Posix TZ string. Check that it conforms.
- while
-- echo >&2 'Please enter the desired value' \
-- 'of the TZ environment variable.'
-- echo >&2 'For example, GST-10 is a zone named GST' \
-- 'that is 10 hours ahead (east) of UTC.'
-- read TZ
-+ TZ=`"${SHOWDIALOG}" inputbox \
-+ 'Please enter the desired value of the TZ environment variable.
-+For example, GST-10 is a zone named GST that is 10 hours ahead (east) of UTC.'` || exit $?
- $AWK -v TZ="$TZ" 'BEGIN {
- tzname = "[^-+,0-9][^-+,0-9][^-+,0-9]+"
- time = "[0-2]?[0-9](:[0-5][0-9](:[0-5][0-9])?)?"
-@@ -336,8 +376,8 @@ while
- exit 0
- }'
- do
-- echo >&2 "'$TZ' is not a conforming" \
-- 'Posix time zone string.'
-+ "${SHOWDIALOG}" msgbox \
-+ "'$TZ' is not a conforming Posix time zone string."
- done
- TZ_for_date=$TZ;;
- *)
-@@ -345,12 +385,10 @@ while
- coord)
- case $coord in
- '')
-- echo >&2 'Please enter coordinates' \
-- 'in ISO 6709 notation.'
-- echo >&2 'For example, +4042-07403 stands for'
-- echo >&2 '40 degrees 42 minutes north,' \
-- '74 degrees 3 minutes west.'
-- read coord;;
-+ coord=`"${SHOWDIALOG}" inputbox \
-+ 'Please enter coordinates in ISO 6709 notation.
-+For example, +4042-07403 stands for
-+40 degrees 42 minutes north, 74 degrees 3 minutes west.'` || exit $?
- esac
- distance_table=`$AWK \
- -v coord="$coord" \
-@@ -363,12 +401,10 @@ while
- BEGIN { FS = "\t" }
- { print $NF }
- '`
-- echo >&2 'Please select one of the following' \
-- 'time zone regions,'
-- echo >&2 'listed roughly in increasing order' \
-- "of distance from $coord".
-- doselect $regions
-- region=$select_result
-+ region=`"${SHOWDIALOG}" menu \
-+ "Please select one of the following time zone regions,
-+listed roughly in increasing order of distance from $coord." \
-+ $regions` || exit $?
- TZ=`echo "$distance_table" | $AWK -v region="$region" '
- BEGIN { FS="\t" }
- $NF == region { print $4 }
-@@ -405,10 +441,9 @@ while
- # If there's more than one country, ask the user which one.
- case $countries in
- *"$newline"*)
-- echo >&2 'Please select a country' \
-- 'whose clocks agree with yours.'
-- doselect $countries
-- country=$select_result;;
-+ country=`"${SHOWDIALOG}" menu \
-+ 'Please select a country whose clocks agree with yours.' \
-+ $countries` || exit $?;;
- *)
- country=$countries
- esac
-@@ -436,10 +471,9 @@ while
- # If there's more than one region, ask the user which one.
- case $regions in
- *"$newline"*)
-- echo >&2 'Please select one of the following' \
-- 'time zone regions.'
-- doselect $regions
-- region=$select_result;;
-+ region=`"${SHOWDIALOG}" menu \
-+ 'Please select one of the following time zone regions.' \
-+ $regions` || exit $?;;
- *)
- region=$regions
- esac
-@@ -495,23 +529,24 @@ Universal Time is now: $UTdate."
-
-
- # Output TZ info and ask the user to confirm.
-+ infomsg='
-+The following information has been given:
-+
-+'
-
-- echo >&2 ""
-- echo >&2 "The following information has been given:"
-- echo >&2 ""
- case $country%$region%$coord in
-- ?*%?*%) echo >&2 " $country$newline $region";;
-- ?*%%) echo >&2 " $country";;
-- %?*%?*) echo >&2 " coord $coord$newline $region";;
-- %%?*) echo >&2 " coord $coord";;
-- *) echo >&2 " TZ='$TZ'"
-+ ?*%?*%) infomsg="${infomsg} $country$newline $region";;
-+ ?*%%) infomsg="${infomsg} $country";;
-+ %?*%?*) infomsg="${infomsg} coord $coord$newline $region";;
-+ %%?*) infomsg="${infomsg} coord $coord";;
-+ *) infomsg="${infomsg} TZ='$TZ'"
- esac
-- echo >&2 ""
-- echo >&2 "Therefore TZ='$TZ' will be used.$extra_info"
-- echo >&2 "Is the above information OK?"
-+ infomsg="${infomsg}
-+
-+Therefore TZ='$TZ' will be used.$extra_info
-+Is the above information OK?"
-
-- doselect Yes No
-- ok=$select_result
-+ ok=`"${SHOWDIALOG}" yesno "${infomsg}" Yes No` || exit $?
- case $ok in
- Yes) break
- esac
-diff --git a/tzselect_dialog b/tzselect_dialog
-new file mode 100755
-index 0000000..a352694
---- /dev/null
-+++ b/tzselect_dialog
-@@ -0,0 +1,71 @@
-+#!/bin/bash
-+# This script is released under the GNU General Public License 3.0
-+
-+# sample dialog handler for tzselect
-+# MUST have same input/output as the showdialog() function in tzselect
-+
-+# showdialog()
-+# All normal user input/output goes through this function
-+#
-+# The user dialog of this script can be altered by setting
-+# the SHOWDIALOG variable as in:
-+# SHOWDIALOG=$PWD/tzselect_dialog tzselect
-+# where 'tzselect_dialog' imitates this function
-+#
-+# Arguments:
-+# Type: one of: menu, yesno, msgbox, inputbox
-+# Message: text to display
-+# Options: menu-options, only for types menu and yesno
-+
-+WHICHDIALOG=dialog
-+# let's support Xdialog for the fun of it
-+if [ ! $(type "Xdialog" &> /dev/null) ] && [ -v 'DISPLAY' ] && [ -n "${DISPLAY}" ]; then
-+ WHICHDIALOG=Xdialog
-+fi
-+
-+# get type and message first
-+TYPE="${1}"
-+shift
-+MSG="${1}"
-+shift
-+MENU_ITEMS=()
-+RET_DIALOG=
-+
-+case "${TYPE}" in
-+ # prepare arguments to dialog/Xdialog --menu
-+ menu)
-+ # add menu-height: auto
-+ MENU_ITEMS+=(0)
-+ # add value and description
-+ while [ $# -gt 0 ]; do
-+ MENU_ITEMS+=("$(( ( ${#MENU_ITEMS[@]} +1 ) / 2 ))" "${1}")
-+ shift
-+ done ;;
-+esac
-+
-+# use dialog/Xdialog
-+ANSWER=$("${WHICHDIALOG}" \
-+ --no-cancel \
-+ "--${TYPE}" \
-+ "${MSG}" 0 0 \
-+ "${MENU_ITEMS[@]}" \
-+ 9>&1 1>&2 2>&9)
-+RET_DIALOG=$?
-+
-+# exit on cancel unless it's a yesno
-+[ "${TYPE}" != 'yesno' ] && [ "${RET_DIALOG}" -ne 0 ] && exit "${RET_DIALOG}"
-+
-+case "${TYPE}" in
-+ yesno)
-+ if [ "${RET_DIALOG}" -eq 0 ]; then
-+ ANSWER=$([ -n "${1}" ] && echo "${1}" || echo Yes)
-+ else
-+ ANSWER=$([ -n "${2}" ] && echo "${2}" || echo No)
-+ fi ;;
-+ # get string from index
-+ menu)
-+ ANSWER="${MENU_ITEMS[(($ANSWER * 2))]}" || exit $? ;;
-+esac
-+# print result
-+echo "${ANSWER}"
-+exit 0
diff --git a/sys-libs/timezone-data/metadata.xml b/sys-libs/timezone-data/metadata.xml
index 5ea9445..7c6efda 100644
--- a/sys-libs/timezone-data/metadata.xml
+++ b/sys-libs/timezone-data/metadata.xml
@@ -11,5 +11,8 @@
Install the set of "right" timezones; these timezones include leap seconds
when counting seconds since the epoch (while posix does not)
</flag>
+ <flag name='dialog'>
+ Install hack to tzselect so dialogs by tzselect can be used by other scripts
+ </flag>
</use>
</pkgmetadata>
diff --git a/sys-libs/timezone-data/timezone-data-2014j.ebuild b/sys-libs/timezone-data/timezone-data-2014j.ebuild
index 676d645..6f852b3 100644
--- a/sys-libs/timezone-data/timezone-data-2014j.ebuild
+++ b/sys-libs/timezone-data/timezone-data-2014j.ebuild
@@ -16,7 +16,7 @@ SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.ta
LICENSE="BSD public-domain"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="nls right_timezone elibc_FreeBSD elibc_glibc"
+IUSE="nls right_timezone elibc_FreeBSD elibc_glibc dialog"
RDEPEND="!sys-libs/glibc[vanilla(+)]"
@@ -45,7 +45,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-2014j-coord-gawk.patch
epatch "${FILESDIR}"/${PN}-2014j-POSIX-TZ-display.patch
# disabled, used in the pentoo-installer
- # epatch "${FILESDIR}"/${PN}-2014j-dialog.patch
+ use dialog && epatch "${FILESDIR}"/${PN}-2014j-dialog.patch
tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
}