pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/50814: libvpx 1.5 dropped powerpc configuration
The following reply was made to PR pkg/50814; it has been noted by GNATS.
From: "John D. Baker" <jdbaker%mylinuxisp.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/50814: libvpx 1.5 dropped powerpc configuration
Date: Sun, 11 Sep 2016 22:11:09 -0500 (CDT)
With the update to libvpx-1.6.0,
${LOCALPATCHES}/multimedia/libvpx/patch-configure
fails to apply during the patch phase. It succeeds when applied manually
with some fuzz warnings and offset notifications.
See below patches regenerated for libvpx-1.6.0. (Only build-tested on
amd64 for now--will check runtime on non-powerpc first and then powerpc
eventually.)
+--- build/make/configure.sh.orig 2016-09-11 21:48:48.000000000 -0500
++++ build/make/configure.sh 2016-09-11 21:49:58.000000000 -0500
+@@ -418,7 +418,7 @@ write_common_config_banner() {
+ write_common_config_targets() {
+ for t in ${all_targets}; do
+ if enabled ${t}; then
+- if enabled child; then
++ if enabled universal || enabled child; then
+ fwrite config.mk "ALL_TARGETS += ${t}-${toolchain}"
+ else
+ fwrite config.mk "ALL_TARGETS += ${t}"
+@@ -697,6 +697,12 @@ process_common_toolchain() {
+ *i[3456]86*)
+ tgt_isa=x86
+ ;;
++ *powerpc64*)
++ tgt_isa=ppc64
++ ;;
++ *powerpc*)
++ tgt_isa=ppc32
++ ;;
+ *sparc*)
+ tgt_isa=sparc
+ ;;
+@@ -704,6 +710,14 @@ process_common_toolchain() {
+
+ # detect tgt_os
+ case "$gcctarget" in
++ *darwin8*)
++ tgt_isa=universal
++ tgt_os=darwin8
++ ;;
++ *darwin9*)
++ tgt_isa=universal
++ tgt_os=darwin9
++ ;;
+ *darwin10*)
+ tgt_isa=x86_64
+ tgt_os=darwin10
+@@ -807,7 +821,7 @@ process_common_toolchain() {
+ add_ldflags "-isysroot ${iphoneos_sdk_dir}"
+ fi
+ ;;
+- x86*-darwin*)
++ *-darwin*)
+ osx_sdk_dir="$(show_darwin_sdk_path macosx)"
+ if [ -d "${osx_sdk_dir}" ]; then
+ add_cflags "-isysroot ${osx_sdk_dir}"
+@@ -1180,6 +1194,29 @@ EOF
+ check_add_asflags -march=${tgt_isa}
+ check_add_asflags -KPIC
+ ;;
++ ppc*)
++ enable_feature ppc
++ bits=${tgt_isa##ppc}
++ link_with_cc=gcc
++ setup_gnu_toolchain
++ add_asflags -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
++ soft_enable altivec
++ enabled altivec && add_cflags -maltivec
++
++ case "$tgt_os" in
++ linux*)
++ add_asflags -maltivec -mregnames -I"\$(dir \$<)linux"
++ ;;
++ darwin*)
++ darwin_arch="-arch ppc"
++ enabled ppc64 && darwin_arch="${darwin_arch}64"
++ add_cflags ${darwin_arch} -m${bits} -fasm-blocks
++ add_asflags ${darwin_arch} -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
++ add_ldflags ${darwin_arch} -m${bits}
++ enabled altivec && add_cflags -faltivec
++ ;;
++ esac
++ ;;
+ x86*)
+ case ${tgt_os} in
+ win*)
+@@ -1358,7 +1395,7 @@ EOF
+ ;;
+ esac
+ ;;
+- *-gcc|generic-gnu)
++ universal*|*-gcc|generic-gnu)
+ link_with_cc=gcc
+ enable_feature gcc
+ setup_gnu_toolchain
+--- configure.orig 2016-09-11 21:48:48.000000000 -0500
++++ configure 2016-09-11 21:53:30.000000000 -0500
+@@ -114,6 +114,12 @@ all_platforms="${all_platforms} armv7s-d
+ all_platforms="${all_platforms} armv8-linux-gcc"
+ all_platforms="${all_platforms} mips32-linux-gcc"
+ all_platforms="${all_platforms} mips64-linux-gcc"
++all_platforms="${all_platforms} ppc32-darwin8-gcc"
++all_platforms="${all_platforms} ppc32-darwin9-gcc"
++all_platforms="${all_platforms} ppc32-linux-gcc"
++all_platforms="${all_platforms} ppc64-darwin8-gcc"
++all_platforms="${all_platforms} ppc64-darwin9-gcc"
++all_platforms="${all_platforms} ppc64-linux-gcc"
+ all_platforms="${all_platforms} sparc-linux-gcc"
+ all_platforms="${all_platforms} sparc-solaris-gcc"
+ all_platforms="${all_platforms} x86-android-gcc"
+@@ -159,6 +165,13 @@ all_platforms="${all_platforms} x86_64-w
+ all_platforms="${all_platforms} x86_64-win64-vs11"
+ all_platforms="${all_platforms} x86_64-win64-vs12"
+ all_platforms="${all_platforms} x86_64-win64-vs14"
++all_platforms="${all_platforms} universal-darwin8-gcc"
++all_platforms="${all_platforms} universal-darwin9-gcc"
++all_platforms="${all_platforms} universal-darwin10-gcc"
++all_platforms="${all_platforms} universal-darwin11-gcc"
++all_platforms="${all_platforms} universal-darwin12-gcc"
++all_platforms="${all_platforms} universal-darwin13-gcc"
++all_platforms="${all_platforms} universal-darwin14-gcc"
+ all_platforms="${all_platforms} generic-gnu"
+
+ # all_targets is a list of all targets that can be configured
+@@ -217,6 +230,8 @@ ARCH_LIST="
+ mips
+ x86
+ x86_64
++ ppc32
++ ppc64
+ "
+ ARCH_EXT_LIST_X86="
+ mmx
+@@ -227,6 +242,8 @@ ARCH_EXT_LIST_X86="
+ sse4_1
+ avx
+ avx2
++
++ altivec
+ "
+ ARCH_EXT_LIST="
+ edsp
+@@ -415,8 +432,22 @@ post_process_cmdline() {
+
+ process_targets() {
+ enabled child || write_common_config_banner
+- write_common_target_config_h ${BUILD_PFX}vpx_config.h
+- write_common_config_targets
++ enabled universal || write_common_target_config_h ${BUILD_PFX}vpx_config.h
++
++ # For fat binaries, call configure recursively to configure for each
++ # binary architecture to be included.
++ if enabled universal; then
++ # Call configure (ourselves) for each subarchitecture
++ for arch in $fat_bin_archs; do
++ BUILD_PFX=${arch}/ toolchain=${arch} $self --child $cmdline_args || exit $?
++ done
++ fi
++
++ # The write_common_config (config.mk) logic is deferred until after the
++ # recursive calls to configure complete, because we want our universal
++ # targets to be executed last.
++ write_common_config_targets
++ enabled universal && echo "FAT_ARCHS=${fat_bin_archs}" >> config.mk
+
+ # Calculate the default distribution name, based on the enabled features
+ cf=""
+@@ -560,6 +591,30 @@ EOF
+ process_toolchain() {
+ process_common_toolchain
+
++ # Handle universal binaries for this architecture
++ case $toolchain in
++ universal-darwin*)
++ darwin_ver=${tgt_os##darwin}
++
++ # Snow Leopard (10.6/darwin10) dropped support for PPC
++ # Include PPC support for all prior versions
++ if [ $darwin_ver -lt 10 ]; then
++ fat_bin_archs="$fat_bin_archs ppc32-${tgt_os}-gcc"
++ fi
++
++ # Tiger (10.4/darwin8) brought support for x86
++ if [ $darwin_ver -ge 8 ]; then
++ fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
++ fi
++
++ # Leopard (10.5/darwin9) brought 64 bit support
++ if [ $darwin_ver -ge 9 ]; then
++ fat_bin_archs="$fat_bin_archs x86_64-${tgt_os}-${tgt_cc}"
++ fi
++ ;;
++ esac
++
++
+ # Enable some useful compiler flags
+ if enabled gcc; then
+ enabled werror && check_add_cflags -Werror
+@@ -651,7 +706,7 @@ process_toolchain() {
+ esac
+
+ # Other toolchain specific defaults
+- case $toolchain in x86*) soft_enable postproc;; esac
++ case $toolchain in x86*|ppc*|universal*) soft_enable postproc;; esac
+
+ if enabled postproc_visualizer; then
+ enabled postproc || die "postproc_visualizer requires postproc to be enabled"
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index