[MacPorts] #64083: New port -- m2vrequantiser

MacPorts noreply at macports.org
Sat Dec 4 01:29:33 UTC 2021


#64083: New port -- m2vrequantiser
-----------------------------+------------------------
  Reporter:  RobK88          |      Owner:  ryandesign
      Type:  submission      |     Status:  accepted
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.7.1
Resolution:                  |   Keywords:
      Port:  m2vrequantiser  |
-----------------------------+------------------------

Comment (by ryandesign):

 Replying to [comment:9 RobK88]:
 > Thanks Ryan.  The terminology for fat or universal binaries can be
 confusing because it can mean different things.  Sometimes it means
 PPC/i386 and sometimes it means i386/x64.  But I believe Apple called
 PPC/i386 binaries "fat" binaries and 1386/x64 binaries "universal"
 binaries.  And I do not know what Apple now calls x86/ARM-Silicon
 binaries.

 "[https://en.wikipedia.org/wiki/Fat_binary#Apple Fat binary]" refers to a
 classic Mac OS executable containing both PowerPC and 68K code. "Universal
 binary" refers to a Mach-O binary or library having multiple
 architectures. Originally that was ppc and i386, though you could also see
 3- or 4-way universal binaries also having ppc7400 (G4) or ppc64 (G5)
 code. Once Intel Macs appeared, x86_64 started being added, and ppc64
 started disappearing since Rosetta didn't support ppc64. Once Rosetta
 disappeared, universal binaries were just x86_64 i386. Now that macOS no
 longer supports i386 and arm64 exists, universal is x86_64 arm64. I've
 seen Apple refer to this combination as "universal 2" just as they now
 refer to the x86_64-on-arm64 emulator as "Rosetta 2".

 > That is strange.  I was able to download the second file from the debian
 site using the proposed portfile.

 {{{
 --->  Fetching distfiles for m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 https://distfiles.macports.org/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.us.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.is.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.uk.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.fr.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.ie.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.nl.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.bg.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.es.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.ee.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.sk.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.si.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.cl.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp2.de.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.de.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.no.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.pl.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.it.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.ru.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.cz.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.se.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.fi.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.hr.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.hk.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.wa.au.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.au.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.hu.debian.org/debian/pool/main/d/m2vrequantiser
 --->  Attempting to fetch m2vrequantiser_1.1-5.debian.tar.xz from
 http://ftp.jp.debian.org/debian/pool/main/d/m2vrequantiser
 Error: Failed to fetch m2vrequantiser: The requested URL returned error:
 404 Not Found
 }}}

 But I found the file elsewhere and will fix up the port and commit it.

 > And thank you for your suggestion that I should have used `extract.only`
 to extract the second file.  But I doubt that would worked because the two
 files downloaded used two different compression schemes (gz vs.xz).  As
 you noted, Macports does not handle this situation very well.

 If you do not use `extract.only` to specify which of the distfiles to
 extract, MacPorts will try to extract all distfiles using the same method.
 On OS X 10.9 and later, it just so happens that Apple enhanced the tar
 command to accept gzip, bzip2, and xz input without the user needing to
 specify which it is, so this will work by coincidence. However, MacPorts
 was designed prior to OS X 10.9, and on OS X 10.8 and earlier, you must
 use the correct command for each compression format, otherwise the port
 will fail with an error at extract time.

 > In future releases of Macports, the developers should consider using
 tags to handle this. (e.g.  `use_xz yes:tagtwo`).

 I do not plan to do it that way; instead, I plan to have the extract phase
 automatically recognize the compression format of each distfile (possibly
 by using the `file` command to analyze the distfile's contents, or just by
 looking at its filename extension) and use the correct decompression
 command. #50969 is not exactly the ticket for this issue but is related.

 > M2VDownsizer re-encodes the mpeg-2 video files (instead of transcoding)
 which is a lot slower but yields better quality after the compression.
 The source code for M2VDownsizer was very hard to find.  But I was able to
 download it from the original developer's  website for DVDRemaster using
 the internet archive.  (The developer for DVDRemaster is no longer
 around).
 >
 > I suspect it would be easier (for the portfile) that I set up a Githiub
 repo for the M2VDownsizer source.  I have patched the source code and
 cleaned it up a bit so it will run on 64-bit Macs.  (The original source
 code was written for PPC/x86 fat binaries in mind).

 If you'd like to continue development of the project, then sure, setting
 up your own GitHub project for it makes sense. But if you just want to
 fetch the last code that existed, it's fine to program the portfile to
 fetch from archive.org. We have tons of ports that already do that, as
 many projects have disappeared over the years.

 > Unfortunately, it was set up as an xcode project.  I suspect that will
 make the portfile a little tricky (since I do not know how to change
 different compiler flags for different architectures in a xcode project
 portfile.  Different flags are needed if one want to compile the source
 for a PPC Mac.  Or maybe I should abandon PPC support).  I will see if I
 can create a Makefile instead.

 The xcode 1.0 portgroup is designed to simplify creating portfiles for
 software that builds using xcode projects.

 If you need to supply different flags for different architectures, the
 muniversal 1.0 portgroup can help with that.

-- 
Ticket URL: <https://trac.macports.org/ticket/64083#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list