From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 5 21:30:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D03833C9 for ; Wed, 5 Mar 2014 21:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD0CEFD7 for ; Wed, 5 Mar 2014 21:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s25LU0ZR059776 for ; Wed, 5 Mar 2014 21:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s25LU0rp059774; Wed, 5 Mar 2014 21:30:00 GMT (envelope-from gnats) Resent-Date: Wed, 5 Mar 2014 21:30:00 GMT Resent-Message-Id: <201403052130.s25LU0rp059774@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christian Elmerot Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 581F4190 for ; Wed, 5 Mar 2014 21:24:01 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B05AF64 for ; Wed, 5 Mar 2014 21:24:01 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s25LO02X095161 for ; Wed, 5 Mar 2014 21:24:00 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s25LO0Gj095155; Wed, 5 Mar 2014 21:24:00 GMT (envelope-from nobody) Message-Id: <201403052124.s25LO0Gj095155@cgiserv.freebsd.org> Date: Wed, 5 Mar 2014 21:24:00 GMT From: Christian Elmerot To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/187304: multimedia/libvpx: allow building with zsh X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 21:30:00 -0000 >Number: 187304 >Category: ports >Synopsis: multimedia/libvpx: allow building with zsh >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Mar 05 21:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Christian Elmerot >Release: 10-STABLE >Organization: >Environment: >Description: Changes to libvpx have rendered it unable to be built by default using zsh. By making the port detect if zsh is installed and have the user disable EXAMPLES will enable proper building using zsh instead of bash which removes additional dependencies when zsh is already installed. There are several bash-isms in examples/gen_example_code.sh & examples/gen_example_text.sh such as short if statements, tests and printf that fails for zsh making EXAMPLES currently a no-go. ANy fixes for those files should likely be upstreamed >How-To-Repeat: $ cd /usr/ports/shells/zsh; make install $ cd /usr/ports/multimedia/libvpx; make install >Fix: $ cd /usr/ports/shells/zsh; make install Apply attached patch to Makefile for libvpx, Deselect EXAMPLES $ cd /usr/ports/multimedia/libvpx; make config; make install Patch attached with submission follows: --- Makefile.orig 2014-01-12 17:08:27.000000000 +0100 +++ Makefile 2014-03-05 22:07:23.721069292 +0100 @@ -13,7 +13,7 @@ LICENSE= BSD LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \ +BUILD_DEPENDS= ${SHELL}:${PORTSDIR}/shells/${SHELL} \ yasm:${PORTSDIR}/devel/yasm USES= gmake perl5 @@ -22,11 +22,12 @@ USE_PERL5= build USE_LDCONFIG= yes -OPTIONS_DEFINE= DEBUG POSTPROC RUNTIME THREADS SHARED +OPTIONS_DEFINE= DEBUG POSTPROC RUNTIME THREADS SHARED EXAMPLES OPTIONS_DEFAULT= POSTPROC RUNTIME THREADS SHARED POSTPROC_DESC= Enable postprocessing RUNTIME_DESC= Enable runtime CPU detection SHARED_DESC= Enable shared-library support +EXAMPLES_DESC= Build and/or install examples (requires Bash) WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} ALL_TARGET= @@ -46,9 +47,18 @@ RUNTIME_CONFIGURE_ON= --enable-runtime-cpu-detect THREADS_CONFIGURE_OFF= --disable-multithread SHARED_CONFIGURE_ON= --enable-shared +EXAMPLES_CONFIGURE_OFF= --disable-examples .include +.if ${PORT_OPTIONS:MEXAMPLES} +SHELL= bash +.elif exists(${LOCALBASE}/bin/zsh) +SHELL= zsh +.else +SHELL= bash +.endif + .if ${OSVERSION} < 900000 .if ${ARCH} == "amd64" USE_GCC= yes @@ -85,7 +95,7 @@ @${REINPLACE_CMD} -e 's|%%DESTDIR%%|${STAGEDIR}|g' \ ${WRKSRC}/build/make/Makefile ${WRKSRC}/libs.mk @${GREP} -Rl '^#!/bin/bash' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \ - -e 's,#!/bin/bash,#!/usr/bin/env bash,g' + -e 's,#!/bin/bash,#!/usr/bin/env ${SHELL},g' @${GREP} -Rl -- '-l\?pthread' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} -E \ -e 's/-l?pthread/${PTHREAD_LIBS}/g' >Release-Note: >Audit-Trail: >Unformatted: