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: Mon, 15 Feb 2016 21:23:32 -0600 (CST)
The following patches were derived from partial diffs between the
respective files in libvpx 1.4 and 1.5. As such, I've kept them
in my ${LOCALPATCHES}/multimedia/libvpx directory and should be
applied similarly.
+--- configure.orig1 2016-02-05 19:20:02.629320210 -0600
++++ configure 2016-02-05 20:00:11.433584433 -0600
+@@ -111,6 +111,12 @@ all_platforms="${all_platforms} armv7-wi
+ all_platforms="${all_platforms} armv7s-darwin-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"
+@@ -154,6 +160,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
+@@ -219,6 +232,8 @@ ARCH_LIST="
+ mips
+ x86
+ x86_64
++ ppc32
++ ppc64
+ "
+ ARCH_EXT_LIST="
+ edsp
+@@ -239,6 +254,8 @@ ARCH_EXT_LIST="
+ sse4_1
+ avx
+ avx2
++
++ altivec
+ "
+ HAVE_LIST="
+ ${ARCH_EXT_LIST}
+@@ -418,8 +435,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=""
+@@ -564,6 +595,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"
+--- build/make/configure.sh.orig1 2016-02-05 19:20:01.887740123 -0600
++++ build/make/configure.sh 2016-02-05 20:21:14.514915812 -0600
+@@ -403,7 +403,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}"
+@@ -661,6 +661,12 @@ process_common_toolchain() {
+ *i[3456]86*)
+ tgt_isa=x86
+ ;;
++ *powerpc64*)
++ tgt_isa=ppc64
++ ;;
++ *powerpc*)
++ tgt_isa=ppc32
++ ;;
+ *sparc*)
+ tgt_isa=sparc
+ ;;
+@@ -668,6 +674,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
+@@ -760,7 +774,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}"
+@@ -1119,6 +1133,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*)
+@@ -1281,7 +1318,7 @@ EOF
+ ;;
+ esac
+ ;;
+- *-gcc|generic-gnu)
++ universal*|*-gcc|generic-gnu)
+ link_with_cc=gcc
+ enable_feature gcc
+ setup_gnu_toolchain
--
|/"\ 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