From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-05.nifty.com (conssluserg-05.nifty.com [210.131.2.90]) by sourceware.org (Postfix) with ESMTPS id 5AA3E3858D3C for ; Wed, 22 Feb 2023 03:33:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5AA3E3858D3C Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from HP-Z230 (aj135041.dynamic.ppp.asahi-net.or.jp [220.150.135.41]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 31M3X8jU027708; Wed, 22 Feb 2023 12:33:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 31M3X8jU027708 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1677036788; bh=ZgPln0z2RrD3UYU/1G9TcRaJb54+NtaVnHNK43qfHYg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mVX9aPQkz91obH05OKETWEYN5wEwMhYdS13zkNDltGdkq9kjn87CBVsB1g/UVbJML pmzaxLHW/uua4Ck0cOme0wC6xqNNATUHhk1/Z2f2jv0VLT0a9Ezl7eFpPToguNlVfH hb7+IYyBS4DX9WOI/6rW5TlEdfJxS043CRDcfDXQEYo56r3I8QtWhu5XQGy1lIizg7 lNZxFKtlD6WRSg1DdiQum526ybyPW8iQaYbaxvFGcgwvlMZRIKIJsOqSanFL5zlYT9 vL66SIiuXl5Paz6vkjsTf9XN7QWD7/jF73nFslPwil0U2vlPOYEtAFMivOSRpExSsD kCwZLLfND2cOA== X-Nifty-SrcIP: [220.150.135.41] Date: Wed, 22 Feb 2023 12:33:08 +0900 From: Takashi Yano To: Cc: Jon Turney Subject: Re: [ITP] openh264 (2.3.1) Message-Id: <20230222123308.5d171a96c957cc5be9eb2500@nifty.ne.jp> In-Reply-To: <907d2252-5372-c587-5d2c-aa8637b36e54@dronecode.org.uk> References: <20230205173745.cf6aa7153ce8eae1dfd52c4c@nifty.ne.jp> <20230206142523.23a3b4b02cf8a8c5ef54b9f0@nifty.ne.jp> <20230210140531.673c73c9e3c2f8682418e803@nifty.ne.jp> <20230210141850.bfb1fbe60f09ef83d7407374@nifty.ne.jp> <20230210142534.18683ad2cd9e61e21d8fa8ab@nifty.ne.jp> <0e72ab79-fa2b-71fb-c453-3e29590ea7e4@dronecode.org.uk> <846e51c3-f96b-348a-a6aa-2b12bb74376d@Shaw.ca> <20230214181138.b1ecbd47e2ed919ed49cc714@nifty.ne.jp> <87cz6cwlv6.fsf@Otto.invalid> <20230214212801.83ead05c9df51b281e26baf4@nifty.ne.jp> <878rh0w66r.fsf@Otto.invalid> <20230215062152.474ad26d8c3b4a9bd0d2bb82@nifty.ne.jp> <20230217174959.c4172f9b903763dc58df4320@nifty.ne.jp> <3fcd159f-3925-d541-8a91-ef7431608a00@dronecode.org.uk> <20230220175514.5e7cd25af4eabfa7e0e4e1dd@nifty.ne.jp> <907d2252-5372-c587-5d2c-aa8637b36e54@dronecode.org.uk> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Wed__22_Feb_2023_12_33_08_+0900_3UdoNCxJ0_YqgI1/" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --Multipart=_Wed__22_Feb_2023_12_33_08_+0900_3UdoNCxJ0_YqgI1/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 21 Feb 2023 14:11:46 +0000 Jon Turney wrote: > On 20/02/2023 08:55, Takashi Yano via Cygwin-apps wrote: > > On Sun, 19 Feb 2023 15:37:47 +0000 > > Jon Turney wrote: > [...]>> * I don't think you should need: > >> > >>> # Install postinstall/preremove scripts > >>> mkdir -p ${D}/etc/postinstall ${D}/etc/preremove > >>> cp ${C}/lib${NAME}.postinstall ${D}/etc/postinstall/lib${NAME}.sh > >>> cp ${C}/lib${NAME}.preremove ${D}/etc/preremove/lib${NAME}.sh > >>> > >> > >> This should happen automatically if the files are in $C (and you can > >> list them in CYGWIN_FILES or make them with cygwin.patch file to put > >> them there) > > > > That's what I understood from > > https://cygwin.github.io/cygport/masterindex.html, > > however, actually libopenh264.{postinstall,preremove} are > > not installed during install process by cygport 0.36.0 > > even though openh264-2.3.1-1.cygwin.patch exists. > > > > Could you please give me a hint how I can make it work? > > Aha! This is a bug in cygport. > > (There's some code which skips over doing this for the first item in > PKG_NAMES, assuming that is always the same as PN, which has already > been done) > > Thanks for drawing that to my attention. I'll look into fixing it, but > for the moment it seems you can workaround the bug by ensuring that the > package with premove/postinstall scripts isn't first in that list, i.e.: > > - PKG_NAMES="libopenh264 libopenh264-headers" > + PKG_NAMES="libopenh264-headers libopenh264" Thanks! It works. I updated the cygport file and cygwin.patch. -- Takashi Yano --Multipart=_Wed__22_Feb_2023_12_33_08_+0900_3UdoNCxJ0_YqgI1/ Content-Type: text/plain; name="openh264.cygport" Content-Disposition: attachment; filename="openh264.cygport" Content-Transfer-Encoding: 7bit NAME="openh264" VERSION=2.3.1 RELEASE=1 CATEGORY="Video" SUMMARY="H.264 codec library by Cisco" DESCRIPTION="OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC. The binary library (runtime) itself will be downloaded from http://ciscobinary.openh264.org/" HOMEPAGE="https://www.openh264.org/" LICENSE="BSD-2-Clause" ARCH="noarch" # This is noarch because it's just header files and shell scrpits. SRC_URI="${NAME}-headers-${VERSION}.tar.xz" # Make dummy source file for prep if the cleaned one is not exist. if [ ! -f ${SRC_URI} ] then mkdir -p ${NAME}-${VERSION} tar acf ${SRC_URI} ${NAME}-${VERSION} rm -rf ${NAME}-${VERSION} fi CYGPORT_USE_UNSTABLE_API=1 src_unpack_hook() { if [ $(tar tvf ../../../${SRC_URI} | wc -l) -eq 1 ] # Source file is dummy then NV=${NAME}-${VERSION} pushd .. # Download original source file. wget -q https://github.com/cisco/openh264/archive/refs/tags/v${VERSION}.tar.gz -O - | tar xzf - # Make source tarball file which has only necessary header files. tar acf ../../${NAME}-headers-${VERSION}.tar.xz ${NV}/codec/api/wels/*.h # Update source directory. rm -rf ${NV} tar xf ../../${NAME}-headers-${VERSION}.tar.xz popd fi } PKG_NAMES="libopenh264-headers libopenh264" libopenh264_CATEGORY="Video Libs" libopenh264_CONTENTS="etc/ usr/share/" libopenh264_REQUIRES="wget bzip2" libopenh264_SUMMARY="H.264 codec library runtime by Cisco" libopenh264_headers_CATEGORY="Video Devel" libopenh264_headers_CONTENTS="usr/include" libopenh264_headers_SUMMARY="H.264 codec library headers" src_compile() { : } src_install() { mkdir -p ${D}/usr/include ln -fs ${S}/codec/api/wels ${D}/usr/include/. # Get license file mkdir -p ${D}/usr/share/doc/lib${NAME} if ! wget -q http://www.openh264.org/BINARY_LICENSE.txt -O - > ${D}/usr/share/doc/lib${NAME}/BINARY_LICENSE.txt then echo "Need internet access!!!" exit 1 fi mkdir -p ${D}/etc/lib${NAME} # Make sha256 hash wget -q http://ciscobinary.openh264.org/${NAME}-${VERSION}-win64.dll.bz2 -O - | bunzip2 | sha256sum | sed "s/-$/${NAME}-${VERSION}-win64.tmp/" > ${D}/etc/lib${NAME}/${NAME}-${VERSION}-win64.dll.sha256 wget -q http://ciscobinary.openh264.org/${NAME}-${VERSION}-win32.dll.bz2 -O - | bunzip2 | sha256sum | sed "s/-$/${NAME}-${VERSION}-win32.tmp/" > ${D}/etc/lib${NAME}/${NAME}-${VERSION}-win32.dll.sha256 # Make version text echo ${VERSION} > ${D}/etc/lib${NAME}/version.txt } --Multipart=_Wed__22_Feb_2023_12_33_08_+0900_3UdoNCxJ0_YqgI1/ Content-Type: text/plain; name="openh264-2.3.1-1.cygwin.patch" Content-Disposition: attachment; filename="openh264-2.3.1-1.cygwin.patch" Content-Transfer-Encoding: 7bit --- origsrc/openh264-2.3.1/CYGWIN-PATCHES/libopenh264.postinstall 1970-01-01 09:00:00.000000000 +0900 +++ src/openh264-2.3.1/CYGWIN-PATCHES/libopenh264.postinstall 2023-02-17 12:36:27.633701700 +0900 @@ -0,0 +1,18 @@ +if [ $(uname -m) = "x86_64" ] +then + POSTFIX="win64" +else + POSTFIX="win32" +fi +VERSION=$(cat /etc/libopenh264/version.txt) +cd /tmp +wget -q http://ciscobinary.openh264.org/openh264-${VERSION}-${POSTFIX}.dll.bz2 -O - | bunzip2 > openh264-${VERSION}-${POSTFIX}.tmp +if sha256sum --status -c /etc/libopenh264/openh264-${VERSION}-${POSTFIX}.dll.sha256 +then + mv openh264-${VERSION}-${POSTFIX}.tmp /usr/bin/libopenh264.dll +else + # Hash mismatch (or failed to download) + rm openh264-${VERSION}-${POSTFIX}.tmp + exit 1 +fi +chmod a+x /usr/bin/libopenh264.dll --- origsrc/openh264-2.3.1/CYGWIN-PATCHES/libopenh264.preremove 1970-01-01 09:00:00.000000000 +0900 +++ src/openh264-2.3.1/CYGWIN-PATCHES/libopenh264.preremove 2023-02-17 12:14:05.806697700 +0900 @@ -0,0 +1 @@ +rm -f /usr/bin/libopenh264.dll --Multipart=_Wed__22_Feb_2023_12_33_08_+0900_3UdoNCxJ0_YqgI1/--