diff options
author | Heikki Lindholm <holin@iki.fi> | 2008-12-28 15:48:29 +0000 |
---|---|---|
committer | Heikki Lindholm <holin@iki.fi> | 2008-12-28 15:48:29 +0000 |
commit | 54c20f65214fd93bf41a3ce542b85d8af13644af (patch) | |
tree | 9ce905f87a793464521c15f4b31fd4c5e7742914 /contrib | |
parent | 75dd2321fb143271e73addf455e9c192feb5eac8 (diff) | |
download | libextractor-54c20f65214fd93bf41a3ce542b85d8af13644af.tar.gz libextractor-54c20f65214fd93bf41a3ce542b85d8af13644af.zip |
OS X native i18n for the framework build
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/macosx/build-osx-framework.sh | 78 |
1 files changed, 65 insertions, 13 deletions
diff --git a/contrib/macosx/build-osx-framework.sh b/contrib/macosx/build-osx-framework.sh index e642aac..fba623c 100755 --- a/contrib/macosx/build-osx-framework.sh +++ b/contrib/macosx/build-osx-framework.sh | |||
@@ -313,17 +313,17 @@ build_package() | |||
313 | # | 313 | # |
314 | build_dependencies() | 314 | build_dependencies() |
315 | { | 315 | { |
316 | prepare_package "${GETTEXT_NAME}" | 316 | # prepare_package "${GETTEXT_NAME}" |
317 | build_package "${GETTEXT_NAME}" \ | 317 | # build_package "${GETTEXT_NAME}" \ |
318 | "${ARCH_HOSTSETTING} \ | 318 | # "${ARCH_HOSTSETTING} \ |
319 | --prefix="${FW_DIR}" \ | 319 | # --prefix="${FW_DIR}" \ |
320 | --with-pic \ | 320 | # --with-pic \ |
321 | --disable-shared \ | 321 | # --disable-shared \ |
322 | --enable-static \ | 322 | # --enable-static \ |
323 | --disable-java \ | 323 | # --disable-java \ |
324 | --disable-native-java \ | 324 | # --disable-native-java \ |
325 | --without-emacs \ | 325 | # --without-emacs \ |
326 | --with-libiconv-prefix=${SDK_PATH}/usr" | 326 | # --with-libiconv-prefix=${SDK_PATH}/usr" |
327 | 327 | ||
328 | prepare_package "${LIBOGG_NAME}" | 328 | prepare_package "${LIBOGG_NAME}" |
329 | build_package "${LIBOGG_NAME}" \ | 329 | build_package "${LIBOGG_NAME}" \ |
@@ -388,13 +388,14 @@ build_extractor() | |||
388 | CFLAGS="${CFLAGS}" \ | 388 | CFLAGS="${CFLAGS}" \ |
389 | CXXFLAGS="${CXXFLAGS}" \ | 389 | CXXFLAGS="${CXXFLAGS}" \ |
390 | LDFLAGS="${LDFLAGS}" \ | 390 | LDFLAGS="${LDFLAGS}" \ |
391 | gt_cv_func_gnugettext1_libintl=yes \ | 391 | xxgt_cv_func_gnugettext1_libintl=yes \ |
392 | ac_cv_func_memcmp_working=yes \ | 392 | ac_cv_func_memcmp_working=yes \ |
393 | ac_cv_func_mmap_fixed_mapped=yes \ | 393 | ac_cv_func_mmap_fixed_mapped=yes \ |
394 | ac_cv_func_stat_empty_string_bug=no \ | 394 | ac_cv_func_stat_empty_string_bug=no \ |
395 | ./configure "${ARCH_HOSTSETTING}" \ | 395 | ./configure "${ARCH_HOSTSETTING}" \ |
396 | --prefix="${FW_DIR}" \ | 396 | --prefix="${FW_DIR}" \ |
397 | --enable-shared \ | 397 | --enable-shared \ |
398 | --enable-framework \ | ||
398 | --disable-gsf \ | 399 | --disable-gsf \ |
399 | --disable-gnome \ | 400 | --disable-gnome \ |
400 | --enable-ffmpeg \ | 401 | --enable-ffmpeg \ |
@@ -559,6 +560,52 @@ install_file_to_framework() | |||
559 | done | 560 | done |
560 | } | 561 | } |
561 | 562 | ||
563 | install_message_catalog_to_framework() | ||
564 | { | ||
565 | local src_file="$1" | ||
566 | local lang_name=$( basename -s .po $src_file ) | ||
567 | local dst_file="${FINAL_FW_DIR}/Resources/${lang_name}.lproj/Localizable.strings" | ||
568 | if [ ! -e "$dst_file" ] | ||
569 | then | ||
570 | echo "MSGCAT $src_file $dst_file" | ||
571 | create_directory_for "$dst_file" | ||
572 | if ! ( msgcat -t UTF-8 --stringtable-output -o "$dst_file" "$src_file" ) | ||
573 | then | ||
574 | echo "error creating message catalog: $lang" | ||
575 | exit 1 | ||
576 | fi | ||
577 | if ! ( chmod 0755 "${dst_file}" ) | ||
578 | then | ||
579 | echo "error setting permissions" | ||
580 | exit 1 | ||
581 | fi | ||
582 | plutil -lint "$dst_file" | ||
583 | fi | ||
584 | } | ||
585 | |||
586 | install_en_message_catalog_to_framework() | ||
587 | { | ||
588 | local src_file="$1" | ||
589 | local lang_name="en" | ||
590 | local dst_file="${FINAL_FW_DIR}/Resources/${lang_name}.lproj/Localizable.strings" | ||
591 | if [ ! -e "$dst_file" ] | ||
592 | then | ||
593 | echo "MSGCAT $src_file $dst_file" | ||
594 | create_directory_for "$dst_file" | ||
595 | if ! ( msgcat -t UTF-8 "$src_file" | msgen --stringtable-output -o "$dst_file" - ) | ||
596 | then | ||
597 | echo "error creating English message catalog" | ||
598 | exit 1 | ||
599 | fi | ||
600 | if ! ( chmod 0755 "${dst_file}" ) | ||
601 | then | ||
602 | echo "error setting permissions" | ||
603 | exit 1 | ||
604 | fi | ||
605 | plutil -lint "$dst_file" | ||
606 | fi | ||
607 | } | ||
608 | |||
562 | copy_file_to_framework() | 609 | copy_file_to_framework() |
563 | { | 610 | { |
564 | local src_file="$1" | 611 | local src_file="$1" |
@@ -691,7 +738,12 @@ done | |||
691 | cd "${ORIG_DIR}" | 738 | cd "${ORIG_DIR}" |
692 | copy_file_to_framework "./contrib/macosx/Info.plist" "Resources/Info.plist" | 739 | copy_file_to_framework "./contrib/macosx/Info.plist" "Resources/Info.plist" |
693 | fill_framework_revision "Resources/Info.plist" | 740 | fill_framework_revision "Resources/Info.plist" |
694 | copy_file_to_framework "./contrib/macosx/English.lproj/InfoPlist.strings" "Resources/English.lproj/InfoPlist.strings" | 741 | for tfn in ./po/*.po |
742 | do | ||
743 | install_message_catalog_to_framework "$tfn" | ||
744 | done | ||
745 | install_en_message_catalog_to_framework "./po/libextractor.pot" | ||
746 | #copy_file_to_framework "./contrib/macosx/English.lproj/InfoPlist.strings" "Resources/English.lproj/InfoPlist.strings" | ||
695 | make_framework_link "lib/libextractor.dylib" "Extractor" | 747 | make_framework_link "lib/libextractor.dylib" "Extractor" |
696 | make_framework_link "lib" "Libraries" | 748 | make_framework_link "lib" "Libraries" |
697 | make_framework_link "lib/libextractor" "PlugIns" | 749 | make_framework_link "lib/libextractor" "PlugIns" |